Originally Posted by Miralen
Edit: This does work in the sense that it hides recount in a capital city but now when I leave it won't reappear also I have edited it to show a chatframe in a capital town and make that disappear when leaving, the appearing of it works the disappearing of it doesn't...Very strange.
|
Ok this code should work:
Code:
OnLoad=function(self)
self:RegisterEvent'CHAT_MSG_CHANNEL_NOTICE'
end,
OnEvent=function(self)
if event == "CHAT_MSG_CHANNEL_NOTICE" then
if arg1 == "YOU_JOINED" and arg7 == 2 then
Recount_MainWindow:Hide()
ChatFrame4:Show()
end
if arg1 == "YOU_LEFT" and arg7 == 2 then
ChatFrame4:Hide()
Recount_MainWindow:Show()
end
end
end,
(Taken from
kgPanels - Sample Scripts - WoWAce)