API GetNumCompanions

104,672pages on
this wiki
Add New Page
Talk0 Share
WoW API < GetNumCompanions

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

count = GetNumCompanions("type")

Arguments Edit

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

Returns Edit

Number - The number of companions of a specific type.

Example Edit

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.');

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki