ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [outdated] EVENT_DAILY_RESET (https://www.esoui.com/forums/showthread.php?t=7721)

manavortex 04/12/18 12:11 AM

[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.

Scootworks 04/12/18 01:36 AM

how can you initialize check if it's done? maybe you need a second EVENT_DAILY_INITIALIZE or something too?

manavortex 04/12/18 01:46 AM

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.

Dolgubon 04/12/18 01:12 PM

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.

Ayantir 04/13/18 09:16 AM

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)

Dolgubon 04/13/18 09:40 AM

Quote:

Originally Posted by Ayantir (Post 34386)
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.

sirinsidiator 04/13/18 11:02 AM

Quote:

Originally Posted by Dolgubon (Post 34389)
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


All times are GMT -6. The time now is 03:44 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI