WoW:API CastPetAction: Difference between revisions
Jump to navigation
Jump to search
CastPetAction
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
---- | ---- | ||
;''Example'' | ;''Example'' | ||
Cast by specified action name | |||
for i=1, NUM_PET_ACTION_SLOTS, 1 do | for i=1, NUM_PET_ACTION_SLOTS, 1 do | ||
Line 32: | Line 32: | ||
;''Description'' | ;''Description'' | ||
: Cast the corresponding pet skill. | : Cast the corresponding pet skill. Requires a button press. | ||
---- | ---- | ||
{{WoW API}} | {{WoW API}} |
Revision as of 01:12, 12 March 2006
Cast the corresponding pet skill.
CastPetAction(index);
- Arguments
- (index)
- index
- Number - The index of the pet skill for query.
- Returns
- nil
- Example
Cast by specified action name
for i=1, NUM_PET_ACTION_SLOTS, 1 do local name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i); if ( name == "Sacrifice" ) then CastPetAction(i); end end
Please notice that this exemple will only works if the sacrifice skill is named "Sacrifice" in the client locale.
- Description
- Cast the corresponding pet skill. Requires a button press.