Thread Tools Display Modes
06-21-13, 09:06 AM   #1
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Red face LF Addons

Hello everyone.

Sorry if my English is not very good because it is not my native language.

I'm looking for two addons, ¿could help me find them?.

1º An addon that, show me the durability in a bar format (and if can be posible, that bar be customizable), but, initially, if show the durability in bar format, Its enought for me.

2º An addon (ideally broker) that allows me to put the coordinates in format XX,YY, without decimals, for example 83,35, I am currently using the broker of tomtom but consumes too many resources need to find an alternative.

Thanks for your time, I hope your answers.
  Reply With Quote
06-21-13, 09:18 AM   #2
def9
A Cobalt Mageweaver
 
def9's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 219
To help with your #2 request I'd suggest zz_Coords broker mod.
__________________
Epiria, level 100 Ret/Holy Paladin
Simkin level 100 Combat Rogue
Feldeemus, level 100 Arcane Mage
  Reply With Quote
06-21-13, 09:54 AM   #3
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Originally Posted by def9 View Post
To help with your #2 request I'd suggest zz_Coords broker mod.
Hi, Thanks for your answer.

I try zz Coord as you guess, but they show me the cords at format, XX,X / YY,Y.

I need a broker with no decimal if can me posible, for example XX / YY.

For the other hand PLS I need that addon:

1º An addon that, show me the durability in a bar format (and if can be posible, that bar be customizable), but, initially, if show the durability in bar format, Its enought for me.

Thx!!!
  Reply With Quote
06-21-13, 11:16 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Maybe Track-O-Matic for the durability? (It tracks alot of other things)
I'm not using the addon myself so can't give more details.
  Reply With Quote
06-21-13, 06:39 PM   #5
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Originally Posted by Dridzt View Post
Maybe Track-O-Matic for the durability? (It tracks alot of other things)
I'm not using the addon myself so can't give more details.
Hi, Thanks for the help.

I try the addon that you say (Track-O-Matic), but I cant found nothing that, can leave me, track durability (at bar mode).

For the Addon for coordinates, at this moment, I am trying to edit the broker StatBlock_Coord.lua, to adapt it.

/¡\ I need An addon that, show me the durability in a bar format (and if can be posible, that bar be customizable), but, initially, if show the durability in bar format, Its enought for me. /¡\

Thanks to all.
  Reply With Quote
06-24-13, 01:29 AM   #6
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
News!.

I solved the issue with coords.

With Statblock coord, only need to edit in the StatBlock_Coords.lua, that lines:

local obj = LibStub("LibDataBroker-1.1"):NewDataObject("Coords", {type = "data source", text = "00.00, 00.00"})

[.....]

obj.text = format("%.1f, %.1f", x*100, y*100)
FOR THAT:

local obj = LibStub("LibDataBroker-1.1"):NewDataObject("Coords", {type = "data source", text = "00, 00"})

[....]

obj.text = format("%i, %i", x*100, y*100)

At this point the Request be:

/¡\ I need An addon that, show me the durability in a bar format (and if can be posible, that bar be customizable), but, initially, if show the durability in bar format, Its enought for me. /¡\

!!! PLS HELP !!!
  Reply With Quote
06-24-13, 09:01 AM   #7
def9
A Cobalt Mageweaver
 
def9's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 219
I'm not proficient in anyway in coding addons but I do know a bar for your durability would be possible.

I've used AraBrokerXP for example for a long time now and it shows my xp in an ASCII bar format. So I can't see why durability couldn't be done the same way I just have no idea how to put the code together to make it work.
__________________
Epiria, level 100 Ret/Holy Paladin
Simkin level 100 Combat Rogue
Feldeemus, level 100 Arcane Mage
  Reply With Quote
06-24-13, 11:16 AM   #8
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Here. tekAbility was used as a base, along with some code from Phanx I found on google.

Code:
local statusbar = CreateFrame("StatusBar", nil, UIParent)
local texture = "Interface\\TARGETINGFRAME\\UI-StatusBar"
local font = "Fonts\\FRIZQT__.TTF"

 -- Set the position top left, 100 px from top and left side
statusbar:SetPoint("TOPLEFT", 100, -100)
statusbar:SetWidth(150)
statusbar:SetHeight(25)
statusbar:SetStatusBarTexture(texture)
statusbar:GetStatusBarTexture():SetHorizTile(false) -- prevent weird looks
statusbar:GetStatusBarTexture():SetVertTile(false)
statusbar:SetStatusBarColor(0, 1, 0)

