WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Launch something once per day or certain time (https://www.wowinterface.com/forums/showthread.php?t=58842)

darhanger 07-17-21 11:45 AM

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

pas06 07-17-21 01:12 PM

thats pretty straight forward.

Code:

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



All times are GMT -6. The time now is 07:56 AM.

vBulletin © 2022, Jelsoft Enterprises Ltd
© 2004 - 2021 MMOUI