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


Joined: 18 Nov 2005
Posts: 5

PostPosted: Tue Nov 02, 2010 4:34 pm   

Help making a trigger response delay
 
I wish to make a trigger to send a command after receiving a certain response from a MUD, such as #TRIGGER {You put a lantern in a pack} {close pack}

where the trigger waits maybe 2 seconds before it sends the "close pack" command. I'm not quite sure how timers or such work, so any help put be appreciated.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Tue Nov 02, 2010 6:29 pm   
 
well the problem is that the #WAIT command does not work as expected in zMUD.
So don't ever use it.

The easiest workaround is to create an #ALARM inside the #TRIGGER.

#ALARMs are #TRIGGERS that fire based off of time, more info on that in the help file, what you want is an #ALARM like this:

#ALARM "closer" +2 {close pack}
_________________
Discord: Shalimarwildcat
Reply with quote
Yetzederixx
Beginner


Joined: 19 Oct 2010
Posts: 14
Location: Sulphur, LA

PostPosted: Wed Nov 03, 2010 5:39 am   
 
I use #wait all the time in ZMUD and it works fine, but you have to count from zero if you have multiples.

ie:
Code:

command1
#wait 1000
command2
// now if you want command3 to go off 2 seconds from command2 you have to:
#wait 3000
command3


Give this a try, but shalimar is correct as well in that the alarm will work.
Code:

#wait 2000
close pack
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Thu Nov 04, 2010 1:56 am   
 
Yes, but in zMUD when #WAIT is used, all settings are paused for that time limit, which could end up with some unexpected results.
_________________
Discord: Shalimarwildcat
Reply with quote
Yetzederixx
Beginner


Joined: 19 Oct 2010
Posts: 14
Location: Sulphur, LA

PostPosted: Thu Nov 04, 2010 7:18 am   
 
true, I only use it in instance where that's all I'm doing so I never thought of that.
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