PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: patamon90 on 24 September, 2004, 18:06:21

Title: Time banner
Post by: patamon90 on 24 September, 2004, 18:06:21
Hello, i wounder if there is an script (bot) who shows the time in his username. Please it would be fun to have one  :P
Title:
Post by: Typhoon on 24 September, 2004, 19:24:23
i found a oldie by Kepp ..Enloy it :)

--Live Timer bot by kepp
--Idea yepyepyep4711
--modded me.

bot = "TimE"

function Main()
frmHub:RegBot(bot)
SetTimer(1*1000)
StartTimer()
end

function OnTimer()
SendToAll("$MyINFO $ALL "..bot.." Local Time : "..date("%H:%M:%S").."$ $"..date("%H:%M:%S").."$Local Time : "..date("%H:%M:%S").."$$|")
end


Typhoon?
Title:
Post by: patamon90 on 24 September, 2004, 19:45:06
I did more think to have the time in the name instead of description :P:P
Title:
Post by: patamon90 on 25 September, 2004, 12:32:26
anyone? =P
Title:
Post by: Psycho_Chihuahua on 25 September, 2004, 12:54:36
QuoteOriginally posted by patamon90
Hello, i wounder if there is an script (bot) who shows the time in his username. Please it would be fun to have one  :P

Try this - User with the Time as his Name
current = date("%H:%M")
min = 1000*60

--------------------------------------------------------
function Main()
frmHub:RegBot("---" ..current .."---")
SetTimer(min)
StartTimer()
end
--------------------------------------------------------
function OnTimer()
frmHub:UnregBot("---" ..current .."---")
time = date("%H:%M")
current = time
frmHub:RegBot("---" ..current .."---")
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot("---" ..current .."---")
end
--------------------------------------------------------
Title:
Post by: patamon90 on 25 September, 2004, 14:27:29
Thanks Psycho_Chihuahua It works very well, but I changed the code abit :) now it shows secounds too :))
Title:
Post by: Psycho_Chihuahua on 25 September, 2004, 14:35:21
QuoteOriginally posted by patamon90
Thanks Psycho_Chihuahua It works very well, but I changed the code abit :) now it shows secounds too :))

Well if u got a 100Mbit Connection then thats no Problem
I had that 2 once but it lamed the Mainchat for my Users, thats why i only use hours and minutes
Title:
Post by: patamon90 on 25 September, 2004, 16:15:46
Yeah, I saw that when I tried :D
But thanks anyway!
Title:
Post by: _Satan_ on 26 September, 2004, 06:26:12
perhaps a little bug , everytime i restart the scripts i get a new time bot with the previous one showing the time of restart of scripts. thanx
Title:
Post by: BoJlk on 26 September, 2004, 09:13:56
No BUGs Here...All works fine.

Good one Psycho_Chihuahua