ec3 @verb #1247:"draw_map" this none this rxdo #8219 @program #1247:"draw_map" this none this map = {{this.you_are_here}} x_coord = 1 y_coord = 1 exit_num = 1 for exit in (args[1]) try for x in (`exit.location:exits() ! ANY => {}') if (x.name == "north" && `map[y_coord - 1][x_coord] == " " ! ANY => 1') map = this:padt(map) map[y_coord][x_coord] = this.v_street_unused y_coord = y_coord + 1 elseif (x.name == "south" && `map[y_coord + 1][x_coord] == " " ! ANY => 1') map = this:padb(map) map[y_coord + 1][x_coord] = this.v_street_unused elseif (x.name == "east" && `map[y_coord][x_coord + 1] == " " ! ANY => 1') map = this:padr(map) map[y_coord][x_coord + 1] = this.h_street_unused elseif (x.name == "west" && `map[y_coord][x_coord - 1] == " " ! ANY => 1') map = this:padl(map) map[y_coord][x_coord] = this.h_street_unused x_coord = x_coord + 1 elseif (x.name == "northwest" && `map[y_coord - 1][x_coord - 1] == " " ! ANY => 1') map = this:padl(this:padt(map)) map[y_coord][x_coord] = this.building x_coord = x_coord + 1 y_coord = y_coord + 1 elseif (x.name == "northeast" && `map[y_coord - 1][x_coord + 1] == " " ! ANY => 1') map = this:padr(this:padt(map)) map[y_coord][x_coord + 1] = this.building y_coord = y_coord + 1 elseif (x.name == "southwest" && `map[y_coord + 1][x_coord - 1] == " " ! ANY => 1') map = this:padl(this:padb(map)) map[y_coord + 1][x_coord] = this.building x_coord = x_coord + 1 elseif (x.name == "southeast" && `map[y_coord + 1][x_coord + 1] == " " ! ANY => 1') map = this:padr(this:padb(map)) map[y_coord + 1][x_coord + 1] = this.building endif $command_utils:suspend_if_needed(0) endfor except (ANY) endtry if (exit.name == "north") map = this:padt(this:padt(this:padt(map))) map[y_coord][x_coord] = tostr(exit_num)[1] map[y_coord + 1][x_coord] = this.v_street map[y_coord + 2][x_coord] = this.v_street elseif (exit.name == "south") map = this:padb(this:padb(this:padb(map))) map[y_coord + 3][x_coord] = tostr(exit_num)[1] map[y_coord + 2][x_coord] = this.v_street map[y_coord + 1][x_coord] = this.v_street y_coord = y_coord + 3 elseif (exit.name == "east") map = this:padr(this:padr(this:padr(this:padr(map)))) map[y_coord][x_coord + 1] = this.h_street map[y_coord][x_coord + 2] = this.h_street map[y_coord][x_coord + 3] = this.h_street map[y_coord][x_coord + 4] = tostr(exit_num)[1] x_coord = x_coord + 4 elseif (exit.name == "west") map = this:padl(this:padl(this:padl(this:padl(map)))) map[y_coord][x_coord + 3] = this.h_street map[y_coord][x_coord + 2] = this.h_street map[y_coord][x_coord + 1] = this.h_street map[y_coord][x_coord] = tostr(exit_num)[1] elseif (exit.name == "northeast") map = this:padr(this:padt(map)) map[y_coord][x_coord + 1] = tostr(exit_num)[1] x_coord = x_coord + 1 elseif (exit.name == "northwest") map = this:padl(this:padt(map)) map[y_coord][x_coord] = tostr(exit_num)[1] elseif (exit.name == "southwest") map = this:padl(this:padb(map)) map[y_coord + 1][x_coord] = tostr(exit_num)[1] y_coord = y_coord + 1 elseif (exit.name == "southeast") map = this:padr(this:padb(map)) map[y_coord + 1][x_coord + 1] = tostr(exit_num)[1] x_coord = x_coord + 1 y_coord = y_coord + 1 endif $command_utils:suspend_if_needed(0) exit_num = exit_num + 1 endfor return this:pack(map) "Last modified by Avenger (#8219) on Mon Sep 9 23:01:27 2002 MDT." . 0