Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Making a macro
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{outdated|Assumes many class abilities which have changed or been removed.}} {{Macronav}} This is an article on '''making a macro'''. A [[macro]] is a list of slash commands. Common slash commands include the following: * /say (/s) * /whisper (/w, /talk, /t) * /reply (/r) * /emote (/e, /em, /me) * /dance With macros, these commands can be used from action buttons, and many of them can be used at once. Each unique command goes on its own line and is written exactly as it would be typed it in the chat box. For instance, a macro that makes the player yell "Everybody, dance now!" and burst into dance would be written thus. /y Everybody, dance now! /dance A mostly complete list of slash commands is available at [[List of Slash Commands]] though at the time of this writing some of the new commands in 2.0 have not been added. WoWWiki is a great source of additional information for macros, especially scripts using the /run command (which will be covered later). '''Note:''' Remember, some macros run all at once. This means that when you click the button, the macro runs each command from start to finish before returning control to the game. This has two important effects. First, if you write a macro that takes a long time to execute (like /run for i=1, 100000000 do end), the game will freeze for as long as it takes to run the macro. Second, and arguably more important, '''there is no way to wait in a macro''' without freezing the game. This fact will become much more apparent when we start dealing with the /cast command and its ilk. Some AddOns can provide a way to issue a command at a later time, but they can only be used for "benign" functions like chatting, emotes, and issuing commands to other AddOns (though equipping weapons in combat is allowed). If you don't mind the game freezing, you can use this little workaround to make macros pause: /script debugprofilestart(); while debugprofilestop() < wait_time do end Where wait_time is the time, in milliseconds, you want to wait. You can use this with multiple /cast commands, no problem, as long as you wait for the correct cooldown periods.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)