WoW API < GetNumCompanions

Returns the number of companions you have. New in Patch 3.0

count = GetNumCompanions("type")

Arguments[edit | edit source]

String (companionType) - Type of companions to count ("CRITTER", or "MOUNT")

Returns[edit | edit source]

Number - The number of companions of a specific type.

Example[edit | edit source]

The following snippet prints how many mini-pets the player has collected.

local count = GetNumCompanions("CRITTER");
print('Hello, I have collected a total of ' .. count .. ' pets.');
Community content is available under CC-BY-SA unless otherwise noted.