WoW API < UnitXPMax

Return the max XP of a "unit" - only seems to work with "player".

XP = UnitXPMax("unit")

Parameters[edit | edit source]

Arguments[edit | edit source]

String - The UnitId to select as a target.

Returns[edit | edit source]

Numeric - Returns the max XP points of the "unit".

Example[edit | edit source]

XP = UnitXP("player")
XPMax = UnitXPMax("player")
DEFAULT_CHAT_FRAME:AddMessage("Your XP is currently at "..floor( XP / XPMax ).."%."),1,0,0)

Info[edit | edit source]

DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b)[edit | edit source]

Valid Frame names:
ChatFrame1 - ChatFrame7

UnitXP("unit")[edit | edit source]

UnitXP("unit") - Returns the number of experience points the specified unit has in their current level.

floor(value)[edit | edit source]

floor(value) - Returns the floor of value.

Note[edit | edit source]

This probably works for Hunter pets as well, as they earn XP and level up seperately from the Hunter.

Community content is available under CC-BY-SA unless otherwise noted.