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
Articnal
Apprentice


Joined: 19 Jan 2002
Posts: 107

PostPosted: Sun Oct 19, 2003 12:31 pm   

Complex trigger
 
Hi.
Im afraid this must be answered anywhere,but i have being searching on the database for 1 hour and didnt get it...

Ill put the example of what i need with a simple triggeR:

#trigger {(%w) (%w) (%w) is here.} {#if ({%1|%2|%3}=(corpse|fountain|blood)) {} {#echo atack}}

Id like this trigger to #echo atack whenever any of the 3 words is corpse,fountain,or blood,but this trigger i did doesnt work.

Any idea?
Reply with quote
Articnal
Apprentice


Joined: 19 Jan 2002
Posts: 107

PostPosted: Sun Oct 19, 2003 12:45 pm   
 
Ok i found out the way:
#trigger {(%w) (%w) (%w) is here.} {#if ({"%1"|"%2"|"%3"}=~ {"corpse"|"fountain"|"blood"}) {} {#echo atack}}

the only problem is that now it will fire when similar words are there too,for example, bloodlust or things like that will fire it,how to prevent them from doing so?
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Sun Oct 19, 2003 1:44 pm   
 
Add a space before and after the trigger words, eg: " blood "

Arcane
Reply with quote
Articnal
Apprentice


Joined: 19 Jan 2002
Posts: 107

PostPosted: Sun Oct 19, 2003 2:13 pm   
 
=) tnx
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 19, 2003 4:42 pm   
 
#TR {( %w %w %w )is here.} {#IF ("%1" =~ { corpse | fountain | blood }) {#ECHO attack}}
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