API:CommandPetDoAbility
From RoR Wiki
UI Lua API · Pet functions
Version: WAR 1.4.8
Asks the player's pet to use one of its abilities.
sent = CommandPetDoAbility(abilityId)
Arguments
- abilityId
number– ID of the pet ability.
Returns
- sent
boolean–trueif the request was sent to the server,falseotherwise.
Details
- Sends a "use ability" pet command together with
abilityId. - Nothing is sent, and
falseis returned, if the player has no pet, the player object does not exist yet, or one of the player's state flags blocks pet commands (see CommandPet). - The client does not check that the pet has the ability.
- Exactly one argument must be passed.
- The stock UI never calls this function.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a number.
Example
A minimal call built from the signature:
if not CommandPetDoAbility( abilityId ) then
-- no pet, or the command was blocked
end
