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
Errol
Newbie


Joined: 12 May 2003
Posts: 1

PostPosted: Mon May 12, 2003 3:47 am   

Things at beginning of trigs?
 
what is the thing that you put at the beginning of a trig that will make it so it will go off even though anything can be infront of it?

ie:
here 's trig
#TR {(%1)hp, (%2)mv} {get cher bag;wear cher}

but the prompt could have %$^% or anything like that in front of it... do I put anything in front of it to make it go off?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon May 12, 2003 4:42 am   
 
quote:

what is the thing that you put at the beginning of a trig that will make it so it will go off even though anything can be infront of it?

ie:
here 's trig
#TR {(%1)hp, (%2)mv} {get cher bag;wear cher}

but the prompt could have %$^% or anything like that in front of it... do I put anything in front of it to make it go off?



First, do not use %1...%99 within the trigger pattern. Instead use proper pattern-matching symbols like %d (matches any one-word combination of numbers only), %w (matches any one-word combination of letters only), %a (matches any one-word combination of letters and numbers only), or %x (matches any one-word combination of letters, numbers, and symbolic characters such as punctuation). There are several other operators, which you can learn about in the help file under Pattern Matching.

Based on your given trigger, I suspect the conversion from %1...%99 to %d and other proper pattern-matching expressions will solve all your problems, since your trigger is in no way anchored to the beginning or the ending of the line. If it is not so anchored, ZMud could care less whether there are things in front of or behind the pattern.

li'l shmoe of Dragon's Gate MUD
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