|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Wed Dec 26, 2007 4:30 am
variable within a variable |
Hi, I'm playing a Monk in Achaea and have a rather puzzling problem. I'm sure I could do this differently but it might be fun for you guys to play around with. I've never seen this posted but maybe some of you have seen it before. There are times when I want to add a random attack onto an action or have one there in case the action fails and it doesn't cost balance or equilibrium. I do not want to become predictable which could hapen if people catch on and trigger blocks or parry to my initial action. I have a list variable for kicks that looks like this:
#var AttackMode {axk @Target|mnk @Target left|mnk @Target right|sdk @Target|snk@Target right|snk @Target left}
I then have an alias
#alias ChooseAttack {#1 {%item(@AttackMode,%random(1,6))}}
The output I get is for example:
snk @Target left
Which should be expected. I have tried different types of brackets to get the @Target variable to show up as the actual name. Is there any way to do this? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Dec 26, 2007 10:36 am |
Try using #exec instead of #1 - that's what it's for, after all.
If that doesn't work, try using %eval on the result of %item. |
|
|
|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Thu Dec 27, 2007 12:37 am |
That works perfectly! Thanks so much!
|
|
|
|
|
|