Could someone help me out here?
current = os.date("%d:%m:%y - %H:%M")
iMin = 1000*60
function Main()
current = os.date("%d:%m:%y - %H:%M")
if tTime[current] then
SendToAll( ("---" ..current .."---"), tTime[current] )
end
frmHub:RegBot("---" ..current .."---")
SetTimer(iMin)
StartTimer()
end
function OnTimer()
frmHub:UnregBot("---" ..current .."---")
current = os.date("%d:%m:%y - %H:%M")
if tTime[current] then
SendToAll( ("---" ..current .."---"), tTime[current] )
end
frmHub:RegBot("---" ..current .."---")
end
function OnExit()
frmHub:UnregBot("---" ..current .."---")
end
I had it working with the newer Version of Ptx (16.03/16.04/16.05) but now with 16.06 it don't work
Maybe this could work .. current = os.date("%d:%m:%y - %H:%M")
iMin = 1000*60
function Main()
current = os.date("%d:%m:%y - %H:%M")
SendToAll( ("*** Time now is ---" ..current .."---") )
frmHub:RegBot("---" ..current .."---", 1, "", "")
SetTimer(iMin)
StartTimer()
end
function OnTimer()
frmHub:UnregBot("---" ..current .."---")
current = os.date("%d:%m:%y - %H:%M")
SendToAll( ("*** Time now is ---" ..current .."---") )
frmHub:RegBot("---" ..current .."---", 1, "", "")
end
function OnExit()
frmHub:UnregBot("---" ..current .."---")
end
Thnx Herodes, partialy works - just the "dummy User" doesn't appear :( is it possible to get that part working as well?
QuoteOriginally posted by Psycho_Chihuahua
Thnx Herodes, partialy works - just the "dummy User" doesn't appear :( is it possible to get that part working as well?
Could be working now .. above post edited ... I am guessing the mistake is coming from the new way PtokaX is ReggingBots ... the frmHub:RegBot() needs some additional arguments ( botname, oper, description, email )...
no - still not working ;(
QuoteOriginally posted by Psycho_Chihuahua
no - still not working ;(
Found it .. Nothing to do with Lua itself ... it was the invalid characters for nicknames that the newest PtokaX has .. it was the ':' screwing the whole thing up .. there you go with a working thing ..
current = ""
iMin = 1000*60
function Main()
current = os.date("%d-%m-%y - %H.%M")
SendToAll( "*** Time now is @ -=".. current.."=-" )
frmHub:RegBot( "-=".. current.."=-" , 1, "", "")
SetTimer(iMin)
StartTimer()
end
function OnTimer()
frmHub:UnregBot( "-=" ..current .."=-" )
current = os.date("%d-%m-%y - %H.%M")
SendToAll( "*** Time now is @ -=".. current.."=-" )
frmHub:RegBot( "-=".. current.."=-" , 1, "", "")
end
function OnExit()
frmHub:UnregBot( ("-=" ..current .."=-") )
end
HI ,,
this timebot seems to send the time every min ,,
maybe i have to little beer in my head or i'm stupid ,,
i cannot change timevalue (120 min)
[19:19:20] ?? Dagens datum & tid ?r nu: 15-03-05 - 19.19 ??
[19:20:20] ?? Dagens datum & tid ?r nu: 15-03-05 - 19.20 ??
[19:21:20] ?? Dagens datum & tid ?r nu: 15-03-05 - 19.21 ??
I actually only want it to show a "Dummy User" in the Userlist that shows the Time - which it still doesn't ;( ;(
Check here for original Timebot
http://www.wooshman.ath.cx/ (http://www.wooshman.ath.cx/)
I've seen and tried that one already, but with Ptokax 16.06 it doesnt work ;(
tested and wasting bandwidth so yes it works.
localtime = {
sec = "1",
Description = "local time bot",
Email = "some email addy",
}
function Time()
local current = os.date("%H.%M.%S")
localtime.botname = "-=" ..current .."=-"
end
--------------------------------------------------------
function Main()
Time()
frmHub:RegBot(localtime.botname, 1, localtime.Description, localtime.Email)
SetTimer(localtime.sec * 1000)
StartTimer()
end
--------------------------------------------------------
function OnTimer()
frmHub:UnregBot(localtime.botname)
Time()
frmHub:RegBot(localtime.botname, 1, localtime.Description, localtime.Email)
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot(localtime.botname)
end
any1 an idea who made the original??
plop
i think it was Whooshman, but i'm not sure
Thanks a lot for the Script Plop, after taking out the seconds and setting it on 1minute its running fine now (saving at least a bit of Bw :D )
Here is what i now have - running fine
localtime = {
sec = "60",
Description = "lokaler Zeitbot",
Email = "helvetia@psycho-chihuahua.net",
}
function Time()
local current = os.date("%H.%M..%d.%m.%y")
localtime.botname = "-=" ..current .."=-"
end
--------------------------------------------------------
function Main()
Time()
frmHub:RegBot(localtime.botname, 1, localtime.Description, localtime.Email)
SetTimer(localtime.sec * 1000)
StartTimer()
end
--------------------------------------------------------
function OnTimer()
frmHub:UnregBot(localtime.botname)
Time()
frmHub:RegBot(localtime.botname, 1, localtime.Description, localtime.Email)
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot(localtime.botname)
end
showing as -=21.47..15.03.05=-