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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Mon Jul 23, 2012 7:34 pm   

#IF firing on multiple things.
 
How can I get an #IF to fire on multiple words, in my example I have a trigger to remove 'tells' from the game window by a #GAG and paste them into the communications window. However the shopkeepers in the game also use the tell command, so to stop spam I don't want it to fire on those... this is what I have already:

Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="34621" regex="true" copy="yes">
    <pattern>(.+) tells you:</pattern>
    <value>#IF %1=(Eamon|Laryn|Alexa|Alazif|Zaban\Samir) {} {#VAR Reply %1;#CAPTURE TellHist;#GAG}</value>
  </trigger>
</cmud>


I know I am doing something right because the trigger doesn't fire when Eamon sends me a tell (The first in the list), I think I just need to study my special characters, but I can't find any documents about them.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Mon Jul 23, 2012 8:58 pm   
 
you want %ismember for that

#IF (%ismember(%1, "Eamon|Laryn|Alexa|Alazif|Zaban|Samir")) {} {#VAR Reply %1;#CAPTURE TellHist;#GAG}
_________________
Discord: Shalimarwildcat
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Mon Jul 23, 2012 9:12 pm   
 
Perfect, thanks!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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