WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   [KGPanels] Script onEvent Problem (https://www.wowinterface.com/forums/showthread.php?t=43659)

Linayo 07-06-12 06:41 PM

[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

Talyrius 07-06-12 06:53 PM

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")

Linayo 07-07-12 05:37 AM

Thank you. it fixed it (:


All times are GMT -6. The time now is 05:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI