hwired Newbie
Joined: 08 Nov 2006 Posts: 5
|
Posted: Wed Nov 08, 2006 2:14 pm
Need help with enemy scanner |
hey guys ive recently converted from wintin to zmud (about time) and im trying to setup previous triggers provided for me for wintin...
this is the original trigger sciprt
Code: |
#if {$message==0} {#message {variable};#var message 1}
#var stopscan {0}
#var count {0}
#alias {relist} {#match lt tt {+* %0 %1 *+} {1};#match mt lt {1} {1}}
#alias {NEWcollect} {#if {[$mt]==[]} {#var stopscan 1};#var checkstring $mt;loopit}
#alias {loopit} {#if {$stopscan==0} {#loop {$checkstring} {#math count {$count+1}}}}
#alias {dxa} {relist;NEWcollect;#math count {$count+1};#if {[$mt]==[]} {#math count {$count-1}};#if {[$mt]==[1]} {#math count {$count-1}};#if {[$pt]==[1]} {#math count {$count-1}}}
#alias {backlist} {#match pt line {%0 and +* %1 %2 *+ are %3} {1}}
#alias {frontlist} {#match tt line {+* %0 %1 *+} {+* %0 %1 *+}}
#alias {dir} {#match dir line {%0 and %1 are %2 from here.} {%2};dirchecki;dircheckii;dircheckiii}
#alias {dirsolo} {#match dir line {+* %0 %1 *+ is %2 from here.} {%2};dirchecki;dircheckii;dircheckiii}
#alias {trysolo} {#match tt line {+* %0 %1 *+ is %2} {1};dirsolo;#if {[$tt]=[1]} {#math count 1}}
#alias {dirchecki} {#if {[$dir]==[pretty close by north]} {#var dirf {1 NORTH};#math t 1};#if {[$dir]==[pretty close by south]} {#var dirf {1 SOUTH};#math t 1};#if {[$dir]==[pretty close by east]} {#var dirf {1 EAST};#math t 1};#if {[$dir]==[pretty close by west]} {#var dirf {1 WEST};#math t 1};#if {[$dir]==[pretty close by up]} {#var dirf {1 UP};#math t 1};#if {[$dir]==[pretty close by down]} {#var dirf {1 DOWN};#math t 1}}
#alias {dircheckii} {#if {[$dir]==[fairly far off north]} {#var dirf {2 NORTH};#math t 1};#if {[$dir]==[fairly far off south]} {#var dirf {2 SOUTH};#math t 1};#if {[$dir]==[fairly far off east]} {#var dirf {2 EAST};#math t 1};#if {[$dir]==[fairly far off west]} {#var dirf {2 WEST};#math t 1};#if {[$dir]==[fairly far off up]} {#var dirf {2 UP};#math t 1};#if {[$dir]==[fairly far off down]} {#var dirf {2 DOWN};#math t 1}}
#alias {dircheckiii} {#if {[$dir]==[a long ways off north]} {#var dirf {3 NORTH};#math t 1};#if {[$dir]==[a long ways off south]} {#var dirf {3 SOUTH};#math t 1};#if {[$dir]==[a long ways off east]} {#var dirf {3 EAST};#math t 1};#if {[$dir]==[a long ways off west]} {#var dirf {3 WEST};#math t 1};#if {[$dir]==[a long ways off up]} {#var dirf {3 UP};#math t 1};#if {[$dir]==[a long ways off down]} {#var dirf {3 DOWN};#math t 1}}
#alias scanline {#var t 0;#unvar lt;#unvar pt;#unvar tt;#math count 0;trysolo;#if {[$tt]==[]} {backlist;frontlist;dxa;#if {[$pt]==[1]} {#math count {$count+1}};dir};#math stopscan 0}
#alias reportscan {#if {$count!=0} {#if {$t==1} {$chan ----> $count DARKIES $dirf <----;#math stopscan 0;#var rest .;#unvar mt;#unvar checkstring}}
#action {^%0 from here.} {#var line {%%0 from here.};#var sub {.};#var rest {.};scanline;reportscan}
#action {A strange buzzing sound comes close.} {gt ----> ADVANCED INVIS enters the ROOM <----}
#alias teststring {#show +* A Darkie *+, +* A Darkie *+, +* A Darkie *+, a mob and +* A Darkie *+ are fairly far off north from here.}
|
---------------------------------------------------------
using testring the only output I get is "$t==1"
this is the mud output of a scan when enemies are in
+* A Darkie *+, +* A Darkie *+, +* A Darkie *+, a mob and +* A Darkie *+ are fairly far off north from here
rooms are pretty close (1) , fairly far of off (2) long ways (3)
so i want the output to be 'gtell (number) of darkies (rooms) (direction of here'
any help would be greatly appreciated |
|