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.
→ WoW API
Return the current XP of a "unit" - only seems to work with "player".
XP = UnitXP("unit")
- String - The UnitId to select as a target.
- Numeric - Returns the current XP points of the "unit".
XP = UnitXP("player") XPMax = UnitXPMax("player") DEFAULT_CHAT_FRAME:AddMessage("Your XP is currently at "..floor( (XP / XPMax)*100 ).."%.",1,0,0)
- Valid Frame names:
ChatFrame1 - ChatFrame7
- UnitXPMax("unit") - Returns the number of experience points the specified unit needs to reach their next level.
- floor(value) - Returns the floor of value.
This does not work for hunter pets, use GetPetExperience() for that.