PHP Code:
for i=1,4 do
local bossCheck = "boss"..i
if UnitExists(bossCheck) then
local npcID = tonumber(UnitGUID(bossCheck):sub(6,10), 16)
local bossCasting,_,_,_,_,castEnd = UnitCastingInfo(bossCheck)
if npcID == 60009 then --Feng the Accursed
--grab spell names for abilities:
local lightningFists = GetSpellInfo(116157)
local epiCenter = GetSpellInfo(116018)
--intercept the spell if casting Lightning Fists
if bossCasting == lightningFists then
TargetUnit(focus)
--Press the ExtraActionButton (Nullification Barrier)
RunMacroText("/click ExtraActionButton1")
end
--interrupt Feng if casting Epicenter
if bossCasting == epiCenter then
TargetUnit(bosscheck)
--Press the ExtraActionButton (Lightning Fists)
RunMacroText("/click ExtraActionButton1")
end
Anyone help me checking this code, dont know why it wont work? Helped and coded by googlebee.