Originally Posted by
cpowroks
yeah sure
(10 char)
Hm, I meant something more along the lines of a party-wide check. Something like this (which I adapted from Dominium's ret profile).
Code:
local myHp = 100 * UnitHealth("player") / UnitHealthMax("player")
local tarHp = 100 * UnitHealth("target") / UnitHealthMax("target")
local p1Hp = 100 * UnitHealth("party1") / UnitHealthMax("party1")
local p2Hp = 100 * UnitHealth("party2") / UnitHealthMax("party2")
local p3Hp = 100 * UnitHealth("party3") / UnitHealthMax("party3")
local p4Hp = 100 * UnitHealth("party4") / UnitHealthMax("party4")
local p5Hp = 100 * UnitHealth("party5") / UnitHealthMax("party5")
if myHp < 70 then
CastSpellByName(GetSpellInfo(5394), "player")
end
if p1Hp < 70 and PQR_IsOutOfSight("party1") == false and IsSpellInRange("Healing Surge", "party1") == 1 and not UnitIsEnemy("party1", "player") then
CastSpellByName(GetSpellInfo(5394), "party1")
end
if p2Hp < 70 and PQR_IsOutOfSight("party2") == false and IsSpellInRange("Healing Surge", "party2") == 1 and not UnitIsEnemy("party2", "player") then
CastSpellByName(GetSpellInfo(5394), "party2")
end
if p3Hp < 70 and PQR_IsOutOfSight("party3") == false and IsSpellInRange("Healing Surge", "party3") == 1 and not UnitIsEnemy("party3", "player") then
CastSpellByName(GetSpellInfo(5394), "party3")
end
if p4Hp < 70 and PQR_IsOutOfSight("party4") == false and IsSpellInRange("Healing Surge", "party4") == 1 and not UnitIsEnemy("party4", "player") then
CastSpellByName(GetSpellInfo(5394), "party4")
end
if p5Hp < 70 and PQR_IsOutOfSight("party5") == false and IsSpellInRange("Healing Surge", "party5") == 1 and not UnitIsEnemy("party5", "player") then
CastSpellByName(GetSpellInfo(5394), "party5")
end
I can't figure out how to do this for Healing Tide, though. Needs to check if say 3+ party members are low. Casting Healing Stream when only the player casting is low is a waste.
Also, I noticed couple of problems with the profile.
1: If you're moving, it only casts lightning bolt and doesn't use Fulminate or instant Lava Burst procs!
2: It won't attack some targets (like the orbs in Shado-Pan Monestary), I'm not sure if they count as "hostile targets"?