WoW:API UnitXP: Difference between revisions

112 bytes removed ,  15 August 2023
m
Move page script moved page API UnitXP to WoW:API UnitXP without leaving a redirect
(upgraded deprecated template)
m (Move page script moved page API UnitXP to WoW:API UnitXP without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
<center>'''UnitXP''' - ''Documentation by VelvetPaw''</center>
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 20: 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)*100 ).."%."),1,0,0)
  DEFAULT_CHAT_FRAME:AddMessage("Your XP is currently at "..floor( (XP / XPMax)*100 ).."%.",1,0,0)


== Info ==
== Info ==
Line 37: Line 35:
== Note ==
== Note ==


This probably works for Hunter pets as well, as they earn XP and level up seperately from the Hunter. [[User:Sarf|Sarf]] 17:26, 17 July 2006 (EDT)
This does '''not''' work for hunter pets, use [[API GetPetExperience|GetPetExperience()]] for that.
Anonymous user