Quantcast
Download
(15 Kb)
Download
Updated: 03/21/19 02:59 PM
Compatibility:
Wrathstone (4.3)
Updated:03/21/19 02:59 PM
Created:01/24/16 10:27 AM
Monthly downloads:154
Total downloads:10,086
Favorites:36
MD5:
Undaunted Daily  Popular! (More than 5000 hits)
Version: 1.4.3
by: sirinsidiator [More]
A simple addon that adds a slash command which prints the undaunted daily quests to chat.

Usage:
/pledges, /undaunted, /dungeons [offset]
Offset is an optional number that can be used to get the pledges for x days in the future or past.
e.g. "/pledges -1" returns yesterday's dungeons and "/pledges 5" the dungeons 5 days from now.

/pledges2chat, /undaunted2chat, /dungeons2chat [offset]
This command will fill the chat input field to contain the pledges so you can send them to other players.

The original pledge cycle before One Tamriel has been taken from /u/blakjesus420's reddit thread.
v1.4.3
- updated for Wrathstone (Thanks macdesktops)

v1.4.2
- updated for Wolfhunter

v1.4.1
- updated for Summerset

v1.4
- updated for Dragon Bones

v1.3
- updated for Horns of the Reach (Thanks hacky2007)

v1.2.1
- added Russian localization (Thanks Fellorion)

v1.2
- updated to latest API version
- collected and updated pledge cycle for One Tamriel
- added LibSlashCommander
- added slash command for placing the pledges in chat (Thanks for the idea BladeRnr)
- added French localization (Thanks Ayantir)

v1.1
- updated to latest API version
- added new dungeons to the veteran cycle
- reworked how dungeon names are found

v1.0.2
- updated to latest API version

v1.0.1
- fixed time left being off by one hour.
Optional Files (0)


Archived Files (11)
File Name
Version
Size
Uploader
Date
1.4.2
14kB
sirinsidiator
08/19/18 06:12 AM
1.4.1
14kB
sirinsidiator
05/28/18 12:45 PM
1.4
14kB
sirinsidiator
02/06/18 11:59 AM
1.3
14kB
sirinsidiator
08/17/17 12:23 PM
1.2.1
14kB
sirinsidiator
12/06/16 01:23 PM
1.2
14kB
sirinsidiator
10/29/16 03:16 PM
1.1
3kB
sirinsidiator
07/23/16 10:06 AM
1.1
3kB
sirinsidiator
07/23/16 10:05 AM
1.0.2
3kB
sirinsidiator
03/07/16 08:51 AM
1.0.1
3kB
sirinsidiator
01/26/16 12:07 PM
1.0
3kB
01/24/16 10:27 AM


Post A Reply Comment Options
Unread 04/05/19, 03:00 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1258
File comments: 778
Uploads: 34
Re: Re: Re: Wrathstone

Originally Posted by macdesktops
Originally Posted by Lelldorano
Hi any chance of getting this updated for the new dlc rotation ?

I do use WPamA but like this one too for the commands.
Okay. I've gone through the whole cycle this time. Here's the new code. You can copy and paste the whole thing to replace the contents of StartUp.lua, or just replace the highlighted lines:
Are you sure that's the correct version? There is no difference to what you posted last time.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 04/05/19, 01:26 PM  
macdesktops
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 11
Uploads: 1
Re: Re: Wrathstone

Originally Posted by Lelldorano
Hi any chance of getting this updated for the new dlc rotation ?

I do use WPamA but like this one too for the commands.
Okay. I've gone through the whole cycle this time. Here's the new code. You can copy and paste the whole thing to replace the contents of StartUp.lua, or just replace the highlighted lines:
local ADDON_NAME = "UndauntedDaily"
UndauntedDaily = {}

local nextEventHandleIndex = 1

local function RegisterForEvent(event, callback)
local eventHandleName = ADDON_NAME .. nextEventHandleIndex
EVENT_MANAGER:RegisterForEvent(eventHandleName, event, callback)
nextEventHandleIndex = nextEventHandleIndex + 1
return eventHandleName
end

