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


Joined: 08 Nov 2009
Posts: 3

PostPosted: Sun Nov 08, 2009 10:14 pm   

Random Response
 
Hey all, im trying to to get it so that when someone sends me a TELL they recieve a random response from a list.

%item( @saywhat1, %random( 1, %numitems( @saywhat1)))

This is what i have so far, but im having a hard time creating the String List containing the responses. Any help is appreciated
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 09, 2009 1:09 am   
 
"Hi."
"Hello."
"Heeeeeeey!"
"Aloha!"
"koni chiwa, %1-san!"
"Yo!"
"Yo! I'm not here. Leave a message."
"Yes?"
"Whaddaya want?"
"Master, I am here to serve."

If you're not having trouble creatively and instead are having trouble with the syntax/procedure, you can use the #ADDITEM command from the commandline (#ADDITEM SayWhat1 "what you want to put into the variable goes here").

You can also go to the @SayWhat1 variable in the Package Editor. In the area on the right where you can change things like the variable name and the contents, there's a little down arrow/up arrow along the bottom that collapses/expands the more detailed options. In that pane is the variable type. If you set this to String List, the text area where you put the variable contents will change to a table where each line represents one item in the stringlist. You can also use the String (literal) type and separate each item you type in with the pipe symbol (ie, item1|item2|item3, etc).
_________________
EDIT: I didn't like my old signature
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