statusbar:SetMinMaxValues(0, 1) -- percentage.
statusbar:SetValue(1)

statusbar.bg = statusbar:CreateTexture(nil, "BACKGROUND")
statusbar.bg:SetTexture(texture)
statusbar.bg:SetAllPoints(true)
statusbar.bg:SetVertexColor(0, .5, 0)

statusbar.value = statusbar:CreateFontString(nil, "OVERLAY")
statusbar.value:SetPoint("CENTER")
statusbar.value:SetFont(font, 14, "OUTLINE")
statusbar.value:SetTextColor(1, 1, 1)
statusbar.value:SetText("100%")
statusbar.value:SetShadowOffset(0, 0)
statusbar.value:SetShadowColor(0, 0, 0, .2) -- just a little shadow to make the outline smooth

-- Credits goes to Tekkub!
local ids, slots = {}, {
    "Head", "Shoulder", "Chest", "Legs", "Hands",
    "Waist", "Feet", "Wrist",
    "MainHand", "SecondaryHand",
}
for _, slot in pairs(slots) do
    ids[(GetInventorySlotInfo(slot .. "Slot"))] = slot
end
slots = nil -- go away

local function PercentToRGB(perc)
    local relperc = perc*2 % 1
    if perc <= 0 then       return           1,       0, 0
    elseif perc < 0.5 then  return           1, relperc, 0
    elseif perc == 0.5 then return           1,       1, 0
    elseif perc < 1.0 then  return 1 - relperc,       1, 0
    else                    return           0,       1, 0 end
end

local coloredPercentFormat = '|cff%02x%02x%02x%.2f%%'
local percentFormat = '%.2f%%'
statusbar:SetScript('OnEvent', function()
    local percent, min, max, r, g, b = 1
    for id, _ in pairs(ids) do
        local min, max = GetInventoryItemDurability(id)
        -- Only if item actually has durability (heirlooms anyone?)
        if min and max and max > 0 then
            -- set bar to inventory items lowest durability
            -- because if one is at 10%, and the rest above 80%,
            -- you need to repair anyway, right?
            percent = math.min(min / max, percent)
        end
    end

    r, g, b = PercentToRGB(percent)

    -- Set the statusbar value
    statusbar:SetValue(percent)
     -- background 50% darker then front
    statusbar.bg:SetVertexColor(r / 2, g / 2, b / 2)
     -- set the calculated color
    statusbar:SetStatusBarColor(r, g, b)
    -- If you want the text to be colored, uncomment the following line.
    --statusbar.value:SetFormattedText(coloredPercentFormat, r*255, g*255, b*255, percent*100)
    statusbar.value:SetFormattedText(percentFormat, percent * 100)
end)
statusbar:RegisterEvent('UPDATE_INVENTORY_DURABILITY')
  Reply With Quote
06-24-13, 01:42 PM   #9
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Originally Posted by ravagernl View Post
Here. tekAbility was used as a base, along with some code from Phanx I found on google.

Code:
local statusbar = CreateFrame("StatusBar", nil, UIParent)
local texture = "Interface\\TARGETINGFRAME\\UI-StatusBar"
local font = "Fonts\\FRIZQT__.TTF"

 -- Set the position top left, 100 px from top and left side
statusbar:SetPoint("TOPLEFT", 100, -100)
statusbar:SetWidth(150)
statusbar:SetHeight(25)
statusbar:SetStatusBarTexture(texture)
statusbar:GetStatusBarTexture():SetHorizTile(false) -- prevent weird looks
statusbar:GetStatusBarTexture():SetVertTile(false)
statusbar:SetStatusBarColor(0, 1, 0)

statusbar:SetMinMaxValues(0, 1) -- percentage.
statusbar:SetValue(1)

statusbar.bg = statusbar:CreateTexture(nil, "BACKGROUND")
statusbar.bg:SetTexture(texture)
statusbar.bg:SetAllPoints(true)
statusbar.bg:SetVertexColor(0, .5, 0)

statusbar.value = statusbar:CreateFontString(nil, "OVERLAY")
statusbar.value:SetPoint("CENTER")
statusbar.value:SetFont(font, 14, "OUTLINE")
statusbar.value:SetTextColor(1, 1, 1)
statusbar.value:SetText("100%")
statusbar.value:SetShadowOffset(0, 0)
statusbar.value:SetShadowColor(0, 0, 0, .2) -- just a little shadow to make the outline smooth