local function UnregisterForEvent(event, name)
EVENT_MANAGER:UnregisterForEvent(name, event)
end

local function WrapFunction(object, functionName, wrapper)
if(type(object) == "string") then
wrapper = functionName
functionName = object
object = _G
end
local originalFunction = object[functionName]
object[functionName] = function(...) return wrapper(originalFunction, ...) end
end

local messages = {}
local function LogDebug(message, ...)
if CHAT_SYSTEM.primaryContainer then
df("[%s] " .. message, ADDON_NAME, ...)
else
messages[#messages + 1] = {message, ...}
end
end

local function FlushMessages()
for i = 1, #messages do
LogDebug(messages[i])
end
messages = {}
end

local function OnAddonLoaded(callback)
local eventHandle = ""
eventHandle = RegisterForEvent(EVENT_ADD_ON_LOADED, function(event, name)
if(name ~= ADDON_NAME) then return end
FlushMessages()
callback()
UnregisterForEvent(event, name)
end)
end

OnAddonLoaded(function()
-- dungeon list from GetLFGOption(LFG_ACTIVITY_DUNGEON, index):
-- 1: Fungal Grotto I
-- 2: Spindleclutch I
-- 3: The Banished Cells I
-- 4: Darkshade Caverns I
-- 5: Wayrest Sewers I
-- 6: Elden Hollow I
-- 7: Arx Corinium
-- 8: Crypt of Hearts I
-- 9: City of Ash I
-- 10: Direfrost Keep
-- 11: Volenfell
-- 12: Tempest Island
-- 13: Blessed Crucible
-- 14: Blackheart Haven
-- 15: Selene's Web
-- 16: Vaults of Madness
-- 17: Fungal Grotto II
-- 18: Wayrest Sewers II
-- 19: White-Gold Tower
-- 20: Imperial City Prison
-- 21: Ruins of Mazzatun
-- 22: Cradle of Shadows
-- 23: The Banished Cells II
-- 24: Elden Hollow II
-- 25: Darkshade Caverns II
-- 26: Spindleclutch II
-- 27: Crypt of Hearts II
-- 28: City of Ash II
-- 29: Bloodroot Forge
-- 30: Falkreath Hold
-- 31: Scalecaller Peak
-- 32: Fang Lair
-- 33: Moon Hunter Keep
-- 34: March of Sacrifices
-- 35: Frostvault
-- 36: Depths of Malatar

-- 2016-07-22: Spindleclutch II / Direfrost Keep / Ruins of Mazzatun
local startTime = 1473055200
local SECONDS_PER_DAY = 24 * 3600

-- dungeon set A: Maj al-Ragath
local pledgeCycleA = {26, 3, 17, 2, 25, 6, 18, 1, 23, 4, 24, 5}

-- dungeon set B: Gilirion the Redbeard
local pledgeCycleB = {10, 16, 27, 9, 12, 14, 7, 15, 28, 8, 11, 13}

-- dlc dungeons: Urgalarg Chief-bane
local pledgeCycleC = {34, 36, 35, 20, 21, 19, 22, 29, 30, 32, 31, 33}

local localization = {
en = {
DUNGEONS = "<<1>>, <<2>> and <<3>>",
PAST = "The undaunted pledges <<3>> days ago (<<X:1>>) were <<2>>.",
YESTERDAY = "Yesterday's undaunted pledges (<<X:1>>) were <<2>>.",
TODAY = "Today's undaunted pledges (<<X:1>>, <<5>> left) are <<2>>.",
TOMORROW = "Tomorrow's undaunted pledges (<<X:1>>, available in <<4>>) will be <<2>>.",
FUTURE = "The undaunted pledges <<3>> days from now (<<X:1>>) will be <<2>>.",
NOINFO = "No information about the undaunted pledges from <<3>> days ago available.",
PLEDGE_COMMAND_DESCRIPTION = "Shows the undaunted pledges",
SEND_COMMAND_DESCRIPTION = "Places the pledges for sending",
UDLIST_COMMAND_DESCRIPTION = "Internal UndauntedDaily command",
},
de = {
DUNGEONS = "<<1>>, <<2>> und <<3>>",
PAST = "Die Unerschrockenen Gelöbnisse von vor <<3>> Tagen (<<X:1>>) waren <<2>>.",
YESTERDAY = "Die Unerschrockenen Gelöbnisse von gestern (<<X:1>>) waren <<2>>.",
TODAY = "Die Unerschrockenen Gelöbnisse von heute (<<X:1>>, <<5>> verbleibend) sind <<2>>.",
TOMORROW = "Die Unerschrockenen Gelöbnisse von morgen (<<X:1>>, verfügbar in <<4>>) werden <<2>> sein.",
FUTURE = "Die Unerschrockenen Gelöbnisse <<3>> Tage von heute (<<X:1>>) werden <<2>> sein.",
NOINFO = "Keine Informationen über die Unerschrockenen Gelöbnisse von vor <<3>> Tagen verfügbar.",
PLEDGE_COMMAND_DESCRIPTION = "Zeigt die Unerschrockenen Gelöbnisse",
SEND_COMMAND_DESCRIPTION = "Plaziert die Gelöbnisse zum Senden",
UDLIST_COMMAND_DESCRIPTION = "Interner UndauntedDaily Befehl",
},
fr = { -- provided by Ayantir
DUNGEONS = "<<1>>, <<2>> et <<3>>",
PAST = "Les donjons indomptables d'il y a <<3>> jours (<<X:1>>) étaient <<2>>.",
YESTERDAY = "Les donjons indomptables d'hier (<<X:1>>) étaient <<2>>.",
TODAY = "Les donjons indomptables d'aujourd'hui (<<X:1>>, <<5>> restantes) sont <<2>>.",
TOMORROW = "Les donjons indomptables de demain (<<X:1>>, disponibles dans <<4>>) seront <<2>>.",
FUTURE = "Les donjons indomptables dans <<3>> jours (<<X:1>>) seront <<2>>.",
NOINFO = "Aucune information disponible sur les donjons indomptables d'il y a <<3>> jours",
PLEDGE_COMMAND_DESCRIPTION = "Afficher les donjons indomptables",
SEND_COMMAND_DESCRIPTION = "Afficher dans le Chat",
UDLIST_COMMAND_DESCRIPTION = "Commande UndauntedDaily interne",
},
ru = { -- provided by Fellorion
DUNGEONS = "<<1>>, <<2>> и <<3>>",
PAST = "Обеты Неустрашимых <<3>> д. назад (<<X:1>>): <<2>>",
YESTERDAY = "Обеты Неустрашимых вчера (<<X:1>>): <<2>>.",
TODAY = "Обеты Неустрашимых сегодня (<<X:1>>, <<5>> осталось): <<2>>.",
TOMORROW = "Обеты Неустрашимых завтра (<<X:1>>, доступны через <<4>>): <<2>>.",
FUTURE = "Обеты Неустрашимых через <<3>> д. (<<X:1>>): <<2>>.",
NOINFO = "Обеты Неустрашимых за <<3>> д. до этого недоступны.",
PLEDGE_COMMAND_DESCRIPTION = "Показать обеты Неустрашимых",
SEND_COMMAND_DESCRIPTION = "Поместить обеты в чат для отправки",
UDLIST_COMMAND_DESCRIPTION = "Внутренняя комманда UndauntedDaily",
},
}

local language = GetCVar("language.2")
local L = localization[language] or {}
if(language ~= "en") then
setmetatable(L, { __index = localization["en"] })
end

local function FormatTimeBetween(startTime, endTime) -- formats as 11h 11m, strips seconds when over 1 minute
local diff = math.abs(GetDiffBetweenTimeStamps(startTime, endTime))
return ZO_FormatTime(diff, TIME_FORMAT_STYLE_DESCRIPTIVE_MINIMAL, TIME_FORMAT_PRECISION_TWENTY_FOUR_HOUR):gsub("m.-$","m")
end

local function GetFormatString(dayOffset)
if(not dayOffset) then
return L["NOINFO"]
elseif(dayOffset < -1) then
return L["PAST"]
elseif(dayOffset == -1) then
return L["YESTERDAY"]
elseif(dayOffset == 0) then
return L["TODAY"]
elseif(dayOffset == 1) then
return L["TOMORROW"]
elseif(dayOffset > 1) then
return L["FUTURE"]
end
end

local function GetDungeonName(pledgeCycle, diff)
local cycleIndex = 1 + diff % #pledgeCycle
local dungeonIndex = pledgeCycle[cycleIndex]
return GetLFGOption(LFG_ACTIVITY_DUNGEON, dungeonIndex)
end

local function GetPledgesString(dayOffset)
local now = GetTimeStamp()
local diff = math.floor(GetDiffBetweenTimeStamps(now, startTime) / SECONDS_PER_DAY)
dayOffset = tonumber(dayOffset)

if(dayOffset) then
diff = diff + dayOffset
else
dayOffset = 0
end

local currentStartTime = startTime + diff * SECONDS_PER_DAY
local dateString = FormatAchievementLinkTimestamp(currentStartTime)
local dayOffsetAbs = math.abs(dayOffset)
local timeToStartString = FormatTimeBetween(now, currentStartTime)
local timeToEndString = FormatTimeBetween(now, currentStartTime + SECONDS_PER_DAY)

local dungeonA = GetDungeonName(pledgeCycleA, diff)
local dungeonB = GetDungeonName(pledgeCycleB, diff)
local dungeonC = GetDungeonName(pledgeCycleC, diff)

if(currentStartTime < startTime) then
dayOffset = nil
end
local format = GetFormatString(dayOffset)
local dungeons = zo_strformat(L["DUNGEONS"], dungeonA, dungeonB, dungeonC)
return zo_strformat(format, dateString, dungeons, dayOffsetAbs, timeToStartString, timeToEndString)
end

local LSC = LibStub("LibSlashCommander")
LSC:Register({"/undaunted", "/pledges", "/dungeons"}, function(dayOffset)
d(GetPledgesString(dayOffset))
end, L["PLEDGE_COMMAND_DESCRIPTION"])

LSC:Register({"/undaunted2chat", "/pledges2chat", "/dungeons2chat"}, function(dayOffset)
StartChatInput(GetPledgesString(dayOffset))
end, L["SEND_COMMAND_DESCRIPTION"])

LSC:Register("/udlist", function() -- for getting indices of new dungeons
d("---- dungeons:")
local type = LFG_ACTIVITY_DUNGEON
for i = 1, GetNumLFGOptions(type) do
local name = GetLFGOption(type, i)
df("%d: %s", i, name)
end
end, L["UDLIST_COMMAND_DESCRIPTION"])
end)
Report comment to moderator  
Reply With Quote
Unread 03/20/19, 03:25 PM  
macdesktops
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 11
Uploads: 1
Re: Wrathstone

Originally Posted by Lelldorano
Hi any chance of getting this updated for the new dlc rotation ?

I do use WPamA but like this one too for the commands.
[strikethru]I think I've fixed my copy. It has correctly shown both of the new pledges as well as those before the new pledges.[/strikethru]
Code update redacted
Well, I'm afraid that my underlying assumption was faulty. I may need to track the entire cycle to get it right.
Last edited by macdesktops : 03/22/19 at 12:52 PM.
Report comment to moderator  
Reply With Quote
Unread 03/06/19, 03:51 PM  
Lelldorano

Forum posts: 0
File comments: 4
Uploads: 0
Wrathstone

Hi any chance of getting this updated for the new dlc rotation ?

I do use WPamA but like this one too for the commands.
Report comment to moderator  
Reply With Quote
Unread 02/05/19, 10:54 AM  
Chuaznega

Forum posts: 1
File comments: 8
Uploads: 0
Easy post LFG for pledges on chat

Hi, I made some changes so I can post a LFG message to chat like 'LF Tank/Healer/Dps for VET HM Pledges Fungal Grotto I, Selene's Web and White-Gold Tower', here is the code:
https://github.com/andreydjason/The-...ly-StartUp.lua
Report comment to moderator  
Reply With Quote
Unread 08/19/18, 06:15 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1258
File comments: 778
Uploads: 34
Originally Posted by Onigar
I realise this is me being super lazy but how about "/pledges week" to give today plus the next 6 days as separate entries in the chat window.

For me its nice to know what coming up over the next few days or more,

Just to save typing
/pledges
/pledges 1
/pledges 2
/etc
Sounds like an interesting idea. I'll consider it for the future.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 07/17/18, 06:34 AM  
Onigar
 
Onigar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 172
Uploads: 3
I realise this is me being super lazy but how about "/pledges week" to give today plus the next 6 days as separate entries in the chat window.

For me its nice to know what coming up over the next few days or more,

Just to save typing
/pledges
/pledges 1
/pledges 2
/etc
Report comment to moderator  
Reply With Quote
Unread 06/02/18, 05:43 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1258
File comments: 778
Uploads: 34
Originally Posted by seganku
DLC pledges lost sync with latest update.

I changed StartUp.lua, line 100:

From:
if(GetAPIVersion() == 100022) then

To:
if(GetAPIVersion() >= 100022) then
Hi. Version 1.4.1 which was released 6 days ago already fixes this.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 06/02/18, 02:07 AM  
seganku
 
seganku's Avatar

Forum posts: 2
File comments: 7
Uploads: 0
DLC pledges lost sync with latest update.

I changed StartUp.lua, line 100:

From:
if(GetAPIVersion() == 100022) then

To:
if(GetAPIVersion() >= 100022) then
Report comment to moderator  
Reply With Quote
Unread 08/17/17, 05:59 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1258
File comments: 778
Uploads: 34
Re: Confirmed DLC Rotation

Originally Posted by hacky2007
local pledgeCycleC = {22, 29, 30, 20, 21, 19}
Thanks. I'll update it later today.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 08/17/17, 05:42 AM  
hacky2007

Forum posts: 0
File comments: 7
Uploads: 0
Confirmed DLC Rotation

local pledgeCycleC = {22, 29, 30, 20, 21, 19}
Report comment to moderator  
Reply With Quote
Unread 08/14/17, 11:52 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1258
File comments: 778
Uploads: 34
Re: Update

Originally Posted by hacky2007
With the new DLC dungeons I believe the rotation will be:

local pledgeCycleC = {21, 29, 30, 19, 22, 20}

I can confirm tomorrow to be sure.
Thanks! I knew I forgot to do something... Should have checked that on the PTS.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 08/14/17, 10:32 AM  
hacky2007

Forum posts: 0
File comments: 7
Uploads: 0
Update

With the new DLC dungeons I believe the rotation will be:

local pledgeCycleC = {21, 29, 30, 19, 22, 20}

I can confirm tomorrow to be sure.
Report comment to moderator  
Reply With Quote
Unread 02/25/17, 05:54 AM  
iladrion

Forum posts: 0
File comments: 6
Uploads: 0
Originally Posted by sirinsidiator
That's not possible. You cannot send chat messages automatically.
OK, thanks for the info. Have a nice weekend
Report comment to moderator  
Reply With Quote
Unread 02/19/17, 09:51 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1258
File comments: 778
Uploads: 34
Originally Posted by iladrion
I really like this addon.

Suggestion for improvement:
Let the user define a keyword, and if another guildmember uses this defined word, the addon answers automatically with the pledges of the day text in this particular guild. Maybe use something like "-pledges" as default?

It better should be configurable to choose in which guilds it should answer (and all deactivated by default), so that in big trading guilds it is muted, and not 50 player's addons answer at the same time and spam the chat.
That's not possible. You cannot send chat messages automatically.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
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.