Trying to figure out how to alter Firepongs code, and add Boss (when friendly) to list of targets to heal - Specifically for the Tsulong Encounter. (Think of it as a cross between Elagon and Dreamwalker [ICC].
Tsulong is either Hostile or Friendly.
Tsulong does seem to have 2 NPC Id's however.
During Night Phase Tsulong is Hostile and attack-able. (NPC ID = 62442)
During Day Phase Tsulong is Friendly and needs to be healed. (NPC ID = 63025? Could be he uses the above one always though)
It should be noted that healing Tsulong by any class that can, should be done when players have the buff: Bathed in Light
This buff is obtained after any players are hit with his Sun Breath (Frontal cone) during Day Phase.
here is Firepongs code:
Code:
--Variables
local inBG = PQR_Battleground()
--Misc Buffs/Debuffs/CD's
local playerHP1 = 100 * UnitHealth("Player") / UnitHealthMax("Player")
local psBuff = UnitBuffID("Player",69369)
local nsBuff = UnitBuffID("Player",132158)
if psBuff or nsBuff then
if members[1].HP < playerHP1 then
PQR_CustomTarget = members[1].Unit
CastSpellByName(tostring(GetSpellInfo(5185)),PQR_CustomTarget)
else
CastSpellByName(tostring(GetSpellInfo(5185)),"Player")
end
end
Here is the Data File Functions relevant to the above code. This would probably need to be altered as well.
Code:
function CanHeal(t)
if UnitInRange(t) and UnitCanCooperate("player",t) and not UnitIsEnemy("player",t)
and not UnitIsCharmed(t) and not UnitIsDeadOrGhost(t) and not PQR_IsOutOfSight(t)
then return true end
end
function GroupInfo()
members, group = { { Unit = "player", HP = CalculateHP("player") } }, { low = 0, tanks = { } }
group.type = IsInRaid() and "raid" or "party"
group.number = GetNumGroupMembers()
for i=1,group.number do if CanHeal(group.type..i) then
local unit, hp = group.type..i, CalculateHP(group.type..i)
table.insert( members,{ Unit = unit, HP = hp } )
if hp < 90 then group.low = group.low + 1 end
if UnitGroupRolesAssigned(unit) == "TANK" then table.insert(group.tanks,unit) end
end end
if group.type == "raid" and #members > 1 then table.remove(members,1) end
table.sort(members, function(x,y) return x.HP < y.HP end)
local customtarget = CanHeal("target") and "target" -- or CanHeal("mouseover") and GetMouseFocus() ~= WorldFrame and "mouseover"
if customtarget then table.sort(members, function(x) return UnitIsUnit(customtarget,x.Unit) end) end
end
Feral cats will have a HUGE advantage with this as healing up Tsulong during Day Phase is key to defeating the encounter. The Raid literally only gets 2 Day Phases before Berserk.
Granted the easiest way to do this would to simply use Heart of the Wild talent and spam healing Touches on the second day phase. However, the dps loss and overall healing would be considerably less than using Dream of Cenarius.
I have never dealt with boss targets paired with my moderate knowledge of LUA, I really have no idea where to start.
thanks.