--- [ExtraActionButton1] ---
local DivineShield = UnitBuffID("player", 642)
local LeftAlt = IsLeftAltKeyDown()
--- [Fading Light] ---
local fadingtime = select(7,UnitDebuffID("player",110070))
if fadingtime ~= nil and fadingtime - GetTime() < 1.3 and DivineShield == nil then
RunMacroText("/click ExtraActionButton1")
end
--- [Hour of Twilight, Left Alt to skip] ---
if LeftAlt == nil then
local channelSpell, _, _, _, _, endTime = UnitCastingInfo("boss1")
if channelSpell == GetSpellInfo(109417) and endTime/1000 - GetTime() < 1 and DivineShield == nil then
RunMacroText("/click ExtraActionButton1")
end
end
--- [Madness of Deathwing] ---
local tentacledeath = select(7,UnitDebuffID("player",109597))
if tentacledeath ~= nil and tentacledeath - GetTime() < 0.7 then
RunMacroText("/click ExtraActionButton1")
end
--- [Spine of Deathwing] ---
local inCombat = UnitAffectingCombat("player")
local Parachute = UnitAura("player", "Parachute")
if inCombat then
if Parachute ~= nil then
RunMacroText("/cancelaura Parachute")
end
end
--- [Lightwell] ---
local LightwellName = "Lightwell"
local hp = UnitHealth("player") / UnitHealthMax("player") * 100
local sLightwell = UnitBuffID("player", 7001)
local sDeepCorruption = UnitDebuffID("player", 108220)
if PQR_LightwellTimeout == nil then
PQR_LightwellTimeout = 0
end
if hp < 70 and sLightwell == nil then
if PQR_LightwellTimeout < GetTime() then
if sDeepCorruption == nil then
PQR_LightwellTimeout = GetTime() + 1
InteractUnit(LightwellName)
end
end
end
--- [Darkmoon] ---
local cannontime = select(7,UnitBuffID("player",102116))
if cannontime ~= nil and cannontime - GetTime() < 1.15 then
CancelUnitBuff("player","Magic Wings")
end