Module br.player.pets
Pet handling functions for BadRotations.
These functions provide pet management capabilities such as checking if pets exist, counting specific pets, and retrieving pet information.
Functions
br.player.pet.active.exists () | Checks if the player's current pet exists |
br.player.pet.active.count () | Counts player pets that match any pet in the list |
br.player.pet.active.id () | Gets the ID of the player's current pet |
br.player.pet.count () | Counts specific pets matching the current pet ID |
br.player.pet.active () | Checks if the specific pet type is active |
br.player.pet.exists () | Checks if the specific pet type exists |
br.player.pet.id () | Gets the ID of the specific pet type |
Functions
- br.player.pet.active.exists ()
-
Checks if the player's current pet exists
Returns:
-
boolean True if player has an active pet, false otherwise
Usage:
local hasPet = br.player.pet.active.exists()
- br.player.pet.active.count ()
-
Counts player pets that match any pet in the list
Returns:
-
number The count of matching active pets
- br.player.pet.active.id ()
-
Gets the ID of the player's current pet
Returns:
-
number The ID of the active pet
- br.player.pet.count ()
-
Counts specific pets matching the current pet ID
Returns:
-
number The count of matching pets
Usage:
local impCount = br.player.pet.imp.count()
- br.player.pet.active ()
-
Checks if the specific pet type is active
Returns:
-
boolean True if this pet type is active, false otherwise
Usage:
local hasImp = br.player.pet.imp.active()
- br.player.pet.exists ()
-
Checks if the specific pet type exists
Returns:
-
boolean True if this pet type exists, false otherwise
Usage:
local hasImp = br.player.pet.imp.exists()
- br.player.pet.id ()
-
Gets the ID of the specific pet type
Returns:
-
number The pet ID
Usage:
local impID = br.player.pet.imp.id()