Need some feedback before I add this code in to the optional rotation.
The code below does.
--if we are fighting a boss, cd handling, n
PHP Code:
if bossexists and targetisboss and not moving and we are in melee range then
--Goak with lust/nolust handling
PHP Code:
if goakisavail then
cast goak
elseif goakisup and goak < 24secondsleft and lustisup then
if avengingwrathisavail or sanctifiedwrathisavail then
cast avenging
cast sanc
elseif holyavengerisaspell and holyavengerisup then
cast holyavenger
end
elseif goakisup and goak < 21secondsleft and lustisnotup then
if avengingwrathisavail or sanctifiedwrathisavail then
cast avenging
cast sanc
elseif holyavengerisaspell and holyavengerisup then
cast holyavenger
end
elseif trinket1isavail and goakisup and goak < 24secondsleft and lustisup then
usetrink1
elseif trinket1isavail and goakisup and goak < 21secondsleft and lustisnotup then
usetrink1
elseif trinket1isavail and goakisup and goak < 24secondsleft and lustisup then
usetrink2
elseif trinket2isavail and goakisup and goak < 21secondsleft and lustisnotup then
usetrink2
elseif glovesisavail and not trinket1isavail and not trinket2isavail and trinket1 > 10seconds and trinket2 > 10seconds then
if goakisup and goak < 25secondsleft then
usegloves
end
--regular cd handling without lust to save cds for goak, probably going to add in a boss hp check here
--goak is not up and has more than 25seconds till available and we dont have lust
PHP Code:
elseif goakisnotup and goak > 25secondsleft and lustisnotup then
if avengingwrathisavail or sanctifiedwrathisavail then
cast avenging
cast sanc
elseif holyavengerisaspell and holyavengerisup then
cast holyavenger
end
elseif trinket1isavail and lustisnotup then
use trinket1
elseif trinket2isavail and lustisnotup then
use trinket2
elseif glovesisavail and not trinket1isavail and not trinket2isavail and trinket1 > 10seconds and trinket2 > 10seconds and lustisnotup then
use gloves
--cd handling for lust
PHP Code:
elseif goakisnotavail and lustisup then
if avengingwrathisavail or sanctifiedwrathisavail then
cast avenging
cast sanc
elseif holyavengerisaspell and holyavengerisup then
cast holyavenger
end
elseif trinket1isavail and lustisup then
usetrinket1
elseif trinket2isavail and lustisup then
usetrinket2
elseif glovesisavail and not trinket1isavail and not trinket2isavail and trinket1 > 10seconds and trinket2 > 10seconds and lustisup then
use gloves
end
--not in a boss fight
PHP Code:
elseif bossnotexists and not moving and we are in melee range then
if glovesareavail then
usegloves
end
end
PHP Code:
local glovesCD = GetItemCooldown(GetInventoryItemID("player", 10))
local trinket1CD = GetItemCooldown(GetInventoryItemID("player", 13)
local trinket2CD = GetItemCooldown(GetInventoryItemID("player", 14)
local goakSTART, goakDURATION = GetSpellCooldown(86698)
-- Boss Check
local bossExists = false
for i=1,4 do
if UnitExists("boss"..tostring(i)) then
bossExists = true
end
end
-- Lust Check
local lust = false
if UnitBuffID("player", 2825) -- Bloodlust
or UnitBuffID("player", 32182) -- Heroism
or UnitBuffID("player", 80353) -- Time Warp
or UnitBuffID("player", 90355) -- Ancient Hysteria
then lust = true end
if bossExists == true and UnitLevel("target") == -1 and PQR_IsMoving(1) == false and RangeCheck(35395, "target") then
--Goak is up and lust is up or not up
if PQR_SpellAvailable(86698) then
CastSpellByName(GetSpellInfo(86698))
elseif UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 24 and lust == true then
if (PQR_SpellAvailable(31884) or PQR_SpellAvailable(53376)) then
CastSpellByName(GetSpellInfo(31884))
CastSpellByName(GetSpellInfo(53376))
elseif (IsPlayerSpell(105809) and PQR_SpellAvailable(105809)) then
CastSpellByName(GetSpellInfo(105809))
end
elseif UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 21 and lust == false then
if (PQR_SpellAvailable(31884) or PQR_SpellAvailable(53376)) then
CastSpellByName(GetSpellInfo(31884))
CastSpellByName(GetSpellInfo(53376))
elseif (IsPlayerSpell(105809) and PQR_SpellAvailable(105809)) then
CastSpellByName(GetSpellInfo(105809))
end
elseif trinket1CD == 0 and UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 24 and lust == true then
UseInventoryItem(13)
elseif trinket2CD == 0 and UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 24 and lust == true then
UseInventoryItem(14)
elseif trinket1CD == 0 and UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 21 and lust == false then
UseInventoryItem(13)
elseif trinket2CD == 0 and UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 21 and lust == false then
UseInventoryItem(14)
elseif glovesCD == 0 and trinket1CD == 1 and trinket2CD == 1 and trinket1CD - GetTime() > 10 and trinket2CD - GetTime() > 10 then
if UnitBuffID("player", 86698) and select(7, UnitBuffID( "player", 86698)) - GetTime() < 25 then
UseInventoryItem(10)
end
--Goak not avail and goak has > 25 seconds and lust is not up
elseif not PQR_SpellAvailable(86698) and goakSTART - GetTime() + goakDURATION > 25 and lust == false then
if (PQR_SpellAvailable(31884) or PQR_SpellAvailable(53376)) then
CastSpellByName(GetSpellInfo(31884))
CastSpellByName(GetSpellInfo(53376))
elseif (IsPlayerSpell(105809) and PQR_SpellAvailable(105809)) then
CastSpellByName(GetSpellInfo(105809))
end
elseif trinket1CD == 0 and lust == false then
UseInventoryItem(13)
elseif trinket2CD == 0 and lust == false then
UseInventoryItem(14)
elseif glovesCD == 0 and trinket1CD == 1 and trinket2CD == 1 and trinket1CD - GetTime() > 10 and trinket2CD - GetTime() > 10 and lust == false then
UseInventoryItem(10)
--Goak not avail and lust is up
elseif not PQR_SpellAvailable(86698) and lust == true then
if (PQR_SpellAvailable(31884) or PQR_SpellAvailable(53376)) then
CastSpellByName(GetSpellInfo(31884))
CastSpellByName(GetSpellInfo(53376))
elseif (IsPlayerSpell(105809) and PQR_SpellAvailable(105809)) then
CastSpellByName(GetSpellInfo(105809))
end
elseif trinket1CD == 0 and lust == true then
UseInventoryItem(13)
elseif trinket2CD == 0 and lust == true then
UseInventoryItem(14)
elseif glovesCD == 0 and trinket1CD == 1 and trinket2CD == 1 and trinket1CD - GetTime() > 10 and trinket2CD - GetTime() > 10 and lust == true then
UseInventoryItem(10)
end
elseif bossExists == false and PQR_IsMoving(1) == false and RangeCheck(35395, "target") then
if glovesCD == 0 then
UseInventoryItem(10)
end
end
edit:
Changed execution sentence, reason: it's better to delay it at the start for goak+wings.
This won't cast if wings is avail so you can combine it with cds to make it more powerful.
PHP Code:
-- Boss Check
local bossExists = false
for i=1,4 do
if UnitExists("boss"..tostring(i)) then
bossExists = true
end
end
--Execution Sentence
if IsPlayerSpell(114157) and not PQR_SpellAvailable(31884) then
if IsInInstance() and select(2, GetInstanceInfo()) == "party" or select(2, GetInstanceInfo()) == "raid" then
if bossExists == false then return false end end
if RangeCheck(114157, "target") and UnitBuffID("player", 84963) and select(7, UnitBuffID( "player", 84963)) - GetTime() >= 11 then
CastSpellByName(GetSpellInfo(114157), "target")
end
end
Can I do this?
select(2, GetInstanceInfo()) == "raid|party" then