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


Joined: 14 Dec 2001
Posts: 3

PostPosted: Sun Dec 16, 2001 7:30 pm   

Cancel a loop with a trigger.
 
Okay, here's what I want to do. I want to loop a command over and over no specific number of times, until trigger turns it off.

So let's say, for an example I triggered "You are Thirsty" to "Drink Water" over and over and over until the the Mud sends me "You are no longer thirsty" and it would turn the loop off...(just and example that's not what I'm going to use it for) I don't even know where to start on this one, because the #loop command always requires a number.

Someone told me that this is impossible to do with JUST Zmudscript, but I'm a firm believer that anything is possible ;). Anyways if you can point me in the right direction I'm sure I can figure it out.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sun Dec 16, 2001 7:45 pm   
 
#VAR TryingToDrink 0
#ALIAS alDrink {TryingToDrink=1;~drink water;#ALARM {+1} {#IF (TryingToDrink) {alDrink}}}
#TRIGGER {^You are Thirsty} {alDrink}
#TRIGGER {^You are no longer thirsty} {TryingToDrink=0}

You can do it other ways but they tend to have bad effects, the least of which is you spam your mud and it disconnects you.
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Sun Dec 16, 2001 8:45 pm   
 
Just adding something to Vijilante's post, (s)he's missing a @ in there:

#ALIAS alDrink {TryingToDrink=1;~drink water;#ALARM {+1} {#IF (@TryingToDrink) {alDrink}}}

Iljhar
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