Download
(179Kb)
Download
Updated: 04-28-09 02:11 PM
Pictures
File Info
Updated:04-28-09 02:11 PM
Created:12-19-08 06:06 PM
Downloads:21,148
Favorites:119
MD5:

Wintergrasp Timer  Popular! (More than 5000 hits)

Version: beta18 (defunct)
by: Mike-N-Go [More]

This AddOn is not updated for 4.x.

It will remain
for posterity.


If you are still unabated, please show your support if you want this AddOn updated for 4.x. You can either donate, or show your support on the comments page.


As of May 20, 2009: This addon is unsupported for the time being. AddOn authoring was only a hobby of mine. Mike-N-Go is not currently playing WoW, thus not creating or maintaining mods for WoW. If someone wishes to submit a patch for one of my mods to WoWInterface, you may within the bounds of the license bundled with the mod.


Now with slashcommand-options!
/wgt or /wintergrasptimer [option]
screen - shows announcements on screen
chat - shows announcements in chat
sound - plays warningsound with announcements (Sound file is from Nintendo's (c) Smash Brothers, provided by HelpTheWretched (http://noproblo.dayjo.org/ZeldaSounds/).)
stopwatch - shows stopwatch when less than 5 minutes left
time - prints time left in chat


Note: Ownership of this file has changed to Mike-N-Go from Mikma. He has several new features that should be out soon(tm). The pictures do not necessarily reflect the latest version of the AddOn.

04-28-09 beta18:
+ Fixed GetWintergraspWaitTime() math nil error

04-26-09 beta17:
+ Updated for WoW 3.1
+ First version using GetWintergraspWaitTime(); this allows the user to see the WG start time from anywhere

02-25-09 beat16:
+ Fixed a problem with AceConsole loading
+ Forces the mod to ask and send the latest WG start time when logging in

02-25-09 beta15:
+ Fixed a problem with CTL not properly being enabled by the mod

2-23-09 beta14:
+ Fixed lib embedding
+ Fixed printing to chat frame to use ChatFrame1:AddMessage

2-23-09 beta13:
+ Begun conversion to Ace; note that the addon is not yet fully converted
+ Added ruRU localization; let me know if it works because I cannot test it, also, if it is translated correctly. Thanks ZillahGiovanni and StingerSoft for the initial translation
+ Added Shake() and Flash() to the warnings
+ Added 'In progress' to the LDB feed text if a battle is in progress
+ Added 'Begins after' to the LDB feed text if the last known time of the start of WG is within 3 hours of the current time; this is an estimation of when the next battle will start
+ Added 'Begins in' to the LDB feed text this will tell the user when the next known start time of WG will start
+ Added 'In progress' to the LDB feed text
+ Changed formant of the LDB feed text IE: Begins in: 1h 28m (4:27)
+ Embedded SSBM_YoungLink_KO.wav sound file. File from http://noproblo.dayjo.org/ZeldaSounds/ (c) Nintendo from HelpTheWretched

02-05-09 beta12:
+ Reverted SVPC from beta 11; you should now see WG start time on all characters
+ Added more info to the .toc
+ First update by Mike-N-Go, the new author

beta11:
+ Fixed the 24h clock format
+ Added the bugfix for "general bugginess" Mike-N-Go submitted

01-28-09 beta10:
+ Added the estimated startingtime in LDB and tooltip, thanks to Mike-N-Go
+ Loads Blizzard_TimeManager to eliminate the Stopwatch errors

01-27-09 beta9:
+ Added slashcommands to control some options. try /wgt or /wintergrasptimer.
+ Added announcement support for MSBT
+ Added /stopwatch-support that is being used when there is less than 5min to next battle

beta8:
+ German localization added. thank you dingsbums!

beta7:
+ Now gets the time in Wintergrasp-zone if you happen to fly over!
- Removed debugpring I might have forgotten in broadcast-function

beta6:
+ *Ninjaupdate*
+ Added a "Timerfix" that will try to make the startingtime much more accurate than the default one Blizzards shows us.
+ Now broadcasts the time left in seconds, not the estimated startingtime.

beta5:
- Removed global channel. buh bye!
+ Added Raid, Party and Guild broadcasting back in.
+ Fixed the timer, should be accurate now.

beta4:
- Removed the text "Wintergrasp:" from the broker.
+ Added pretty tooltip when mouseovering the broker.

beta3:
+ Added slashcommand '/wgtreset' and '/wintergrasptimerreset' in case you need to reset the timer.
+ Added shift+leftclick that announces the time in chat editbox.
+ Added shift+rightclick that resets and requests the current time.
+ Changed Raid, Party and Guild broadcast into Global broadcast (Hidden channel).
+ Added NPC yell-capture that adds the remaining time into WGT Broker.

beta2:
+ Added the Horde NPC.
+ When showing the long time, show it in form H:MM instead of H:MM:SS.

beta1:
+ Release.
Optional Files (0)


Post A Reply Comment Options
Unread 02-04-09, 06:12 AM  
mikma
A Cyclonian
 
mikma's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 267
Uploads: 23
Some of Mike-N-Go's ideas are actually good, so I'll have a go when I get the time for it
Last edited by mikma : 02-04-09 at 06:12 AM.
Report comment to moderator  
Reply With Quote
Unread 02-03-09, 11:44 AM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
Another idea for the mod:
Do a /who wintergrasp and ping the people in the zone. If they pingback because they have this mod, update the time left until next battle or time left until the current battle will be completed.
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Report comment to moderator  
Reply With Quote
Unread 02-03-09, 10:38 AM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
Originally posted by daimaah
I tried searching through the comments but couldn't find if this was already fixed...

When using 24h time format, if time is 23:something and there's more than an hour left, the "Time when battle will start at" shows as 24:49 (or 24:anything, depending on the actual time left), which isn't corret. Minor bug but thought you'd like to know.
To fix this one, look for if hours > 24 then. This needs to be changed to if hours >= 24 then:

Code:
In ConvertSecondsToHourMinute():
    if GetCVarBool("timeMgrUseMilitaryTime") then
        for i=1, hours/24 do if hours >= 24 then hours = hours - 24 end end
    else
        for i=1, hours/12 do if hours > 12 then hours = hours - 12 end end
    end
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Report comment to moderator  
Reply With Quote
Unread 02-02-09, 04:57 PM  
daimaah
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
I tried searching through the comments but couldn't find if this was already fixed...

When using 24h time format, if time is 23:something and there's more than an hour left, the "Time when battle will start at" shows as 24:49 (or 24:anything, depending on the actual time left), which isn't corret. Minor bug but thought you'd like to know.
Report comment to moderator  
Reply With Quote
Unread 02-01-09, 11:19 AM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
And some more:
If we do change the GMOTD, it should need be triggered manually by the user, but I got a better idea: Set a calendar, defaulted to guild/friends, event with the time of the next WG match. And anyone who sends the addon message with the prefix of this mod can be promoted or passed ownership of the event when the user who is in charge of the event logs out, so they can mod the set time. There would also need to be a check so multiple WG timers are not created in the calender. There could also be a whisper setting. Like the user could whisper 'wg remove' to remove all announcements. And 'wg alert cal' to be added to the default announce calender. Also, with these whisper settings for 'wg alert whisper' to be sent a whisper 1 hour, 15 minutes, and 5 minutes before WG starts. Also, 'wg time' to be whispered the current time known by the mod.

To say again:
1) GMOTD set should only be manually, if this mod alters it
2) Calender event made by the addon with the next WG time
3) Whisper settings
4) Whisper alerts/announcements (including request of time, and alerts when the battle draws near)
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Report comment to moderator  
Reply With Quote
Unread 02-01-09, 12:39 AM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
Here are a few more ideas for the mod:
1) If we know the battle is still in progress or if it is within 30 minutes since it started, show "Battle in progress" instead of 'N/A'
2) Have a chart/graph or estimation of the min/max/avg times of the next WGs within 12 hours.
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Report comment to moderator  
Reply With Quote
Unread 01-28-09, 02:39 PM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
Re: Re: Error in Beta9