-- Credits goes to Tekkub!
local ids, slots = {}, {
    "Head", "Shoulder", "Chest", "Legs", "Hands",
    "Waist", "Feet", "Wrist",
    "MainHand", "SecondaryHand",
}
for _, slot in pairs(slots) do
    ids[(GetInventorySlotInfo(slot .. "Slot"))] = slot
end
slots = nil -- go away

local function PercentToRGB(perc)
    local relperc = perc*2 % 1
    if perc <= 0 then       return           1,       0, 0
    elseif perc < 0.5 then  return           1, relperc, 0
    elseif perc == 0.5 then return           1,       1, 0
    elseif perc < 1.0 then  return 1 - relperc,       1, 0
    else                    return           0,       1, 0 end
end

local coloredPercentFormat = '|cff%02x%02x%02x%.2f%%'
local percentFormat = '%.2f%%'
statusbar:SetScript('OnEvent', function()
    local percent, min, max, r, g, b = 1
    for id, _ in pairs(ids) do
        local min, max = GetInventoryItemDurability(id)
        -- Only if item actually has durability (heirlooms anyone?)
        if min and max and max > 0 then
            -- set bar to inventory items lowest durability
            -- because if one is at 10%, and the rest above 80%,
            -- you need to repair anyway, right?
            percent = math.min(min / max, percent)
        end
    end

    r, g, b = PercentToRGB(percent)

    -- Set the statusbar value
    statusbar:SetValue(percent)
     -- background 50% darker then front
    statusbar.bg:SetVertexColor(r / 2, g / 2, b / 2)
     -- set the calculated color
    statusbar:SetStatusBarColor(r, g, b)
    -- If you want the text to be colored, uncomment the following line.
    --statusbar.value:SetFormattedText(coloredPercentFormat, r*255, g*255, b*255, percent*100)
    statusbar.value:SetFormattedText(percentFormat, percent * 100)
end)
statusbar:RegisterEvent('UPDATE_INVENTORY_DURABILITY')

Hi, sorry for my dude, ¿can you tell me how can I aply the code?.

¿Just create a random text file, paste the code -> save, in interface -> addons?

THANKS!
  Reply With Quote
06-24-13, 01:55 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you need help turning code into an addon, copy and paste it into this page:
http://addon.ziuo.net/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
06-24-13, 02:10 PM   #11
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Originally Posted by Phanx View Post
If you need help turning code into an addon, copy and paste it into this page:
http://addon.ziuo.net/
Thanks!!

I dont have idea how to "customice", the bar, I try to replace text and, try, try , try.....

If i have dudes, ¿can I contact you?.
  Reply With Quote
06-24-13, 03:18 PM   #12
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Akatosh View Post
Thanks!!

I dont have idea how to "customice", the bar, I try to replace text and, try, try , try.....

If i have dudes, ¿can I contact you?.
What are you trying to customize?
  Reply With Quote
06-24-13, 04:11 PM   #13
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Originally Posted by ravagernl View Post
What are you trying to customize?
Hi thanks for the help:

-------

No border.
No text.
No background (transparent or remove it).

I combine that with kgpanels for do that.

-------

Texture of the bar, "Flat": (My_sharedmedia).

Color:
-Full durability: 0:86:15. (dark green).
-Mid durability: 205.205.0. (dark yellow).
-Little durability: 199:0:0. (dark red).

With the efect like the default config explain:

Little Dur-----betwen little/ mid-------Mid dur-------betwen mid/Full-----Full dur.
Dark red------mix of red/yelow-----Dark yellow-----mix of yellow/red----Dark red.

The some efect like the grid of that photo: http://s.cdn.wowinterface.com/preview/pvw59665.jpg.

But in durability bar (only the colors).

Thanks for all.

Last edited by Akatosh : 06-24-13 at 05:05 PM.
  Reply With Quote
06-25-13, 12:35 AM   #14
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
I see you're using ElvUI Did you try http://www.tukui.org/addons/index.php?act=view&id=58?

It has support for durability, bags, fps and ms. There's a good chance it already picks up the colors used in your ElvUI configuration.
  Reply With Quote
06-25-13, 08:58 AM   #15
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Originally Posted by ravagernl View Post
I see you're using ElvUI Did you try http://www.tukui.org/addons/index.php?act=view&id=58?

