PDA

View Full Version : [SOLVED] Timers



LordSeaworth
08-01-2016, 08:00 PM
Does Eluna have any timers?

Like i want to execute something each 30 mins fomr the moment the server starts.
There an timer that runs an function on certain intervals?

Rochet2
08-01-2016, 08:56 PM
local function timed(event, delay, repeats)
-- code
end

CreateLuaEvent(timed, 1000, 0)

http://eluna.emudevs.com/Global/CreateLuaEvent.html

If you are looking for creature/player/gameobject specific timed events later, they are creature:RegisterEvent(...)
and they work exactly the same way as createluaevent except a 4th argument is passed to the function that is triggered, in this case the "creature" would be after the "repeats" in the code above

LordSeaworth
08-02-2016, 04:41 PM
Thank you very much.