Super Macro Plugin
Super Macro Plugin
A Super Macro Plugin is an independently distributable and shareable form of super macro packaging. Its scripting syntax is fully identical to the main super macro system, but it is organized using a directory structure similar to WoW addons, making it easy to share and distribute among players.
Core Features
- Fully Compatible Syntax: The Lua syntax and built-in functions of super macro plugins are exactly the same as the main super macro system — no additional learning required.
- Fully Isolated Environment: Each super macro plugin runs in an independent environment. Variables and functions won't conflict or pollute each other, so multiple plugins can be used simultaneously without worry.
1. How to Write a Super Macro Plugin
Directory Structure
In the WoW client directory, create a plugins_sm folder at the same level as Interface. Inside this folder, each subfolder represents an independent super macro plugin.
For example, to create a plugin called One-Click Heal:
WoW Client Directory/
├── Interface/
├── plugins_sm/ ← Create here
│ └── One-Click Heal/ ← Plugin folder (folder name = plugin name)
│ └── One-Click Heal.lua ← Entry file (must match folder name)Writing Rules
- Create a new folder under
plugins_sm— the folder name is your plugin name (e.g.,One-Click Heal). - Inside the plugin folder, create a
.luafile with the exact same name as the folder (e.g.,One-Click Heal.lua). - Write your super macro code in this
.luafile — the syntax and available functions are exactly the same as the main super macro system. - The
requirefunction is supported for loading other lua files.
Example
Assume One-Click Heal.lua defines a core function YiJianNai that contains healing logic:
function YiJianNai()
-- Your healing logic
if HeathTargetLost(2000) then
Spell(635) -- Holy Light
else
Spell(19750) -- Flash of Light
end
end2. How to Use
After writing, follow these steps in-game:
Step 1: Reload Plugins
/s S reload_plugins()This command rescans and loads all plugins from the plugins_sm directory.
Step 2: Call Plugin Functions
Use the Plugin() function to call methods from a specified plugin, in the format:
/s S Plugin("PluginName", "FunctionName")Example
/s S Plugin("One-Click Heal", "YiJianNai")3. How to Share
After writing and testing your plugin, you can publish it in the Super Macro Sharing Zone of the Heitu client, following the on-screen instructions, to share it with other players.
4. Developer Benefits
To encourage the creation and sharing of super macro plugins, if you choose to include built-in ads when publishing, you will earn a certain amount of Heitu sponsorship time each time another user downloads your plugin — a rewarding incentive.
Tips
Built-in ads do not affect plugin functionality or user experience. It's a win-win incentive mechanism.