My trigger:
Match line - *h, *m, *e, *w *
Send to Script:
SetVariable("healthc",%1)
healthc = %1
if healthc < healthm / 2 then
SetVariable("potbalance","false")
potbalance = "false"
Send("sip vitality")
end--if
SetVariable("manac",%2)
manac = %2
if manac < manam / 2 then
SetVariable("potbalance","false")
potbalance = "false"
Send("sip mana")
end--if
The error message I keep getting:
[string "Trigger: "]:4: attempt to perform arithmetic on global 'healthm' (a nil value)
stack traceback:
[string "Trigger: "]:4: in main chunk
How can I set my values to be numeric instead of string variables so I can perform math operations on them? (to determine when I'm at less than half health/mana to know when to auto-sip so I don't waste potion)
Additional question. Is there a way to check if my potion balance is up in the same line as checking health/mana values? e.g. something like:
if manac < manam / 2 and potbalance == "true" then
EDIT - Using MUSHclient if that's important.
0
Comments
CURING STATUS to see all the other various things.