Jump to content

Need help fixing this script


  • Please log in to reply
4 replies to this topic

#1 HTFael

HTFael
  • Members
  • Posts: 26

Posted 05 December 2013 - 04:13 AM

MultiBarRight:SetAlpha(0)
MultiBarRight:EnableMouse(true)
MultiBarRight:SetScript("OnEnter", function(self) MultiBarRight:SetAlpha(1) end)
MultiBarRight:SetScript("OnLeave", function(self) MultiBarRight:SetAlpha(0) end)
MultiBarRight:SetFrameLevel(0)

for i = 1, 12, 1 do
_G["MultiBarRightButton"..i]:HookScript("OnEnter", function(self) MultiBarRight:SetAlpha(1) end)
_G["MultiBarRightButton"..i]:HookScript("OnLeave", function(self) MultiBarRight:SetAlpha(0) end)
end;

MultiBarLeft:SetAlpha(1)
MultiBarLeft:EnableMouse(true)
MultiBarLeft:SetScript("OnEnter", function(self) MultiBarRight:SetAlpha(1) end)
MultiBarLeft:SetScript("OnLeave", function(self) MultiBarRight:SetAlpha(0) end)
MultiBarLeft:SetFrameLevel(0)

for i = 1, 12, 1 do
_G["MultiBarLeftButton"..i]:HookScript("OnEnter", function(self) MultiBarRight:SetAlpha(1) end)
_G["MultiBarLeftButton"..i]:HookScript("OnLeave", function(self) MultiBarRight:SetAlpha(0) end)
end;

This is the code in the lua.  What it does is hide the right action bars, but when you mouseover them they appear.  This used to work back in cata, but it stopped working in Mop.  Basically I need an expert to fix it up to make it work in Mop.

#2 Torapants

Torapants
  • Premium
  • Curse Premium
  • Humanclass_name
  • EU-Auchindoun
  • Vindication
  • Posts: 144
  • Talents: Subtlety 1/1/2/2/0/1/0
  • 2v2: 1525
  • 3v3: 1466
  • 5v5: 576
  • RBG: 1839
  • LocationUK

Posted 05 December 2013 - 02:39 PM

local function showFoo(self)
for _, v in ipairs(MICRO_BUTTONS) do
_G[v]:SetAlpha(1)
end
end
local function hideFoo(self)
for _, v in ipairs(MICRO_BUTTONS) do
_G[v]:SetAlpha(0)
end
end
for _, v in ipairs(MICRO_BUTTONS) do
v = _G[v]
v:HookScript("OnEnter", showFoo)
v:HookScript("OnLeave", hideFoo)
v:SetAlpha(0)
end

That's what I use to make my Micromenu show on mouseover, just change the framename to the ones for the actionbar, it should work then.

Make sure they're ticked in the options menu too :P
:rogue: forever and always.

Quote

Posted by Soltan:
when playing mutilate its pretty important to bind V ..... for vendetta :cool:

#3 HTFael

HTFael
  • Members
  • Posts: 26

Posted 07 December 2013 - 05:26 PM

Bump, didn't work :(.
So I used these 2 codes, and it didn't work.  
local function showFoo(self)
for _, v in ipairs(MultiBarRight) do
_G[v]:SetAlpha(1)
end
end
local function hideFoo(self)
for _, v in ipairs(MultiBarRight) do
_G[v]:SetAlpha(0)
end
end
for _, v in ipairs(MultiBarRight) do
v = _G[v]
v:HookScript("OnEnter", showFoo)
v:HookScript("OnLeave", hideFoo)
v:SetAlpha(0)
end


local function showFoo(self)
for _, v in ipairs(MultiBarLeft) do
_G[v]:SetAlpha(1)
end
end
local function hideFoo(self)
for _, v in ipairs(MultiBarLeft) do
_G[v]:SetAlpha(0)
end
end
for _, v in ipairs(MultiBarLeft) do
v = _G[v]
v:HookScript("OnEnter", showFoo)
v:HookScript("OnLeave", hideFoo)
v:SetAlpha(0)
end


#4 Torapants

Torapants
  • Premium
  • Curse Premium
  • Humanclass_name
  • EU-Auchindoun
  • Vindication
  • Posts: 144
  • Talents: Subtlety 1/1/2/2/0/1/0
  • 2v2: 1525
  • 3v3: 1466
  • 5v5: 576
  • RBG: 1839
  • LocationUK

Posted 11 December 2013 - 08:41 PM

-- Auto-hide main bars
if config.autoHideMainBars then
local enableMouseOver = function(frame, includeChildren)
local show = function()
frame:SetAlpha(1)
end
local hide = function()
frame:SetAlpha(0)
end
if includeChildren then
for _, child in ipairs({frame:GetChildren()}) do
child:HookScript("OnEnter", show)
child:HookScript("OnLeave", hide)
end
end

frame:EnableMouse(true)
frame:HookScript("OnEnter", show)
frame:HookScript("OnLeave", hide)
hide()
end
--~ enableMouseOver(MultiBarLeft, true)
--~ enableMouseOver(MultiBarRight, true)
end

Try that, found it on wowinterface and just changed the two lines at the bottom, though the -- comments them out I think... may need to remove those, can't really say :P mess about with it!

Also found a macro script you can use to show/hide them, not sure if it still works though.

/script if (MultiBarLeft:IsVisible()) then MultiBarLeft:Hide() MultiBarRight:Hide() else MultiBarLeft:Show() MultiBarRight:Show() end

:rogue: forever and always.

Quote

Posted by Soltan:
when playing mutilate its pretty important to bind V ..... for vendetta :cool:

#5 HTFael

HTFael
  • Members
  • Posts: 26

Posted 13 December 2013 - 02:48 AM

Thanks the macros works!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<