Getting Started
Super Macro
This is a new feature, currently in the beta development phase.
Super Macro currently supports all versions: 1.14.2 (60) / 1.12.1 (60) / Turtle WoW / 2.4.3 (70) / 2.5.3 (80) / 3.3.5 (80) / 3.4.3 (80) clients, enhancing the original macro functionality. It is currently in the development and testing phase and is gradually being improved.
Tutorial video: https://www.bilibili.com/video/BV1FVxuejEbn/
How to Enable
Automatically enabled after turning on Heitu Model Editing.
Note: Before using Super Macro, it is strongly recommended to completely disable your antivirus software and add the Heitu folder to the whitelist. Antivirus software may interfere with program operation.
If disabling antivirus doesn't help, try installing the Microsoft library files — the files may be missing.
Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center
For 1.12.1 / Turtle WoW / 2.4.3 / 3.3.5 clients, install the x86 (32-bit) version. For others, install the x64 version.
Standard Format
/s S lua_statement
Example:
/s S if HeathTargetPct(0,50) then Spell(116) else Spell(133) end
Explanation: /s S+space is the fixed format. This format will be recognized and parsed by Heitu.
if HeathTargetPct(0,50) then Spell(116) else Spell(133) end is a piece of Lua code, where the methods are Heitu-enhanced macro functions.
Translation: If the current target's health is between 0% and 50%, use spell 116 (Fireball); otherwise use spell 133 (Frostbolt).
Example 2:
/s S t = AttackTime1() if t>200 or Power(1)>50 then M('/use 英勇打击') if t>200 then Sleep(1,t-200,function() if Power(1)>50 then M('/use 英勇打击') else StopCasting() end end) end end
This is the warrior Execute macro. Adjust parameters according to your needs.
For 1.12 client and Turtle WoW, use the following instead:
/s S t = AttackTime1() if t>200 or Power(1)>50 then Script("CastSpellByName('英勇打击')") if t>200 then Sleep(1,t-200,function() if Power(1)>50 then Script("CastSpellByName('英勇打击')") else Script("SpellStopCasting()") end end) end endThe above is the standard format for an enhanced macro. It can be used alongside in-game native macros.
Super Macro Function Library
Super Macro isn't limited to editing in the in-game macro interface. You can also pre-create functions in the Heitu client interface and sync them for in-game use at any time.
This feature requires Heitu version >= 1.10.30.
For example, as shown above, edit the following in the Heitu client:
function abc()
p=AP() Say('攻强='..p)
endThen use it in an in-game macro:
/s S abc()
This is fully equivalent to:
/s S function abc() p=AP() Say('攻强='..p) end abc()
Clever use of Heitu's base library editor can overcome the in-game macro character limit.
Built-in Functions
AutoLoot (Heitu version >= 1.10.14)
One-key area loot (no bending animation; press multiple times).
void AutoLoot()
(Heitu version 1.10.22) Added a bool parameter. When passed true, bound items will also be looted.
/s S AutoLoot(true)
Example:
/s S AutoLoot()
Create a macro with the above and set a keybind. You can loot all items within range with a single press.AttackPower (Heitu version >= 1.10.14)
Gets your own attack power.
int AttackPower()
Shorthand: int AP()
Example:
/s S p=AP() Say('攻强='..p)Spell
Casts a spell.
void Spell(spellId)
Shorthand: void S(spellId)
Example: Cast Rank 1 Holy Light, where 635 is the spell ID for Rank 1 Holy Light.
/s S Spell(635)Macro
Calls the game's own native macros to perform complex operations.
void Macro(native_wow_macro)
Shorthand: void M(native_wow_macro)
Note: On 1.12.1 client and Turtle WoW, conflicts with some addons may cause spell casting to fail. Use the Script function as an alternative.
Example: Cast Seal of Righteousness via a native WoW macro.
/s S Macro('/cast 正义圣印')Script
Calls the game's own script functions to perform complex operations.
Note: Only supported on 1.12.1 client and Turtle WoW.
void Script(native_wow_script)
Example: Cast Holy Light via a native WoW script.
/s S Script("CastSpellByName('圣光术')")
Equivalent to:
/script CastSpellByName('圣光术')
Equivalent to:
/cast 圣光术Say
Outputs a message to the console, invisible to other players. Used for debugging.
void Say(content)
Example:
/s S Say('我是大帅哥')HeathTargetPct
Determines which spell to use based on the target's health percentage. For example, use Execute when health is between 0% and 20%, and Bloodthirst at other times.
bool HeathTargetPct(target_health_greater_than_pct, target_health_less_than_pct)
Shorthand: bool HTP(target_health_greater_than_pct, target_health_less_than_pct)
Example: If target health is >= 0% and <= 50%, use spell 116 (Rank 1 Frostbolt); otherwise use spell 133 (Rank 1 Fireball).
/s S if HeathTargetPct(0,50) then Spell(116) else Spell(133) endHeathTargetLost
Determines which spell to use based on the target's health deficit. For example, if the deficit is 2000, use Holy Light Rank 4; if the deficit is 5000, use Holy Light Rank 9.
bool HeathTargetLost(target_health_deficit)
Shorthand: bool HTL(target_health_deficit)
Example: If the target is missing 10 HP, use spell 116 (Rank 1 Frostbolt); otherwise use spell 133 (Rank 1 Fireball).
/s S if HeathTargetLost(10) then Spell(116) else Spell(133) endTargetSpellId
Returns the spell ID of the current target's active cast. Returns 0 if not casting.
Can be used with interrupts like Kick to determine whether to interrupt based on casting state. It can also precisely return the spell ID to create macros for interrupting specific spells.
int TargetSpellId()
Shorthand: int TSI()
Example: Output the spell ID the target is currently casting.
/s S id=TargetSpellId() Say('输出='..id)AttackTime1
Gets the remaining swing timer of the main-hand weapon — in milliseconds.
int AttackTime1()
Shorthand: int AT1()
Example: Output the remaining main-hand swing timer.
/s S a=AttackTime1() Say('输出='..a)AttackTime2
Gets the remaining swing timer of the off-hand weapon — in milliseconds.
int AttackTime2()
Shorthand: int AT2()
Example: Output the remaining off-hand swing timer.
/s S a=AttackTime2() Say('输出='..a)Power
Gets your own power value.
int Power(int powerType)
Shorthand: int P(int powerType)
Parameter description:
0 Mana
1 Rage
2 Focus
3 Energy
4 Happiness
5 Runes
6 Runic Power
Example: Output your current mana.
/s S a=Power(0) Say('输出='..a)PowerTarget
Gets the target's power value.
int PowerTarget(int powerType)
Shorthand: int PT(int powerType)
Parameter description:
0 Mana
1 Rage
2 Focus
3 Energy
4 Happiness
5 Runes
6 Runic Power
Example: Output the target's current mana.
/s S a=PowerTarget(0) Say('输出='..a)Sleep
Asynchronous delayed execution function. Only the first Sleep call with the same unique ID will be executed. Resets after completion.
void Sleep(int uniqueId, int delayMs, function callback)
Parameter description:
uniqueId — pass an int. If no special requirement, pass 1.
delayMs — delay in milliseconds. The third parameter (callback) will be executed after the specified delay.
Reference:
/s S t = AttackTime1() if t>200 or Power(1)>50 then M('/use 英勇打击') if t>200 then Sleep(1,t-200,function() if Power(1)>50 then M('/use 英勇打击') else StopCasting() end end) end end
This is the warrior Execute macro. Adjust parameters according to your needs.Used properly, it can be very useful — for example, performing fixed actions at fixed times, such as scheduled chat messages.
SpellCooldownTime
Gets the cooldown of your own spell, in milliseconds.
int SpellCooldownTime(spellId)
Shorthand: int SCT(spellId)
Example: Output the cooldown of Divine Shield.
/s S p=SCT(642) Say('结果='..p)StopCasting
Stops the current cast.
void StopCasting()
Shorthand: void SC()
Note: On 1.12 servers and Turtle WoW, you can use /s S Script("SpellStopCasting()") as an alternative.
Example: Stop the current cast.
/s S SC()ComboPoints
Gets the number of your combo points on the target.
int ComboPoints()
Shorthand: int CP()
Example: Get your combo points on the target.
/s S p=CP() Say('结果='..p)TargetTargetIsSelf
Checks whether the target's target is yourself.
bool TargetTargetIsSelf()
Shorthand: bool TTIS()
Example: Check whether the target's target is yourself.
/s S p=TTIS() if p then Say('结果=true') else Say('结果=false') endAuraRemainingTime
Takes an aura spell ID and returns two values:
Return 1: Remaining time of your own aura — in milliseconds
Return 2: Stack count of your own aura
int,int AuraRemainingTime(int spellId)
Shorthand: int,int ART(int spellId)
Note: The spellId parameter is a spell ID, but it may not always be the spell you cast. Look up the corresponding spell ID by the aura's name on a database website.
Example: Output the remaining duration of Seal of Righteousness — in milliseconds.
/s S a,b=ART(21084) Say('输出='..a..' b='..b)TargetAuraRemainingTime
Takes an aura spell ID and returns two values:
Return 1: Remaining time of the **target's** aura — in milliseconds
Return 2: Stack count of the **target's** aura
int,int TargetAuraRemainingTime(int spellId)
Shorthand: int,int TART(int spellId, bool isSelf)
Note: The spellId parameter is a spell ID, but it may not always be the spell you cast. Look up the corresponding spell ID by the aura's name on a database website.
Note: The isSelf parameter is a bool value. true means only retrieve auras cast by yourself. This parameter is supported starting from Heitu version 1.10.20.
On 1.12.1 servers (level 60), the server does not send the remaining time of buffs or debuffs on the target. It can only return 99999999 as the cooldown when the target has the aura, and 0 when it does not.
Servers (level 80) work normally.
Example: Output the remaining duration of Seal of Righteousness on the target — in milliseconds.
/s S a,b=TART(21084) Say('输出='..a..' b='..b)IsCombat
Returns whether the current player is in combat.
bool IsCombat()
TeamMembers
Heitu version >= 1.11.4
Gets the list of team members, returning a table containing team member info.
table TeamMembers()
Example: Enter the following in the Super Macro editor:
function test_TeamMembers()
local members = TeamMembers()
print("开始循环团队信息")
for i = 1, #members do
local m = members[i]
print(m.name)
print(m.name, "小队:",m.subgroup+1)
print(" 唯一编号(guid):",m.guid)
end
end
In-game, enter:
/s S test_TeamMembers()
You will see output:
糖糖代理:开始循环团队信息
糖糖代理:(自己)
糖糖代理:(自己) 小队: 1
糖糖代理: 唯一编号(guid): 5
糖糖代理:Bb
糖糖代理:Bb 小队: 1
糖糖代理: 唯一编号(guid): 27
糖糖代理:测少阿文
糖糖代理:测少阿文 小队: 1
糖糖代理: 唯一编号(guid): 51GetUnitInfo
Heitu version >= 1.11.4
Gets unit information using a string-type guid, returning a table containing unit info.
table GetUnitInfo(guid) — Note: guid is a string type.
Example: Enter the following in the Super Macro editor:
function test_GetUnitInfo()
local info = GetUnitInfo("5") -- Here, "5" is your own guid. You can check it with the .heitu info command.
if info then
print(info.name, " 职业:", info.classId, "血量:", info.health, "/", info.maxHealth)
print(" 战斗中:", info.isCombat, "施法:", info.castSpellId)
if info.position then
print(" 位置: x="..info.position.x..", y="..info.position.y..", z="..info.position.z)
end
if info.auras and #info.auras > 0 then
for j, aura in ipairs(info.auras) do
print(" 光环:", aura.spellId, "层数:", aura.applications)
end
end
end
end
In-game, enter:
/s S test_GetUnitInfo()
You will see output:
糖糖代理:(自己) 职业: 1 血量: 15341 / 15341
糖糖代理: 战斗中: 施法: 0
糖糖代理: 位置: x=1234.56, y=5678.90, z=12.34
糖糖代理: 光环: 414812 层数: 0
糖糖代理: 光环: 71 层数: 0Distance
Gets the distance between the current target and yourself, in yards.
int Distance()
You can also pass a guid to get the distance to a specific unit. (Heitu version >= 1.11.6)
int Distance(string guid)
Example: Output the distance between the current target and yourself.
/s S d=Distance() Say('距离='..d)
Example: Output the distance to a target with a known guid.
/s S d=Distance(目标的字符串类型guid) Say('距离='..d)
Example: Check if the target is within melee range (5 yards).
/s S if Distance()<=5 then Spell(melee_skill_ID) else Spell(ranged_skill_ID) endCanDefensiveStrike
Heitu version >= 1.11.6
Checks whether you can use a defensive strike ability (triggered after a parry/dodge/block).
- Corresponds to Warrior Revenge/Overpower, Hunter Counterattack, Rogue Riposte
bool CanDefensiveStrike()
Example: Use Warrior Revenge when a defensive trigger procs. Adjust the spell ID as needed.
/s S if CanDefensiveStrike() and SCT(6572)==0 then Spell(6572) endCanWarriorExecute
Heitu version >= 1.11.6
Checks whether the current target is eligible for Warrior Execute (target health below 20%).
bool CanWarriorExecute()
Example: Execute when target health is below 20%; otherwise use Bloodthirst.
/s S if CanWarriorExecute() then Spell(5308) else Spell(23881) end
Example: Combined with rage check — Execute when you have enough rage and the target is executable.
/s S if CanWarriorExecute() and Power(1)>=15 then Spell(5308) end