Originally posted by Mikma
*edit* Actually I was told the TimeManager is LoD, so now Wintergrasp Timer loads it too. Hope this works.
Are you sure you instead need to load the Blizzard_TimeManager addon when your mod is loaded? You could do the call to load it just before you do the Stopwatch functions,.
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Last edited by Mike-N-Go : 01-28-09 at 02:40 PM.
Report comment to moderator  
Reply With Quote
Unread 01-28-09, 07:20 AM  
mikma
A Cyclonian
 
mikma's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 267
Uploads: 23
Re: Error in Beta9

Originally posted by SaberHawke
Received the following error 22 times in quick succession in the latest beta.

[2009/01/27 22:22:43-526-x22]: WintergraspTimer-beta\WintergraspTimer.lua:152: attempt to call global 'Stopwatch_StartCountdown' (a nil value)

---
*edit* Actually I was told the TimeManager is LoD, so now Wintergrasp Timer loads it too. Hope this works.
Last edited by mikma : 01-28-09 at 09:01 AM.
Report comment to moderator  
Reply With Quote
Unread 01-28-09, 06:35 AM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
Here is the time to event code I put in for my request 'The hour and minute of when the next battle will start, not just a counter down to the event announce of the mod.'. Note it is more of a prof of concept, and may need some tuning.


Code:

--[[
Notes of the changes by MikeNGo:
I think my changes were done to beta8, but I do not know for sure as the version in the .toc just says 'beta', I do know it is not beta9 I altered; note it would be nice to update the version in the .toc 
The objective of my  changes were to add in hour:minute format the hour and minute that the next WG battle would land on.
The altered code (noted by '--Added by MikeNGo') is what I changed
Note that there is a problem with a rounding error, so the minute time might bounce between a moment and the moment before or after it
Also, the sound and MSBT addition are in this reversion
Due to a few stupid wrong assumptions I made, so it took me a long time to make this change, lol, so here is what I got so far
Note what I have done is more or less a proff of concept; the idea needs a bit of ironing out
BTW, Mikma, I took you saying, "4) Not sure is this one needed :I," to my sudjustion that you repplied to as, "Not sure if I want to bother implementing that," so I just did it for you =]
Enjoy, and you may use my changes in improving your addon
]]

if not WGTime then WGTime = 0 end

local NPC1,NPC2,text1,text2,text3,text4,text5,text6,text7,text8,tooltip1,tooltip2,tooltip3,tooltip4,tooltip5,tooltip6,tooltip7

if GetLocale() == "deDE" then
    -- Thank you dingsbums @ wowinterface.com
    NPC1 = "Arkanist Braedin"
    NPC2 = "Magister Surdiel"
    text1 = "Tausendwinter beginnt in 15 Minuten"
    text2 = "Tausendwinter beginnt in 5 Minuten"
    text3 = "Die Schlacht um Tausendwinter startet in: "
    text4 = "Tausendwinter Timer: Die Schlacht startet in "
    text5 = "Tausendwinter Timer: Die Schlacht hat begonnen!"
    text6 = "Tausendwinter Timer: Am Zur¸cksetzen und Abfragen der Zeit."
    text7 = "N‰chste Schlacht:"
    text8 = "Tausendwinter Timer:"
    tooltip1 = "Echtzeit:"
    tooltip2 = "Blizzardzeit:"
    tooltip3 = "Shift+Linke Maustaste"
    tooltip4 = "Die Zeit im Chat bekanntgeben."
    tooltip5 = "Shift+Rechte Maustaste"
    tooltip6 = "Zur¸cksetzen und bekannte Zeit abfragen."
    tooltip7 = "Time when battle will start at: "--Added by MikeNGo
else
    NPC1 = "Arcanist Braedin"
    NPC2 = "Magister Surdiel"
    text1 = "Wintergrasp will begin in 15 minutes"
    text2 = "Wintergrasp will begin in 5 minutes"
    text3 = "Battle of Wintergrasp starts in: "
    text4 = "Wintergrasp Timer: Battle will begin in "
    text5 = "Wintergrasp Timer: Battle has begun!"
    text6 = "Wintergrasp Timer: Resetting and requesting time"
    text7 = "Next Battle:"
    text8 = "Wintergrasp Timer:"
    tooltip1 = "Fixed Time:"
    tooltip2 = "Blizzard Time:"
    tooltip3 = "Shift+LeftButton"
    tooltip4 = "Announce the time in chat input."
    tooltip5 = "Shift+RightButton"
    tooltip6 = "Reset and request known time."
    tooltip7 = "Time when battle will start at: "--Added by MikeNGo
end
                         
local TIMEFIX,updateperiod,elapsed,output,h,m,s,timer = 1.025,1,0
local brokertext = text8

