Quantcast Kgpanels code troubleshooting help needed. - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-15-17, 01:24 PM   #1
Bufe
A Cyclonian
Join Date: Aug 2007
Posts: 45
Kgpanels code troubleshooting help needed.

Hello.

Hope this is the right place for it.

A few years back i wanted Kgpanels showing depending on different raid sizes.

I never really got it to work, but now i would really like to have it fixed. (i did not make this myself originally but i fiddled with it and now it don't work no more.. XD)



I get really confused with these "functions" like equal to or greater and lesser and such, so was hoping someone could look over the code, and change it so it does what i want it to do.




KGpanel #1 - 40 man raiding frame, should only show if there are more than 21 people in the raid, otherwise hide.

OnLoad:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PARTY_MEMBERS_CHANGED")
self:RegisterEvent("RAID_ROSTER_UPDATE")

OnEvent:
local pmems = GetNumGroupMembers()

local rmems = GetNumGroupMembers()

if (pmems > 6 and rmems > 6) or (pmems > 0 and pmems > 6 and rmems > 21)
then

self:Show()

else

self:Hide()
end

KGpanel #2 - 20 man raiding frame, should only show if number of people in raid is 6-20 people.

OnLoad:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PARTY_MEMBERS_CHANGED")
self:RegisterEvent("RAID_ROSTER_UPDATE")

OnEvent:
local pmems = GetNumGroupMembers()

local rmems = GetNumGroupMembers()


if (pmems > 6 and rmems > 6) or (pmems > 0 and pmems > 6 and rmems < 20)
then

self:Show()

else

self:Hide()
end


KGpanel #3 - 1 to 5-man, This should be visible when there are 1-5 people in a PARTY, and it is not a RAID. If it is a RAID, it should not show this, and instead show the either of the two above.

OnLoad:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PARTY_MEMBERS_CHANGED")
self:RegisterEvent("RAID_ROSTER_UPDATE")

OnEvent:
local pmems = GetNumGroupMembers()

local rmems = GetNumGroupMembers()


if (pmems > 1 and rmems > 1) or (pmems < 5 and pmems < 5 and rmems < 5)
then

self:Show()

else

self:Hide()
end





Hope someone can help getting this right.

Thank you!



Best Regards



Boof,

Hellfire, EU

[email protected]
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Kgpanels code troubleshooting help needed.

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