Code:
<?xml version="1.0" encoding="utf-8" ?><WARLOCK><Ability><Name>Shadow Bolt</Name><Default>false</Default><SpellID>686</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>300</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Curse of the Elements</Name><Default>false</Default><SpellID>1490</SpellID><Actions></Actions><Lua>--we want to cast if the target is a boss, and does not have any of the following:
--Curse of the Elements, Earth and Moon, Ebon Plague, Fire Breath, Lightning Breath, Master Poisoner.
--and Jinx: Curse of the Elements
local dbCotEPlayer, _, _, _, _, _, CotEexpireTime = UnitDebuffID(&quot;target&quot;, 1490, &quot;PLAYER&quot;)
local dbCotE = UnitDebuffID(&quot;target&quot;, 1490)
local dbJinx = UnitDebuffID(&quot;target&quot;, 85547)
local dbEaM = UnitDebuffID(&quot;target&quot;, 60433)
local dbEP = UnitDebuffID(&quot;target&quot;, 65142)
local dbFB = UnitDebuffID(&quot;target&quot;, 34889)
local dbLB = UnitDebuffID(&quot;target&quot;, 24844)
local dbMP = UnitDebuffID(&quot;target&quot;, 93068)
local levelCheck = UnitLevel(&quot;target&quot;)
if levelCheck ~= -1 then
--boss level returns as -1
return false
end
if dbCotEPlayer ~= nil then
--we have a COTE up that was cast by us, refresh it if necessary.
if CotEexpireTime - GetTime() &lt; 1.5 then
return true
end
elseif dbCotE ~= nil or dbEaM ~= nil or dbEP ~= nil or dbFB ~= nil or dbLB ~= nil or dbMP ~= nil or dbJinx ~= nil then
--a debuff is up, cast by another player... let them manage it.
return false
else
--no debuff is up, cast it.
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Life Tap</Name><Default>false</Default><SpellID>1454</SpellID><Actions></Actions><Lua>local myMana = UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) * 100
local myHealth = UnitHealth(&quot;player&quot;) / UnitHealthMax(&quot;player&quot;) * 100
if myMana &lt; 20 and myHealth &gt; 50 then
return true
end</Lua><RecastDelay>2000</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Fel Flame</Name><Default>false</Default><SpellID>77799</SpellID><Actions></Actions><Lua>local felSpark = UnitBuffID(&quot;player&quot;, 89937)
if felSpark ~= nil then
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Shadowburn</Name><Default>false</Default><SpellID>17877</SpellID><Actions></Actions><Lua>local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if unithealth &lt;= 20 then
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Soulburn</Name><Default>false</Default><SpellID>74434</SpellID><Actions></Actions><Lua>local SoulFireCheck = UnitBuffID(&quot;player&quot;, 18120)
local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local heroism = UnitBuffID(&quot;player&quot;, 32182)
local lust = UnitBuffID(&quot;player&quot;, 2825)
local warp = UnitBuffID(&quot;player&quot;, 80353)
local hysteria = UnitBuffID(&quot;player&quot;, 90355)
if unithealth &gt; 97 then
--best we can currently do for Start of Fight
if SoulFireCheck == nil then
return true
end
end
if heroism ~= nil or lust ~= nil or warp ~= nil or hysteria ~= nil then
if SoulFireCheck == nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Soul Fire</Name><Default>false</Default><SpellID>6353</SpellID><Actions></Actions><Lua>local hasSoulburn = UnitBuffID(&quot;player&quot;, 74434)
local SoulFireCheck, _, _, _, _, _, SoulFireExpire = UnitBuffID(&quot;player&quot;, 18120)
local heroism = UnitBuffID(&quot;player&quot;, 32182)
local lust = UnitBuffID(&quot;player&quot;, 2825)
local warp = UnitBuffID(&quot;player&quot;, 80353)
local hysteria = UnitBuffID(&quot;player&quot;, 90355)
local levelCheck = UnitLevel(&quot;target&quot;)
local empoweredImp = UnitBuffID(&quot;player&quot;, 47221)
if hasSoulburn ~= nil then
return true
end
if empoweredImp ~= nil then
return true
end
if heroism ~= nil or lust ~= nil or warp ~= nil or hysteria ~= nil then
if SoulFireCheck == nil then
return true
end
end
if levelCheck == -1 then
--boss level returns as -1
if SoulFireCheck == nil then
return true
else
SoulFireExpire = SoulFireExpire - GetTime()
if SoulFireExpire &lt; 3.5 then
return true
end
end
end</Lua><RecastDelay>400</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Demon Soul</Name><Default>false</Default><SpellID>77801</SpellID><Actions>/use 13|/use 14</Actions><Lua>local levelCheck = UnitLevel(&quot;target&quot;)
local heroism = UnitBuffID(&quot;player&quot;, 32182)
local lust = UnitBuffID(&quot;player&quot;, 2825)
local warp = UnitBuffID(&quot;player&quot;, 80353)
local hysteria = UnitBuffID(&quot;player&quot;, 90355)
local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if heroism ~= nil or lust ~= nil or warp ~= nil or hysteria ~= nil then
return true
end
if levelCheck == -1 then
--boss level returns as -1
if unithealth &gt;= 90 then
return true
end
end</Lua><RecastDelay>12000</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Immolate</Name><Default>false</Default><SpellID>348</SpellID><Actions></Actions><Lua>local debuffImmolate, _, _, _, _, _, ImmolateExpire = UnitDebuffID(&quot;target&quot;, 348, &quot;PLAYER&quot;)
if debuffImmolate == nil then
return true
else
ImmolateExpire = ImmolateExpire - GetTime()
if ImmolateExpire &lt; 3 then
return true
end
end</Lua><RecastDelay>400</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Conflagrate</Name><Default>false</Default><SpellID>17962</SpellID><Actions></Actions><Lua>local debuffImmolate, _, _, _, _, _, ImmolateExpire = UnitDebuffID(&quot;target&quot;, 348, &quot;PLAYER&quot;)
if debuffImmolate ~= nil then
ImmolateExpire = ImmolateExpire - GetTime()
if ImmolateExpire &gt; 3.5 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Bane of Doom</Name><Default>false</Default><SpellID>603</SpellID><Actions></Actions><Lua>--cast Bane of Doom if boss level and Bane not up already.
local baneDoomDebuff = UnitDebuffID(&quot;target&quot;, 603, &quot;PLAYER&quot;)
local levelCheck = UnitLevel(&quot;target&quot;)
if levelCheck ~= -1 then
--boss level returns as -1
return false
end
if baneDoomDebuff == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Corruption</Name><Default>false</Default><SpellID>172</SpellID><Actions></Actions><Lua>local dbCorruption, _, _, _, _, _, CorruptionExpire = UnitDebuffID(&quot;target&quot;, 172, &quot;PLAYER&quot;)
if dbCorruption ~= nil then
--cast if &lt; 1.5 sec left
CorruptionExpire = (CorruptionExpire - GetTime())
if CorruptionExpire &lt; 1.5 then
return true
end
else
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Chaos Bolt</Name><Default>false</Default><SpellID>50796</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Incinerate</Name><Default>false</Default><SpellID>29722</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Bane of Agony</Name><Default>false</Default><SpellID>980</SpellID><Actions></Actions><Lua>local baneAgonyDebuff, _, _, _, _, _, AgonyExpireTime = UnitDebuffID(&quot;target&quot;, 980, &quot;PLAYER&quot;)
local levelCheck = UnitLevel(&quot;target&quot;)
if levelCheck == -1 then
--boss level is -1... do not cast this on a boss.
return false
end
if baneAgonyDebuff ~= nil then
AgonyExpireTime = AgonyExpireTime - GetTime()
if AgonyExpireTime &lt; 1.5 then
return true
end
else
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Haunt</Name><Default>false</Default><SpellID>48181</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Unstable Affliction</Name><Default>false</Default><SpellID>30108</SpellID><Actions></Actions><Lua>local debuffUA, _, _, _, _, _, UaExpire = UnitDebuffID(&quot;target&quot;, 30108, &quot;PLAYER&quot;)
if debuffUA == nil then
return true
else
UaExpire = UaExpire - GetTime()
if UaExpire &lt; 4 then
return true
end
end</Lua><RecastDelay>400</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Shadow Bolt Opener</Name><Default>false</Default><SpellID>686</SpellID><Actions></Actions><Lua>local hasShadowtrance = UnitBuffID(&quot;player&quot;, 17941)
local debuffShadowandflame, _, _, _, _, _, SandfExpire = UnitDebuffID(&quot;target&quot;, 17801, &quot;PLAYER&quot;)
local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if hasShadowtrance ~= nil then
return true
end
if debuffShadowandflame == nil then
return false
else
SandfExpire = SandfExpire - GetTime()
if SandfExpire &lt; 3 then
return true
end
end</Lua><RecastDelay>300</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Drain Soul</Name><Default>false</Default><SpellID>1120</SpellID><Actions></Actions><Lua>local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local hasHaunt = UnitDebuffID(&quot;target&quot;, 48181, &quot;PLAYER&quot;)
if unithealth &lt;= 25 and hasHaunt then
return true
end</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Soulburn Aff</Name><Default>false</Default><SpellID>74434</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Seed of Corruption</Name><Default>false</Default><SpellID>27243</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>600</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Soul Swap</Name><Default>false</Default><SpellID>86121</SpellID><Actions></Actions><Lua>-not done
local bOd = UnitDebuffID(&quot;target&quot;, 603, &quot;PLAYER&quot;)
local bOa = UnitDebuffID(&quot;target&quot;, 980, &quot;PLAYER&quot;)
local corrupT = UnitDebuffID(&quot;target&quot;, 172, &quot;PLAYER&quot;)
local uA = UnitDebuffID(&quot;target&quot;, 30108, &quot;PLAYER&quot;)
if bOd ~= nil or bOa ~= nil and corrupT ~= nil and uA ~= nil then
return true
end</Lua><RecastDelay>300</RecastDelay><SelfCast>False</SelfCast></Ability><Ability><Name>Soul Swap exhale</Name><Default>false</Default><SpellID>68213</SpellID><Actions></Actions><Lua>-not done
local hassoulswap = UnitBuffID(&quot;player&quot;, 86213)
if hassoulswap ~= nil then focustarget
return true
end</Lua><RecastDelay>300</RecastDelay><SelfCast>False</SelfCast></Ability></WARLOCK>
WARLOCK_Rotations.xml: