Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CommandPetDoAbility

From RoR Wiki
Revision as of 19:41, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 – true if the request was sent to the server, false otherwise.

Details

  • Sends a "use ability" pet command together with abilityId.
  • Nothing is sent, and false is 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

See also