PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Mihalich666 on 08 September, 2005, 17:09:38

Title: Problem with Time Bot
Post by: Mihalich666 on 08 September, 2005, 17:09:38
All greetings! I here the newcomer but as I have understood you probably can help my problem.
I have changed PtokaX for version 0.3.3.0 build 17.08 and my script worked on lua4. you could not convert it in lua 5 or tell where it is possible to find a similar script for this version PtokaX.

P.S.At once I am sorry for the bad English :)

And here a script:


-- TimeBot by aMutex - 26.06.2005
BotName = "Time"
TimeSpanInMinutes = 60
function Main()
SetTimer(TimeSpanInMinutes*60000)
StartTimer()
end
function OnTimer()
SendToAll(BotName, date("Today %A  %D. And time now %T  ...Whether it is time to be freshened?? =)))"))
end
Title:
Post by: TTB on 08 September, 2005, 17:23:55
Here you have... NOTE that "date" is changed to os.date!

-- TimeBot by aMutex - 26.06.2005
-- Converted to LUA5 by TTB - 08.09.2005
-----------------------------------------

BotName = "Time"
TimeSpanInMinutes = 60

function Main()
SetTimer(TimeSpanInMinutes*60000)
StartTimer()
end

function OnTimer()
SendToAll(BotName, os.date("Today %A %D. And time now %T ...Whether it is time to be freshened?? =)))"))
end
Title:
Post by: Mihalich666 on 08 September, 2005, 17:53:44
Many thanks for a prompt reply:) I shall test Now  :D
Title:
Post by: TTB on 08 September, 2005, 18:54:10
You're welcome :)