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


Joined: 19 Jun 2005
Posts: 2

PostPosted: Tue Aug 13, 2013 5:27 pm   

Trigger with Wait and Abort
 
How do I make a trigger to send a command in x seconds and if that same trigger is run again, it will cancel the previous command and send command again

Example:

Text: Zugg
Script: # WAIT 1000; # ECHO something

When text "Zugg" appears, the script will wait 1 second and then will echo "Something", where text "Zugg" appear again before command echo, the both command "WAIT" and "ECO" will be aborted and sent again

is possible to do this kind of trigger?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Aug 14, 2013 12:06 am   
 
Zscript commands are executed immediately, so there are no takebacks on them. Specifically for #WAIT, it will also pause the entire ZMud application rather than strictly pausing just that trigger code.
_________________
EDIT: I didn't like my old signature
Reply with quote
shalimar
GURU


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

PostPosted: Thu Aug 15, 2013 1:20 am   
 
for this you would want a named alarm

#ALARM +1 "someName" {#ECHO Something}

Using the + will ensure that the alarm can only fire once.
While using the "name" allows it to be overwritten and the time interval to be refreshed or changed.
_________________
Discord: Shalimarwildcat
Reply with quote
Lucas2
Newbie


Joined: 30 Dec 2013
Posts: 1

PostPosted: Mon Dec 30, 2013 4:06 am   
 
Nice post!
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Thu Jan 02, 2014 1:51 am   
 
Well, one 'tard was banned, but another is right back. IP Ban please?

Oh, and Happy New Years! :)
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
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