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
qdly
Beginner


Joined: 26 Jun 2009
Posts: 13

PostPosted: Thu Jan 20, 2011 9:42 pm   

wildcard string list to variable, in trigger, question
 
that's another small problem i'm trying to solve, without result so far, mud ouput can be:

Quote:
u feel good
u feel bad
u feel whatever...


i need trigger that will fire for good and bad, but not for 'whatever...' and other output, and will let me use that word in script as %1, so, i thought i will try something like
Code:
*u feel {bad|good}*

it fires only when i want it to, but doesn't assign bad/good to %1, any suggestions?

Thanks

edit:typo
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jan 20, 2011 10:11 pm   
 
read the help file on pattern matching.
_________________
EDIT: I didn't like my old signature
Reply with quote
qdly
Beginner


Joined: 26 Jun 2009
Posts: 13

PostPosted: Thu Jan 20, 2011 11:55 pm   
 
i'v actually checked it, but not much about it ther {a|b|c} is from that help u mentioned, that &{bad|good} will set %1 as 'u feel', not 'good' or 'bad' (v 2.37, maybe it was corrected?)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jan 21, 2011 2:05 am   
 
Quote:

i'v actually checked it, but not much about it ther {a|b|c} is from that help u mentioned, that &{bad|good} will set %1 as 'u feel', not 'good' or 'bad' (v 2.37, maybe it was corrected?)


You know, when someone tells you to go do something it generally means they know the answer and where to find the info in the helpfile. This means that if you STILL cannot figure it out you need to reread the helpfile to figure out what you missed (hint: the answer is used in this very sentence).
_________________
EDIT: I didn't like my old signature
Reply with quote
DraxDrax
Apprentice


Joined: 22 Mar 2009
Posts: 149

PostPosted: Fri Jan 21, 2011 4:01 am   
 
Enclose what you would like to have passed as an argument in brackets ()

In this case, that means the trigger pattern would be:
Code:
u feel ({bad|good})
Reply with quote
qdly
Beginner


Joined: 26 Jun 2009
Posts: 13

PostPosted: Fri Jan 21, 2011 10:37 am   
 
thanks :]
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