Thread Tools Display Modes
05-16-09, 11:20 AM   #1
Kuthumii
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 6
XP Bar

Is it possible to build an XP bar?
  Reply With Quote
05-16-09, 02:34 PM   #2
Dgrimes
A Black Drake
 
Dgrimes's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 89
Yes look at my novo ui.
__________________
What was is, what will be was.
  Reply With Quote
05-16-09, 03:38 PM   #3
Kuthumii
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 6
I did. I downloaded your UI because it has both an info/xp bar, when I was unzipping it, it had a handful of errors. I tried it three times.
  Reply With Quote
05-16-09, 04:58 PM   #4
Dgrimes
A Black Drake
 
Dgrimes's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 89
I'll take a look at my oobe when I get off work tonight.
__________________
What was is, what will be was.
  Reply With Quote
05-16-09, 05:13 PM   #5
Kuthumii
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 6
Thanks, I couldn't find another UI with either type of bar. Being at to use yours and look over it will help me build my own!
  Reply With Quote
05-17-09, 03:04 AM   #6
Dgrimes
A Black Drake
 
Dgrimes's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 89
Sorry for the late reply. I found the problem though. It seems that status bar are not taking custom variables for some reason now. I made a feature for the rested xp part of the bar. I currently re-formatted my computer and I do not have the OOBE software installed. Here is the code for the fractional variable feature though.

Code:
RDX.RegisterFeature({
    name = "Variable: Rested XP (frxp)";
    category = i18n("Variables: Unit Status");
    IsPossible = function(state)
        if not state:Slot("EmitPaintPreamble") then return nil; end
        if state:Slot("Var_frxp") then return nil; end
        return true;
    end;
    ExposeFeature = function(desc, state, errs)
        state:AddSlot("Var_frxp");
        state:AddSlot("FracVar_frxp");
        return true;
    end;
    ApplyFeature = function(desc, state)
        state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
local rxp = GetXPExhaustion();
local cxp = UnitXP(uid);
local cmxp = UnitXPMax(uid);
local lrxp = 0;
if not rxp then
    lrxp = 0;
end
if rxp then
    if (rxp > cmxp) then
        lrxp = cmxp;
    elseif (rxp + cxp) < cmxp then 
        lrxp = cxp + rxp;
    end    
frxp = format("%.2f", (lrxp/cmxp));
end
]]); end);
        local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
        local mask = mux:GetPaintMask("XP");
        mux:Event_UnitMask("UNIT_XP_UPDATE", mask);
    end;
    UIFromDescriptor = VFL.Nil;
    CreateDescriptor = function() return { feature = "Variable: Rested XP (frxp)" }; end
});
Just add that to the bottom of the autoexec file. Then edit the uf_gamestats object, drag in the new variable "Frac Rested XP ("frxp")" and make the last status bar that should be yellow point to the frxp variabe.
__________________
What was is, what will be was.
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » XP Bar


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