PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: ap1kp2 on 13 August, 2005, 22:43:11

Title: Hub time
Post by: ap1kp2 on 13 August, 2005, 22:43:11
Hi all,
can anyone make a script wherein a bot in the nick list would show the local time and the description field should show the text as "Local time"

eg:- Time 23:34 | Local time |


thx.

Title:
Post by: Jelf on 14 August, 2005, 00:14:58
Try this..-- timebot by WooshMan -- landofps.ath.cx
-- Converted to Lua5 By Jelf 10/03/05
-- Changed : to . to work with Ptokax 16.06 and later
-- creates a dummy user at the top of the user list
-- and displays the time.
-- It is updates every minute

current = os.date("%H.%M")
min = 1000*60
---------------------------------------------------
function Main()
frmHub:RegBot("---" ..current .."---", 1, "Local Time", "")
SetTimer(min)
StartTimer()
end
--------------------------------------------------------
function OnTimer()
frmHub:UnregBot("---" ..current .."---")
time = os.date("%H.%M")
current = time
frmHub:RegBot("---" ..current .."---", 1, "Local Time", "")
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot("---" ..current .."---")
end
Title: Works
Post by: ap1kp2 on 14 August, 2005, 03:11:28
Thx a bunch. I mean respect for ya \m/.
Title:
Post by: Jelf on 14 August, 2005, 09:18:52
Your Welcome  ;)
Title: Top Script!
Post by: -Dan- on 15 August, 2005, 21:07:45
That's a sorted script m8 just what i was looking for-keep up the good work m8