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
Metal Icarus
Newbie


Joined: 01 May 2003
Posts: 2

PostPosted: Thu May 01, 2003 12:39 am   

Need help with random.
 
Ive been trying to make the rando var sufix stack with prefix... for example
[test] stack with [1] and texts between them
[test2] stack with [2] and so on.
I can randomize them but cant do them stack... Help plz. Thx.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu May 01, 2003 5:29 am   
 
I don't exactly understand what you are trying to do. Perhaps another example with more explanation of what your aim of the script is.

Ton Diening
Reply with quote
Metal Icarus
Newbie


Joined: 01 May 2003
Posts: 2

PostPosted: Thu May 01, 2003 5:57 am   
 
K, lets see this way...
Just create variable @testvar
#VAR testvar {test|test2|test3}
Then create alias
#1 %item( @testvar, %random(1,3))
it will send one random sufix from the testvar, i want to stack the sufix with the prefix... for example
#1 chat %item( @testvar, %random(1,3))%-1( here comes the same thing as prefix)

Then when it sends the message sends like that:
test %-1 test
test2 %-1 test2
test3 %-1 test3
understood?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu May 01, 2003 8:01 pm   
 
Try something like this:
#VAR TestVar {test|test2|test3}
#ALIAS chat {#VAR CurrentTestVar %item(%random(1,%numitems(@TestVar)),@TestVar);~chat @CurrentTestVar %-1 @CurrentTestVar}

Idea is you capture a random TestVar item into a variable then use it twice.

Ton Diening
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