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!
===Macro Branching with /click=== Say you want a button that chooses between three different spells based on shift, ctrl, or no modifier and two different targets depending on left or right click. This can be done all in one like the following: /cast [mod:shift, button:2, @player] [mod:shift, @party1] Greater Heal; [mod:ctrl, button:2, @player] [mod:ctrl, @party1] Flash Heal; [nomod, button:2, @player] [nomod, @party1] Renew That's quite an unwieldy bit of script there. We can split it onto multiple lines for clarity and remove some redundancies to save room but it's still a bit of a beast: /cast [mod:shift, button:1, @party1] [mod:shift, @player] Greater Heal /cast [mod:ctrl, button:1, @party1] [mod:ctrl, @player] Flash Heal /cast [button:1, @party1] [@player] Renew However, by using one master macro to choose the target based on mouse button and two macros to choose the spells based on modifier key, we can make it much easier to follow. For the sake of these examples, macros 2 and 3 are on MultiBarLeftButton2 and MultiBarLeftButton3, respectively. Macro 1: /click [button:1] MultiBarLeftButton2; MultiBarLeftButton3 Macro 2: /cast [mod:shift, @party1] Greater Heal; [mod:ctrl, @party1] Flash Heal; [@party1] Renew Macro 3: /cast [mod:shift, @player] Greater Heal; [mod:ctrl, @player] Flash Heal; [@player] Renew
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)