3
# This script will write (to stdout) all the needed exits to connect maps
4
# in a tiled fashion. The variables at the start will need to be set
7
# Set these as appropriate to the maps it should connect to. If one is left
8
# blank, then exits for that direction will not be created.
10
$NORTHWEST="world_b2";
20
# DELTA What the overlap is - it should always be 5 for smooth transitions
24
# End of configurable options.
25
# Quick reminder - hp is the destination x, sp is the destination y
27
# Lets do the corners first
28
if ($NORTHWEST ne "") {
30
print "slaying $NORTHWEST\n";
33
print "hp ".($WIDTH-$DELTA-1)."\n";
34
print "sp ".($HEIGHT-$DELTA-1)."\n";
37
if ($SOUTHWEST ne "") {
39
print "slaying $SOUTHWEST\n";
41
print "y ".($HEIGHT-$DELTA)."\n";
42
print "hp ".($WIDTH-$DELTA-1)."\n";
43
print "sp ".($DELTA+1)."\n";
46
if ($SOUTHEAST ne "") {
48
print "slaying $SOUTHEAST\n";
49
print "x ".($WIDTH-$DELTA)."\n";
50
print "y ".($HEIGHT-$DELTA)."\n";
51
print "hp ".($DELTA+1)."\n";
52
print "sp ".($DELTA+1)."\n";
55
if ($NORTHEAST ne "") {
57
print "slaying $NORTHEAST\n";
58
print "x ".($WIDTH-$DELTA)."\n";
59
print "y ".$DELTA."\n";
60
print "hp ".($DELTA+1)."\n";
61
print "sp ".($HEIGHT-$DELTA-1)."\n";
65
# Now lets do the edges.
69
while ($x < ($WIDTH-$DELTA-1)) {
71
print "slaying $NORTH\n";
73
print "y ".$DELTA."\n";
75
print "sp ".($HEIGHT-$DELTA-1)."\n";
83
while ($x < ($WIDTH-$DELTA-1)) {
85
print "slaying $SOUTH\n";
87
print "y ".($HEIGHT-$DELTA)."\n";
89
print "sp ".($DELTA+1)."\n";
98
while ($y < ($HEIGHT-$DELTA-1)) {
100
print "slaying $WEST\n";
101
print "x ".$DELTA."\n";
103
print "hp ".($WIDTH-$DELTA-1)."\n";
113
while ($y < ($HEIGHT-$DELTA-1)) {
115
print "slaying $EAST\n";
116
print "x ".($WIDHT-$DELTA)."\n";
118
print "hp ".($DELTA_1)."\n";