|
Noodles Beginner
Joined: 03 Mar 2004 Posts: 12 Location: USA
|
Posted: Fri Mar 19, 2004 8:56 am
Stringlist / Expanding Variables |
Is there a way to expand variables in a stringlist? I've spent the better part of 2 hours reading help's / faq's / and testing.... It's late here, can someone point it out so I can smack my forehead and say "DOH!"
ex.
#VAR ATTACKMOVES {@flyingkick|@barefists|@leadpipe}
#1 {%item( @ATTACKMOVES, %random( 1, 3))}
I tried " " { } [ ] ( ) < > and varied combos.
Laugh at me if it is simple, laugh at me if it can't be done :)
Thankyou again in advance :)
Noodles |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Fri Mar 19, 2004 10:50 am |
What you have there, #VAR ATTACKMOVES {@flyingkick|@barefists|@leadpipe} should work. it should expand the variables automatically and set @Attackmoves properly.
|
|
|
|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Fri Mar 19, 2004 11:01 am |
If your wanting to send it to the mud you could try
#EXEC {%item(@AttackMoves,%random(1,3))}
other wise try %exec(), %expand() may also be helpful. |
|
|
|
Noodles Beginner
Joined: 03 Mar 2004 Posts: 12 Location: USA
|
Posted: Fri Mar 19, 2004 11:45 am |
Wonderful, thanks, exactly what I needed. :)
Noodles |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Fri Mar 19, 2004 11:45 am |
If don't want the variables to be expanded before you select one of the three variables at random, and then expand them, you could try this:
#1 %eval(@%item( {flyingkick|barefists|leadpipe}, 3)) |
|
|
|
|
|