Shield Tank One-Button Threat Macro (Detailed Annotations)
About 4 min
Shield Tank One-Button Threat Macro [Requires Defensive Stance] (Detailed Annotations)
Step 1: Open the Heitu client → click "Super Macro" → create a new macro → paste the code below.
Step 2: Create a regular macro in-game with /s S DTank_Main(), bind it to a key.
-- ============ Shield Tank One-Button Threat Macro [Requires Defensive Stance] ============
-- Usage: /s S DTank_Main()
-- Priority order (top to bottom): Low-HP Life Gem trinket + Last Stand > DPS trinkets auto-use > Bloodrage rage gen > Battle Shout (Sunder >= 3) > Taunt (target's target isn't self) > Demoralizing Shout at 5 Sunder > Revenge rage dump > Maintain 5 Sunder > Shield Slam filler > Heroic Strike dump > Shield Block damage/mitigation > Cleave dump
-- Core strategy: Auto Last Stand when HP < 26%, auto Life Gem when HP < 41%, auto Bloodrage when rage < 26 for safety, refresh Battle Shout when target has >= 3 Sunder stacks and own buff < 2s to boost AP, auto Taunt when aggro lost and rage is sufficient, auto Demoralizing Shout at 5 Sunder with < 2s remaining, prioritize Revenge when it procs, then maintain 5 Sunder for stable threat, fire Shield Slam when ready, Shield Block at rage > 45, Cleave for large rage dump at rage > 74
-- Not included: auto potions, Shield Wall, Challenging Shout — use these manually based on the situation
function DTank_Main()
-- ====================== [Constant Definition Area] Centralized skill/trinket/equipment ID management for easy swapping ======================
-- Rage generation, raid buff skills
local SPELL_BLOODRAGE = 2687 -- Bloodrage: use when rage < 26 and off CD, quickly generate rage to prevent resource starvation
local SPELL_BATTLE_SHOUT = 25289 -- Battle Shout (max rank): refresh when Sunder >= 3 stacks, buff < 2s remaining, rage > 9 — significant AP boost for threat/damage
local SPELL_TAUNT = 355 -- Taunt: force target swap when target's target isn't you, rage > 9 required
local SPELL_PAIN_SUPPRESS = 12975 -- Last Stand: auto-use when HP < 26%, instant cast, no rage cost
-- Core threat/debuff/survival skills
local SPELL_SUNDER_ARMOR = 11597 -- Sunder Armor: 5-stack cap, primary threat source, maintain throughout the fight
local SPELL_REVENGE = 11601 -- Revenge: high threat value, prioritize when it procs
local SPELL_DEMORALIZE = 11556 -- Demoralizing Shout: apply when target has 5 Sunder stacks and debuff < 2s remaining
local SPELL_SHIELD_SLAM = 23922 -- Shield Slam: high threat filler skill
local SPELL_SHIELD_BLOCK = 2565 -- Shield Block: damage increase and mitigation, activate when Shield Slam is ready and rage > 45
-- Dump skills
local SPELL_HEROIC_STRIKE= 25286 -- Heroic Strike: mid-range rage dump, boosts single-hit threat
local SPELL_CLEAVE = 20569 -- Cleave: high rage overflow dump, fire at rage > 74
-- Survival consumable/trinket
local ITEM_LIFE_GEM = 19341 -- Life Gem: auto-use when HP < 41%, significant heal survival trinket
-- Active DPS trinkets
local ITEM_SPIDER = 22954 -- Kiss of the Spider: AP/haste trinket, auto-use in combat
local ITEM_BUG_BADGE = 21670 -- Badge of the Swarmguard: survival/threat trinket, auto-use in combat
-- ====================== [Batch State Pre-Read] Read all states at once to reduce API calls and improve efficiency ======================
local me = GetMeInfo()
local inCombat = IsCombat() -- Check if in combat — potions/trinkets only trigger during combat
local rage = Power(1) -- Current rage value
local brCD = SCT(SPELL_BLOODRAGE) -- Bloodrage cooldown
local shoutLeft = AuraRemainingTime(SPELL_BATTLE_SHOUT) -- Battle Shout buff remaining time in ms
local tauntCD = SCT(SPELL_TAUNT) -- Taunt cooldown
local painSupCD = SCT(SPELL_PAIN_SUPPRESS) -- Last Stand cooldown
local demoralizeCD = SCT(SPELL_DEMORALIZE) -- Demoralizing Shout cooldown
local demoralizeDebuffDur,_ = TART(SPELL_DEMORALIZE) -- Target's Demoralizing Shout debuff remaining time in ms
local ssCD = SCT(SPELL_SHIELD_SLAM) -- Shield Slam cooldown
local sbCD = SCT(SPELL_SHIELD_BLOCK) -- Shield Block cooldown
local spiderCD = SCT(ITEM_SPIDER) -- Kiss of the Spider cooldown
local bugBadgeCD = SCT(ITEM_BUG_BADGE) -- Badge of the Swarmguard cooldown
local sunderDur, sunderStack = TART(SPELL_SUNDER_ARMOR) -- Current Sunder Armor remaining duration and stacks
local lifeGemCD = SCT(ITEM_LIFE_GEM) -- Life Gem trinket cooldown
local hpPercent = me and (me.health / me.maxHealth * 100) or 100 -- Current HP percentage
local isTargetSelf = TTIS() -- TTIS() shorthand: check if target's target is self
-- ====================== [Priority 1: Life Gem first when HP < 41%; Last Stand when HP < 26%] ======================
if inCombat then
-- Life Gem executes first
if lifeGemCD <= 0 then
if hpPercent < 41 then
M('/use Life Gem')
lifeGemCD = SCT(ITEM_LIFE_GEM)
end
end
-- Last Stand: HP < 26%, off CD, no rage requirement
if hpPercent < 26 and painSupCD <= 0 then
S(SPELL_PAIN_SUPPRESS)
painSupCD = SCT(SPELL_PAIN_SUPPRESS)
end
end
-- ====================== [Priority 2: Auto-use both DPS trinkets in combat to boost threat] ======================
if inCombat then
-- Kiss of the Spider: auto-use when CD <= 0
if spiderCD <= 0 then
M('/use Kiss of the Spider')
spiderCD = SCT(ITEM_SPIDER)
end
-- Badge of the Swarmguard: auto-use when CD <= 0
if bugBadgeCD <= 0 then
M('/use Badge of the Swarmguard')
bugBadgeCD = SCT(ITEM_BUG_BADGE)
end
end
-- ====================== [Priority 3: Bloodrage when CD <= 0 and rage < 26 — only use when rage is low] ======================
if brCD <= 0 and rage < 26 then
S(SPELL_BLOODRAGE)
rage = Power(1)
brCD = SCT(SPELL_BLOODRAGE)
end
-- ====================== [Priority 4: Refresh Battle Shout when buff < 2s, rage > 9, and target has >= 3 Sunder stacks] ======================
if inCombat and shoutLeft < 2000 and rage > 9 and sunderStack >= 3 then
S(SPELL_BATTLE_SHOUT)
rage = Power(1)
end
-- ====================== [Priority 5: Taunt when target's target isn't you, rage > 9, and Taunt off CD — grab aggro back] ======================
if inCombat and not isTargetSelf and rage > 9 and tauntCD <= 0 then
S(SPELL_TAUNT)
tauntCD = SCT(SPELL_TAUNT)
end
-- ====================== [Priority 6: At 5 Sunder stacks, Demoralizing Shout debuff < 2s, rage > 9, off CD — apply debuff] ======================
if inCombat and sunderStack == 5 and demoralizeDebuffDur < 2000 and rage > 9 and demoralizeCD <= 0 then
S(SPELL_DEMORALIZE)
rage = Power(1)
demoralizeCD = SCT(SPELL_DEMORALIZE)
end
-- ====================== [Priority 7: Revenge when proc is available — high threat, no cooldown, fire immediately] ======================
if CanDefensiveStrike() and SCT(SPELL_REVENGE) <= 0 and rage > 4 then
Spell(SPELL_REVENGE)
rage = Power(1)
end
-- ====================== [Priority 8: Sunder Armor — refresh if less than 5 stacks or duration < 3s, rage > 14] ======================
if (sunderStack < 5 or sunderDur < 3000) and rage > 14 then
S(SPELL_SUNDER_ARMOR)
rage = Power(1)
sunderDur, sunderStack = TART(SPELL_SUNDER_ARMOR)
end
-- ====================== [Priority 9: Shield Slam when rage > 24 and off CD — stable high-threat filler] ======================
if rage > 24 and ssCD <= 0 then
S(SPELL_SHIELD_SLAM)
rage = Power(1)
ssCD = SCT(SPELL_SHIELD_SLAM)
end
-- ====================== [Priority 10: Heroic Strike when rage > 36] ======================
if rage > 36 then
S(SPELL_HEROIC_STRIKE)
rage = Power(1)
end
-- ====================== [Priority 11: Shield Block when rage > 45, off CD, and Shield Slam on CD — boosts Shield Slam damage] ======================
if rage > 45 and sbCD <= 0 and ssCD <= 0 then
S(SPELL_SHIELD_BLOCK)
rage = Power(1)
sbCD = SCT(SPELL_SHIELD_BLOCK)
end
-- ====================== [Priority 12: Cleave when rage > 74 — large rage dump] ======================
if rage > 74 then
S(SPELL_CLEAVE)
rage = Power(1)
end
end