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


Joined: 06 Jan 2004
Posts: 13
Location: Canada

PostPosted: Tue Jan 20, 2004 1:54 am   

trigger problems?
 
How do I set up a trigger so that it goes off whenever a number received from the mud is below a certain value? eg: I want the trigger to go off whenever I get below 17 in this string "You only scored %d." How do I do this? Pls&Thx!

-Chim
Reply with quote
musishun00
Wanderer


Joined: 16 Dec 2003
Posts: 77
Location: USA

PostPosted: Tue Jan 20, 2004 2:01 am   
 
#TRIGGER {You only scored (%n)} {#IF (%1<17) {TRUE VALUE HERE} {FALSE VALUE HERE}}

That ought to work.
Reply with quote
Chim
Beginner


Joined: 06 Jan 2004
Posts: 13
Location: Canada

PostPosted: Tue Jan 20, 2004 2:18 am   
 
Thanks for your reply, but I can't seem to apply that to my text. Here's exactly what I want to do. I get this text from the mud(%d is a number and %s is a bunch of spaces):

%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%sKeep these? :%s

So how do I write a trigger that will exicute a command if these numbers are below certain values? Pls&Thx!

-Chim
Reply with quote
musishun00
Wanderer


Joined: 16 Dec 2003
Posts: 77
Location: USA

PostPosted: Tue Jan 20, 2004 2:42 am   
 
#TRIGGER {%s(%n)%s(%n)%s(%n)%s(%n)%s(%n)%s(%n)%s(%n)%s(%n)%s(%n)%sKeep these? :%s} {#IF (%1<17) {TRUE HERE} {FALSE HERE};#IF (%2<17) {TRUE HERE} {FALSE HERE};#IF (%3<17) {TRUE HERE} {FALSE HERE};etc.}

Try that, and see if it works.
Reply with quote
Chim
Beginner


Joined: 06 Jan 2004
Posts: 13
Location: Canada

PostPosted: Tue Jan 20, 2004 3:14 am   
 
I tried this, but ended up getting seventeen responses to the trigger when I only wanted one. What I mean is if even one of the variables is less than the specified value, I want the one command sent to the mud. I don't need a true feild, because if all the variable match the desired values, I don't wnat anything triggered. Thank you for you help thus far and for putting up with this total newbie.

-Chim
Reply with quote
Chim
Beginner


Joined: 06 Jan 2004
Posts: 13
Location: Canada

PostPosted: Tue Jan 20, 2004 3:53 am   
 
Started messing around with the trigger and solved my own problem. Thanks for your help musishun00. If anyone else wanted an aswer to this question, email me to get the trigger text.
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