WoW:API UnitXP: Difference between revisions

m
Move page script moved page API UnitXP to WoW:API UnitXP without leaving a redirect
No edit summary
m (Move page script moved page API UnitXP to WoW:API UnitXP without leaving a redirect)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<center>'''UnitXP''' - ''Documentation by VelvetPaw''</center>
{{wowapi}}
 
Return the current XP of a "unit" - only seems to work with "player".
Return the current XP of a "unit" - only seems to work with "player".


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


== Info ==
== Info ==
Line 34: Line 33:
:[[API floor|floor(value)]] - Returns the floor of value.
:[[API floor|floor(value)]] - Returns the floor of value.


----
== Note ==
{{WoW API}}
 
This does '''not''' work for hunter pets, use [[API GetPetExperience|GetPetExperience()]] for that.
Anonymous user