An Original TimeBot - Page 2
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

An Original TimeBot

Started by WooshMan, 06 March, 2004, 11:15:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

??????Hawk??????

#25
Hello again   this is how mine is set up   runs sweet updating once a min:-

Great script Woosh :-)


-- timebot by WooshMan -- landofkaraoke.ath.cx

-- creates a dummy user at the top of the user list
-- and displays the time as the user name.
-- A clock which diplays the current time in Hours and minutes.

-- Version 1.3
-- ops only can turn on and off
-- added !clockon and !clockoff.  Turns clock on and off
-- added characters to start and end of time.  User can choose anything to prefix and finish the clock
-- code added to give other bot info by ??????Hawk??????  06-03-04
startchrs = "-?????"   -- shows before clock
endchrs = "?????-"    -- shows after clock
gb = 15 * 1024 * 1024
botDesc = "??????Hubs Local Time??????" 
botSpeed = "Time" 
botEmail = "clocks@hawks-world.com" 
botShare = 1 * 1024 * gb

current = date("%H:%M:%S")
sec = 1000
min = sec*60
--------------------------------------------------------
function Main() 
	SetTimer(min)
end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot(startchrs ..current ..endchrs)
	time = date("%H:%M_Hrs_GmT")
	current = time
	frmHub:RegBot(startchrs ..current ..endchrs)
 	info = "$MyINFO $ALL -?????"..current.."?????- "..botDesc.."$ $"..botSpeed..strchar( 1 ).."$"..botEmail.."$"..botShare.."$" 
	SendToAll( info )
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot(startchrs ..current ..endchrs)
end
--------------------------------------------------------
function DataArrival(user, data)
	if( strsub(data, 1, 1) == "<" ) then
	if user.bOperator then
	local s,e,prefix,cmd = strfind(data, "%b<>%s+(%S+)(%S+)") 
		if prefix == "!clockoff" then
			StopTimer()
			frmHub:UnregBot(startchrs ..current ..endchrs)
			return 1
		elseif prefix == "!clockon" then
			current = date("%H:%M_Hrs_GmT")
			StartTimer() 
			frmHub:RegBot(startchrs ..current ..endchrs)
			return 1
		end	
	end
	end
end  
--------------------------------------------------------------------------------


BTW....  the  other info dosnt appear for 1 min on clock start

spurlos

Part|Join messages spamming..
Is it any way to disable this message from bot on server side?
Any clients want to see part|join messages, but not from timebot =)

DorianG

I want to add an alarm clock. Example, an user ,chat, and he doesn't want to forget an appointment. So set the hour of the appointment and when it is the hour the Bot sends him a message in mainchat. Is it possible?

WickeD

#28
Can eny one take away from this script the on/off funktion! So I do not need to start the Time script when I restart all scripts i the hubsoft!  I want the Time script to bee on ON all the time!

-- timebot by WooshMan -- landofkaraoke.ath.cx

-- creates a dummy user at the top of the user list
-- and displays the time as the user name.
-- A clock which diplays the current time in Hours and minutes.

-- Version 1.3
-- ops only can turn on and off
-- added !clockon and !clockoff.  Turns clock on and off
-- added characters to start and end of time.  User can choose anything to prefix and finish the clock
-- code added to give other bot info by ??????Hawk??????  06-03-04
startchrs = "[Bot]-?-?-"   -- shows before clock
endchrs = "-?-?-"    -- shows after clock
gb = 15 * 1024 * 1024
botDesc = "??????Show local time in this hub??????" 
botSpeed = "BOT" 
botEmail = "support@northside.se" 
botShare = 0 * 1024 * gb

current = date("%H:%M:%S")
sec = 1000
min = sec*60
--------------------------------------------------------
function Main() 
	SetTimer(min)
end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot(startchrs ..current ..endchrs)
	time = date("%H:%M")
	current = time
	frmHub:RegBot(startchrs ..current ..endchrs)
 	info = "$MyINFO $ALL [Bot]-?-?-"..current.."-?-?- "..botDesc.."$ $"..botSpeed..strchar( 1 ).."$"..botEmail.."$"..botShare.."$" 
	SendToAll( info )
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot(startchrs ..current ..endchrs)
end
--------------------------------------------------------
function DataArrival(user, data)
	if( strsub(data, 1, 1) == "<" ) then
	if user.bOperator then
	local s,e,prefix,cmd = strfind(data, "%b<>%s+(%S+)(%S+)") 
		if prefix == "!clockoff" then
			StopTimer()
			frmHub:UnregBot(startchrs ..current ..endchrs)
			return 1
		elseif prefix == "!clockon" then
			current = date("%H:%M")
			StartTimer() 
			frmHub:RegBot(startchrs ..current ..endchrs)
			return 1
		end	
	end
	end
