Wikia

WoWWiki

Watchlist Recent changes

API UnitXP

Main Menue



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

XP = UnitXP("unit")

Contents

Parameters Edit

Arguments Edit

("unit")
unit 
String - The UnitId to select as a target.

Returns Edit

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

Example Edit

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

Info Edit

DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b) Edit

ScrollingMessageFrame:AddMessage("text",r,g,b,id) 
Valid Frame names:
DEFAULT_CHAT_FRAME
ChatFrame1 - ChatFrame7

UnitXPMax("unit") Edit

UnitXPMax("unit") - Returns the number of experience points the specified unit needs to reach their next level.

floor(value) Edit

floor(value) - Returns the floor of value.

Note Edit

This does not work for hunter pets, use GetPetExperience() for that.

Pages on WoWWiki

95,741pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
58,022photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki