PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: TTB on 21 January, 2005, 17:29:27

Title: Timer script
Post by: TTB on 21 January, 2005, 17:29:27
Hi,

I'm looking for a script that every day, will restart all scripts...

So the command: !restartscripts  wil be executed on time xx:xx every 24 hours (day).

Thanx
Title:
Post by: bastya_elvtars on 21 January, 2005, 21:04:43
use a BCDC script for this.
Title:
Post by: TTB on 23 January, 2005, 00:46:19
There is indeed a script for it. But it is timer set.... it will refresh within xx minutes... and not at time xx.. (what I want)... or is there such a script for it that can be triggert @ time xx?

thanx
Title:
Post by: bastya_elvtars on 23 January, 2005, 01:31:23
It can easily be done as lua can grab the current date :)
Title:
Post by: Sedulus on 23 January, 2005, 03:18:26
yes, like bastya_elvtars says, this isn't too hard with a combination of os.date() and the OnTimer function

take note though, I've removed the OnTimer (which gets called every second) though by default. hit DC():RunTimer(1) if you want it from now on.

edit: hoi TTB ;)
Title:
Post by: bastya_elvtars on 23 January, 2005, 03:26:41
sed: what about just making the BCDC functions list for me
(i know bout available listeners, just the funcs with few words explanation) and i can make a howto out of it in almost no time. i have been longing a long time for a BCDC scripting howto.

thx in advance.