Quantcast
[KGPanels] Script onEvent Problem - WoWInterface
Thread Tools Display Modes
07-06-12, 06:41 PM   #1
Linayo
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 11
[KGPanels] Script onEvent Problem (mop)

Hi Everyone,

I'm currently trying to fix my UI again on the MoP Beta by converting Live settings over, with updated Addons etc.

So right now i've a little problem with a script I'm using for 2 of my Bartender bars.

thats how it looks on live right now onEvent
Code:
local pmems = GetNumPartyMembers()
local rmems = GetNumRaidMembers()
 if  (pmems == 0 and rmems == 0) then
    BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -39, 43 )
 elseif  (pmems >= 1 and pmems <= 5 and rmems==0)
then
BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -41, 84 )
 elseif  (rmems >= 1 and rmems <= 6)
then
BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -41, 84 )
elseif (rmems >= 7 and rmems <= 10)
then 
BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -41, 126)
elseif (rmems >= 11 and rmems <= 20)
then
BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -41, 126)

elseif (rmems >= 21 and rmems <= 30)
then BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -41, 161)
elseif (rmems >= 31)
then BT4Bar5:SetPoint( "BOTTOM", BT4Bar6, "TOP", -41, 197)
end
onLoad

Code:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PARTY_MEMBERS_CHANGED")
self:RegisterEvent("RAID_ROSTER_UPDATE")
so basicly depending on raid size, those two bars get moved up or down on my screen, so they are nicely placed over my vuhdo raidframes.

atm its not moving anything at all on the Beta for me, anyone can help me here?

here some screenshots, so you get an overview what i mean :p

http://i.imgur.com/MJzpE.jpg live(4.3)
http://i.imgur.com/4le8j.jpg mop beta (build 15799)

Thanks in advance

Last edited by Linayo : 07-06-12 at 06:50 PM.
  Reply With Quote
07-06-12, 06:53 PM   #2
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 361
OnEvent:
Lua Code:
  1. local pmems = GetNumSubgroupMembers()
  2. local rmems = GetNumGroupMembers()
  3.  
  4. if (pmems == 0 and rmems == 0) then
  5.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -39, 43)
  6. elseif (pmems >= 1 and pmems <= 5 and rmems==0) then
  7.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -41, 84)
  8. elseif (rmems >= 1 and rmems <= 6) then
  9.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -41, 84)
  10. elseif (rmems >= 7 and rmems <= 10) then
  11.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -41, 126)
  12. elseif (rmems >= 11 and rmems <= 20) then
  13.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -41, 126)
  14. elseif (rmems >= 21 and rmems <= 30) then
  15.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -41, 161)
  16. elseif (rmems >= 31) then
  17.     BT4Bar5:SetPoint("BOTTOM", BT4Bar6, "TOP", -41, 197)
  18. end

OnLoad:
Lua Code:
  1. self:RegisterEvent("PLAYER_ENTERING_WORLD")
  2. self:RegisterEvent("GROUP_ROSTER_UPDATE")

Last edited by Talyrius : 07-06-12 at 06:56 PM.
  Reply With Quote
07-07-12, 05:37 AM   #3
Linayo
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 11
Thank you. it fixed it (:
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » [KGPanels] Script onEvent Problem

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