|
Valentim Newbie
Joined: 19 Jun 2005 Posts: 2
|
Posted: 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? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Lucas2 Newbie
Joined: 30 Dec 2013 Posts: 1
|
Posted: Mon Dec 30, 2013 4:06 am |
Nice post!
|
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: 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
-------------------------------- |
|
|
|
|
|