Wikia

WoWWiki

API CastPetAction

Talk0
101,284pages on
this wiki
Revision as of 19:11, February 6, 2007 by DerGhulbus (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW API < CastPetAction
CastPetAction

Cast the corresponding pet skill.

CastPetAction(index, [unit]);

Arguments
(index)
index 
Number - The index of the pet skill for query.
(unit)
unit 
UnitId - Optional UnitId

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.

Around Wikia's network

Random Wiki