Download
(8Kb)
Download
Updated: 07-20-16 06:06 AM
Pictures
File Info
Compatibility:
Legion (7.0.3)
Minor patch (6.2.4)
Minor patch (6.2.3)
Fury of Hellfire (6.2)
Updated:07-20-16 06:06 AM
Created:01-21-10 02:48 AM
Downloads:4,848
Favorites:12
MD5:

Broker: EasyXP

Version: 0.1.0-beta
by: Lonny [More]

Show your current experience progression similar to the experience bar but better.

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

To post issues/bugs/feedback or get support please click here.

Enjoy!

Please check the changes at GitHub.
Post A Reply Comment Options
Unread 07-01-10, 06:16 AM  
Twidget
An Aku'mai Servant
 
Twidget's Avatar

Forum posts: 33
File comments: 401
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.
Report comment to moderator  
Reply With Quote
Unread 01-28-10, 12:44 AM  
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
Unread 01-27-10, 08: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.
Report comment to moderator  
Reply With Quote
Unread 01-27-10, 05: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 05:35 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 01-27-10, 04: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 04:43 PM.
Report comment to moderator  
Reply With Quote
Unread 01-27-10, 03: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
Report comment to moderator  
Reply With Quote
Unread 01-27-10, 01: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
Report comment to moderator  
Reply With Quote
Unread 01-27-10, 01: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 01:16 PM.
Report comment to moderator  
Reply With Quote
Unread 01-25-10, 09: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
Unread 01-25-10, 09: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 09:05 PM.
Report comment to moderator  
Reply With Quote
Unread 01-25-10, 08: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 08:56 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 01-25-10, 05: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?
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.