WoW:API IsUsableAction: Difference between revisions
Jump to navigation
Jump to search
({{wowapi}}, formatting.) |
|||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown). | |||
Determine if an action can be used. | |||
isUsable, notEnoughMana = IsUsableAction(slot) | isUsable, notEnoughMana = IsUsableAction(slot) | ||
== Parameters == | == Parameters == | ||
=== Arguments === | === Arguments === | ||
:;slot : Integer - The action slot to retrieve data for. | :;slot : Integer - The action slot to retrieve data for. | ||
=== Returns === | === Returns === | ||
:;isUsable : Flag - Returns 1 if the action is valid for use at present (Does NOT include cooldown or range tests), nil otherwise. | :;isUsable : Flag - Returns 1 if the action is valid for use at present (Does NOT include cooldown or range tests), nil otherwise. | ||
:;notEnoughMana : Flag - Returns 1 if the reason for the action not being usable is because there is not enough mana/rage/energy, nil otherwise. | :;notEnoughMana : Flag - Returns 1 if the reason for the action not being usable is because there is not enough mana/rage/energy, nil otherwise. | ||
== | |||
==Notes== | |||
Slots are usually distributed as follows: | |||
{| BORDER="0" CELLSPACING="0" CELLPADDING="5" | |||
---- | |- BGCOLOR="#222222" | ||
!Slots!!Description | |||
|- | |||
|1 - 12||Action Bar 1 | |||
|- bgcolor="#3F3F3F" | |||
|13 - 24||Action Bar 2 | |||
|- | |||
|25 - 36||Action Bar 3 (Right) | |||
|- bgcolor="#3F3F3F" | |||
|37 - 48||Action Bar 4 (Right-2) | |||
|- | |||
|49 - 60||Action Bar 5 (Bottom Left) | |||
|- bgcolor="#3F3F3F" | |||
|61 - 72||Action Bar 6 (Bottom Right) | |||
|- | |||
|73 - 84||Battle Stance (Warrior) or Stealth (Rogue) | |||
|- bgcolor="#3F3F3F" | |||
|85 - 96||Defensive Stance (Warrior) | |||
|- | |||
|97 - 108||Berserker Stance (Warrior) | |||
|} |
Revision as of 17:55, 23 December 2006
Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown).
isUsable, notEnoughMana = IsUsableAction(slot)
Parameters
Arguments
- slot
- Integer - The action slot to retrieve data for.
Returns
- isUsable
- Flag - Returns 1 if the action is valid for use at present (Does NOT include cooldown or range tests), nil otherwise.
- notEnoughMana
- Flag - Returns 1 if the reason for the action not being usable is because there is not enough mana/rage/energy, nil otherwise.
Notes
Slots are usually distributed as follows:
Slots | Description |
---|---|
1 - 12 | Action Bar 1 |
13 - 24 | Action Bar 2 |
25 - 36 | Action Bar 3 (Right) |
37 - 48 | Action Bar 4 (Right-2) |
49 - 60 | Action Bar 5 (Bottom Left) |
61 - 72 | Action Bar 6 (Bottom Right) |
73 - 84 | Battle Stance (Warrior) or Stealth (Rogue) |
85 - 96 | Defensive Stance (Warrior) |
97 - 108 | Berserker Stance (Warrior) |