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
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Tue Nov 17, 2009 3:59 am   

Funky trigger matching
 
Ok, so I'm trying to create an Identify trigger, and I'm having an issue when it comes to the wearable slots. The code as follows:

Code:
#var validslots {amulet|arm|belt|bracelet|cloak|finger|foot|hand|head|held|leg|neck|tail|torso}
#TRIGGER {({@validslots}){.|,| and}} {#var idslots %additem(%1,@idslots)} "Identify"


When applied to this pattern:

It takes the following slots: torso, leg, leg, foot, foot, arm, arm, hand and
hand.

The following is only produced:

Variable: + idslots (StringList) torso|hand

Anyone have an idea why it isn't matching all the patterns in that line? I.e., idslots=torso|leg|leg|foot|foot|arm|arm|hand|hand?

Sorry for the noob question, and thanks in advance for the help.
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Nov 17, 2009 4:51 am   
 
Do you have the repeat within line option checked? If not, the stringlist will only match one item at a time. Since it looks like you have a 2-line pattern there, the trigger matched on "torso," for the first line and then "hand." for the second line.
_________________
EDIT: I didn't like my old signature
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Tue Nov 17, 2009 4:54 am   
 
Oh interesting. Works like a charm. Been using CMUD for over a year and still finding new things every day. :)
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
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