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


Joined: 26 Sep 2004
Posts: 5

PostPosted: Sun Oct 10, 2004 9:58 pm   

Basic Help with the random command
 
I'm read the help files, and checked around through other posts but I'm unsure how to go around a basic random function...

What I'm looking for is for it pick a random color from a list so I can reflect that into an emote.

emote the color is now.. (red,blue,white)!

If anyone can help this would be appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Oct 11, 2004 12:47 am   
 
emote the color is now..%item( "red|blue|white", %random( 1, 3))

There is no #RANDOM command.
There is a predefined variable, %random, and a function, %random(). Using either the variable or the function usually involves other commands or functions as well.
zMUD doesn't recognize comma-separated values as lists. Lists must be made with the list-separator, |.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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