WoW:API UnitXPMax: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Move page script moved page API UnitXPMax to API UnitXPMax without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>'''UnitXP''' - ''Documentation by VelvetPaw''</center>
{{wowapi}}
 
Return the max XP of a "unit" - only seems to work with "player".
Return the max XP of a "unit" - only seems to work with "player".


Line 36: 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 probably works for Hunter pets as well, as they earn XP and level up seperately from the Hunter.
----
{{WoW API}}

Latest revision as of 04:47, 15 August 2023

WoW API < UnitXPMax

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

XP = UnitXPMax("unit")

Parameters[edit]

Arguments[edit]

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

Returns[edit]

XP
XP
Numeric - Returns the max 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 ).."%."),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

UnitXP("unit")[edit]

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

floor(value)[edit]

floor(value) - Returns the floor of value.

Note[edit]

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