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
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Tue Jun 25, 2002 8:00 am   

Doesn't seem to want to work
 
i use this trigger #trigger {~( (%n)~) a faith token} {#%1 eat token} for this line ( 4) a faith token whats wrong with my trigger?, it doesnt seem to wanna work

Apollyon
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jun 25, 2002 9:06 am   
 
#trigger {~( (%n)~) a faith token} {#%1 {eat token}}

That's what I use in that circumstance. Haven't read the help file to
as why one works but not the other.

Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Tue Jun 25, 2002 7:22 pm   
 
thanks it works now
Reply with quote
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Sun Jun 30, 2002 4:03 am   
 
Ok new probelm akin to the old one

#trigger {~( (%n)~) a faith token} {#%1 eat token}
works for a token count < 10

for a token count of >9 tho it doesnt

i then make the trigger into
#trigger {~((%n)~) a faith token} {#%1 eat token}
because for >9 the line is
(10) a faith token
but then its doesnt work for <10 cause for <10 the line is still
( 4) a faith token
with the space and
# 4 eat token doesnt seem to want to work

is there a way i can use 1 trigger for both the case where there is the space and the case where there isnt?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jun 30, 2002 4:38 am   
 
Why bother? It's much easier to just make two triggers. As you've already pointed out, only one of them will trigger for any particular number.

LightBulb
Senior Member
Reply with quote
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Sun Jun 30, 2002 6:06 am   
 
I was wondering if there is a way to do a single trigger to do it
Reply with quote
wilh
Wanderer


Joined: 08 Feb 2001
Posts: 89
Location: USA

PostPosted: Sun Jun 30, 2002 9:35 am   
 
Use the %trim function. It will remove the spaces. I haven't tested that with the #num syntax, however, so you may need to use the #LOOP command to make it work.

#TRIGGER {blah blah} {#LOOP {%trim(%1)} {do whatever...}}

Wil

Wil Hunt
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jun 30, 2002 4:23 pm   
 
The easiest way is probably to ignore the text that precedes the number, since you aren't using it.
#TR {(%d)~) a faith token} {#%1 {eat token}}

LightBulb
Senior Member
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Jul 01, 2002 8:05 pm   
 
#trigger {{~( |~(}(%n)~) a faith token} {#%1 {eat token}}

If you wanted to make a "choice" in a trigger
compare you would do something like that.

Ton Diening
Providing untested answers that tend to be
more complicated than others.
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