start of flee stuff, it works if you flee into a lit room with no hidden exits

master
rascul 3 years ago
parent 155b2e2280
commit 9ead4e84c8

@ -1,6 +1,8 @@
#map flag nofollow off #map flag nofollow off
#map flag direction off #map flag direction off
#map flag static on #map flag static on
#map flag vtmap off
#map flag unicodegraphics on
#unpathdir n #unpathdir n
#unpathdir s #unpathdir s
@ -11,10 +13,10 @@
#list dirs create #list dirs create
#action {~\e[0m\e[36m%1$} {#regex {%1} {%w speaks from the %*} {#line {log} {.wotmud-comms}} {room %1}} {1} #action {~\e[36m%1$} {#regex {%1} {%w speaks from the %*} {#line {log} {.wotmud-comms}} {roomname {%1}}} {1}
#action {^[ obvious exits: %1 ]$} {exits %1;dirmove} {1} #action {^[ obvious exits: %1 ]$} {roomexits {%1};dirmove} {1}
#action {^[ obvious exits: ]$} {exits {};dirmove} {1} #action {^[ obvious exits: ]$} {roomexits {};dirmove} {1}
#action {~%1 HP:%2 MV:%3 > \e[36m%4$} {#regex {%4} {%w speaks from the %*} {#nop} {room %4}} {1} #action {~%1 HP:%2 MV:%3 > \e[36m%4$} {#regex {%4} {%w speaks from the %*} {#nop} {roomname {%4}}} {1}
#action {It is pitch black...} {dirmove} {1} #action {It is pitch black...} {dirmove} {1}
#action {Alas, you cannot go that way...} {dirpop} {1} #action {Alas, you cannot go that way...} {dirpop} {1}
@ -53,11 +55,54 @@
#alias dirget #list dirs get 1 dir #alias dirget #list dirs get 1 dir
#alias dirpop {#list dirs size dirsize;#if {$dirsize == 0} {#nop} {#list dirs delete 1}} #alias dirpop {#list dirs size dirsize;#if {$dirsize == 0} {#nop} {#list dirs delete 1}}
#alias dirmove {dirget;#if {"$dir" !== "0"} {dirpop;#if {"$dir" !== "l"} {#map move $dir;showmap}}} #alias dirmove {dirget;#if {"$dir" !== "0"} {dirpop;#if {"$dir" !== "l"} {#if {"$dir" == "f"} {doflee}; #else {domove}}}}
#alias domove {#map get roomvnum lastroom;#map move $dir;#map get roomvnum currentroom;showmap}
#alias exits #var exits %1
#alias room #var room %1 #alias doflee {
#map get roomvnum lastroom;
#map get {roomexits} {lastexits} {$lastroom};
#foreach {$lastexits[%+]} {vnum} {
#map get {roomname} {exitname} {$vnum};
#if {"$exitname" == "$roomname"} {
#map get {roomexits} {foundexits} {$vnum};
#list currentroomexits create;
#parse {$roomexits} {pexit} {
#if {"$pexit" != " "} {
#format {pexit} {%l} {$pexit};
#list currentroomexits add {$pexit};
}
};
#foreach {$currentroomexits[%+]} {cre} {
#var roommatch true;
#if {"$foundexits[$cre]" == ""} {
#var roommatch false;
};
#else {
#unvar {foundexits[$cre]};
};
};
#if {"$roommatch" == "true" && &foundexits[%+] == 0} {
#map get roomvnum lastroom;
#map goto {$vnum};
#map get roomvnum currentroom;
showmap;
#break;
}
}
}
}
#alias roomexits #var roomexits %1
#alias roomname {
#regex {%1} {%+} {
#line substitute variables #line strip #var {roomname} {%1}
};
#else {
#var roomname
}
}
#alias n {#send north;dirpush n} #alias n {#send north;dirpush n}
@ -66,13 +111,17 @@
#alias w {#send west;dirpush w} #alias w {#send west;dirpush w}
#alias u {#send up;dirpush u} #alias u {#send up;dirpush u}
#alias d {#send down;dirpush d} #alias d {#send down;dirpush d}
#alias l {#send look;dirpush l} #alias l {#send look %1;dirpush l}
#alias l {#regex {%1} {%+} {#send look %1} {#send look}}
#alias f {#send flee;dirpush f}
#alias flee {#send flee;dirpush f}
#alias dirstack {#var dirs} #alias dirstack {#var dirs}
#alias dirclear {#list dirs create} #alias dirclear {#list dirs create}
#var maprows 19 #var maprows 30
#var mapcols 60 #var mapcols 60
#var mapout map.out #var mapout map.out

Loading…
Cancel
Save