|
undergod Wanderer
Joined: 27 Jun 2001 Posts: 82
|
Posted: Sat Jan 26, 2002 9:41 pm
Alarm with random times? |
Okay, I want to make a trigger that will fire of a line of code... then wait a random amount of time (say between 4 and 7 minutes) and then do a command. How would I do this?
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Jan 26, 2002 9:58 pm |
#TRIGGER {text to fire on} {#ALARM {+%random(min, max)} {commands}}
Kjata |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Jan 27, 2002 2:42 pm |
#TRIGGER {text to fire on} {#EXEC %expand(#ALARM {+%random(min, max)} {commands})}
ALARM creates its trigger using verbatim mode for it arguments hence you have to use the EXEC and %expand combo to get it created correctly. You might have to move expand's ) to before the {commands} if you don't want them expanded. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jan 27, 2002 7:20 pm |
That's what I thought too at first, but I tested it in zMUD and it worked fine without the %expand.
Kjata |
|
|
|
|
|