Thread Tools Display Modes
04/12/18, 12:11 AM   #1
manavortex
 
manavortex's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 138
[outdated] EVENT_DAILY_RESET

Hey Chip,

as the title probably implies, would it be possible to send an EVENT_DAILY_RESET the moment the crafting and world boss dailies / pledges / etc reset? It'd be a great help for stuff like DailyAutoshare.

Thanks a ton.
 
04/12/18, 01:36 AM   #2
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 312
how can you initialize check if it's done? maybe you need a second EVENT_DAILY_INITIALIZE or something too?
 
04/12/18, 01:46 AM   #3
manavortex
 
manavortex's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 138
I'm currently doing this. It's not fully working yet.

A function WasRepeatableCompletedInResetCycle(questId) would come in handy, but I can live with logging.
 
04/12/18, 01:12 PM   #4
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
I don't think that's necessary. Daily quests all reset at the same time all year round. Anytime the player logs in, you could calculate the next daily reset time and just do a zo_cqlllater or something. Maybe check out arkadius undaunted add-on. It provides a notice when the dailies reset. There is also /dailyreset in the writ crafter in the slashcommands.lua file.
 
04/13/18, 09:16 AM   #5
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I don't second this.

Because if user is not logged in, it won't work.

But it would be interesting to have :

Constant type

RESET_DAILY_MAGES_GUILD_QUESTS
RESET_DAILY_FIGHTERS_GUILD_QUESTS
RESET_DAILY_UNDAUNTED_GUILD_QUESTS
RESET_DAILY_CYRODIIL_AVA_QUESTS

etc

and GetNumSecondsBeforeReset(constant)
 
04/13/18, 09:40 AM   #6
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
Originally Posted by Ayantir View Post
I don't second this.

Because if user is not logged in, it won't work.

But it would be interesting to have :

Constant type

RESET_DAILY_MAGES_GUILD_QUESTS
RESET_DAILY_FIGHTERS_GUILD_QUESTS
RESET_DAILY_UNDAUNTED_GUILD_QUESTS
RESET_DAILY_CYRODIIL_AVA_QUESTS

etc

and GetNumSecondsBeforeReset(constant)
Those constants would all be the same, dailies all reset at the same time. GetNumSexondsBeforeReset is then quite easy to code.
 
04/13/18, 11:02 AM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Dolgubon View Post
Those constants would all be the same, dailies all reset at the same time. GetNumSexondsBeforeReset is then quite easy to code.
UndauntedDaily does this for years already.

A simple function could look like this:

Lua Code:
  1. local SECONDS_PER_DAY = 24 * 3600
  2. local QUEST_RESET_TIME_UTC = 6 * 3600
  3.  
  4. local function GetSecondsBeforeDailyQuestReset(now)
  5.     now = now or GetTimeStamp()
  6.     local secondsSinceMidnightUtc = now % SECONDS_PER_DAY
  7.     local diff = GetDiffBetweenTimeStamps(QUEST_RESET_TIME_UTC, secondsSinceMidnightUtc)
  8.     if(diff < 0) then
  9.         diff = diff + SECONDS_PER_DAY
  10.     end
  11.     return diff
  12. end
 

ESOUI » Developer Discussions » Wish List » [outdated] EVENT_DAILY_RESET

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off