WGTbroker = LibStub("LibDataBroker-1.1"):NewDataObject(brokertext, {
    type = "data source",
    text = "N/A",
    icon = "Interface\\Icons\\INV_Jewelry_Ring_66",
    OnClick = function(self, button)
        if IsShiftKeyDown() then
            if button == "LeftButton" and WGTime > 0 then
                ChatFrameEditBox:Show()
                ChatFrameEditBox:SetText(text3..output)
            elseif button == "RightButton" then
                print(text6)
                WGTime = 0
                if IsInGuild() then SendAddonMessage("WGTime", "timerequest", "GUILD") end
                if UnitExists("party1") then SendAddonMessage("WGTime", "timerequest", "PARTY") end
                if UnitExists("raid1") then SendAddonMessage("WGTime", "timerequest", "RAID") end
            end
        end
    end,
    OnEnter = function(self)
        local originaltime = timer/TIMEFIX
        local h1,m1,s1 = ConvertSeconds(timer)
        local h2,m2,s2 = ConvertSeconds(originaltime)
        local h3,m3,s3 = ConvertSecondsToHourMinute(timer)--Added by MikeNGo
        GameTooltip:SetOwner(self, "ANCHOR_NONE")
        GameTooltip:SetPoint("TOPLEFT", self, "BOTTOMLEFT")
        GameTooltip:ClearLines()
        GameTooltip:AddLine(text8,0,1,0)
        if WGTime-time() > 0 then
            GameTooltip:AddLine("------------------------------------",1,1,0)
            GameTooltip:AddDoubleLine(tooltip1,h1.."h "..m1.."m "..s1.."s",1,1,0)
            GameTooltip:AddDoubleLine(tooltip2,h2.."h "..m2.."m "..s2.."s",1,1,0)
            GameTooltip:AddDoubleLine(tooltip7,h3..":"..m3,1,1,0)--Added by MikeNGo
            GameTooltip:AddLine("------------------------------------",1,1,0)
        end
        GameTooltip:AddDoubleLine(tooltip3,tooltip4)
        GameTooltip:AddDoubleLine(tooltip5,tooltip6)
        GameTooltip:Show()
    end,
    OnLeave = function()
        GameTooltip:Hide()
    end,
})

function ConvertSeconds(value)
    local hours = floor(value / 3600)
    local minutes = value - (hours * 3600)
    minutes = floor(minutes / 60)
    local seconds = floor(value - ((hours * 3600) + (minutes * 60)))
    if hours > 0 then return hours,minutes,seconds
    elseif minutes > 0 then return 0,minutes,seconds
    else return 0,0,seconds
    end
end

--Added by MikeNGo
function ConvertSecondsToHourMinute(value)
	value = tonumber(value)
	local _, currentHour, currentMinute =	GameTime_GetTime()
	local currentSecond = 0
	
	if GetCVar("timeMgrUseLocalTime") == 1 then
		currentHour = date"%H"
		currentMinute = date"%M"
		currentSecond = date"%S"
	else
		currentHour, currentMinute = GetGameTime()
		currentSecond = date"%S"
	end
	
	value = value + (currentSecond+(currentHour*3600)+(currentMinute*60))

    local hours = floor(value / 3600)
    local minutes = (hours * 3600) - value
    minutes = floor(minutes / 60)
    local seconds = floor( ((hours * 3600) + (minutes * 60)) - value )

	
  	minutes = math.abs(minutes)--Because it sometimes is negative, and the abs value is what we want

    if GetCVarBool("timeMgrUseMilitaryTime") then
    	for i=1, hours/24 do
			if hours > 24 then
				hours = hours - 24
			end
    	end
	else
		for i=1, hours/12 do
			if hours > 12 then
				hours = hours - 12
			end
		end
    end

    if hours > 0 then return hours,minutes,seconds
    elseif minutes > 0 then return 0,minutes,seconds
    else return 0,0,seconds
    end
end



local function broadcast(arg1)
    if IsInGuild() then SendAddonMessage("WGTime", arg1, "GUILD") end
    if UnitExists("party1") then SendAddonMessage("WGTime", arg1, "PARTY") end
    if UnitExists("raid1") then SendAddonMessage("WGTime", arg1, "RAID") end
end

local frame = CreateFrame("Frame")
frame:SetScript("OnUpdate", function(self, elap)
    timer = WGTime-time()
    elapsed = elapsed + elap
    if elapsed <= updateperiod then return end
        timer = timer - elapsed
        if timer > 0 then
            local hours,minutes,seconds = ConvertSeconds(timer)
            if hours > 0 then output = hours.."h "..minutes.."m"
            elseif minutes > 0 then output = minutes.."m "..seconds.."s"
            else output = seconds.."s"
            end
        else
            output = "N/A"
            WGTime = 0
        end
        
        --Added by MikeNGo
        if output == "15m 0s" or output == "5m 0s" then 
            print(text4..output) 
			if ( MikSBT and ( not ( MikSBT.IsModDisabled() ) ) ) then
				MikSBT.DisplayMessage(text4..output)
			else
				UIErrorsFrame:AddMessage(text4..output)
			end
			PlaySound'ReadyCheck'
		
        elseif output == "0s" then 
            print(text5)
			if ( MikSBT and ( not ( MikSBT.IsModDisabled() ) ) ) then
				MikSBT.DisplayMessage(text5)
			else
				UIErrorsFrame:AddMessage(text5)
			end
			PlaySound'ReadyCheck'

        end
        
        --Added by MikeNGo
        if output ~= "N/A" then
            local hours,minutes,seconds = ConvertSecondsToHourMinute(timer)--SecondsToTime(WGTime-time()))
            
        	output = hours..":"..minutes.." - "..output
        end
        
        WGTbroker.text = output
    elapsed = 0
