|
russ3z Newbie
Joined: 18 Nov 2005 Posts: 5
|
Posted: 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. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Yetzederixx Beginner
Joined: 19 Oct 2010 Posts: 14 Location: Sulphur, LA
|
Posted: 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
|
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Yetzederixx Beginner
Joined: 19 Oct 2010 Posts: 14 Location: Sulphur, LA
|
Posted: 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.
|
|
|
|
|
|