|
vortis Novice
Joined: 15 Jul 2010 Posts: 39 Location: USA
|
Posted: Fri May 08, 2015 3:23 am
SOLVED: How to hold a command within a variable and then execute it later |
So I have been playing with the #PICK command as such:
#PICK {p:Select Item:}
{*Arrow:CM_Arrow}
{Medium:CM_Branch_M}
{Large:CM_Branch_L}
and I set CM_Arrow as a multiline Alias:
CM_Choice="CM_Arrow"
carve weapon arrow
and when the item is finished I have a trigger:
Pattern: You craft an arrow!
Trigger:
#IF (@AutoCraft=1) {
CM_Choice
}
The trigger sends "CM_Arrow" to the MUD, which isn't a local command and fails to do anything, because CM_Arrow is a client-side alias inside CMUD. I want the alias to fire, not send the name of the alias to the MUD. Is there an easy way to fire the contents of CM_Arrow from the trigger or is there a better way to go about this?
Basically what I am trying to do, is to simply repeat the actions I chose from the popup #PICK menu, rather than simply go through the entire menu again to pick the same item (I simplified this as I have 5 menu categories, each with multiple options) |
|
Last edited by vortis on Fri May 08, 2015 5:18 am; edited 1 time in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Fri May 08, 2015 3:28 am |
try #EXEC CM_Arrow
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
vortis Novice
Joined: 15 Jul 2010 Posts: 39 Location: USA
|
Posted: Fri May 08, 2015 5:18 am |
shalimar wrote: |
try #EXEC CM_Arrow |
Thanks, that's exactly what I was searching for. |
|
|
|
|
|