Jump to content

  • Curse Sites
Help

script to move buffs on top right?


  • Please log in to reply
2 replies to this topic

#1 Dethz

Dethz
  • Members
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 108
  • Talents: Subtlety 1/1/2/1/0/1
  • Locationsocal

Posted 03 January 2013 - 08:04 PM

hi im trying to find the script to move the whole buff frame and scale it ty

#2 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 182

Posted 09 January 2013 - 03:53 PM

--SETTINGS
debuffDirectionX = "right"
-- "right" or "left"
debuffDirectionY = "up"
-- "up" or "down"
debuffPerRow = 5
-- if debuffPerRow is set below 3 it will automatically set to 3!
debuffScale = 0.9
xpos = -10
ypos = 25
----------------
----------------
local f = CreateFrame("Frame")
local function BuffsUpdate(self)
db = "DebuffButton"
dpr = debuffPerRow
dbs = debuffScale
if (debuffDirectionX=="right") then ddx = 35 elseif (debuffDirectionX=="left") then ddx = -35 end
if (debuffDirectionY=="down") then ddy = -45 elseif (debuffDirectionY=="up") then ddy = 45 end
if debuffPerRow < 3 then debuffPerRow = 3 end
--Row 1
if _G[db..1] then _G[db..1]:ClearAllPoints() _G[db..1]:SetPoint("CENTER","UIParent",xpos,ypos) end
for i = 2, dpr do if _G[db..i] then _G[db..i]:ClearAllPoints() _G[db..i]:SetPoint("CENTER",db..i - 1 ,ddx,0) end end
--Row 2
if _G[db..dpr+1] then _G[db..dpr+1]:ClearAllPoints() _G[db..dpr+1]:SetPoint("CENTER",db..1,0,ddy) end
for i = dpr+2, dpr*2 do if _G[db..i] then _G[db..i]:ClearAllPoints() _G[db..i]:SetPoint("CENTER",db..i - 1 ,ddx,0) end end
--Row 3
if _G[db..dpr*2+1] then _G[db..dpr*2+1]:ClearAllPoints() _G[db..dpr*2+1]:SetPoint("CENTER",db..dpr+1,0,ddy) end
for i = dpr*2+2, dpr*3 do if _G[db..i] then _G[db..i]:ClearAllPoints() _G[db..i]:SetPoint("CENTER",db..i - 1 ,ddx,0) end end
--Row 4
if _G[db..dpr*3+1] then _G[db..dpr*3+1]:ClearAllPoints() _G[db..dpr*3+1]:SetPoint("CENTER",db..dpr*2+1,0,ddy) end
for i = dpr*3+2, dpr*4 do if _G[db..i] then _G[db..i]:ClearAllPoints() _G[db..i]:SetPoint("CENTER",db..i - 1 ,ddx,0) end end
--Row 5
if _G[db..dpr*4+1] then _G[db..dpr*4+1]:ClearAllPoints() _G[db..dpr*4+1]:SetPoint("CENTER",db..dpr*3+1,0,ddy) end
for i = dpr*4+2, dpr*5 do if _G[db..i] then _G[db..i]:ClearAllPoints() _G[db..i]:SetPoint("CENTER",db..i - 1 ,ddx,0) end end
for i = 1, 25 do if _G[db..i] then _G[db..i]:SetScale(dbs) end end
end
f:SetScript("OnUpdate", BuffsUpdate)

you can change the SETTINGS-Section like you wish to get what you want

#3 Zerstiren

Zerstiren
  • Junkies
  • Humanclass_name
  • US-Darkspear
  • Cyclone
  • Posts: 166
  • Talents: Holy 2/1/1/2/2/0
  • LocationNew Jersey

Posted 12 January 2013 - 12:45 AM

BuffFrame:ClearAllPoints()
BuffFrame:SetParent(UIParent)
BuffFrame:SetScale(1.2)
BuffFrame:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -1, -1)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<