I have been looking on forum for information on how to do this for 4 hours.
I found this
http://www.mushclient.com/forum/?id=6030
I tried this
How I wanted it to work was. It would see You are thirsty. It for check my_stats. It would see if I had 20 or more mana available. If the answer was yes, then it would cast the freshwater spell.
I get:
I found this
http://www.mushclient.com/forum/?id=6030
I tried this
<triggers>
<trigger
enabled="y"
match="You are thirsty."
script="my_stats"
send_to="12"
sequence="100"
>
<send>if cma > 20 then
Send ("cast 'freshwater'")
endif</send>
</trigger>
</triggers>
>
<triggers>
<trigger
enabled="y"
match="<*/*hp */*ma */*mv>"
script="my_stats"
send_to="12"
sequence="100"
>
</trigger>
</triggers>
function test_alias (name, line, wildcards)
Note "Hello, world!"
end -- function test_alias
function my_stats (name,line,wildcards)
local chp = wildcards [1]
local mhp = wildcards [2]
local cma = wildcards [3]
local mma = wildcards [4]
local cmv = wildcards [5]
local mmv = wildcards [6]
end--function my_stats
How I wanted it to work was. It would see You are thirsty. It for check my_stats. It would see if I had 20 or more mana available. If the answer was yes, then it would cast the freshwater spell.
I get:
Error number: 0
Event: Run-time error
Description: [string "Trigger: "]:1: attempt to compare number with nil
stack traceback:
[string "Trigger: "]:1: in main chunk
Called by: Immediate execution