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!
==[@''unit''] (previously [target=''unit''])== In addition to condition checking, the macro option system provides us with a way to set the target of various actions. For example, the following macro will always use the bandages on yourself (self-cast) regardless of your target: /use [@player] Heavy Netherweave Bandage This can be helpful for those that prefer not to utilize the UI's '''Auto Self Cast''' feature under '''Main Menu'''\'''[[Interface]]'''\''Combat''. (You can also use [target=player], however the [@player] format is preferred because it uses fewer characters.) Besides setting the target of the action itself, the [@unit] assignment also sets the unit that the conditionals are checked against. Since that probably didn't make much sense, here's a macro that combines concepts from both of the examples you've seen so far: /cast [help] [@targettarget, help] [@player] Flash Heal First it checks against [help]. If it's true, then it passes Flash Heal to /cast. Otherwise it moves on to the next condition, [@targettarget, help]. Now it checks for help again, but this time it's checking to see if your target's target is friendly. If it is, then it will pass Flash Heal to /cast, but this time it also tells /cast that it should be cast on your target's target. If it still hasn't found a valid target yet, it'll move onto the next condition, [@player]. Since there are no actual conditions in there, it will always be true, so Flash Heal is sent to /cast with you, the player, as the target.
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)