end  


//WickeD

WooshMan

Hi,

Take out the DataArrival(user,data)  part.

And in Main()

StartTimer()
frmHub:RegBot(startchrs ..current ..endchrs)

Add that.

That should put the clock in all the time.

Not tested though.

Woosh
WooshMan

Creator of
originaltimebot.lua
www hubstats

Thanks to Plop, Kepp and NightLitch

WickeD

Can you fix that for me? I can not get it to work!

Can you add that in the script and post it here??? Plzzz!


//WickeD

??????Hawk??????

try this WickeD m8


-- timebot by WooshMan -- landofkaraoke.ath.cx

-- creates a dummy user at the top of the user list
-- and displays the time as the user name.
-- A clock which diplays the current time in Hours and minutes.

-- Version 1.3
-- ops only can turn on and off
-- added !clockon and !clockoff.  Turns clock on and off
-- added characters to start and end of time.  User can choose anything to prefix and finish the clock
-- code added to give other bot info by ??????Hawk??????  06-03-04 / removed switches 16-13-04
startchrs = "[Bot]-?-?-"   -- shows before clock
endchrs = "-?-?-"    -- shows after clock
gb = 15 * 1024 * 1024
botDesc = "??????Show local time in this hub??????" 
botSpeed = "BOT" 
botEmail = "support@northside.se" 
botShare = 0 * 1024 * gb

current = date("%H:%M:%S")
sec = 1000
min = sec*60
--------------------------------------------------------
function Main() 
	SetTimer(min)
	current = date("%H:%M")
	StartTimer() 
	frmHub:RegBot(startchrs ..current ..endchrs)

end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot(startchrs ..current ..endchrs)
	time = date("%H:%M")
	current = time
	frmHub:RegBot(startchrs ..current ..endchrs)
 	info = "$MyINFO $ALL [Bot]-?-?-"..current.."-?-?- "..botDesc.."$ $"..botSpeed..strchar( 1 ).."$"..botEmail.."$"..botShare.."$" 
	SendToAll( info )
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot(startchrs ..current ..endchrs)
end
--------------------------------------------------------

WickeD

It works fine now!!!!  " My WickeD m8"  =)

Thx a lot for your help!!  


//WickeD

WickeD

Is there a way to get the Description to bee there all the time??  It vanish from user list when I restart the scripts from hubsoft!

//WickeD

??????Hawk??????

#34
-- timebot by WooshMan -- landofkaraoke.ath.cx

-- creates a dummy user at the top of the user list
-- and displays the time as the user name.
-- A clock which diplays the current time in Hours and minutes.

-- Version 1.3
-- ops only can turn on and off
-- added !clockon and !clockoff.  Turns clock on and off
-- added characters to start and end of time.  User can choose anything to prefix and finish the clock
-- code added to give other bot info by ??????Hawk??????  06-03-04 / removed switches 16-13-04
startchrs = "[Bot]-?-?-"   -- shows before clock
endchrs = "-?-?-"    -- shows after clock
gb = 15 * 1024 * 1024
botDesc = "??????Show local time in this hub??????" 
botSpeed = "BOT" 
botEmail = "support@northside.se" 
botShare = 0 * 1024 * gb
current = date("%H:%M")
sec = 1000
min = sec*60
info = "$MyINFO $ALL [Bot]-?-?-"..current.."-?-?- "..botDesc.."$ $"..botSpeed..strchar( 1 ).."$"..botEmail.."$"..botShare.."$" 
--------------------------------------------------------
function Main() 
	SetTimer(min)
	current = date("%H:%M")
	StartTimer() 
	frmHub:RegBot(startchrs ..current ..endchrs)
	SendToAll( info )

end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot(startchrs ..current ..endchrs)
	time = date("%H:%M")
	current = time
	frmHub:RegBot(startchrs ..current ..endchrs)
 	info = "$MyINFO $ALL [Bot]-?-?-"..current.."-?-?- "..botDesc.."$ $"..botSpeed..strchar( 1 ).."$"..botEmail.."$"..botShare.."$" 
	SendToAll( info )
end
--------------------------------------------------------
function OnExit()
frmHub:UnregBot(startchrs ..current ..endchrs)
end
--------------------------------------------------------

WickeD

Now it is working!!!


//WickeD

??????Hawk??????

hi WickeD

Although it didnt show on log in  it would have appeared on timer trigger ( no more than 1 min on entring the hub )

Psycho_Chihuahua

is it possible to port this to lua5 (dchpp++)?

i tried using plops converter but i only get errors
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk