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
Slair
Novice


Joined: 10 Oct 2000
Posts: 44
Location: USA

PostPosted: Thu May 08, 2003 5:00 pm   

%random Trigger need help
 
Ok folks need a little assistance on this script. It is for a GW mud. I apprecaite any thoughts or suggestions, or a way to do this better.

Mud output: A shimmering portal appears in front of you.

Trigger so far:
@travel %case %random( 16) (3.drow, 5.harpy, 6.hob, goat, evil, 6.vamp, 4.harpy, fido, swarm, ethereal, spider, snake, wolf, dwarf, 15.evil, 30.hob, 25.orc)

Travel Var is what mode the class travels with. Open to all suggestions, for some reason I cannot get this to work. Also if you know of a shorter way of doing this feel free. Thanks

Slair
Reply with quote
Lain
Novice


Joined: 26 Oct 2001
Posts: 38

PostPosted: Thu May 08, 2003 6:04 pm   
 
If you want the 3.drow, 5.harpy, 6.hob and so on to be picked randomly, you can place them as seperate strings in a variable,

#VAR nameofvar {3.drow|5.harpy|6.hob|goat|evil|6.vamp|4.harpy|fido|swarm|ethereal|spider|snake|wolf|dwarf|15.evil|30.hob|25.orc}

Then for your trigger,

#TR {A shimmering portal appears in front of you.} {@travel %item( @nameofvar, %random( 1, %numitems( @nameofvar)))}

This will send whatever is in your @travel variable and a random string from the list in the @nameofvar variable:

mode 25.orc
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