Jump to content

Photo

Script to make target buffs/debuffs bigger


  • Please log in to reply
5 replies to this topic

#1 Minteefresh

Minteefresh
  • Junkies
  • Humanclass_name
  • US-Bleeding Hollow
  • Ruin
  • Posts: 9
  • Talents: Assassination 1/2/2/1/2/.

Posted 09 May 2012 - 02:44 PM

Title says all..

I'm trying to make my targets debuff and buffs bigger.

I also would like to make SnD and Recuperate appear right next to my portrait unit frame(I am currently using Woundman's style UF and position). Thanks.
  • 0

#2 Azurejer

Azurejer
  • Junkies
  • Humanclass_name
  • EU-Darksorrow
  • Rampage / Saccage
  • Posts: 4
  • Talents: Subtlety
  • RBG: 2033

Posted 09 May 2012 - 03:28 PM

--[[target buffs]]

local function UpdateTargetAuraPositions(self, auraName, numAuras, numOppositeAuras, largeAuraList, updateFunc, maxRowWidth, offsetX)

    local AURA_OFFSET_Y = 3;

    local LARGE_AURA_SIZE = 36;

    local SMALL_AURA_SIZE = 26;

    local size;

    local offsetY = AURA_OFFSET_Y;

    local rowWidth = 0;

    local firstBuffOnRow = 1;

    for i=1, numAuras do

        if ( largeAuraList[i] ) then

            size = LARGE_AURA_SIZE;

            offsetY = AURA_OFFSET_Y + AURA_OFFSET_Y;

        else

            size = SMALL_AURA_SIZE;

        end

        if ( i == 1 ) then

            rowWidth = size;

            self.auraRows = self.auraRows + 1;

        else

            rowWidth = rowWidth + size + offsetX;

        end

        if ( rowWidth > maxRowWidth ) then

            updateFunc(self, auraName, i, numOppositeAuras, firstBuffOnRow, size, offsetX, offsetY);

            rowWidth = size;

            self.auraRows = self.auraRows + 1;

            firstBuffOnRow = i;

            offsetY = AURA_OFFSET_Y;

        else

            updateFunc(self, auraName, i, numOppositeAuras, i - 1, size, offsetX, offsetY);

        end

    end;

end;

hooksecurefunc("TargetFrame_UpdateAuraPositions", UpdateTargetAuraPositions)





--[[buffs tracker]]

bl={5171,73651,57934,109949,51713}

bs=28;xb=-260;yb=175;br=6;bdr="BORDER"be="UNIT_AURA"cbf=CreateFrame;gi=GetSpellInfo;bm=math.ceil;fm=math.floor;st=STANDARD_TEXT_FONT;function cu(s) return UnitBuff("player",gi(s))end

function Cb(i,s)local _,_,t3=gi(s)local f=cbf("Frame")f:SetSize(bs,bs)f.t=f:CreateTexture(nil,bdr)f.t:SetAllPoints(true)f.t:SetTexture(t3)f.f=f:CreateFontString(nil,bdr)f.f:SetFont(st,12,"OUTLINE")f.f:SetPoint("BOTTOMRIGHT",0,0)return f;end

function vb(s,i,row)local b1,_,_,b4=cu(s)local f=_G["B"..i]if b1 then f:Show()f:SetPoint("CENTER",xb+(bs+5)*bm((row-1)%br),yb-(bs+10)*bm(row/br))if(b4>1)then f.f:SetText(b4)end row=row+1;end return row;end

function ub()for i,s in ipairs(bl)do local b,_,_,_,_,_,k=cu(s)if b then local vt=fm(k-GetTime())if (vt>=60)then vt=bm(vt/60)_G["B"..i].c:SetText(vt.."m")elseif vt >= 0 then _G["B"..i].c:SetText(vt.."s")end end end end

function Cc(f)f.c=f:CreateFontString(nil,bdr)f.c:SetFont(st,14,"OUTLINE")f.c:SetPoint("CENTER",0,20)end function db()for i in ipairs(bl)do _G["B"..i]:Hide()end end

for i,s in ipairs(bl)do _G["B"..i]=Cb(i,s)Cc(_G["B"..i])_G["B"..i]:Hide()end function bb()db()local bw=1;for i,s in ipairs(bl)do bw=vb(s,i,bw)end end bk=cbf("Frame")bk:SetScript("OnEvent",bb)bk:SetScript("OnUpdate",ub)bk:RegisterEvent(be)


  • 3

#3 Minteefresh

Minteefresh
  • Junkies
  • Humanclass_name
  • US-Bleeding Hollow
  • Ruin
  • Posts: 9
  • Talents: Assassination 1/2/2/1/2/.

Posted 09 May 2012 - 03:48 PM

I love you. Will try this when I get home from work. Thanks.
  • 0

#4 Fredro125

Fredro125
  • Members
  • Undeadclass_name
  • US-Bleeding Hollow
  • Ruin
  • Posts: 3
  • Talents: Subtlety 2/2/2/1/0/0
  • RBG: 384

Posted 27 June 2012 - 05:19 PM

where do you type that script in to make it work? im looking to do the same thing on my rogue


thanks
  • 0
Posted Image

#5 Superlative

Superlative
  • Members
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 51
  • Talents: Shadow 0/2/0/1/2/.
  • RBG: 1894

Posted 28 June 2012 - 12:04 AM

This is what i use:

-- Big Debuffs
  hooksecurefunc("TargetFrame_UpdateAuraPositions", function(self, auraName, numAuras, numOppositeAuras,largeAuraList, updateFunc, maxRowWidth, offsetX)
    local AURA_OFFSET_Y = 3
    local LARGE_AURA_SIZE = 27 -- Self Debuffs
    local SMALL_AURA_SIZE = 15 -- others debuffs
    local size
    local offsetY = AURA_OFFSET_Y
    local rowWidth = 0
    local firstBuffOnRow = 1
    for i=1, numAuras do
	 if ( largeAuraList[i] ) then
	   size = LARGE_AURA_SIZE
	   offsetY = AURA_OFFSET_Y + AURA_OFFSET_Y
	 else
	   size = SMALL_AURA_SIZE
	 end
	 if ( i == 1 ) then
	   rowWidth = size
	   self.auraRows = self.auraRows + 1
	 else
	   rowWidth = rowWidth + size + offsetX
	 end
	 if ( rowWidth > maxRowWidth ) then
	   updateFunc(self, auraName, i, numOppositeAuras, firstBuffOnRow, size, offsetX, offsetY)
	   rowWidth = size
	   self.auraRows = self.auraRows + 1
	   firstBuffOnRow = i
	   offsetY = AURA_OFFSET_Y
	 else
	   updateFunc(self, auraName, i, numOppositeAuras, i - 1, size, offsetX, offsetY)
	 end
    end
    end)

  • 2

#6 Lostariel

Lostariel
  • Junkies
  • Humanclass_name
  • EU-Twilight's Hammer
  • Blackout
  • Posts: 126
  • Talents: Assassination 0/2/2/2/0/1/1
  • 2v2: 1624
  • 3v3: 1452
  • 5v5: 1808

Posted 28 January 2015 - 04:25 AM

This is what i use:

-- Big Debuffs
hooksecurefunc("TargetFrame_UpdateAuraPositions", function(self, auraName, numAuras, numOppositeAuras,largeAuraList, updateFunc, maxRowWidth, offsetX)
local AURA_OFFSET_Y = 3
local LARGE_AURA_SIZE = 27 -- Self Debuffs
local SMALL_AURA_SIZE = 15 -- others debuffs
local size
local offsetY = AURA_OFFSET_Y
local rowWidth = 0
local firstBuffOnRow = 1
for i=1, numAuras do
	 if ( largeAuraList[i] ) then
	 size = LARGE_AURA_SIZE
	 offsetY = AURA_OFFSET_Y + AURA_OFFSET_Y
	 else
	 size = SMALL_AURA_SIZE
	 end
	 if ( i == 1 ) then
	 rowWidth = size
	 self.auraRows = self.auraRows + 1
	 else
	 rowWidth = rowWidth + size + offsetX
	 end
	 if ( rowWidth > maxRowWidth ) then
	 updateFunc(self, auraName, i, numOppositeAuras, firstBuffOnRow, size, offsetX, offsetY)
	 rowWidth = size
	 self.auraRows = self.auraRows + 1
	 firstBuffOnRow = i
	 offsetY = AURA_OFFSET_Y
	 else
	 updateFunc(self, auraName, i, numOppositeAuras, i - 1, size, offsetX, offsetY)
	 end
end
end)



/casts ressurection

Just wanted to say thank for you this script, i looked through the default ui scripts thread and could not find it, have a +rep
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<