Hello, I'm trying to run a below alias. It's named "aven". It is just a short piece. I'm just trying to see what gets 'captured' as x if I type up something like that below.
I want to see how to grab some particular strings from the server, so that in the future, I can compare it and then take different actions. For now, I'm having problem with capturing a string from a choice of lists. (i.e. for below, I'm trying to see if 'Door is closed!' comes up, or my Hit point and mana line "[*/*hp*" comes up, which always comes up last. So that I can move on to next step without doing the 'wait' thing)
This is the error I'm receiving when I tried to run the alias:
Immediate execution
[string "Alias: "]:5: '=' expected near 'x'
Below is the code:
<code>
<aliases>
<alias
match="aven"
enabled="y"
send_to="12"
sequence="100"
>
<send>require "wait"
wait.make(function()
send "east"
local x = wait.match (("The door is closed.") or ("[*/*hp*"), 1)
print x
end) -- end of coroutine</send>
</alias>
</aliases>
</code>
I want to see how to grab some particular strings from the server, so that in the future, I can compare it and then take different actions. For now, I'm having problem with capturing a string from a choice of lists. (i.e. for below, I'm trying to see if 'Door is closed!' comes up, or my Hit point and mana line "[*/*hp*" comes up, which always comes up last. So that I can move on to next step without doing the 'wait' thing)
This is the error I'm receiving when I tried to run the alias:
Immediate execution
[string "Alias: "]:5: '=' expected near 'x'
Below is the code:
<code>
<aliases>
<alias
match="aven"
enabled="y"
send_to="12"
sequence="100"
>
<send>require "wait"
wait.make(function()
send "east"
local x = wait.match (("The door is closed.") or ("[*/*hp*"), 1)
print x
end) -- end of coroutine</send>
</alias>
</aliases>
</code>