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


Joined: 06 Dec 2004
Posts: 59

PostPosted: Mon Apr 04, 2005 11:17 am   

#alarm
 
is there a way to specify a random time in a certain range with this command?


normally, the command works like this:

#ALARM -5:30 {save}

this line sends the command 'save' to the mud every 5 1/2 minutes.

what i'm looking for is a way to set a range like 4-6 minutes, and have it randomly select a specific time every cycle.

for example:

cycle 1:
counts from 5 minutes, 22 seconds, then saves

cycle 2:
counts from 4 minutes 48 seconds, then saves

cycle 22:
counts from 5 minutes 32 seconds, then saves


anyone know a way to do this?

-Merc

ps. sorry if it seems like i'm explaining the problem too much, but in my experience, the more information you give, even if you repeat yourself and massivly dumb it down, the better the answers you get.
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Mon Apr 04, 2005 11:59 am   
 
I think this will work like you want it to...

#VAR randtime {%random(240,330)}
#ALARM randalarm {-@randtime} {save;#VAR randtime {%random(240,330)}}
Reply with quote
mercatroid
Wanderer


Joined: 06 Dec 2004
Posts: 59

PostPosted: Wed Apr 06, 2005 1:53 pm   
 
This works; thanx Maelstrom.

The obvious purpose of this, for those who wish to use it themselves, is to avoid idle disconnects. If you replace the instance of the word 'save' above with '%item(@commands,%random(1, 8))' instead, and make a variable @commands with 8 commands you would normally type while not doing anything, then this should be a foolproof trigger. There's a random time in between each command, and it's a random command each time.

-Merc
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