Time script/bot
 

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

Time script/bot

Started by ???883??, 02 October, 2004, 17:48:05

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

???883??

I have seen a bot in a hub, that tells the time, it is always at the top of the users list n has a key, the time also changes, i do hav a screenshot of this script/bot in action & the hub addy, but not sure if ur allowed to addy on here so i wont, ive been told that kepp made it, if ne1 has any info or you have it, please will u let me know, thanx, ???883??

Psycho_Chihuahua

cant remember where i got this one


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
--------------------------------------------------------
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

enema

yeppp, found it
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
--------------------------------------------------------
 

enema

Didnt noticed, that this post is already answered... I need glasses :D

???883??

Thanx ever so much, i didnt expect a reply so quick  :D ,  8)

Psycho_Chihuahua

QuoteOriginally posted by enema
Didnt noticed, that this post is already answered... I need glasses :D

He he well i got it in first m8

but what a coincedence that both of us posted exactly the same  :D
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

enema

I kept this thread open while searhing for script in other window. So the thread couldnt get refreshed :) Well, I found this script in this forum by using search. I found it, tested it, I realised, that I like this clock and then posted it here... hahaahaa... so i didnt noticed, that somebody posted same thing... well, s*it happens!

still laughing..

DARELL

iInterval = 60; -- in minutes
sBotName = "opunia";

iState = 0;

function Main()
  iState = 2;
  SetTimer(60 * 1000);
  StartTimer();
end

function OnTimer()
  if (iState == 1) then
    SendToAll(sBotName, "text"..date("%H:%M").."text");
  elseif (iState == 2 and mod(date("%M") + iInterval, iInterval) == 0) then
    SetTimer(iInterval * 60 * 1000);
    iState = 1;
    SendToAll(sBotName, "text"..date("%H:%M").."text");
  end
end

function GetDate()
   d = date("%d")
   mm = date("%m")
   y = date("%y")
   Date = ""..d.."/"..mm.."/"..y
   return Date
end

enema

#8
... But Im afraid it isint what ???883?? was looking for. Take a look at script above, you will see, that they work completely different. Thanks anyway :)

BoJlk

Can anyone check why i'm getting another Bot
after "Restart Scripts"

And i did restarted my client!

The only way to restore it was Restarting the HUB
and that's out of the question!

Psycho_Chihuahua

depends which script your talking about

I'v restarted my scripts many times and always havebut 1 timbot in the hub



otherwise use this
-- BotMgr 1.0
-- by Mutor
--
-- Add / Remove bot names from user list.
-- Option for context menu [you can add more of your own commands]
-- Allow command by profile
--
-- Remove/Restore a bot by typing [in main chat]
-- !killbot  		--Removes bot
-- !listbot 		--Restores bot 
-- Bot will be listed if scripts are restarted as well
--
--
aprof = 0	-- Masters are authorized to use these commands
SendMenu = "1"	-- Provide context [right click] menu commands, 0 for no
--


function NewUserConnected(user)
	if SendMenu == "1" then
		if user.iProfile == aprof then
			customCMDS(user)
			user:SendData(" *** Notice :: Right click hub tab or user list for Admin commands. ***")
		else
		end
	else
	end
end

OpConnected = NewUserConnected

--$UserCommand 1 X  Where -> 1=Hub Menu 2=User Menu 3=Hub/User Menu 
function customCMDS(user)
	--user:SendData("$UserCommand 255 7")	--clear the menu first
	user:SendData("$UserCommand 1 3 [Admin]\\Remove Bot $<%[mynick]> !killbot %[line:BotNick]||")
	user:SendData("$UserCommand 1 3 [Admin]\\Restore Bot $<%[mynick]> !listbot %[line:BotNick]||")
end

function DataArrival(user, data)
	if user.iProfile == aprof then
		if strsub(data,1,1)=="<" then
			data=strsub(data,1,strlen(data)-1) 
			s,e,cmd,name = strfind(data,"%b<>%s+(%S+)%s+(%S+)") 
				if cmd=="!killbot" then 
					frmHub:UnregBot(name)
				elseif cmd=="!listbot" then 
					frmHub:RegBot(name)				
				end 
		end 
	end
end
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Typhoon

can also deppend on what PtokaX verison you are using , the " OnExit() " part is only available in the beta versions. that's why it don't unreg the bot upon restart scripts ...


Typhoon?



BoJlk

i'm using [ProtaX v0.326 TD4]
And when i got the three BOTs the time was different
in each of them (the interval of the time i've restarted)

Typhoon

current = date("%H:%M")
min = 1000*60 

--------------------------------------------------------
function Main()
                frmHub:UnregBot("---" ..current .."---")
	frmHub:RegBot("---" ..current .."---")
	SetTimer(min) 
	StartTimer() 
end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot("---" ..current .."---")
	time = date("%H:%M")
	current = time
	frmHub:RegBot("---" ..current .."---")
end
--------------------------------------------------------

try this out it should do the same


Typhoon?



BoJlk

Typhoon?
Can you add Date?

Typhoon

#15
current = date("  %X -- %d/%m-%Y")
min = 1000*60 

--------------------------------------------------------
function Main()
                frmHub:UnregBot("---" ..current .."---")
	frmHub:RegBot("---" ..current .."---")
	SetTimer(min) 
	StartTimer() 
end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot("---" ..current .."---")
	time = date("  %X -- %d/%m-%Y")
	current = time
	frmHub:RegBot("---" ..current .."---")
end
--------------------------------------------------------

that should do it ..


Typhoon?



BoJlk

#16
hehe...That was quick!
10x Typhoon?

Can you change it and make it without a second?!

Typhoon

current = date("%H:%M -- %d/%m-%Y")
min = 1000*60 

--------------------------------------------------------
function Main()
                frmHub:UnregBot("---" ..current .."---")
	frmHub:RegBot("---" ..current .."---")
	SetTimer(min) 
	StartTimer() 
end 
--------------------------------------------------------
function OnTimer()
	frmHub:UnregBot("---" ..current .."---")
	time = date("%H:%M -- %d/%m-%Y")
	current = time
	frmHub:RegBot("---" ..current .."---")
end
--------------------------------------------------------

here you go..


Typhoon?



SMF spam blocked by CleanTalk