View Single Post
03-06-24, 11:55 AM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,894
Sounds like you would want to replace the ticker with an OnUdate script with a countdown that does essentially the same thing but with an added second countdown adjusting the resets etc. of the first when it runs into/outof range. And the added initial check when the code starts to see which settings to use on login.

A second table for adjustment times might be something like (not really required if the adjustment start times etc. are the same (offset (+/- xxx seconds from event start), interval/duration) in every region).
Lua Code:
  1. regionEventAdjustTime = { -- when the "adjustment" event occures
  2.     [1] = {
  3.         starttime = 1709615040, -- when the "adjustment" time starts
  4.         eventDuration = 21600, -- How long "adjustment" lasts [6 hours]
  5.         addIntervalInSeconds = 3600, -- Add seconds to event interval when in range, subtract when not
  6.         addSomethingElse = 2700, -- Add something else when in adjust period like the event duration?
  7.     },
  8. }
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote