Download
(9 Kb)
Download
Updated: 12-04-12 01:29 PM
Pictures
File Info
Compatibility:
Landfall (5.1)
Updated:12-04-12 01:29 PM
Created:01-21-10 01:48 AM
Downloads:3,290
Favorites:11
MD5:
Broker: LonnyXP
Version: r7
by: Lonny, Lombra
Provides information about your current experience progression similar to the experience bar and more.

For more information, please visit the addon's page at Curse.

I will not track comments made on WoWInterface, so please post them on Curse.

Enjoy!
Please check the changes at Curse.
Archived Files (10)
File Name
Version
Size
Author
Date
r6
9kB
Lonny
11-08-12 04:50 AM
r5
13kB
Lonny
10-05-12 08:33 AM
r3
12kB
Lonny
09-29-12 04:33 AM
r2
12kB
Lonny
09-22-12 06:02 AM
r1
13kB
Lonny
04-03-12 09:10 PM
113
13kB
Lonny
10-30-10 10:40 AM
112
13kB
Lonny
05-29-10 06:39 PM
111
12kB
Lonny
05-12-10 02:32 AM
110
13kB
Lonny
03-16-10 12:32 PM
100
7kB
Lonny
01-21-10 01:48 AM


Post A Reply Comment Options
Old 01-25-10, 04:46 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
I had setup the broker addon and it was showing correctly until i logged to another character and the display went from 1 lines to 2 because the xp went from 7.7% to 28.3%.

Any way to fix this? Also is there a way to show xp as 1,500,000/3.500,000 as an option? And is there way to drop the decimal place from the % display?
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-25-10, 07:55 PM  
Lonny
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Originally posted by bossmansmith
I had setup the broker addon and it was showing correctly until i logged to another character and the display went from 1 lines to 2 because the xp went from 7.7% to 28.3%.

Any way to fix this? Also is there a way to show xp as 1,500,000/3.500,000 as an option? And is there way to drop the decimal place from the % display?
Sorry I don't understand you, can you post an image ? or elaborate more ? what do you mean by "the display went from 1 lines to 2..."

I'm not going to add features to this addon as I want it to be as small as possible.
Last edited by : 01-25-10 at 07:56 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Old 01-25-10, 08:04 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
i figured out how to drop the decimal pt so it fits now - dont worry about the text saying xp not really worth it would be way too big

The text next to the icon went from one line 7.7% [150%] to 2 lines with 17.7% on top line and [150%] on 2nd line
Last edited by bossmansmith : 01-25-10 at 08:05 PM.
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-25-10, 08:19 PM  
Lonny
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Originally posted by bossmansmith
i figured out how to drop the decimal pt so it fits now - dont worry about the text saying xp not really worth it would be way too big

The text next to the icon went from one line 7.7% [150%] to 2 lines with 17.7% on top line and [150%] on 2nd line
oh oki, what kind of panel are you using ?
Report comment to moderator  
Edit/Delete Message Reply With Quote
Old 01-27-10, 12:13 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
I am trying to figure out how i can add classcolored "XP:" in front of the displayed value.

I have zero LUA programming before but this is where i am at:

function _addon:GetXpTitle()
local classColors = {
["DEATHKNIGHT"] = "c41f3b",
["DRUID"] = "ff7d0a",
["HUNTER"] = "abd473",
["MAGE"] = "69ccf0",
["PALADIN"] = "f58cba",
["PRIEST"] = "ffffff",
["ROGUE"] = "fff569",
["SHAMAN"] = "2459ff",
["WARLOCK"] = "9482ca",
["WARRIOR"] = "c79c6e",
}
local class = UnitClass("player")
local classColor = classColors[class]
local coloredXP = format("%s%s|r", classColor, "XP:")
local _, _, xpPercent, rested, restedPercent = self:GetXpStats()
if rested ~= 0 then
return format("%.0f%% (%.0f%%)", xpPercent, restedPercent) --return format("%.1f%% (%.1f%%)", xpPercent, restedPercent)
else
return format("%s %.0f%%", coloredXP, xpPercent)
end
end

i keep getting an error here :
local coloredXP = format("%s%s|r", classColor, "XP:")
saying:
Interface\AddOns\Broker_LonnyXp\Internals.lua:50: bad argument #2 to 'format' (string expected, got nil)

I know that class is registering correctly because i can get it to say "Druid" in front of the value just cant get druid colored XP: to show up

I commented out the orginal 1 decimal place to make it fit correctly

Your help would be aprpeciated
Last edited by bossmansmith : 01-27-10 at 12:16 PM.
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-27-10, 12:17 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
Originally posted by Lonny
oh oki, what kind of panel are you using ?
Im using statblockcore and have no idea how to increase the size available for display - just happend to figure out how to lose the decimal place and it fit
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-27-10, 02:50 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
Very close to what i wanted thanks for help.

To fine tune it - i would want the display to say "XP: 17%" with the XP: in class color and the 17% in default color.

I really do appreciate your help.

Originally posted by Lonny
Just replace everything with following code.
Code:
local _name, _addon = ...

local UnitXP = UnitXP
local UnitXPMax = UnitXPMax
local GetXPExhaustion = GetXPExhaustion

local function toColorCode(color)
	return ("|cff%.2x%.2x%.2x"):format(color.r * 255, color.g * 255, color.b * 255)
end

function _addon:GetXpStats()
	local xp, xpMax = UnitXP("player"), UnitXPMax("player")
	local xpPercent =  xp / xpMax * 100
	local rested = GetXPExhaustion() or 0
	local restedPercent = rested / xpMax * 100
	local tnl = xpMax - xp
	local tnlPercent = (xpMax - xp) / xpMax * 100
	return xp, xpMax, xpPercent, rested, restedPercent, tnl, tnlPercent
end

function _addon:ShowXpStats(tooltip)
	tooltip:ClearLines()
	tooltip:AddLine(self.name, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1)
	tooltip:AddLine(" ")
	
	local xp, xpMax, xpPercent, rested, restedPercent, tnl, tnlPercent = self:GetXpStats()
	
	tooltip:AddDoubleLine("XP: ", format("|cffffffff%s / %s (%.1f%%)|r", xp, xpMax, xpPercent))
	if rested ~= 0 then
		tooltip:AddDoubleLine("Rested: ", format("|cffffffff%s (%.1f%%)|r", rested, restedPercent))
	end
	tooltip:AddDoubleLine("TNL: ", format("|cffffffff%s (%.1f%%)|r", tnl, tnlPercent))

	tooltip:Show()
end

function _addon:GetXpTitle()
	local _, _, xpPercent, rested, restedPercent = self:GetXpStats()
	local class = select(2, UnitClass("player"))
	if rested ~= 0 then
		return format("%s%.1f%% (%.1f%%)|r", toColorCode(RAID_CLASS_COLORS[class]), xpPercent, restedPercent)
	else
		return format("%s%.1f%%|r", toColorCode(RAID_CLASS_COLORS[class]), xpPercent)
	end
end
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-27-10, 03:36 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
I think i figured it out (and this is fun trying)

function _addon:GetXpTitle()
local _, _, xpPercent, rested, restedPercent = self:GetXpStats()
local class = select(2, UnitClass("player"))
if rested ~= 0 then
return format("%s%s|r %.0f%% (%.0f%%)", toColorCode(RAID_CLASS_COLORS[class]), "XP: ", xpPercent, restedPercent)
else
return format("%s%s|r %.0f%%", toColorCode(RAID_CLASS_COLORS[class]), "XP: ", xpPercent)
end
end


I have uploaded a screenshot of the look i was going for and the "doubleline" thing that happens when i have over 100% rested - any idea how to fix that (im using statblockcore)

http://img718.imageshack.us/i/wowscrnshot012710163928.jpg/

** your great addon is located just left of bags about 1/3 of the way in from the way left-top
Last edited by bossmansmith : 01-27-10 at 03:43 PM.
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-27-10, 04:21 PM  
Lonny
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
I've tested the panel, and unfortunately there is no way to tell the panel to resize the buttons to the same size of the content.

I'd suggest you to change panel, or write the author of the panel there's an issue and that he should deal with it.

So to fix this, you can just remove the rested part from the title, like so.

Code:
local _name, _addon = ...

local class = select(2, UnitClass("player"))

local UnitXP = UnitXP
local UnitXPMax = UnitXPMax
local GetXPExhaustion = GetXPExhaustion

local function toClassColor(text)
	local color = RAID_CLASS_COLORS[class]
	return ("|cff%.2x%.2x%.2x%s|r"):format(color.r * 255, color.g * 255, color.b * 255, text)
end

function _addon:GetXpStats()
	local xp, xpMax = UnitXP("player"), UnitXPMax("player")
	local xpPercent =  xp / xpMax * 100
	local rested = GetXPExhaustion() or 0
	local restedPercent = rested / xpMax * 100
	local tnl = xpMax - xp
	local tnlPercent = (xpMax - xp) / xpMax * 100
	return xp, xpMax, xpPercent, rested, restedPercent, tnl, tnlPercent
end

function _addon:ShowXpStats(tooltip)
	tooltip:ClearLines()
	tooltip:AddLine(self.name, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1)
	tooltip:AddLine(" ")
	
	local xp, xpMax, xpPercent, rested, restedPercent, tnl, tnlPercent = self:GetXpStats()
	
	tooltip:AddDoubleLine("XP: ", ("|cffffffff%s / %s (%.1f%%)|r"):format(xp, xpMax, xpPercent))
	if rested ~= 0 then
		tooltip:AddDoubleLine("Rested: ", ("|cffffffff%s (%.1f%%)|r"):format(rested, restedPercent))
	end
	tooltip:AddDoubleLine("TNL: ", ("|cffffffff%s (%.1f%%)|r"):format(tnl, tnlPercent))

	tooltip:Show()
end

function _addon:GetXpTitle()
	local _, _, xpPercent = self:GetXpStats()
	return toClassColor("Xp: ")..("%d%%"):format(xpPercent)
end
Last edited by : 01-27-10 at 04:35 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Old 01-27-10, 07:06 PM  
bossmansmith
A Murloc Raider

Forum posts: 4
File comments: 73
Uploads: 0
Lonny,

I beat most of the time you don't hear this - I truly appreciate all the help you have given me. I have learned a lot from you so far. It amazes me that alot of addons have very complex to color text with class color, however your solution has to be about the most efficient that i have seen.

What would you should for a panel? I am looking to be able to just place individual modules literally wherever i would like - other then that nothing much as far as features.
bossmansmith is offline Report comment to moderator  
Reply With Quote
Old 01-27-10, 11:44 PM  
Lonny
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Originally posted by bossmansmith
Lonny,

I beat most of the time you don't hear this - I truly appreciate all the help you have given me. I have learned a lot from you so far. It amazes me that alot of addons have very complex to color text with class color, however your solution has to be about the most efficient that i have seen.

What would you should for a panel? I am looking to be able to just place individual modules literally wherever i would like - other then that nothing much as far as features.
Thank you!

Well, StatBlockCore is a fine panel, and moreover if it works for you, I'd say tell the author to change the behaviour to measure the size of the content and resize the buttons rather than having a fixed size.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Old 07-01-10, 06:16 AM  
Twidget
An Aku'mai Servant
 
Twidget's Avatar

Forum posts: 33
File comments: 404
Uploads: 0
Feature Request

Hi,
Would it be possible for you to add one more calculation/line?

Could you add a line that says how many "bubbles" you have left until you level up?

I play with my honey all the time who doesn't like to use mods and is always asking me how many bubbles I have left. I respond with the percentage and get a herumph if you know what I mean....

Thanks,
Twidget

Edit:
Oh... one more request, could you add hunter pet xp to the drop down?

Never mind... I found another mod that does what I want.
Last edited by Twidget : 07-21-10 at 11:16 AM.
Twidget is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.