Code:
<?xml version="1.0" encoding="utf-8" ?><HUNTER><Ability><Name>SV: Explosive Shot</Name><Default>false</Default><SpellID>53301</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Multi-Shot</Name><Default>false</Default><SpellID>2643</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Kill Shot</Name><Default>false</Default><SpellID>53351</SpellID><Actions>/cast Rabid</Actions><Lua>local unithealth = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
if unithealth &lt;= 20 then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Kill Command</Name><Default>false</Default><SpellID>34026</SpellID><Actions></Actions><Lua>if IsSpellInRange(&quot;Kill Command&quot;,&quot;target&quot;) == 1 then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Serpent Sting</Name><Default>false</Default><SpellID>1978</SpellID><Actions></Actions><Lua>local ssDebuff = UnitAura(&quot;target&quot;, &quot;Serpent Sting&quot;, nil, &quot;PLAYER|HARMFUL&quot;)
if ssDebuff == nil and UnitHealth(&quot;target&quot;) &gt; 100000 then
return true
end</Lua><RecastDelay>15000</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Arcane Shot</Name><Default>false</Default><SpellID>3044</SpellID><Actions></Actions><Lua>local _, _, _, KCcost = GetSpellInfo(34026)
local _, _, _, ArScost = GetSpellInfo(3044)
local totalCost = (KCcost + ArScost)
if UnitPower(&quot;player&quot;) &gt;= totalCost then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Cobra Shot</Name><Default>false</Default><SpellID>77767</SpellID><Actions>/cast Rabid</Actions><Lua>return true</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Bestial Wrath</Name><Default>false</Default><SpellID>19574</SpellID><Actions>/cast Rabid|/cast Call of the Wild|/cast Blood Fury</Actions><Lua>local _, _, _, FrenzyCount = UnitBuff(&quot;pet&quot;, &quot;Frenzy Effect&quot;)
if FrenzyCount == 5 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Focus Fire</Name><Default>false</Default><SpellID>82692</SpellID><Actions></Actions><Lua>local _, _, _, FrenzyCount = UnitBuff(&quot;pet&quot;, &quot;Frenzy Effect&quot;)
local hasTbw = UnitAura(&quot;player&quot;, &quot;The Beast Within&quot;)
if FrenzyCount ~= nil then
if FrenzyCount == 5 and hasTbw == nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Rapid Fire</Name><Default>false</Default><SpellID>3045</SpellID><Actions>/cast Rabid|/cast Call of the Wild|/cast Blood Fury</Actions><Lua>local hasTbw = UnitAura(&quot;player&quot;, &quot;The Beast Within&quot;)
if hasTbw == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Fervor</Name><Default>false</Default><SpellID>82726</SpellID><Actions>/cast arcane torrent</Actions><Lua>local myFocus = UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) * 100
if myFocus &lt;= 45 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>SV: Arcane Shot</Name><Default>false</Default><SpellID>3044</SpellID><Actions></Actions><Lua>local sLnL, _, _, countLnL = UnitBuff(&quot;player&quot;, &quot;Lock and Load&quot;)
local _, _, _, esCost = GetSpellInfo(53301)
local esStart, esDuration, esEnabled = GetSpellCooldown(53301)
local esCooldown = (esStart + esDuration - GetTime())
local baStart, baDuration, baEnabled = GetSpellCooldown(3674)
local baCooldown = (baStart + baDuration - GetTime())
local _, _, _, asCost = GetSpellInfo(3044)
if sLnL ~= nil then
if countLnL == 1 then
return true
end
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>SV: Black Arrow</Name><Default>false</Default><SpellID>3674</SpellID><Actions></Actions><Lua>local _, _, _, esCost = GetSpellInfo(53301)
local esStart, esDuration, esEnabled = GetSpellCooldown(53301)
local esCooldown = (esStart + esDuration - GetTime())
local _, _, _, baCost = GetSpellInfo(3674)
if UnitPower(&quot;player&quot;) &gt; (baCost + esCost) - (esCooldown * 6) then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>SV: Cobra Shot</Name><Default>false</Default><SpellID>77767</SpellID><Actions>/cast Lifeblood|/cast Blood Fury|/cast Rabid</Actions><Lua>local _, _, _, EScost = GetSpellInfo(53301)
if UnitPower(&quot;player&quot;) &lt; EScost then
return true
else
local ESstart, ESduration, ESenabled = GetSpellCooldown(53301);
local EScooldown = (ESstart + ESduration - GetTime())
if EScooldown &lt; 0.7 then
return false
else
return true
end
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>SV: Steady Shot</Name><Default>false</Default><SpellID>56641</SpellID><Actions></Actions><Lua>local _, _, _, EScost = GetSpellInfo(53301)
if UnitPower(&quot;player&quot;) &lt; EScost then
return true
else
local ESstart, ESduration, ESenabled = GetSpellCooldown(53301);
local EScooldown = (ESstart + ESduration - GetTime())
if EScooldown &lt; 0.7 then
return false
else
return true
end
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Hunter&apos;s Mark</Name><Default>false</Default><SpellID>1130</SpellID><Actions></Actions><Lua>--code by kickmydog
local hmDebuff = UnitAura(&quot;target&quot;, &quot;Hunter&apos;s Mark&quot;, nil, &quot;PLAYER|HARMFUL&quot;)
if hmDebuff == nil then
return true
end</Lua><RecastDelay>15000</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Aspect of the Fox</Name><Default>false</Default><SpellID>82661</SpellID><Actions></Actions><Lua>local FoxBuff = UnitBuffID(&quot;player&quot;, 82661)
if PQR_IsMoving(1) == true and FoxBuff == nil and UnitExists(&quot;target&quot;) then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Aspect of the Hawk</Name><Default>false</Default><SpellID>13165</SpellID><Actions></Actions><Lua>if PQR_IsMoving(1) == false
and UnitBuffID(&quot;player&quot;, 13165) == nil
then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Steady Shot</Name><Default>false</Default><SpellID>56641</SpellID><Actions>/cast !auto shot|/use 10|/cast Rabid|/cast Lifeblood|/cast Blood Fury</Actions><Lua>if UnitPower(&quot;player&quot;) &lt; 40 then reloadphase = 1 end
if UnitPower(&quot;player&quot;) &gt; 60 then reloadphase = nil end
if reloadphase then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Arcane Shot</Name><Default>false</Default><SpellID>3044</SpellID><Actions></Actions><Lua>local myFocus = UnitPower(&quot;player&quot;)
if myFocus &gt; 58 then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Chimera Shot</Name><Default>false</Default><SpellID>53209</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Aimed shot!</Name><Default>false</Default><SpellID>0</SpellID><Actions>/cast Aimed Shot!</Actions><Lua>local fire = UnitBuffID(&quot;player&quot;, &quot;82926&quot;)
if fire ~= nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Rapid Fire</Name><Default>false</Default><SpellID>3045</SpellID><Actions>/cast Call of the Wild</Actions><Lua>_,_,_,_,_,_,casttime = GetSpellInfo(19434)
if UnitBuffID(&quot;player&quot;, &quot;3045&quot;) == nil and casttime &gt; 1800 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Aimed Shot</Name><Default>false</Default><SpellID>19434</SpellID><Actions></Actions><Lua>local myFocus = UnitPower(&quot;player&quot;)
local unitHp = 100 * UnitHealth(&quot;target&quot;) / UnitHealthMax(&quot;target&quot;)
_,_,_,_,_,_,casttime = GetSpellInfo(19434)
if myFocus &gt;= 60 and PQR_IsMoving(1) == false then
if casttime &lt; 1800 or unitHp &gt;= 90 then
return true
end
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma; Readiness</Name><Default>false</Default><SpellID>23989</SpellID><Actions></Actions><Lua>local RFstart, RFduration, RFenabled = GetSpellCooldown(3045)
local CSstart, CSduration, CSenabled = GetSpellCooldown(53209)
if RFstart + RFduration - GetTime() &gt; 30 and CSstart + CSduration - GetTime() &gt; 7 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Misdirection</Name><Default>false</Default><SpellID>34477</SpellID><Actions></Actions><Lua>local InParty = GetNumPartyMembers()
if InParty &gt; 0 and UnitInRaid(&quot;player&quot;) == nil then
for i = 1, InParty, 1 do
local member = &quot;party&quot;..tostring(i)
if UnitGroupRolesAssigned(member) == &quot;TANK&quot; and UnitThreatSituation(member,&quot;target&quot;) ~= 3 then
CastSpellByName(&quot;Misdirection&quot;)
SpellTargetUnit(member)
end
end
end</Lua><RecastDelay>500</RecastDelay><Target>Focus</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Multi-Shot</Name><Default>false</Default><SpellID>2643</SpellID><Actions></Actions><Lua>local myFocus = UnitPower(&quot;player&quot;)
if myFocus &gt; 58 then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Raptor Strike</Name><Default>false</Default><SpellID>2973</SpellID><Actions></Actions><Lua>if IsSpellInRange(&quot;Raptor Strike&quot;,&quot;target&quot;) == 1 then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Tranquilizing Shot</Name><Default>false</Default><SpellID>19801</SpellID><Actions></Actions><Lua>local i = 1
local buff,_,_,_,bufftype = UnitBuff(&quot;target&quot;, i)
while buff do
if bufftype == &quot;Magic&quot; or buff == &quot;Enrage&quot; then
return true
end
i = i + 1;
buff,_,_,_,bufftype = UnitBuff(&quot;target&quot;, i)
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Concussive Shot</Name><Default>false</Default><SpellID>5116</SpellID><Actions></Actions><Lua>return true</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>BM: Bestial Wrath (PVP</Name><Default>false</Default><SpellID>19574</SpellID><Actions>/cast Rabid|/cast Call of the Wild|/cast Blood Fury</Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><Target>Player</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Steady Shot (old)</Name><Default>false</Default><SpellID>56641</SpellID><Actions>/cast !auto shot|/use 10|/cast Rabid|/cast Lifeblood|/cast Blood Fury|/petcast Fire Breath</Actions><Lua>local myFocus = UnitPower(&quot;player&quot;)
if myFocus &lt; 70 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>TANK AUTOTARGET</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>if GetNumPartyMembers() &gt; 0 and UnitInRaid(&quot;player&quot;) == nil then
local heisthetank = nil
for i = 1, GetNumPartyMembers(), 1 do
if UnitGroupRolesAssigned(&quot;party&quot;..tostring(i)) == &quot;TANK&quot; then heisthetank = &quot;party&quot;..tostring(i) end
end
if heisthetank and UnitExists(&quot;target&quot;) == nil
and UnitAffectingCombat(heisthetank)
and UnitAffectingCombat(heisthetank..&quot;target&quot;)
and UnitIsDead(heisthetank..&quot;target&quot;) == nil
and UnitCanAttack(&quot;player&quot;,heisthetank..&quot;target&quot;)
then TargetUnit(heisthetank..&quot;target&quot;) end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>PET AUTOTARGET</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>if UnitExists(&quot;target&quot;) == nil
and UnitAffectingCombat(&quot;player&quot;)
then TargetUnit(&quot;pettarget&quot;) end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Kill Command (Burning Adrenaline)</Name><Default>false</Default><SpellID>34026</SpellID><Actions></Actions><Lua>local badrenaline = UnitBuffID(&quot;player&quot;, &quot;99060&quot;)
if badrenaline ~= nil and IsSpellInRange(&quot;Kill Command&quot;,&quot;target&quot;) == 1 then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Aimed Shot (Burning Adrenaline)</Name><Default>false</Default><SpellID>19434</SpellID><Actions></Actions><Lua>local badrenaline = UnitBuffID(&quot;player&quot;, &quot;99060&quot;)
if badrenaline ~= nil then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>Ma: Chimera Shot (Burning Adrenaline)</Name><Default>false</Default><SpellID>53209</SpellID><Actions></Actions><Lua>local badrenaline = UnitBuffID(&quot;player&quot;, &quot;99060&quot;)
if badrenaline ~= nil then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>All: Wing Clip</Name><Default>false</Default><SpellID>2974</SpellID><Actions></Actions><Lua>if IsSpellInRange(&quot;Wing Clip&quot;,&quot;target&quot;) == 1 then
return true
end</Lua><RecastDelay>9000</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability><Ability><Name>SV: Explosive Shot (LNL)</Name><Default>false</Default><SpellID>53301</SpellID><Actions></Actions><Lua>local explosive = UnitBuffID(&quot;player&quot;, &quot;56342&quot;)
if explosive ~= nil then
return true
end</Lua><RecastDelay>500</RecastDelay><Target>Target</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability></HUNTER>
Rotations