end)

frame:RegisterEvent("GOSSIP_SHOW")
frame:RegisterEvent("CHAT_MSG_MONSTER_YELL")
frame:RegisterEvent("CHAT_MSG_ADDON")
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:RegisterEvent("UPDATE_WORLD_STATES")
frame:SetScript("OnEvent", function(self,event,...)
    if event == "GOSSIP_SHOW" then
        if (UnitName("target") == NPC1 or UnitName("target") == NPC2) and GetGossipText():match("%d:%d%d:%d%d") then 
            h,m,s = string.split(":",GetGossipText():match("%d:%d%d:%d%d"))
            timer = h*3600+m*60+s
            local fixedtime = floor(timer*TIMEFIX)
            WGTime = time() + fixedtime
            broadcast(fixedtime)
        elseif (UnitName("target") == NPC1 or UnitName("target") == NPC2) and not GetGossipText():match("%d:%d%d:%d%d") then
            WGTime = 0
        end
    elseif event == "CHAT_MSG_MONSTER_YELL" then
        local message,name = ...
        if name == NPC1 or name == NPC2 then
            if string.match(message,text1) then
                local fixedtime = floor(900*TIMEFIX)
                WGTime = time() + fixedtime
                broadcast(fixedtime)
            elseif string.match(message,text2) then
                local fixedtime = floor(300*TIMEFIX)
                WGTime = time() + fixedtime
                broadcast(fixedtime)
            end
        end
    elseif event == "CHAT_MSG_ADDON" then
        local prefix,message = ...
        if prefix == "WGTime" then
            if message == "timerequest" then
                if WGTime > 0 then broadcast(WGTime-time()) end
            else
                if WGTime == 0 then WGTime = (time() + message) end
            end
        end
    elseif event == "UPDATE_WORLD_STATES" then
        if AlwaysUpFrame2 and AlwaysUpFrame2:IsShown() and AlwaysUpFrame2Text:GetText():match(text7) and WGTime == 0 then
            local timeString = AlwaysUpFrame2Text:GetText():match("%d:%d%d:%d%d")
            if timeString then
                local h,m,s = string.split(":",timeString)
                local fixedtime = floor((h*3600+m*60+s)*TIMEFIX)
                WGTime = time() + fixedtime
                broadcast(fixedtime)
            end
        end
    else
        if WGTime == 0 then
            if IsInGuild() then SendAddonMessage("WGTime", "timerequest", "GUILD") end
            if UnitExists("party1") then SendAddonMessage("WGTime", "timerequest", "PARTY") end
            if UnitExists("raid1") then SendAddonMessage("WGTime", "timerequest", "RAID") end
        end
    end
end)
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Report comment to moderator  
Reply With Quote
Unread 01-28-09, 05:02 AM  
Mike-N-Go
A Theradrim Guardian
 
Mike-N-Go's Avatar
AddOn Author - Click to view AddOns

Forum posts: 68
File comments: 147
Uploads: 18
Originally posted by Psychophan7
I would have use for that. My guild keeps the time for the next battle in the motd. Having a time printout as well as a countdown would make updating the motd much easier.

This addon doesn't communicate with guild/party/raid periodically, right? Just on login and on command?
You just gave me an idea. The mod could also have a command to update the guild MOTD automatically, periodically, or when called. Now, it would not have to be the only thing allowed in the MOTD, if the MOTD is something like "...Wintergrasp starts in X:XX at X:XX. ..." Where the mod would look for "Wintergrasp starts in" and only change the counter down and the actual time.

About your question, of when the addon 'communicates', if you really want to find out yourself, you can get an addon that allows you to view SendAddonMessage()s, like LilAddonMessage, and watch it. Or, by looking at the code, one might think that some of the communication is done when time is requested by someone in guild/party/raid, the user is in Wintergrasp or talks to/hears from the NPC with the time in Darlan, or someone sends the data under these conditions.
__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

