Thread Tools Display Modes
02-17-15, 05:16 PM   #1
Ðynasty
A Fallenroot Satyr
Join Date: May 2010
Posts: 23
Need help editing perty please...

Can someone take a look here and help me edit this?

Trying to add Tiger Power and move the Ox button.
  Reply With Quote
02-18-15, 02:40 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you want help modifying code, post the code. People are lazy. The less effort you ask people to do by clicking links and downloading files and unzipping stuff, the more likely they are to help you.
__________________
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
02-18-15, 04:29 AM   #3
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Have you tryed to send a PM to tropiq? He posted the comment that he modified the code so just ask for it.
My guess this code in "Core.lua" is the part where it shoud be added, moving it is easy just play around with the numbers here:
Code:
-- Ox Statue
	------------------------------------------------------------
	Statue:SetPoint("TOPLEFT", f.Bar, "BOTTOMLEFT", 1, -3)
Then find the spell id of the thing you want to add like tiger-power: http://www.wowhead.com/spell=125359/


Lua Code:
  1. -- Style
  2. local f = CreateFrame("Frame", nil, UIParent)
  3. local Icon1 = CreateFrame("Frame", nil, UIParent)
  4. local Icon2 = CreateFrame("Frame", nil, UIParent)
  5. local Icon3 = CreateFrame("Frame", nil, UIParent)
  6. local Statue = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
  7. local function BuildStagger()
  8.     f:SetSize(cfg.IconSize, cfg.IconSize)
  9.     CreateIF(f, true)
  10.     f.Bar = CreateFrame("StatusBar", nil, f)
  11.     f.Bar:SetSize(cfg.IconSize*4 + 12, 5)
  12.     CreateSB(f.Bar)
  13.     f:SetPoint("BOTTOMRIGHT", f.Bar, "TOPRIGHT", 0, 4)
  14.     f.Text = f:CreateFontString(nil, "OVERLAY")
  15.     f.Text:SetFont(unpack(cfg.Font))
  16.     f.Text:SetPoint("TOPRIGHT", f.Bar, "BOTTOMRIGHT", 0, -2)
  17.  
  18.     -- Elusive Brew
  19.     Icon3:SetSize(cfg.IconSize, cfg.IconSize)
  20.     Icon3:SetPoint("RIGHT", f, "LEFT", -4, 0)
  21.     CreateIF(Icon3, true)
  22.     Icon3.Icon:SetTexture(select(3, GetSpellInfo(115308)))
  23.     Icon3.Count = Icon3:CreateFontString(nil, "OVERLAY")
  24.     Icon3.Count:SetFont(unpack(cfg.Font))
  25.     Icon3.Count:SetPoint("BOTTOMRIGHT", 3, -1)
  26.  
  27.     -- Guard
  28.     Icon2:SetSize(cfg.IconSize, cfg.IconSize)
  29.     Icon2:SetPoint("RIGHT", Icon3, "LEFT", -4, 0)
  30.     CreateIF(Icon2, true)
  31.     Icon2.Icon:SetTexture(select(3, GetSpellInfo(115295)))
  32.  
  33.     -- Shuffle
  34.     Icon1:SetSize(cfg.IconSize, cfg.IconSize)
  35.     Icon1:SetPoint("RIGHT", Icon2, "LEFT", -4, 0)
  36.     CreateIF(Icon1, true)
  37.     Icon1.Icon:SetTexture(select(3, GetSpellInfo(115307)))
  38.    
  39.     -- Ox Statue
  40.     Statue:SetSize(cfg.IconSize*3/4, cfg.IconSize*3/4)
  41.     Statue:SetPoint("TOPLEFT", f.Bar, "BOTTOMLEFT", 1, -3)
  42.     CreateIF(Statue, true)
  43.     Statue.Icon:SetTexture(select(3, GetSpellInfo(115069)))
  44.     Statue:SetScript("OnEnter", function(self)
  45.         GameTooltip:Hide()
  46.         GameTooltip:SetOwner(self, "ANCHOR_RIGHT", 0, 0)
  47.         GameTooltip:ClearLines()
  48.         GameTooltip:SetSpellByID(115315)
  49.         GameTooltip:Show()
  50.     end)
  51.     Statue:SetScript("OnLeave", GameTooltip_Hide)
  52.  
  53.     f.Mover = SetMover(f.Bar, NPE_MOVE, "Stagger", cfg.StaggerPos, 140, 20)
  54.     SlashCmdList["STAGGER"] = function(msg)
  55.         if msg:lower() == "reset" then
  56.             wipe(MoverDB["Stagger"])
  57.             ReloadUI()
  58.         else
  59.             if f.Mover:IsVisible() then
  60.                 f.Mover:Hide()
  61.             else
  62.                 f.Mover:Show()
  63.             end
  64.         end
  65.     end
  66.     SLASH_STAGGER1 = "/stg"
  67. end
  68.  
  69. -- Function
  70. f:RegisterUnitEvent("UNIT_AURA", "player")
  71. f:RegisterUnitEvent("PLAYER_SPECIALIZATION_CHANGED", "player")
  72. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  73. f:RegisterEvent("UNIT_MAXHEALTH")
  74. f:SetScript("OnEvent", function()
  75.     if not f.styled then
  76.         BuildStagger()
  77.         f.styled = true
  78.     end
  79.     if f.styled then
  80.         if GetSpecialization() == 1 then
  81.             f:Show()
  82.             Icon1:Show()
  83.             Icon2:Show()
  84.             Icon3:Show()
  85.             Statue:Show()
  86.             local Total, Per
  87.             local name, _, icon, _, _, duration, expire, _, _, _, _, _, _, _, value = UnitAura("player", GetSpellInfo(124275), "", "HARMFUL")
  88.             if (not name) then name, _, icon, _, _, duration, expire, _, _, _, _, _, _, _, value = UnitAura("player", GetSpellInfo(124274), "", "HARMFUL") end
  89.             if (not name) then name, _, icon, _, _, duration, expire, _, _, _, _, _, _, _, value = UnitAura("player", GetSpellInfo(124273), "", "HARMFUL") end
  90.             if name and value > 0 and duration > 0 then
  91.                 Total = value * math.floor(duration)
  92.                 Per = Total / UnitHealthMax("player") * 100
  93.                 f:SetAlpha(1)
  94.                 f.Icon:SetTexture(icon)
  95.                 f.CD:SetCooldown(expire - 10, 10)
  96.             else
  97.                 value = 0
  98.                 Per = 0
  99.                 f:SetAlpha(cfg.FadeAlpha)
  100.                 f.Icon:SetTexture(select(3, GetSpellInfo(124275)))
  101.                 f.CD:SetCooldown(0, 0)
  102.             end
  103.             f.Bar:SetMinMaxValues(0, 100)
  104.             f.Bar:SetValue(Per)
  105.             f.Text:SetText(cfg.InfoColor..Numb(value).." "..cfg.MyColor..Numb(Per).."%")
  106.             if UnitAura("player", GetSpellInfo(124273), "", "HARMFUL") then
  107.                 ActionButton_ShowOverlayGlow(f)
  108.             else
  109.                 ActionButton_HideOverlayGlow(f)
  110.             end
  111.             -- Shuffle
  112.             local name1, _, _, _, _, dur1, exp1 = UnitBuff("player", GetSpellInfo(115307))
  113.             if exp1 then
  114.                 Icon1:SetAlpha(1)
  115.                 Icon1.CD:SetCooldown(exp1 - dur1, dur1)
  116.                 CreateAT(Icon1, name1)
  117.             else
  118.                 Icon1:SetAlpha(cfg.FadeAlpha)
  119.                 Icon1.CD:SetCooldown(0, 0)
  120.             end
  121.             -- Guard
  122.             local name2, _, _, _, _, dur2, exp2 = UnitBuff("player", GetSpellInfo(115295))
  123.             if exp2 then
  124.                 Icon2:SetAlpha(1)
  125.                 Icon2.CD:SetCooldown(exp2 - dur2, dur2)
  126.                 CreateAT(Icon2, name2, "ANCHOR_RIGHT")
  127.             else
  128.                 Icon2:SetAlpha(cfg.FadeAlpha)
  129.                 Icon2.CD:SetCooldown(0, 0)
  130.             end
  131.             -- Elusive Brew
  132.             local count = select(4, UnitBuff("player", GetSpellInfo(128939)))
  133.             local name3, _, _, _, _, dur, exp3, _, _, _, id = UnitBuff("player", GetSpellInfo(115308))
  134.             local Status
  135.             if count and count > 0 then
  136.                 Icon3:SetAlpha(1)
  137.                 Icon3.Count:SetText(count)
  138.                 CreateAT(Icon3, name3)
  139.                 Status = true
  140.             else
  141.                 Icon3:SetAlpha(cfg.FadeAlpha)
  142.                 Icon3.Count:SetText(nil)
  143.                 Status = false
  144.             end
  145.             if id == 115308 then
  146.                 Icon3.CD:SetCooldown(exp3 - dur, dur)
  147.                 Icon3:SetAlpha(1)
  148.             else
  149.                 Icon3.CD:SetCooldown(0, 0)
  150.                 if Status then
  151.                     Icon3:SetAlpha(1)
  152.                 else
  153.                     Icon3:SetAlpha(cfg.FadeAlpha)
  154.                 end
  155.             end
  156.             if count and count == 15 then
  157.                 ActionButton_ShowOverlayGlow(Icon3)
  158.             else
  159.                 ActionButton_HideOverlayGlow(Icon3)
  160.             end
  161.             -- Ox Statue
  162.             local haveStatue, sname, sstart, sdur, sicon = GetTotemInfo(1)
  163.             local sid = select(7, GetSpellInfo(sname))
  164.             if haveStatue and sdur > 0 then
  165.                 Statue:SetAlpha(1)
  166.                 Statue.CD:SetCooldown(sstart, sdur)
  167.             else
  168.                 Statue:SetAlpha(cfg.FadeAlpha)
  169.                 Statue.CD:SetCooldown(0, 0)
  170.             end
  171.             Statue:SetAttribute("*type*", "macro")
  172.             Statue:SetAttribute("macrotext", "/click TotemFrameTotem1 RightButton")
  173.         else
  174.             f:Hide()
  175.             Icon1:Hide()
  176.             Icon2:Hide()
  177.             Icon3:Hide()
  178.             Statue:Hide()
  179.         end
  180.     end
  181. end)
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
02-18-15, 08:33 AM   #4
Ðynasty
A Fallenroot Satyr
Join Date: May 2010
Posts: 23
All that code might as well be Japanese and no I don't speak Japanese.

I've fiddled with the numbers for the Ox button button no matter what I did I couldn't get it where I wanted it:




As far as adding Tiger Power, I tried some copy pasting from one of the others and changing spellID etc, but yea right lol no go.
  Reply With Quote
02-18-15, 10:09 AM   #5
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
OK then if you don't have the skills to edit the AddOn and no one here can help my suggestion woud be use an AddOn that already has this options without editing the lua.

Download:
Raven
Raven Filter: Leila
Staggermeter or Monkstag

1. /raven
2. select "Buffs" and "Create as Icons"
3. Go to bargroups tab
4. Klick "Buffs" Tab here and scroll down
5. Select "White List" and in the drop down menu on the right select "Special buffs"
6. If you want some of the buffs to be not displayed ask here its easy to change.
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 02-18-15 at 10:12 AM.
  Reply With Quote
02-18-15, 10:45 AM   #6
Ðynasty
A Fallenroot Satyr
Join Date: May 2010
Posts: 23
Originally Posted by Tonyleila View Post
no one here can help
Are you saying you don't know how to or don't want to?

Looks to me you know what you're doing
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Need help editing perty please...


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