Thread Tools Display Modes
01-14-08, 07:57 AM   #1
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
eePanel lua script

hey again, im still trying to fix the problem with partyframes in pitbull and eePanels. Heres the script that ive got up so far:

Code:
function eePanels2:RaidPanelVisibility(self, event, ...)
   
        if GetNumPartyMembers() < 1 then
            eePanel13:Hide()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 1 then
            eePanel13:Show()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 2 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 3 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Show()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 4 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Show()
            eePanel16:Show()
    end
end

-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE", eePanels2.RaidPanelVisibility)
But the problem that ive gotten now is that these frames are shown when im in a raid group and what i want is to hide all these frames whenever im in a raid group. Ive searched around but i couldnt find anything that works:S Anyone know a solution?
  Reply With Quote
01-14-08, 10:25 AM   #2
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
I don't know much about eePanels, and I haven't tested this myself so your mileage may vary. But try the following code:

Code:
function eePanels2:RaidPanelVisibility()
	for i = 3, 6 do
		getglobal("eePanel1"..i):Hide();
	end
	local limit = GetNumPartyMembers() + 2;
	for i = 3, limit do
		getglobal("eePanel1"..i):Show();
	end
end
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD")
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED")
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE")

eePanels2:SetScript("OnEvent",function()
	eePanels2:RaidPanelVisibility();
end);
  Reply With Quote
01-14-08, 10:29 AM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Here's the script wiki.
http://www.wowace.com/wiki/EePanels_Scripts
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-14-08, 12:33 PM   #4
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
thx for the anwers but i nearly don't know anything about lua so could you explain a bit better ? Ive tried to get it to work but i couldnt:s

And Seerah, i tried the script wiki but i didnt find anything that hides the raid frames and show them after how many party members it's in the party. And btw did you make that guide?
  Reply With Quote
01-14-08, 12:58 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I did make the eePanels2 wikis as a favor for Evil Elvis. The scripts were copy-pasted from the thread on wowace, except for the one I wrote myself for elite unit status.

What you want to look at is this script: http://www.wowace.com/wiki/EePanels_..._hide_when_not

Take this part of it
Code:
if GetNumPartyMembers() > 4 or GetNumRaidMembers() > 0 then
		-- Show the panel this script is attached to
		THIS:Show()
Change Show to Hide and put your party eePanel names in there, just like your other script. And put it into your script you showed above just like the rest of them.

edit: I was going to tell you to add registering for the RAID_ROSTER_UPDATE event, but you already have it.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-14-08, 04:29 PM   #6
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
hmm i tried that. Heres the script i used, but it looks like it didnt work:
Code:
function eePanels2:RaidPanelVisibility(self, event, ...)
   
        if GetNumPartyMembers() < 1 then
            eePanel13:Hide()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 1 then
            eePanel13:Show()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 2 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 3 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Show()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 4 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Show()
            eePanel16:Show()
        elseif GetNumPartyMembers() > 4 or GetNumRaidMembers() > 0 then
            eePanel13:Hide()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
    end
end

-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE", eePanels2.RaidPanelVisibility)
The result is attached somewhere i guess.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_011408_212655.jpg
Views:	777
Size:	13.8 KB
ID:	1637  

Last edited by Mock : 01-14-08 at 04:36 PM.
  Reply With Quote
01-14-08, 08:19 PM   #7
shinzon
A Fallenroot Satyr
Join Date: Feb 2006
Posts: 27
if its those frames over you text on the screenie if im not mistaken that is the addon called grid so try look up the commands for grid ^^
  Reply With Quote
01-14-08, 09:37 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Do you have the script in eePanel16 (only) or a panel of a higher number? And are you only registering those events in that one panel?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-15-08, 08:33 AM   #9
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
@ shinzon: hehe yea, I know its grid but i have set it up that way and the frame has nothing to do with grid.

@ Seerah: Hmm I've attached the script only to the last of the frames i want to hide(eePanel16). Aint that correct?
  Reply With Quote
07-02-08, 04:54 AM   #10
Daud
A Defias Bandit
Join Date: Jul 2008
Posts: 2
Hello,

Im using eePanels2 but i need some help with it. I want to do that a panel only appear when the target is casting and disappear when not. I've already checked the scripts on wowace etc but i've found only combat hider script.

Can someone helps me?
  Reply With Quote
07-02-08, 10:58 AM   #11
Eas
A Rage Talon Dragon Guard
 
Eas's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 311
Originally Posted by Daud View Post
Hello,

Im using eePanels2 but i need some help with it. I want to do that a panel only appear when the target is casting and disappear when not. I've already checked the scripts on wowace etc but i've found only combat hider script.

Can someone helps me?
don't ninja someones thread in the middle of getting helped
  Reply With Quote
07-02-08, 11:03 AM   #12
Dreadlorde
A Pyroguard Emberseer
 
Dreadlorde's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 2,302
Originally Posted by Daud View Post
Hello,

Im using eePanels2 but i need some help with it. I want to do that a panel only appear when the target is casting and disappear when not. I've already checked the scripts on wowace etc but i've found only combat hider script.

Can someone helps me?
Parent the panel to the target frame.
__________________

Funtoo - Plan 9 - Windows 7
  Reply With Quote
07-02-08, 11:13 AM   #13
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
He wants it only when the target is casting.

If using a cast bar mod with a target cast bar, could try parenting it to that.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
07-02-08, 01:29 PM   #14
Daud
A Defias Bandit
Join Date: Jul 2008
Posts: 2
And how can i do this exectly? (if u can explain it sortly )
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » eePanel lua script

Thread Tools
Display Modes

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