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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Feb 04, 2003 3:03 am   

Randomizer trouble
 
Ok i got how to randomizer things down

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

however im trying to code in a trigger that withh keep up with my changes to combat styles but i am having trouble setting up the alias to properly set it up... this is what i have so far

#ALIAS {un} {
#VAR target %1
#var style {%item( @un, %random( 1, %numitems( @un))) @target}
@style
}

there are 7 possibilities in @un yet whenever this alias goes of it takes the randomizer literally and only puts the random choosen one into @style to repeat over and over, i want @style to randomely spit out from the @un whenever used... am i missing something?


Shalimar
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Tue Feb 04, 2003 3:44 am   
 
if you want a variable that executes instructions, use the #func command.

#ALIAS {un} {
#VAR target %1
#func style {%item( @un, %random( 1, %numitems( @un))) @target}
@style
}



--------

moon.icebound.net:9000
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Tue Feb 04, 2003 4:08 am   
 
The mud you play up and running?

Evangelist/Pernius
telnet://phidar.com:9000
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Feb 04, 2003 4:43 am   
 
thanks that worked perfectly

Shalimar
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