I've got a rather bizarre trigger problem (running 2.1), that I was hoping for some help with. Here's the Perl regex trigger:
Code: Select all
< (\w*) \| (\d*)\/(\d*)h (\d*)\/(\d*)m (\d*)\/(\d*)s \| O:(.*)
Code: Select all
local CurrHP = matches[3]
local MaxHP = matches[4]
local CurrMana = matches[5]
local MaxForHeal = MaxHP - MaxManaHeal - 5
echo (CurrHP .. " " .. MaxForHeal .. " " .. CurrMana .. " " .. HealInProgress)
if (CurrHP < MaxForHeal) and (HealInProgress == 0) and (CurrMana > 12) then
HealInProgress = 1
send("heal")
end
When the trigger fires, I do get the echo statement. However, the If statement apparently never evaluates as true, even when the echo statement returns: 116 119 93 0.
I've tried just about every permutation, and have confirmed that even if the If statement just reads:
Code: Select all
if (CurrHP < MaxForHeal) then
Many thanks for any help!