This works perfect:
I needed the maelstrom procs to heal me if below 80% and to cast lightning bolt if above it.Code:local _,_,_,hasMaelstrom = UnitBuffID("player", 53817) local myHP = 100 * UnitHealth("player") / UnitHealthMax("player") if hasMaelstrom == 5 then if myHP < 80 then CastSpellByName(GetSpellInfo(8004), "player") else CastSpellByName(GetSpellInfo(403), "target") end end
Thanks and +rep @Kaolla @Nerder @evlow