Transforming Macros into Buttonattributes - How?
Hi,
I am still struggeling in understanding the securebutton's attributes. Since writing macros seems easier (at least to me), maybe someone can provide some examples how to translate macros into attributes.
If I got it right, a common actionbar button has the following attributes:
Button:SetAttribute("type", "action"); -- perfom an action from an actionslot on left click
Button:SetAttribute("action", 1); -- apply action placed in actionslot 1
Button:SetAttribute("*unit*", "player"); -- apply to target
Assuming, that Moonfire is placed in actionslot 1, the behavior of the macro
/cast [target=targettarget] Moonfire
can be obtained by setting the unit attribute to targettarget:
Button:SetAttribute("type", "action"); -- perfom an action from an actionslot on left click
Button:SetAttribute("action", 1); -- apply action placed in actionslot 1
Button:SetAttribute("*unit*", "targettarget"); -- apply to targettarget
But what about more complicated macros like
/cast [target=targettarget,exists,harm] Moonfire; [exists] Moonfire
or
/cast [target=mouseover,exists,help] Rejuvenation; [target=player] Rejuvenation
How do I add a different behavior for right-clicks, eg. to choose the focus?
I think at least everything possible with a macro should be possible with attributes?! I would be very thankful if someone was able to provide and describe some more examples.
Nief
Last edited by Nief : 12-21-06 at 03:15 PM.
|