PHP Code:
<?xml version="1.0" encoding="utf-8" ?><MAGE><Ability><Name>B - Arcane Missile</Name><Default>false</Default><SpellID>5143</SpellID><Actions>/startattack</Actions><Lua>local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;)
local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
if manapercent &lt;= 36 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Buff - Arcane Power</Name><Default>false</Default><SpellID>12042</SpellID><Actions></Actions><Lua>local MirrorImageStart, MirrorImageDuration = GetSpellCooldown(12051)
local MirrorImageCooldown = (MirrorImageStart + MirrorImageDuration - GetTime())
if MirrorImageCooldown &gt;= 3 then
return false
else
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Use - Mana Gem</Name><Default>false</Default><SpellID>0</SpellID><Actions>/use Mana Gem</Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
local ManaGemStart, ManaGemDuration = GetItemCooldown(36799)
local ManaGemCooldown = (ManaGemStart + ManaGemDuration - GetTime())
if ManaGemCooldown &lt; 3 then
if manapercent &lt; 95 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Flame Orb</Name><Default>false</Default><SpellID>82731</SpellID><Actions>/startattack</Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Mirror Image</Name><Default>false</Default><SpellID>55342</SpellID><Actions></Actions><Lua>local levelCheck = UnitLevel(&quot;target&quot;)
if levelCheck ~= -1 then
return false
else
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Make - Mana Gem</Name><Default>false</Default><SpellID>759</SpellID><Actions></Actions><Lua>local gemcount = GetItemCount(&quot;Mana Gem&quot;)
if gemcount &lt; 1 then
return true
end</Lua><RecastDelay>12000</RecastDelay><Target>Player</Target></Ability><Ability><Name>Evocation</Name><Default>false</Default><SpellID>12051</SpellID><Actions></Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
if manapercent &lt; 35 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>B - Arcane Blast</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack|/use 10|/use 13|/use 14</Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;)
local EvocationStart, EvocationDuration = GetSpellCooldown(12051)
local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime())
if EvocationCooldown &lt; 3 then
--evocation will be off CD within 3 seconds or is off CD.
if manapercent &gt; 35 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Buff - Arcane Brilliance</Name><Default>false</Default><SpellID>1459</SpellID><Actions></Actions><Lua>sABr = UnitBuffID(&quot;player&quot;, 1459)
if sABr == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Blast Filler</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
if AB == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Blast</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
local EvocationStart, EvocationDuration = GetSpellCooldown(12051)
local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime())
if EvocationCooldown &gt; 3 then
if AB &gt;= 2 then
return false
else
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Missile</Name><Default>false</Default><SpellID>5143</SpellID><Actions></Actions><Lua>local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;)
local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
if AB &gt;= 2 then
if AM ~= nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Missile</Name><Default>false</Default><SpellID>5143</SpellID><Actions>/startattack</Actions><Lua>local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;)
local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
local EvocationStart, EvocationDuration = GetSpellCooldown(12051)
local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime())
if EvocationCooldown &gt; 3 then
if AB &gt;= 2 then
if AM ~= nil then
return true
end
end
end</Lua><RecastDelay>14000</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Barrage</Name><Default>false</Default><SpellID>44425</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;)
if AB == nil then
if AM == nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Barrage</Name><Default>false</Default><SpellID>44425</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;)
local EvocationStart, EvocationDuration = GetSpellCooldown(12051)
local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime())
if EvocationCooldown &gt; 3 then
if AB &gt;= 3 then
if AM == nil then
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Blast - Filler</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
local EvocationStart, EvocationDuration = GetSpellCooldown(12051)
local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime())
if EvocationCooldown &gt; 3 then
if AB == nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Blast</Name><Default>false</Default><SpellID>30451</SpellID><Actions></Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;)
local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;)
if AB &lt;= 1 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Buff - Mage Armor</Name><Default>false</Default><SpellID>6117</SpellID><Actions></Actions><Lua>sMA = UnitBuffID(&quot;player&quot;, 6117)
if sMA == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability></MAGE>
arcane_MAGE_Rotations.xml