Author of Daily Bean Counter, MyNameTogglesWhenIAFKorDND, Extended Shutdown Warning, Auto Mail Director, Duel Nullify, Spec Transmiter, Say Again, Window Teller, Who Crafts, Ad Repeater, Privy Cork, Mac Backup, and more.
Report comment to moderator  
Reply With Quote
Unread 01-27-09, 10:37 PM  
SaberHawke
A Fallenroot Satyr
 
SaberHawke's Avatar

Forum posts: 23
File comments: 93
Uploads: 0
Error in Beta9

Received the following error 22 times in quick succession in the latest beta.

[2009/01/27 22:22:43-526-x22]: WintergraspTimer-beta\WintergraspTimer.lua:152: attempt to call global 'Stopwatch_StartCountdown' (a nil value)

---
Report comment to moderator  
Reply With Quote
Unread 01-27-09, 03:17 PM  
Psychophan7
A Chromatic Dragonspawn

Forum posts: 153
File comments: 47
Uploads: 0
Originally posted by Mikma
4) Not sure is this one needed :I
I would have use for that. My guild keeps the time for the next battle in the motd. Having a time printout as well as a countdown would make updating the motd much easier.

This addon doesn't communicate with guild/party/raid periodically, right? Just on login and on command?
Report comment to moderator  
Reply With Quote
Unread 01-27-09, 04:16 AM  
Kartun
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 2
mods

I've made quick dirty mod to make this addon more suitable for me and my guildies.

Code:
local last_msg = ""
local antispam = 0
local announced = false
local detection_control = 0
local antispam_delay = 30
local side = "";

local function myChatFilter(msg)
  if (antispam - time() <= 0) then last_msg = ""; antispam = time() + antispam_delay; announced = false; end

  if (msg == last_msg) or ((antispam - time() >= 0)and(announced == true)) then 
   return false else last_msg = msg; end
	
  if (detection_control - time() <= 0)  then
	-- Run detection once in 5 mins ... to save resources
	detection_control = time() + 300;
	-- Contol detection --
	local buffs, i = { }, 1;
	local buff = UnitBuff("player", i);
	side = "Enemy";
	while buff do          
	  buffs[#buffs + 1] = buff;
	  if (buffs[i] == "Essence of Wintergrasp") then side = UnitFactionGroup("player"); break; end
	  i = i + 1;
	  buff = UnitBuff("player", i);
	end;
	side = " ("..side .. " controlled)";
	----------------------
   end

  if msg == "?wg" then	
	 announced = true;
	 SendChatMessage("Battle for wintergrasp starting in : "..output..side , "CHANNEL", nil, arg8); 
	  return false
  end
  return false  
end

ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", myChatFilter)
first of all it react on "?wg" request and reply, but since I'm not really good in lua idk how to make syncronisation to avoid spam from several clients. And second mod is for control side detection for annonce to those who aren't in Northrend.

p.s. I made this mod to beta6, because beta8 for some reason dropped timer after reloadUI()
Last edited by Kartun : 01-27-09 at 04:17 AM.
Report comment to moderator  
Reply With Quote
Unread 01-26-09, 11:32 AM  
mikma
A Cyclonian
 
mikma's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 267
Uploads: 23
Originally posted by Mike-N-Go
1) PlaySound() of something in addition to the 15 and 5 minute warnings
2) Support for scrolling text addons, like MikScrollingBattleText, to display scrolling text in the middle of the screen
3) A 'countdown' that would display from 60 seconds/5 minutes to 0 in big text, like the mod Arena Countdown
4) The hour and minute of when the next battle will start, not just a counter down to the event announce of the mod.
1) Added
2) Added
3) Added
4) Not sure is this one needed :I

Waiting for some texts to be translated before I release next version
Report comment to moderator  
Reply With Quote
Unread 01-26-09, 04:37 AM  
Internet
A Kobold Labourer
 
Internet's Avatar

Forum posts: 0
File comments: 7
Uploads: 0
Originally posted by Mikma
There already is. in AddOns menu (before logging in) uncheck the box infront of WintergraspTimer to disable it. I don't see the point why I should disable the warnings, basicly that's the reason why I coded this in the first place.
I was referring to the warning messages you added that pop up in the center of the screen, which are annoying and i'd like to disable. The small timer is great, and thats all I really want.
Last edited by Internet : 01-26-09 at 04:39 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.