|
thalura Newbie
Joined: 21 Nov 2001 Posts: 2 Location: France
|
Posted: Wed Nov 21, 2001 1:37 pm
question on random selection from a list |
I am trying to generate at random different ways to speak.
I dont want to scrumble the content, neither color it, but use different emotes.
So I want to choose from a list (say, sing, whisper, announce,...) randomly one each time I type say xxx
I did the aliases for each command of the list and the following for the random generation:
%case(%random( 4) , "say" , "sing" , "whisper" , "announces" )
The problem is, randomly it sents only the string I want to say to the mud without the command before (which of course generates the mud error response)
where is my command wrong? |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Wed Nov 21, 2001 2:09 pm |
The following should work:
First create a list of the type of says you want to choose from:
#VAR List {say|whisper|yell|mutter|sing|announce}
Then use an alias to replace your speech:
#ALIAS randomsay {%item( @List, %random(1, %numwords( @List, "|"))) "%-1"}
This my 100th post btw!
Acaila |
|
|
|
thalura Newbie
Joined: 21 Nov 2001 Posts: 2 Location: France
|
Posted: Wed Nov 21, 2001 4:25 pm |
works fine, thanks a lot
|
|
|
|
|
|
|
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
|
|