m
User-controlled Bot: table syntax updated
(→macro) |
m (User-controlled Bot: table syntax updated) |
||
| Line 37: | Line 37: | ||
===actionbar=== | ===actionbar=== | ||
A button of this type changes your current action bar.<br /> | A button of this type changes your current action bar.<br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| action | |||
| May be "increment", "decrement", or an integer which specifies the page to switch to. | |||
|} | |||
frame:SetAttribute("type1", "actionbar") -- Sets this frame's left click type to "actionbar" | frame:SetAttribute("type1", "actionbar") -- Sets this frame's left click type to "actionbar" | ||
| Line 52: | Line 52: | ||
Executes an action. Calls UseAction(self:GetAttribute("action"), 1, self:GetAttribute("unit")) | Executes an action. Calls UseAction(self:GetAttribute("action"), 1, self:GetAttribute("unit")) | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| action | |||
| (integer) The action slot to execute | |||
|} | |||
frame:SetAttribute("type1", "action") | frame:SetAttribute("type1", "action") | ||
| Line 68: | Line 68: | ||
Executes a pet action. Calls CastPetAction(self:GetAttribute("action"), self:GetAttribute("unit")) | Executes a pet action. Calls CastPetAction(self:GetAttribute("action"), self:GetAttribute("unit")) | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| action | |||
| (integer) The pet action slot to execute | |||
|} | |||
frame:SetAttribute("type1", "pet") | frame:SetAttribute("type1", "pet") | ||
| Line 84: | Line 84: | ||
Casts a spell. | Casts a spell. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| spell | |||
| The name of the spell to cast. For example, "Flash Heal". | |||
|} | |||
frame:SetAttribute("type1", "spell") | frame:SetAttribute("type1", "spell") | ||
| Line 100: | Line 100: | ||
Uses an item in your inventory (equipped items) or your bags. | Uses an item in your inventory (equipped items) or your bags. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| slot | |||
| Integer specifying the slot the item to be used is in. If "bag" is set, then this will be a bag slot. If "bag" is not set, then it is an Inventory slot. | |||
|----- | |||
| bag | |||
| Integer specifying the bag the item to be used is in. Requires that "slot" be set. | |||
|----- | |||
| item | |||
| String specifying the item name. May be used instead of a bag/slot combo. Will not be used if "slot" is set. | |||
|} | |||
This causes the button to use the item in Slot #1 in your backpack when left clicked: | This causes the button to use the item in Slot #1 in your backpack when left clicked: | ||
| Line 131: | Line 129: | ||
Executes a macro. | Executes a macro. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | {| border="1" style="border-collapse: collapse;" cellpadding="4" | ||
|- | |- | ||
| Line 153: | Line 151: | ||
Cancels a spell if you are targeting a spellcast. | Cancels a spell if you are targeting a spellcast. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| ''None'' | |||
|} | |||
Causes this frame to cancel spell targeting when clicked. | Causes this frame to cancel spell targeting when clicked. | ||
| Line 171: | Line 169: | ||
* Otherwise, targets the unit. | * Otherwise, targets the unit. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| ''None'' | |||
|} | |||
frame:SetAttribute("type", "target") | frame:SetAttribute("type", "target") | ||
| Line 184: | Line 182: | ||
Sets your focus to this button's ''unit'' attribute. | Sets your focus to this button's ''unit'' attribute. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| ''None'' | |||
|} | |||
Clicking this frame will set your focus to this frame's specified ''unit''. | Clicking this frame will set your focus to this frame's specified ''unit''. | ||
| Line 198: | Line 196: | ||
Assist the unit specified by this button's ''unit'' attribute and attack their target. | Assist the unit specified by this button's ''unit'' attribute and attack their target. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| ''None'' | |||
|} | |||
Clicking this frame will cause you to target and start attacking the target of this button's unit. | Clicking this frame will cause you to target and start attacking the target of this button's unit. | ||
| Line 212: | Line 210: | ||
Clicks another button. Allows this button to act as a proxy to another button. | Clicks another button. Allows this button to act as a proxy to another button. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| clickbutton | |||
| The button object that this button will proxy its click to when clicked | |||
|} | |||
Clicking this button will call :Click() on myOtherButton. | Clicking this button will call :Click() on myOtherButton. | ||
| Line 228: | Line 226: | ||
Shows a popup menu. | Shows a popup menu. | ||
<br /> | <br /> | ||
'''Attributes:''' | |||
{| border="1" style="border-collapse: collapse;" cellpadding="4" | |||
|----- | |||
| Requires that the button have a "showmenu" property set. This property should be a function that takes a unit as a parameter. | |||
|} | |||
Clicking this button will call :Click() on myOtherButton. | Clicking this button will call :Click() on myOtherButton. | ||