Requires: Hack addon
[Donate]
Single Target Macro
Code:
/run Hack.Run("Warrior.Fury","0")
AoE Group Macro
Code:
/run Hack.Run("Warrior.Fury","1")
Code Block
Code:
local AoEMode = ...
cast=CastSpellByName
function check(sp,unit)
unit = unit or "target";
spell = string.format("%s",sp)
if GetSpellCooldown(spell)==0 and IsUsableSpell(spell) then
if SpellHasRange(spell)==1 then
if IsSpellInRange(spell,unit)~=1 then
return false
end
end
else
return false
end
return true
end
local PartyNum = GetNumPartyMembers()
if PartyNum~=0 then
if check("Commanding Shout") then cast("Commanding Shout") return end
else
if check("Battle Shout") then cast("Battle Shout") return end
end
--- INTERCEPT/HEROIC FURY ---
if GetSpellCooldown("Heroic Fury")>2 and GetSpellCooldown("Intercept")>2 and GetSpellCooldown("Heroic Throw")==0 and check("Heroic Throw") then cast("Heroic Throw") return end
if GetSpellCooldown("Heroic Fury")==0 and IsSpellInRange("Raging Blow", "target")==0 and GetSpellCooldown("Intercept")~=0 and UnitPower("player")>10 then cast("Heroic Fury") return end
if check("Intercept") and UnitPower("player")>10 then cast("Intercept") return end
---
-- DO NOT CONTINUE IF OUT OF COMBAT --
if UnitAffectingCombat("player")~=1 then return end
--------------------------------------
--- TRINKETS + SURVIVAL ---
if GetInventoryItemCooldown(13)==0 then UseInventoryItem(13) end
if GetInventoryItemCooldown(14)==0 then UseInventoryItem(14) end
if (UnitHealth("player")/UnitHealthMax("player")<=0.2) and check("Rallying Cry") then cast("Rallying Cry") return end
---------------------------
--- INTERUPTION ----------------------------
local uch={UnitChannelInfo("target")}
local uca={UnitCastingInfo("target")}
-- Cho'gall Interuption
if UnitDebuff("target", "Worshipping")=="Worshipping" and check("Pummel") then cast("Pummel") return end
-- BWD Interuption
if UnitName("target")=="Maloriak" and (uca[1]=="Arcane Storm" or uch[1]=="Arcane Storm") and check("Pummel") then cast ("Pummel") return end
-- ZulGurub Interuption
if (UnitName("target")=="High Priest Venoxis" or UnitName("target")=="Venomancer Mauri" or UnitName("target")=="Venomancer T'Kulu")==true and (uca[1]=="Whispers of Hethiss" or uch[1]=="Whispers of Hethiss") and check("Pummel") then cast("Pummel") return end
-- General Interupt
if (UnitName("target")~="Maloriak" and UnitName("target")~="High Priest Venoxis" and UnitName("target")~="Venomancer Mauri" and UnitName("target")~="Venomancer T'Kulu")==true and (uca[9]==false or uch[8]==false) and check("Pummel") then cast("Pummel") return end
-- Nefarian Debuff
if (UnitName("target")=="Nefarian" or UnitName("target")=="Onyxia") and UnitDebuff("target", "Demoralizing Shout")~="Demoralizing Shout" and check("Demoralizing Shout") then cast("Demoralizing Shout") return end
------------------------------------------------------------------------------------------------
-- Victory Rush before anything
if check("Victory Rush") then cast("Victory Rush") return end
-- Prioritise Bloodthirst before anything else for Single target
if AoEMode=="0" then
if check("Bloodthirst") then cast("Bloodthirst") return end
end
-- Prioritise Whirlwind before anything else for AOE
if AoEMode=="1" then
if check("Whirlwind") then cast("Whirlwind") return end
end
if check("Recklessness") then cast("Recklessness") return end
if check("Enraged Regeneration") and (UnitHealth("player")/UnitHealthMax("player")<=0.5) then cast("Enraged Regeneration") return end
if check("Death Wish") then cast("Death Wish") return end
if check("Inner Rage") then cast("Inner Rage") return end
if check("Berserker Rage") then cast("Berserker Rage") return end
local _, BTCD, _ =GetSpellCooldown("Bloodthirst")
local targetHealth=UnitHealth("target")/UnitHealthMax("target")
-- Single target Execute spam < 20%
if AoEMode=="0" and targetHealth<=0.2 then
if check("Raging Blow") then cast("Raging Blow") return end
if UnitBuff("player", "Bloodsurge")=="Bloodsurge" then cast("Slam") return end
if check("Colossus Smash") then cast("Colossus Smash") return end
if check("Execute") then cast("Execute") return end
end
-- Single target
if AoEMode=="0" and BTCD>2 and targetHealth>0.2 then
if check("Raging Blow") then cast("Raging Blow") return end
if UnitBuff("player", "Bloodsurge")=="Bloodsurge" then cast("Slam") return end
if check("Colossus Smash") then cast("Colossus Smash") return end
i=1 d=90
local isElite=UnitClassification("target")
local isPlayer=UnitIsPlayer("target")
if isPlayer==1 and db("target", "Hamstring")~="Hamstring" and check("Hamstring") then cast("Hamstring") return end
if (isElite=="elite" or isElite=="worldboss" or isPlayer=="1") then
if check("Sunder Armor") then
while(i<=40) do a={UnitDebuff("target",i)}
if a[1]=="Sunder Armor" and a[8]=="player" then
d=a[7]-GetTime()
if a[4]==3 then break end
end
i=i+1
end
end
if i>40 or d<10 then cast("Sunder Armor") return end
end
local PartyNum=GetNumPartyMembers()
if PartyNum~=0 then
if (UnitPower("player")/UnitPowerMax("player")>0.4) and check("Heroic Strike") and BTCD>=2 then cast("Heroic Strike") return end
else
if check("Heroic Strike") and BTCD>=2 then cast("Heroic Strike") return end
end
end
if AoEMode=="1" then
local _, WWCD,_ =GetSpellCooldown("Whirlwind")
local _, CLCD,_ =GetSpellCooldown("Cleave")
if check("Whirlwind") then cast("Whirlwind") return end
if check("Cleave") and WWCD>=2 and IsSpellInRange("Heroic Strike")==1 then cast("Cleave") return end
if WWCD>2 and CLCD>2 and check("Bloodthirst") then cast("Bloodthirst") return end
end