It has support for durability, bags, fps and ms. There's a good chance it already picks up the colors used in your ElvUI configuration.

I dont explain it well, The UI of the photo, dont be my UI.

Be just and example of the efect (of the colors) that I want for the durability bar.
  Reply With Quote
06-25-13, 10:52 AM   #16
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Akatosh View Post
I dont explain it well, The UI of the photo, dont be my UI.

Be just and example of the efect (of the colors) that I want for the durability bar.
I understand.

Originally Posted by Akatosh View Post
Hi thanks for the help:

-------

No border.
No text.
No background (transparent or remove it).

I combine that with kgpanels for do that.
I see, in the lua file, delete / comment out any lines that have "statusbar.value" or "statusbar.bg"
-------
Texture of the bar, "Flat": (My_sharedmedia).
I don't know if the correct path is used for the texture in the script below, you may need to adjust the texture variable at the top of the file.
Color:
-Full durability: 0:86:15. (dark green).
-Mid durability: 205.205.0. (dark yellow).
-Little durability: 199:0:0. (dark red).

With the efect like the default config explain:

Little Dur-----betwen little/ mid-------Mid dur-------betwen mid/Full-----Full dur.
Dark red------mix of red/yelow-----Dark yellow-----mix of yellow/red----Dark red.
Below code should probably work. Open the lua file in notepad and paste the following in it.

I'll see if I can provide a kgPanels script
Code:
-- Adjust these
local texture = [[Interface\Addons\SharedMedia\statusbar\Flat]]
--local font = [[Fonts\FRIZQT__.TTF]]

local statusbar = CreateFrame("StatusBar", nil, UIParent)

 -- Set the position top left, 100 px from top and left side
statusbar:SetPoint("TOPLEFT", 100, -100)
statusbar:SetWidth(150)
statusbar:SetHeight(25)
statusbar:SetStatusBarTexture(texture)
statusbar:GetStatusBarTexture():SetHorizTile(false) -- prevent weird looks
statusbar:GetStatusBarTexture():SetVertTile(false)
statusbar:SetStatusBarColor(0, 1, 0)

statusbar:SetMinMaxValues(0, 1) -- percentage.
statusbar:SetValue(1)

-- Statusbar background.
-- statusbar.bg = statusbar:CreateTexture(nil, "BACKGROUND")
-- statusbar.bg:SetTexture(texture)
-- statusbar.bg:SetAllPoints(true)
-- statusbar.bg:SetVertexColor(0, .5, 0)

-- statusbar.value = statusbar:CreateFontString(nil, "OVERLAY")
-- statusbar.value:SetPoint("CENTER")
-- statusbar.value:SetFont(font, 14, "OUTLINE")
-- statusbar.value:SetTextColor(1, 1, 1)
-- statusbar.value:SetText("100%")
-- statusbar.value:SetShadowOffset(0, 0)
-- statusbar.value:SetShadowColor(0, 0, 0, .2) -- just a little shadow to make the outline smooth

-- Credits goes to Tekkub!
local ids, slots = {}, {
    "Head", "Shoulder", "Chest", "Legs", "Hands",
    "Waist", "Feet", "Wrist",
    "MainHand", "SecondaryHand",
}
for _, slot in pairs(slots) do
    ids[(GetInventorySlotInfo(slot .. "Slot"))] = slot
end
slots = nil -- go away

local function PercentToRGB(perc, ...)
    if perc >= 1 then
        local r, g, b = select(select('#', ...) - 2, ...)
        return r, g, b
    elseif perc <= 0 then
        local r, g, b = ...
        return r, g, b
    end

    local num = select('#', ...) / 3

    local segment, relperc = math.modf(perc*(num-1))
    local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...)

    return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc
end

--local coloredPercentFormat = '|cff%02x%02x%02x%.2f%%'
--local percentFormat = '%.2f%%'
statusbar:SetScript('OnEvent', function()
    local percent, min, max, r, g, b = 1
    for id, _ in pairs(ids) do
        local min, max = GetInventoryItemDurability(id)
        -- Only if item actually has durability (heirlooms anyone?)
        if min and max and max > 0 then
            -- set bar to inventory items lowest durability
            -- because if one is at 10%, and the rest above 80%,
            -- you need to repair anyway, right?
            percent = math.min(min / max, percent)
        end
    end

    -- Set the statusbar value
    statusbar:SetValue(percent)

    -- Get the color
    -- set the calculated color
   r, g, b = PercentToRGB(percent,
        199 / 255,  0,          0,          -- dark red
        205 / 255,  205 / 255,  0,          -- dark yellow
        0,          86 / 255,   15 / 255    -- dark green
    )
    statusbar:SetStatusBarColor(r, g, b)
    -- background 50% darker then front
    --statusbar.bg:SetVertexColor(r / 2, g / 2, b / 2)
    -- If you want the text to be colored, uncomment the following line.
    --statusbar.value:SetFormattedText(coloredPercentFormat, r*255, g*255, b*255, percent*100)
    --statusbar.value:SetFormattedText(percentFormat, percent * 100)
end)
statusbar:RegisterEvent('UPDATE_INVENTORY_DURABILITY')

