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
SHASCO
Novice


Joined: 29 May 2001
Posts: 48
Location: USA

PostPosted: Sat Dec 15, 2001 10:06 pm   

trigger
 
What I am trying to accomplish is a trigger that will attempt to run immediately and if it fails then to wait for specific text and run again.

I know if the trigger fails due to the text that is received from the mud. I am on the latest version of zmud and I think I can use the state options. However, I am unclear how the states work.

If your in achaea I'll use the pipe example. You light your pipes, they stay lit for a specific amount of time. Then you have to relight them in order to use them.

So, I get the message that my pipe is not lit. I try to light it. I can get one of two messages, one is that I light the pipe and the second is that I must wait for balance.

If I light the pipe the trigger is finished. If I don't then it waits for the balance text and then lights the pipe.

In either case I get the text you light your pipe when successful.

I would like to get this working with states if at all possible. I am trying to move away from long IF statements that are nestled together.

Perhaps there is a better way and I just don'e know about it. Any suggestions are appreciated.


Thank you,

SHASCO.
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Sun Dec 16, 2001 1:00 am   
 
Unfortunately, I haven't worked w/states in triggers, but I don't see why you can't just use a few triggers instead.

Try this:

#trigger {Your pipe is not lit.} {#t+ LightPipe;light pipe}

#trigger {You have achieved balance.} {light pipe} "LightPipe"

#trigger {You light your pipe.} {#t- LightPipe} "LightPipe"


Of course, you don't really need to throw them in a class, but if you need to regain balance for other triggers, then throwing the 2 triggers in a class isn't so bad.

Iljhar
Reply with quote
SHASCO
Novice


Joined: 29 May 2001
Posts: 48
Location: USA

PostPosted: Sun Dec 16, 2001 7:07 am   
 
Thank you, that worked perferctly. I used your suggestion with the #alarm command.


Regards,

SHASCO
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