Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Obiji
Newbie


Joined: 18 Nov 2002
Posts: 1
Location: USA

PostPosted: Mon Nov 18, 2002 8:23 pm   

Help with multi-line triggers
 
Ok, so heres the deal, in my mud, you can "scan" for directions, it will show "right here" "nearby direction" "not far direction" and "far off direction" and under those directions it will show the monster or any special token.
EX:
Nearby North:
- BigBadMonster
- Something Shiny
- ReallyWeakMonster
Nearby East:
etc...etc..etc..
i know that in my trigger if I do:
Nearby North:$ - Something shiny
n;get all

that that will work, but what if the item is underneath a monster name, or two monster names? how do I get that to work?
Nearby North:$$$$$$$ - Something Shiny
n;get all
that doesnt seem to work, any suggestions?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Nov 18, 2002 11:59 pm   
 
The easiest method is to use an alias, several triggers, and a class. Something along these lines:
#AL scan {#VAR dir {};#VAR distance 0;#T+ scan;~scan}
#CLASS scan disable
#TR {Nearby (%w)} {#VAR dir %1;#VAR distance 1}
#TR {Not far (%w)} {#VAR dir %1;#VAR distance 2}
#TR {Far off (%w)} {#VAR dir %1;#VAR distance 3}
#TR {- Something Shiny} {#T- scan;#IF (@distance = 1) {@dir};#IF (@distance = 2) {@dir;@dir};#IF (@distance = 3) {@dir;@dir;@dir};get all}
#TR {- (*)} {#IF ("%1" <> "Something Shiny") {#T- scan;#IF (@distance = 1) {@dir};#IF (@distance = 2) {@dir;@dir} #IF (@distance = 3) {@dir;@dir;@dir};kill %1}}
#CLASS 0
#T- scan


LightBulb
Senior Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net