Last edited by ravagernl : 06-25-13 at 11:12 AM. Reason: copypasta fail!
  Reply With Quote
06-25-13, 01:14 PM   #17
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Thanks for all Boss.

I use that code, I really want learn more about Lua code, a lot of dudes..., but I really want be able to do all these things.

¿Can I ask yuo for solve dudes?, ¿via MP or Skype?.
  Reply With Quote
06-26-13, 03:02 PM   #18
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Just post your questions on the forum, where everyone can help answer them (and benefit from the answers). If your questions aren't related to the durability bar being talked about in this thread, start a new thread. That's the whole reason for having a forum in the first place!
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
07-03-13, 12:05 PM   #19
Akatosh
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jun 2013
Posts: 84
Smile

Results:


Durability bar:







Coords



Thx to all

Code of coords:

local Coords = CreateFrame("Frame"):CreateAnimationGroup()
local obj = LibStub("LibDataBroker-1.1"):NewDataObject("Coords", {type = "data source", text = "00, 00"})

local GetPlayerMapPosition = GetPlayerMapPosition
local format = string.format

local update = Coords:CreateAnimation()
Coords:SetScript("OnLoop", function()
local x, y = GetPlayerMapPosition"player"
obj.text = format("%i, %i", x*100, y*100)
end)
update:SetOrder(1)
update:SetDuration(0.1)
Coords:SetLooping("REPEAT")
Coords:Play()
Code of duability bar:

local texture = [[Interface\Addons\SharedMedia\statusbar\Flat]]

local statusbar = CreateFrame("StatusBar", nil, UIParent)

statusbar:GetFrameStrata("High")
statusbar:SetPoint("CENTER", 775, -356)
statusbar:SetWidth(366)
statusbar:SetHeight(12)
statusbar:SetStatusBarTexture(texture)
statusbar:GetStatusBarTexture():SetHorizTile(false)
statusbar:GetStatusBarTexture():SetVertTile(false)
statusbar:SetStatusBarColor(0, 1, 0)

statusbar:SetMinMaxValues(0, 1) -- percentage.
statusbar:SetValue(1)

local ids, slots = {}, {
"Head", "Shoulder", "Chest", "Legs", "Hands",
"Waist", "Feet", "Wrist",
"MainHand", "SecondaryHand",
}
for _, slot in pairs(slots) do
ids[(GetInventorySlotInfo(slot .. "Slot"))] = slot
end
slots = nil -- go away

local function PercentToRGB(perc, ...)
if perc >= 1 then
local r, g, b = select(select('#', ...) - 2, ...)
return r, g, b
elseif perc <= 0 then
local r, g, b = ...
return r, g, b
end

local num = select('#', ...) / 3

local segment, relperc = math.modf(perc*(num-1))
local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...)

return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc
end

statusbar:SetScript('OnEvent', function()
local percent, min, max, r, g, b = 1
for id, _ in pairs(ids) do
local min, max = GetInventoryItemDurability(id)
if min and max and max > 0 then
percent = math.min(min / max, percent)
end
end

statusbar:SetValue(percent)

r, g, b = PercentToRGB(percent,
199 / 255, 0, 0, -- dark red
205 / 255, 205 / 255, 0, -- dark yellow
0 / 255, 154 / 255, 26 / 255 -- dark green
)
statusbar:SetStatusBarColor(r, g, b)
end)
statusbar:RegisterEvent('UPDATE_INVENTORY_DURABILITY')

Addons needed:

Statblockcore: For customice size, color etc of cords.
Kgpanels: Create background panels and borders for elements (coords and durability bar)
Statblock cords: Edit the code of .lua.

Last edited by Akatosh : 07-03-13 at 02:17 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » LF Addons


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