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
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: 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?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Jan 26, 2002 9:58 pm   
 
#TRIGGER {text to fire on} {#ALARM {+%random(min, max)} {commands}}

Kjata
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
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