Launch something once per day or certain time - WoWInterface
Thread Tools Display Modes
07-17-21, 11:45 AM   #1
A Fallenroot Satyr
darhanger's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2017
Posts: 20
Launch something once per day or certain time

Wanna make function for track updates after player login in game then wait 20-30 sec then lauch function for track or make a function to launch it one time per day.

Lua Code:
  1. if player enter in world > 20 sec. then
  2.       --- do something
  3.    end
  Reply With Quote
07-17-21, 01:12 PM   #2
A Theradrim Guardian
Join Date: Apr 2009
Posts: 62
thats pretty straight forward.

local frame = CreateFrame("frame")
local function doStuff()
-- do whatever you want
frame:SetScript("OnEvent", function() C_Timer.After(20, doStuff) end)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Launch something once per day or certain time

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