VelvetPaw61446@legacy41580388 (talk | contribs) mNo edit summary |
@DeletedUser40286642 (talk | contribs) mNo edit summary |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} |
||
− | <center>'''UnitXP''' - ''Documentation by VelvetPaw''</center> |
||
− | |||
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 33: | Line 32: | ||
:[[API floor|floor(value)]] - Returns the floor of value. |
:[[API floor|floor(value)]] - Returns the floor of value. |
||
+ | |||
− | ---- |
||
+ | == Note == |
||
− | __NOTOC__ |
||
+ | |||
− | {{Template:WoW API}} |
||
+ | This probably works for Hunter pets as well, as they earn XP and level up seperately from the Hunter. |
Revision as of 23:47, 2 December 2007
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Return the max XP of a "unit" - only seems to work with "player".
XP = UnitXPMax("unit")
Parameters
Arguments
- ("unit")
- unit
- String - The UnitId to select as a target.
Returns
- XP
- XP
- Numeric - Returns the max XP points of the "unit".
Example
XP = UnitXP("player") XPMax = UnitXPMax("player") DEFAULT_CHAT_FRAME:AddMessage("Your XP is currently at "..floor( XP / XPMax ).."%."),1,0,0)
Info
DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b)
- ScrollingMessageFrame:AddMessage("text",r,g,b,id)
- Valid Frame names:
DEFAULT_CHAT_FRAME
ChatFrame1 - ChatFrame7
UnitXP("unit")
- UnitXP("unit") - Returns the number of experience points the specified unit has in their current level.
floor(value)
- floor(value) - Returns the floor of value.
Note
This probably works for Hunter pets as well, as they earn XP and level up seperately from the Hunter.