Code:
local DivineShield = UnitBuffID("player", 642)
local LeftAlt = IsLeftAltKeyDown()
-- Fading Light
local fadingtime = select(7,UnitDebuffID("player",110070))
if fadingtime ~= nil and fadingtime - GetTime() < 1 and DivineShield == nil then
RunMacroText("/click ExtraActionButton1")
end
-- Hour of Twilight, Left Alt to skip.
local channelSpell, _, _, _, _, endTime = UnitCastingInfo("boss1")
if LeftAlt == nil then
if channelSpell == GetSpellInfo(109417) and endTime/1000 - GetTime() < 1 and DivineShield == nil then
RunMacroText("/click ExtraActionButton1")
end
end
-- Shrapnel
local tentacledeath = select(7,UnitDebuffID("player",109597))
if tentacledeath ~= nil and tentacledeath - GetTime() < 0.7 then
RunMacroText("/click ExtraActionButton1")
end
-- Burning Tendons
local Parachute = UnitAura("player", "Parachute")
if Parachute ~= nil then
RunMacroText("/cancelaura Parachute")
end
if UnitExists("boss2") and UnitName("boss2") == "Burning Tendons" then
if UnitName("target") ~= "Burning Tendons" then
RunMacroText("/cast Avenging Wrath")
RunMacroText("/cast Zealotry")
RunMacroText("/use 13")
RunMacroText("/use 14")
end
TargetUnit("boss2")
end
if UnitExists("boss3") and UnitName("boss3") == "Burning Tendons" then
if UnitName("target") ~= "Burning Tendons" then
RunMacroText("/cast Avenging Wrath")
RunMacroText("/cast Zealotry")
RunMacroText("/use 13")
RunMacroText("/use 14")
end
TargetUnit("boss3")
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
-- Other
-- Try to aim on Darkmoon Faerie Cannon
local cannontime = select(7,UnitBuffID("player",102116))
if cannontime ~= nil and cannontime - GetTime() < 1.15 then
CancelUnitBuff("player","Magic Wings")
end
Code:
local spellSTART, spellDURATION = GetSpellCooldown(#####)
if spellSTART - GetTime() + spellDURATION <= 0.2 and spellSTART - GetTime() + spellDURATION > 0 then
return false
end
Code:
local minValue = 0.05
local maxValue = 0.3
local curPing = tonumber((select(3,GetNetStats()) + select(4,GetNetStats())) / 1000) + .025
if curPing < minValue then
curPing = minValue
elseif curPing > maxValue then
curPing = maxValue
end
PQR_SpellAvailableTime = curPing
Code:
local inCombat = UnitAffectingCombat("player")
local LeftShift = IsLeftShiftKeyDown()
if LeftShift ~= nil then
return true
end
if inCombat == nil or IsMounted() then
return true
end
Code:
-- Hands
local WateryEntrenchment = UnitBuffID("player", 110317)
local Frostflake = UnitBuffID("player", 109325)
local FrostflakeSnare = UnitBuffID("player", 109337)
local PlayerThreat = UnitThreatSituation("player", "target")
--Hand of Freedom
if WateryEntrenchment ~= nil then
if Frostflake ~= nil or FrostflakeSnare ~= nil then
if not PQR_SpellAvailable(1044) then
CastSpellByID(4987,"player")
else CastSpellByID(1044,"player") end end end
--Hand of Salvation
if PlayerThreat == 3 and PQR_SpellAvailable(1038) then
CastSpellByID(1038,"player") end
-- Buffs
local BlessingOfKings = UnitBuffID("player", 20217)
local MarkOfTheWild = UnitBuffID("player", 1126)
local BlessingOfMight = UnitBuffID("player", 19740)
if BlessingOfKings ~= nil or MarkOfTheWild ~= nil or BlessingOfMight ~= nil or IsMounted() then
return false
end
if BlessingOfKings == nil or MarkOfTheWild == nil then
CastSpellByID(19740,"player")
elseif BlessingOfMight ~= nil then
CastSpellByID(20217,"player")
end
--Auras
local playerForm = GetShapeshiftForm()
local playerCombat = UnitAffectingCombat("player")
local playerMounted = IsMounted()
if PQ_LastForm == nil then
PQ_LastForm = 0
end
if playerMounted and not playerCombat then
if playerForm ~= 5 then
PQ_LastForm = playerForm
CastShapeshiftForm(5)
end
else
if playerForm == nil or playerForm == 5 then
--switch back.
if PQ_LastForm == 0 then
CastShapeshiftForm(4)
else
CastShapeshiftForm(PQ_LastForm)
end
end
end