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
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Wed Jan 14, 2004 3:44 pm   

Help needed please
 
Hi,

I have a list of commands in a variable list. how would I pick one at random, execute it and then delete it from the list?

Thanks in advance

Moksha
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Wed Jan 14, 2004 3:55 pm   
 
Try:
#var random {%random(1,%numitems(@variable))}
%item(@variable,@random)
#delnitem variable @random
Reply with quote
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Wed Jan 14, 2004 5:35 pm   
 
Thanks, it works great.

Moksha
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