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


Joined: 26 Nov 2004
Posts: 2

PostPosted: Fri Nov 26, 2004 1:46 pm   

Help with a script
 
Hi,
I really have no luck when it comes to putting together a script. Hopefully someone could help me out on this one. What I'm looking for is a script that will send a random command (from a list of commands) every 500 seconds. i.e. Your list is 'emote laugh', 'emote smile', 'emote wave'. Every 500 seconds it'll send randomly one of those commands. Please help! Thanks
Reply with quote
misterbalrog
Apprentice


Joined: 26 Oct 2004
Posts: 108

PostPosted: Fri Nov 26, 2004 2:54 pm   
 
you use #alarm to make the timing for 500 seconds. Check the helpfiles for that.
Next, let's say you have the list of commands to do in @cmdlist, then you use %item( @cmdlist, %random(1,%numitems(@cmdlist))) as the executive line for the alarm.

This basically makes a random pick of anything between 1 to the number of items in the list and sends it to the mud when the alarm hits.

edit: if you wish, you can put that %item(...) stuff in an alias and make the #alarm call upon the alias instead. Whichever suits you. (the latter would give you the possibility of calling upon the random commands yourself whenever you want to.
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