Download
(2 Kb)
Download
Updated: 05-23-13 09:32 PM
Pictures
File Info
Compatibility:
Escalation (5.3)
Thunder Isle (5.2)
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:05-23-13 09:32 PM
Created:10-30-10 12:54 PM
Downloads:1,174
Favorites:3
MD5:
Categories:Group, Guild & Friends, Chat Mods
SayGMOTD
Version: 130522
by: bitbyte [More]
A lightweight and simple mod that displays a pop-up window with the GMOTD on login, and whenever it changes.

Helps keep you updated with the latest GMOTD. Great for guilds that uses their GMOTD to communicate with their members regularly.


Check out my other mods:
- SaySapped
- SayGMOTD
- SayMassRez
2013-05-22: updated toc for 5.3
2012-10-01: updated toc
2012-05-01: updated toc; Happy Loyalty Day!
2011-07-01: updated toc
2010-10-30: Initial public release
Archived Files (4)
File Name
Version
Size
Author
Date
121001
1kB
bitbyte
10-01-12 11:07 PM
120501
1kB
bitbyte
05-01-12 03:03 PM
110701
1kB
bitbyte
07-01-11 05:44 PM
101030
1kB
bitbyte
10-30-10 12:54 PM


Post A Reply Comment Options
Old 11-10-12, 07:43 AM  
Xruptor
A Black Drake
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 87
File comments: 562
Uploads: 37
Originally Posted by Chigerian
This is a great addon however, I've seem to notice that it will always popup even the motd doesn't change
Replace the code in the .lua file with this. I've gone ahead and made changes so that it will properly get the MOTD on GUILD_ROSTER_UPDATE. This is much better then GUILD_MOTD. I also made it so that it only displays once per new guild MOTD. So if the Guild MOTD hasn't changed you won't get notified. It will now only notify you if the MOTD has changed. I hope this helps

Code:
local SayGMOTD = CreateFrame("Frame", nil, UIParent)
SayGMOTD:SetPoint("CENTER", 0, GetScreenHeight()/5)
SayGMOTD:SetWidth(300)
SayGMOTD:SetHeight(65)
SayGMOTD:SetToplevel(true)
SayGMOTD:SetMovable(true)
SayGMOTD:EnableMouse(true)
SayGMOTD:SetScript("OnMouseDown", SayGMOTD.StartMoving)
SayGMOTD:SetScript("OnMouseUp", SayGMOTD.StopMovingOrSizing)
SayGMOTD:SetBackdrop({ 
  bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", 
  edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
  insets = { left = 5, right = 5, top = 5, bottom = 5 }
})

SayGMOTD.button = CreateFrame("Button", nil, SayGMOTD, "UIPanelCloseButton")
SayGMOTD.button:SetPoint("TOPRIGHT", -7, -7)
SayGMOTD.button:SetScript("OnClick", function()
   SayGMOTD:Hide()
end)

SayGMOTD.header = SayGMOTD:CreateFontString(nil, "OVERLAY", "GameFontNormal")
SayGMOTD.header:SetPoint("TOPLEFT", SayGMOTD, "TOPLEFT", 0, -20)
SayGMOTD.header:SetWidth(SayGMOTD:GetRight() - SayGMOTD:GetLeft())
SayGMOTD.header:SetText("Guild Message Of The Day")

SayGMOTD.text = SayGMOTD:CreateFontString(nil, "OVERLAY", "GameFontWhite")
SayGMOTD.text:SetPoint("TOPLEFT", SayGMOTD, "TOPLEFT", 22, -42)
SayGMOTD.text:SetWidth(SayGMOTD:GetRight() - SayGMOTD:GetLeft() - 40)
SayGMOTD.text:SetJustifyH("LEFT")

SayGMOTD:SetScript("OnEvent", function(self, event, arg1)
  local getMOTD = ""
  if not GMOTD then GMOTD = "" end
  if (event == "GUILD_MOTD") then
	if arg1 ~= GMOTD and arg1 ~= "" then getMOTD = arg1 end
  else
	local chkMsg = IsInGuild() and GetGuildRosterMOTD() or ""
	if chkMsg ~= GMOTD and chkMsg ~= "" then getMOTD = chkMsg end
  end
  if (getMOTD ~= "" and getMOTD ~= GMOTD and IsInGuild()) then
	GMOTD = getMOTD
    SayGMOTD.text:SetText(GMOTD)
    SayGMOTD:SetHeight(SayGMOTD.text:GetHeight() + 65)
    SayGMOTD:Show()
  else
    SayGMOTD:Hide()
  end
end)

SayGMOTD:RegisterEvent("PLAYER_LOGIN")
SayGMOTD:RegisterEvent("GUILD_MOTD")
SayGMOTD:RegisterEvent("GUILD_ROSTER_UPDATE")
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Xruptor is offline Report comment to moderator  
Reply With Quote
Old 11-30-10, 10:58 AM  
Chigerian
A Kobold Labourer

Forum posts: 0
File comments: 20
Uploads: 0
This is a great addon however, I've seem to notice that it will always popup even the motd doesn't change
Chigerian is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: