ESODecoded

GetActiveCollectibleByType

ESO Lua API function — used by 64 of the 3,030 addons we indexed (combined 5,611,019 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetActiveCollectibleByType([CollectibleCategoryType|#CollectibleCategoryType] categoryType, [GameplayActorCategory|#GameplayActorCategory] actorCategory)

Returns: integer collectibleId

Real usage — from RaidNotifier Updated

			if disable then
				settings.last_pet = GetActiveCollectibleByType(COLLECTIBLE_CATEGORY_TYPE_VANITY_PET)
				if settings.last_pet > 0 then

Short excerpt from the shipping addon RaidNotifier Updatedits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
RaidNotifier Updated2,789,746
OdySupportIcons - Group Role Icons & More484,590
Combat Metronome (GCD Tracker)483,791
Wizard's Wardrobe481,038
Caro's Skill Point Saver (Respec Skill Lines, Champion Points, Gear, Quickslots, Appearances)364,055
Bandits Gear Manager306,643