Thread Tools Display Modes
05-14-09, 04:29 PM   #1
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
Modified FracXP

I added a couple new lines in UnitFrames/Variables.lua to yeild an info text in the form "xx.x%"
The first, of course was the variable declaration:
Code:
	state:AddSlot("Txt_fpxptxt");
	state:AddSlot("Txt_sxptxt");
return true;
and the second was the actual calculation of the variable:
Code:
local fxp = UnitXP("player")/UnitXPMax("player");
local sxptxt = (floor(fxp * 1000)/10) .. "%";
local fpxptxt = floor((UnitXP("player")/UnitXPMax("player")) * 100) ..<snip>
Which yields text on my XP bar in the form of "76.8%"
Just thought I would share
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote
05-15-09, 08:46 PM   #2
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
Removed the code I added, putting it in a script like it should be.

Code:
text = ""
    local sXP = floor((UnitXP("player")/UnitXPMax("player"))*10)/10
text = text .. sXP .. "%"
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Modified FracXP


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off