FANDOM


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
 
local name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i);
 
local name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i);

Revision as of 07:32, April 25, 2005

CastPetAction

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

Description
Cast the corresponding pet skill.

Template:WoW API

Community content is available under CC-BY-SA unless otherwise noted.