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
Cbisazza
Wanderer


Joined: 27 Feb 2003
Posts: 69
Location: Australia

PostPosted: Sat Jan 24, 2004 4:09 pm   

Tagging lines
 
Is there a way of tagging lines so that you can then trigger on them?

i.e. I want to do something like ...

#TRIGGER {{a|number|of|combinations}} {act}

however, all the strings in this trigger are defined in more detail elsewhere (because of the limitations of the variable list syntax).

I tried something like :

#TRIGGER {a} {#SUB {* $0}}
#TRIGGER {~*} {act}

but this seems to work at times, but not at others. There does not seem to be a way of ensuring which trigger gets executed first.

Any better ideas?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 24, 2004 5:19 pm   
 
Because #SUB triggers require special handling, it's probably best to use two triggers. They can either be placed in separate classes or be given separate IDs to prevent them from overwriting each other.
#TR a1 {a} {#SUB * $0}
#TR a2 {a} {act}

zMUD Help clearly states, and even emphasizes, that substituted strings are not processed by further triggers.
Reply with quote
Cbisazza
Wanderer


Joined: 27 Feb 2003
Posts: 69
Location: Australia

PostPosted: Sat Jan 24, 2004 7:24 pm   
 
>zMUD Help clearly states, and even emphasizes, that substituted strings are not processed by further triggers.

Interesting. From my experiments they are - it does not match ALL of them, but it does match a significant percentage.

===

As far what I'm looking for goes, I am looking for a way of implementing triggers easy over a lot of 'clutter' lines. The reason I'm going for a string list rather than an alias is that it is more flexible (can be used in advanced triggers).
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