I think this is solved with an if, but I'm clearly doing something wrong.
<alias
match="^x(.*)(.*)(.*)$"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100">
<send>if "%1" == "1" then Send ("kick1")
elseif "%1" == "2" then Send ("kick2")
elseif "%1" == "3" then Send ("kick3")
and
if "%2" == "1" then Send ("punch1")
elseif "%2" == "2" then Send ("punch2")
elseif "%2" == "3" then Send ("punch3")
and
if "%3" == "1" then Send ("punch1")
elseif "%3" == "2" then Send ("punch2")
elseif "%3" == "3" then Send ("punch3")
end</send></alias>
The idea is that I can make up combos on the fly. So x311 would kick the person in the right arm, then punch them twice in the left. Does not work. My first try was to have multiple aliases, but that gave no response at all. The above gave a response. That response just happened to be:
Compile error
Plugin: Sandbox (called from world: Achaea)
Immediate execution
[string "Alias: "]:4: unexpected symbol near 'and'
I have a feeling the solution is agonizingly simple, I just don't know what it is.
<alias
match="^x(.*)(.*)(.*)$"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100">
<send>if "%1" == "1" then Send ("kick1")
elseif "%1" == "2" then Send ("kick2")
elseif "%1" == "3" then Send ("kick3")
and
if "%2" == "1" then Send ("punch1")
elseif "%2" == "2" then Send ("punch2")
elseif "%2" == "3" then Send ("punch3")
and
if "%3" == "1" then Send ("punch1")
elseif "%3" == "2" then Send ("punch2")
elseif "%3" == "3" then Send ("punch3")
end</send></alias>
The idea is that I can make up combos on the fly. So x311 would kick the person in the right arm, then punch them twice in the left. Does not work. My first try was to have multiple aliases, but that gave no response at all. The above gave a response. That response just happened to be:
Compile error
Plugin: Sandbox (called from world: Achaea)
Immediate execution
[string "Alias: "]:4: unexpected symbol near 'and'
I have a feeling the solution is agonizingly simple, I just don't know what it is.