Example: Simple Auto Dispel
Auto Dispel
Using the Heitu Super Macro, you can automatically scan team members' aura lists, detect harmful debuffs, and intelligently cast the corresponding dispel spell. No need to manually check each person — just press a button to dispel.
It uses a simple priority strategy: dispels party members and Group 1 first.
You'll need to manually configure the dispel spell IDs and debuff aura IDs for your own class.
You can combine this with the One-Key Heal macro — just place this macro above the heal macro.
If you're experienced enough, you can develop a one-click dispel Super Macro plugin based on this example to earn sponsorship time.
Warning
Note: This is a minimal example. You need to manually fill in the debuff aura IDs you want to dispel and your own dispel spell IDs.
Use Cases
- Quickly dispel poisons/curses/magic effects from party members in dungeons
- Emergency dispel debuffs from teammates in PVP
- Batch-cleanse harmful auras from raid members
How to Use
- Open Heitu → Super Macro
- Paste the full code into the editor
- In-game, use the following command:
/s S AutoDispel()Bind it to a hotkey and press to auto-dispel.
Full Code
In the Heitu Super Macro editor, enter:
-- ============================================================
-- Auto Dispel: everything in one function
-- Priority: party > Group 1 > others
-- Usage: /s S AutoDispel()
-- ============================================================
function AutoDispel()
-- ============================================================
-- CONFIG (modify as needed)
-- ============================================================
-- Output debug info? (true = print, false = silent)
local DEBUG = false
-- Max cast distance (yards)
local MAX_DIST = 40
-- ============================================================
-- Dispel Spell Config Table
-- Each entry represents a dispel spell (e.g. Abolish Poison, Remove Curse)
-- Currently only Druid spells are listed. Add your own class spells
-- as needed, and remember to comment out the Druid entries.
-- spellId: spell ID of the dispel spell you cast
-- name: spell name (for debug output only)
-- debuffs: list of debuffs this spell can dispel
-- auraId: aura spell ID of the debuff to be dispelled
-- name: debuff name (for debug output only)
--
-- Make sure to use the correct spell IDs for your server version!
-- Look up IDs at: https://db.heitu.org/80/
-- ============================================================
local DISPEL_SPELLS = {
{
-- Remove Curse (Druid)
spellId = 2782,
name = "Remove Curse",
debuffs = {
{ auraId = 5137, name = "Curse of Weakness" },
{ auraId = 12741, name = "Curse of Exhaustion" },
-- add more curse debuffs here ...
},
},
{
-- Abolish Poison (Druid)
spellId = 8946,
name = "Abolish Poison",
debuffs = {
{ auraId = 7992, name = "Crippling Poison" },
-- add more poison debuffs here ...
},
},
}
-- ============================================================
-- Core logic
-- ============================================================
-- Try to dispel a single target; returns true if a spell was cast
local function tryDispel(guid, logPrefix)
local info = GetUnitInfo(guid)
if not info or info.health <= 0 then return false end
if Distance(guid) > MAX_DIST then return false end
if not info.auras then return false end
for _, dispelSpell in ipairs(DISPEL_SPELLS) do
for _, debuff in ipairs(dispelSpell.debuffs) do
for _, aura in ipairs(info.auras) do
if aura.spellId == debuff.auraId then
if DEBUG then
print(logPrefix .. ": " .. info.name .. " has [" .. debuff.name .. "] → cast [" .. dispelSpell.name .. "]")
end
Spell(dispelSpell.spellId, guid)
return true
end
end
end
end
return false
end
local me = GetMeInfo()
local members = TeamMembers()
-- Not in a group — check self only
if not members or #members == 0 then
if me and me.guid then
if DEBUG then print("Auto Dispel: not in a group, checking self only") end
tryDispel(me.guid, "Dispel self")
end
return
end
-- Group members by priority: party / Group 1 / others
local myParty, group1, others = {}, {}, {}
for _, m in ipairs(members) do
local guid = type(m) == "table" and m.guid or m
local info = GetUnitInfo(guid)
if info then
-- partyIndex <= 5 = your party, group == 1 = Group 1
-- adjust the field names if your server returns different ones
if info.partyIndex and info.partyIndex <= 5 then
myParty[#myParty + 1] = guid
elseif info.group and info.group == 1 then
group1[#group1 + 1] = guid
else
others[#others + 1] = guid
end
end
end
-- Scan in priority order: party → Group 1 → others
local scanOrder = {
{ list = myParty, label = "Party dispel" },
{ list = group1, label = "Group1 dispel" },
{ list = others, label = "Dispel" },
}
for _, section in ipairs(scanOrder) do
for _, guid in ipairs(section.list) do
if tryDispel(guid, section.label) then
return -- only dispel one per press (GCD limit); press again for more
end
end
end
if DEBUG then print("Nothing to dispel") end
endThen click the Save and Sync to Game button in the top-right corner of the interface.
How It Works
- All config (distance, debug toggle, dispel spell table) lives inside the
AutoDispel()function — one function does it all - A local
tryDispel()function handles single-target dispel logic - On each press,
TeamMembers()fetches the member list - Members are grouped by priority: party > Group 1 > others
- Each group is scanned in order
GetUnitInfo(guid).aurasretrieves the target's aura list- Each aura is matched against the
DISPEL_SPELLSdebuff table - On the first match, the corresponding dispel spell is cast and the function returns
- Only one debuff is dispelled per press (GCD limit) — press repeatedly to cleanse multiple targets
Config Reference
DISPEL_SPELLS Fields
Each dispel spell entry contains:
| Field | Type | Description |
|---|---|---|
spellId | number | Spell ID of the dispel spell you cast (e.g. Abolish Poison, Remove Curse) |
name | string | Spell name (for debug output only) |
debuffs | table | List of debuffs this spell can dispel |
Each debuffs entry:
| Field | Type | Description |
|---|---|---|
auraId | number | Aura spell ID of the debuff to be dispelled |
name | string | Debuff name (for debug output only) |
Adding a New Dispel Group
Add a new entry to the DISPEL_SPELLS table. For example, Priest's Dispel Magic:
{
-- Dispel Magic (Priest/Mage/Druid)
spellId = 999999,
name = "Dispel Magic",
debuffs = {
{ auraId = 999999, name = "Curse" },
{ auraId = 999999, name = "Hex" },
-- ... more magic debuffs
},
},FAQ
It doesn't react when I press it
- Confirm Heitu version >= 1.11.15
- Check that the
spellIdinDISPEL_SPELLSis correct (your cast dispel spell ID) - Check that the
auraIdindebuffsis correct (the debuff aura ID on the target) - Make sure the target is within cast range (default 40 yards)
How do I find the aura spell ID on a target
Use this Lua snippet to list all auras on your current target:
local info = GetUnitInfo("target")
if info and info.auras then
for _, aura in ipairs(info.auras) do
print("Aura ID: " .. aura.spellId .. " Remaining: " .. aura.endTime .. " Stacks: " .. aura.applications)
end
endHow do I look up dispel spell IDs
A dispel spell ID is your cast spell ID, not the debuff's ID. For example, a Druid's Abolish Poison or Remove Curse. Look up the correct IDs for your server version at db.heitu.org.
Can it dispel multiple debuffs at once
Due to the GCD (Global Cooldown), only one debuff can be dispelled per press. If a target has multiple debuffs, press the key multiple times. The script matches debuffs in the order they appear in the config table.
How do I only dispel a specific type
If you only want to dispel poisons, keep only the Abolish Poison entry in DISPEL_SPELLS and comment out or remove the rest.