Code:
<?xml version="1.0" encoding="utf-8" ?><DRUID><Ability><Name>Rake</Name><Default>false</Default><SpellID>1822</SpellID><Actions></Actions><Lua>local rake, _, _, _, _, _, raketimer = UnitDebuffID(&quot;target&quot;, 1822, &quot;PLAYER&quot;)
if rake ~= nil then
if raketimer - GetTime() &lt; 3 then
return true
end
else
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Rip</Name><Default>false</Default><SpellID>1079</SpellID><Actions></Actions><Lua>local rip, _, _, _, _, _, riptimer = UnitDebuffID(&quot;target&quot;, 1079, &quot;PLAYER&quot;)
local ripCP = GetComboPoints(&quot;player&quot;, &quot;target&quot;)
local riphealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if rip ~= nil then
if riphealth &gt; 25 then
if ripCP == 5 then
if riptimer - GetTime() &lt; 2 then
return true
end
end
end
else
if ripCP == 5 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Shred</Name><Default>false</Default><SpellID>5221</SpellID><Actions></Actions><Lua>-- Check for the debuffs.
local hasCatMangle = UnitDebuffID(&quot;target&quot;, 33876)
local hasBearMangle = UnitDebuffID(&quot;target&quot;, 33878)
local hasTrauma = UnitDebuffID(&quot;target&quot;, 46857)
local hasHemorrhage = UnitDebuffID(&quot;target&quot;, 16511)
local CP = GetComboPoints(&quot;player&quot;, &quot;target&quot;)
-- Just check for all buffs, we have no casting time on Shred so no need for a timer check
if hasCatMangle ~= nil or hasBearMangle ~= nil or hasTrauma ~= nil or hasHemorrhage ~= nil then
if PQR_NotBehindTarget() then
return false
else
if CP == 5 then
return false
else
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Mangle</Name><Default>false</Default><SpellID>33876</SpellID><Actions></Actions><Lua>-- Rogues and Warriors can handle it themselves.
local hasCatMangle, _, _, _, _, _, CatMangleTimer = UnitDebuffID(&quot;target&quot;, 33876)
local hasBearMangle, _, _, _, _, _, BearMangleTimer = UnitDebuffID(&quot;target&quot;, 33878, &quot;PLAYER&quot;)
local hasTrauma = UnitDebuffID(&quot;target&quot;, 46857)
local hasHemorrhage = UnitDebuffID(&quot;target&quot;, 16511)
local CP = GetComboPoints(&quot;player&quot;, &quot;target&quot;)
if PQR_NotBehindTarget() then
if CP == 5 then
return false
else
return true
end
end
-- First, let&apos;s let other people handle their own debuffs
if hasTrauma ~= nil then
return false
elseif hasHemorrhage ~= nil then
return false
elseif hasBearMangle ~= nil then
return false
-- Let us handle it!
elseif hasCatMangle ~= nil or hasBearMangle ~= nil then
-- Check the timer
if CatMangleTimer - GetTime() &lt; 1 then
return true
end
else
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Faerie Fire (Feral)</Name><Default>false</Default><SpellID>16857</SpellID><Actions></Actions><Lua>local FF, _, _, _, _, _, timer = UnitDebuffID(&quot;target&quot;, 91565)
local FFstart, FFduration, FFenabled = GetSpellCooldown(16857)
local FFcooldown = (FFstart + FFduration - GetTime())
if FF == nil then
if FFcooldown &gt; 0 then
return false
else
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Savage Roar</Name><Default>false</Default><SpellID>52610</SpellID><Actions></Actions><Lua>local _,_,_,SavageRoar = UnitBuffID(&quot;player&quot;, 62071)
local srCP = GetComboPoints(&quot;player&quot;, &quot;target&quot;)
local rip, _, _, _, _, _, riptimer = UnitDebuffID(&quot;target&quot;, 1079, &quot;PLAYER&quot;)
if SavageRoar ~= nil then
return false
else
if rip ~= nil then
if srCP &gt;= 5 then
if riptimer - GetTime() &gt;= 8 then
return true
end
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Ferocious Bite</Name><Default>false</Default><SpellID>22568</SpellID><Actions></Actions><Lua>local fbrip, _, _, _, _, _, fbtimer = UnitDebuffID(&quot;target&quot;, 1079, &quot;PLAYER&quot;)
local fbCP = GetComboPoints(&quot;player&quot;, &quot;target&quot;)
local fbhealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local fbenergy = UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) * 100
if fbhealth &lt;= 25 then
if fbrip ~= nil then
if fbCP == 5 then
return true
end
end
else
if fbrip ~= nil then
if fbtimer - GetTime() &gt; 5 and fbenergy &gt;= 60 and fbCP == 5 then
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Berserk</Name><Default>false</Default><SpellID>50334</SpellID><Actions></Actions><Lua>local _, _, _, BS = UnitBuffID(&quot;player&quot;, 50334)
local BSstart, BSduration = GetSpellCooldown(50334)
local BScooldown = (BSstart + BSduration - GetTime())
local bsEnergy = UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) * 100
local bsHealth = UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;) * 100
local levelcheck = UnitLevel(&quot;target&quot;)
if levelcheck == -1 or levelcheck &gt;= 87 then
if BScooldown &gt; 0 then
return false
else
-- if bsHealth &lt; 96 then
return true
-- end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Tigers Fury</Name><Default>false</Default><SpellID>5217</SpellID><Actions>/use Ancient Petrified Seed</Actions><Lua>local _,_,_,TF = UnitBuffID(&quot;player&quot;, 5217)
local TFstart, TFduration = GetSpellCooldown(5217)
local TFcooldown = (TFstart + TFduration - GetTime())
local tfEnergy = UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) * 100
if TF ~= nil then
return false
else
if TFcooldown &gt; 0 then
return false
else
if tfEnergy &lt; 40 then
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Swipe</Name><Default>false</Default><SpellID>62078</SpellID><Actions></Actions><Lua>local _,_,_,BS = UnitBuffID(&quot;player&quot;, 50334)
local energy = UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) * 100
if BS ~= nil then
if energy &gt;= 22 then
return true
end
else
if energy &gt;= 45 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>cat form</Name><Default>false</Default><SpellID>768</SpellID><Actions></Actions><Lua>local slowed = UnitDebuff(&quot;player&quot;, &quot;120&quot;)
local slowed = UnitDebuff(&quot;player&quot;, &quot;7302&quot;)
local slowed = UnitDebuff(&quot;player&quot;, &quot;5116&quot;)
local slowed = UnitDebuff(&quot;player&quot;, &quot;8056&quot;)
local slowed = UnitDebuff(&quot;player&quot;, &quot;45524&quot;)
if slowed ~= nil then
CastSpellByName(&quot;Cat Form&quot;, &quot;768&quot;)
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>barkskin</Name><Default>false</Default><SpellID>22812</SpellID><Actions></Actions><Lua>local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if enraged == nil and unithealth &lt;= 60 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>s</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>local mytarget = &quot;player&quot;
local lowest = 100 * UnitHealth(mytarget) / UnitHealthMax(mytarget)
local group = &quot;party&quot;
local members = GetNumPartyMembers()
lowhpmembers = 0
if GetNumRaidMembers() &gt; 0 then
group = &quot;raid&quot;
members = GetNumRaidMembers()
end
for i = 1, members, 1 do
local member = group..tostring(i)
local memberhp = 100 * UnitHealth(member) / UnitHealthMax(member)
if UnitGroupRolesAssigned(member) == &quot;TANK&quot; then memberhp = memberhp - 5 end
if UnitThreatSituation(member) == 3 then memberhp = memberhp - 5 end
if memberhp &lt; 95 and UnitInRange(member) then lowhpmembers = lowhpmembers +1 end
if memberhp &gt; 1 and memberhp &lt; lowest and UnitInRange(member) then
mytarget = member
lowest = memberhp
end
end
TargetUnit(mytarget)</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Autotarget LowHP</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>local mytarget = &quot;player&quot;
local lowest = 100 * UnitHealth(mytarget) / UnitHealthMax(mytarget)
local group = &quot;party&quot;
local members = GetNumPartyMembers()
lowhpmembers = 0
if GetNumRaidMembers() &gt; 0 then
group = &quot;raid&quot;
members = GetNumRaidMembers()
end
for i = 1, members, 1 do
local member = group..tostring(i)
local memberhp = 100 * UnitHealth(member) / UnitHealthMax(member)
if UnitGroupRolesAssigned(member) == &quot;TANK&quot; then memberhp = memberhp - 5 end
if UnitThreatSituation(member) == 3 then memberhp = memberhp - 5 end
if memberhp &lt; 95 and UnitInRange(member) then lowhpmembers = lowhpmembers +1 end
if memberhp &gt; 1 and memberhp &lt; lowest and UnitInRange(member) then
mytarget = member
lowest = memberhp
end
end
TargetUnit(mytarget)</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Nourish</Name><Default>false</Default><SpellID>50464</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if friend ~= nil and mytarget &lt; 90 then
return true
end
if friend ~= nil and PQR_IsMoving(1) == false and mytarget &lt; 90 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Rejuvenation</Name><Default>false</Default><SpellID>774</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local rejuvenation = UnitBuffID(&quot;target&quot;, 774)
if friend ~= nil and mytarget &lt; 95 and rejuvenation == nil and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Wild Growth</Name><Default>false</Default><SpellID>48438</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if friend ~= nil and mytarget &lt; 80 and lowhpmembers &gt;= 5 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Swiftmend</Name><Default>false</Default><SpellID>18562</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local SM = UnitBuffID(&quot;target&quot;,774)
if friend ~= nil and SM ~= nil and mytarget &lt; 85 and lowhpmembers &gt;= 3 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Regrowth</Name><Default>false</Default><SpellID>8936</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
local Clearcasting = UnitBuffID(&quot;player&quot;,16870, &quot;player&quot;)
if friend ~= nil and Clearcasting ~= nil and mytarget &lt; 65 and manapercent &gt; 15 and IsMounted() == nil then
return true
end
if friend ~= nil and PQR_IsMoving(1) == false and mytarget &lt; 35 and manapercent &gt; 15 and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Innervate</Name><Default>false</Default><SpellID>29166</SpellID><Actions></Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
if manapercent &lt; 65 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Lifebloom</Name><Default>false</Default><SpellID>33763</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local LB = UnitBuffID(&quot;target&quot;, 33763)
local treeoflife = UnitBuffID(&quot;player&quot;,33891)
if friend ~= nil and mytarget &lt; 96 and LB &lt;=3 and UnitThreatSituation(&quot;target&quot;) then
return true
end
if friend ~= nil and treeoflife~= nil and mytarget &lt; 85 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Healing Touch</Name><Default>false</Default><SpellID>5185</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend(&quot;player&quot;,&quot;target&quot;)
local mytarget = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
local SwG = UnitBuffID(&quot;player&quot;, 17116)
if friend ~= nil and SwG ~= nil and mytarget &lt; 25 and manapercent &gt; 10 then
return true
end
if friend ~= nil and PQR_IsMoving(1) == false and mytarget &lt; 25 and manapercent &gt; 10 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Tranquility</Name><Default>false</Default><SpellID>740</SpellID><Actions></Actions><Lua>local SwG = UnitBuffID(&quot;player&quot;, 17116)
if SwG ~= nil and GetSpellCooldown(740) == 0 and IsShiftKeyDown() then
return true
end
if PQR_IsMoving(1) == false and GetSpellCooldown(740) == 0 and IsShiftKeyDown() and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability></DRUID>