WoW API: GetPetExperience

Revision as of 18:45, 23 December 2006 by WoWWiki>Starlightblunder ({{wowapi}}, format, example.)

WoW API < GetPetExperience

Returns the pet's current XP total, and the XP total required for the next level.

currXP, nextXP = GetPetExperience();

Parameters

Returns

currXP
Number - The current XP total
nextXP
Number - The XP total required for the next level

Example

local currXP, nextXP = GetPetExperience();
DEFAULT_CHAT_FRAME("Pet experience: " .. currXP .. " / " .. nextXP);

Result

Pet experience is displayed in the default chat frame.