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
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Thu Jan 02, 2003 9:11 am   

Making a randomized....
 
Trying to make a trigger to randomize congratulations when people level.

On the command and function wizards, random was for integers only...

I wrote an autodisguiser that works and i tried to sub in auto grats, but i realized it might work differently in string lists

#class {general|autograts}
#trigger {^Hear, hear! (%W) has just reached another milestone on his} {grats %item( @malegrat, %random (1, 4))}
#trigger {^Hear, hear! (%W) has just reached another milestone on her} {grats %item( @femalegrat, %random (1, 2))}
#VAR femalegrat {Way to go Miss %1!|Congrats, Miss %1}
#var malegrat {Way to go Sir %1| Grats, %1| Yeah man, way to go %1| testing sir, testing %1}
#class 0

this is what i entered while I tested...using the same method that works for my auto disguise :
#CLASS {general|disguise}
#ALIAS disg {undisguise;disguise %item( @sexes, %random( 1, 2)) %item( @races, %random( 1, 8));score}
#VAR races {dwarf|elf|gnome|goblin|halfling|human|orc|troll}
#VAR sexes {male|female}
#CLASS 0


Any advice on the proper commands to use, or the right style to do it?


Edwub the Mage
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 02, 2003 11:50 am   
 
Use %case:
grats %case(%random(1,4), "Way to go Sir %1", "Grats, %1", "Yeah man, way to go %1", "testing sir, testing %1")
grats %case(%random(1,2), "Way to go Miss %1!", "Congrats, Miss %1")


Kjata
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