WoW:MACRO cast: Difference between revisions

→‎Examples: 'target=self' is bogus, it has to be 'target=player' or '@player'. 'self' does not exist.
(→‎Examples: 'target=self' is bogus, it has to be 'target=player' or '@player'. 'self' does not exist.)
Line 1: Line 1:
{{macroapi}} __NOTOC__
{{macroapi}}
__NOTOC__




Line 84: Line 85:


*This will cast Flash Heal on target; but it will cast it on yourself if your target is hostile, or dead, or you have no target, or if you right-click the button.
*This will cast Flash Heal on target; but it will cast it on yourself if your target is hostile, or dead, or you have no target, or if you right-click the button.
  /cast [target=self, btn:2][target=focus, help, nodead, exists][target=self] Flash Heal  
  /cast [target=self, btn:2][target=focus, help, nodead, exists][target=player] Flash Heal  
: Let's analyze:  
: Let's analyze:  
  ...[target=self, btn:2]...  
  ...[target=player, btn:2]...  
: The script sets the target of the spell to yourself, and checks to see if you right-clicked.  If you did, it skips the next two option sets and casts Flash Heal, keeping the '''target''' it set (you).  If you didn't r-click, it checks the next option set:
: The script sets the target of the spell to yourself, and checks to see if you right-clicked.  If you did, it skips the next two option sets and casts Flash Heal, keeping the '''target''' it set (you).  If you didn't r-click, it checks the next option set:
  ...[target=focus, help, nodead, exists]...
  ...[target=focus, help, nodead, exists]...
: It sets the target of the spell to whatever your current target (focus) is.  If the target is friendly ('''help''') AND it's alive ('''nodead''') AND you actually have something selected ('''exists'''), then it skips the next option set and casts Flash Heal, again keeping the target it set (focus).  Otherwise, if any of those conditions are not true, it checks the next option set:
: It sets the target of the spell to whatever your current target (focus) is.  If the target is friendly ('''help''') AND it's alive ('''nodead''') AND you actually have something selected ('''exists'''), then it skips the next option set and casts Flash Heal, again keeping the target it set (focus).  Otherwise, if any of those conditions are not true, it checks the next option set:
  ...[target=self]
  ...[target=player]
: Since there are no conditions in this set, it just casts Flash Heal, again keeping the target it just set (you).
: Since there are no conditions in this set, it just casts Flash Heal, again keeping the target it just set (you).
Anonymous user