Time 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 bot

Started by Genius, 10 April, 2005, 16:00:49

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Genius

Hi evryone

Sory my bad inglish

I need a script for time um my Hub

exemple:

1:00  -?   bla bla bla
2:00 -?    ble ble ble

One reason for evry hour

[][]s Genius

Mp3-Tuga.sytes.net  Only portuguese users

Herodes

try this one ..
--- SayOnTime by Herodes v1
--- displays a msg when the hour changes.
--- request by genius

curHour = os.date("%H")

function ChatArrival( user, data )
	---// Configure your Messages Here!
local tMessages = {
	-- [hour] = { "nick", "msg" },
	[0] = { "Hour", "The message" },
	[1] = { "Hour", "The message" },
	[2] = { "Hour", "The message" },
	[3] = { "Hour", "The message" },
	[4] = { "Hour", "The message" },
	[5] = { "Hour", "The message" },
	[6] = { "Hour", "The message" },
	[7] = { "Hour", "The message" },
	[8] = { "Hour", "The message" },
	[9] = { "Hour", "The message" },
	[10] = { "Hour", "The message" },
	[11] = { "Hour", "The message" },
	[12] = { "Hour", "The message" },
	[13] = { "Hour", "The message" },
	[14] = { "Hour", "The message" },
	[15] = { "Hour", "The message" },
	[16] = { "Hour", "The message" },
	[17] = { "Hour", "The message" },
	[18] = { "Hour", "The message" },
	[19] = { "Hour", "The message" },
	[20] = { "Hour", "The message" },
	[21] = { "Hour", "The message" },
	[22] = { "Hour", "The message" },
	[23] = { "Hour", "The message" },
}

	if curHour ~= os.date("%H") then
		curHour = os.date("%H")
		SendToAll( tMessages[tonumber(curHour)][1], tMessages[tonumber(curHour)][2])
	end
end

NewUserConnected = ChatArrival
UserDisconnected = ChatArrival
OpConnected = ChatArrival
OpDisconnected = ChatArrival
MyInfoArrival = ChatArrival
SearchArrival = ChatArrival

Dessamator

#2
QuoteOriginally posted by Herodes
NewUserConnected = ChatArrival
UserDisconnected = ChatArrival
OpConnected = ChatArrival
OpDisconnected = ChatArrival
MyInfoArrival = ChatArrival
SearchArrival = ChatArrival

hmmm interesting way to avoid using a timer,  :D , PS. i was confused ?(  at first, almost  thought u were crazy !!
Ignorance is Bliss.

Herodes

QuoteOriginally posted by Dessamator
QuoteOriginally posted by Herodes
NewUserConnected = ChatArrival
UserDisconnected = ChatArrival
OpConnected = ChatArrival
OpDisconnected = ChatArrival
MyInfoArrival = ChatArrival
SearchArrival = ChatArrival

hmmm interesting way to avoid using a timer,  :D , PS. i was confused ?(  at first, almost  thought u were crazy !!
original concept from UserCleaner by plop... that should explain the madness :D

Genius

Hi

The script have a error    :(


Syntax error: attempt to index global `os' (a nil value)
stack traceback:
   1:  main of file `...nte de trabalho\Mp3-World\scripts\??? Horas.lua' at line 5

Madman

Thats beacuse the script is written in lua5.. u need to update your ptokax for this script to work...

get the latest at //www.ptokax.org
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Genius

Hi
Sory but i don?t go update my ptokax because in portugal have a client dc "PTDC++V2" and new version don?t acept.

I need this script for ptokax 15.25 :)

[][] Genius

Madman

#7
that can be fixed...

start a test hub with 16.09 and add this to the file ClientTags.xml

   
        PTDC++V2
        PTDC
    

it should be over the last

and then try to enter your test hub

*edit*
 thats if the tag looks like this


but if it looks like this



it should look like this
   
        PTDC++
        PTDC
    


Hope it helps... =)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Genius

Hi

Have a problem, I?m update tag clients, don?t work, e tring a lot tag?s, and nothing

This is a exemple, user info


[20:06:18] *** Info on **** ***
 
Client:      CZDC/BCDC based client   [09-04 19:24]
Filelist generator:   
Lock:      EXTENDEDPROTOCOLABCABCABCABCABCABC
Pk:      DCPLUSPLUS0.305ABCABC
Tag:      <++ V:0.305,M:A,H:1/0/2,S:2>
Supports:      BZList MiniSlots GetTestZBlock  
Status:      Normal (1)
TestSUR:      File Not Available
Disconnects:   0
Timeouts:      0
Downspeed:   1.35 kB/s
IP:      *****
UserIP:      *****
Search port   26365
ISP:      
Known hubs:   1   ***(*****)  
Stated hubs:   3
Host:      *****
Description:   ?
Email:      
Connection:   Cable
Commands:   
Filelist size:   43.97 kB  (45029 B)
ListLen:      87.06 kB  (89147 B)
Stated Share:   13.10 GB  (14063846767 B)
Real Share:   13.10 GB  (14063846767 B)   [09-04 19:43]
Total files:   3909 (hashed: 0)
Percent hashed:   
Cheat status:   CZDC/BCDC based client
Comment:      
Logged In:   09-04 19:14 (0:51:42)

Herodes

madman tried to explain that you need to open the file named 'ClientTags.xml' that you can find inside the 'cfg' folder  of the latest PtokaX release, with Notepad.exe

After you do that please read what madman is telling in his post ...

Genius

Hi

Lot don?t working ok?
I think is PTDC, send bad my info, and no join, because tag is dc++0.305

But e request a time bot for ptokax 15.25, because i?m not use a new ptokax.

Please creat a bot for ptokax 15.25  :)

Sory my bad inglish

[][] Genius

ConejoDelMal

#11
like genius said, the Tag of PTDC++ is the same as Dc++ 0.305, the only visible diference is the description, it has "Free Slots:3?" or just "" but I will test connecting with it to see if i can get more info

*edited*

Got this when connecting:
[23:32]  (81.193.58.65) > $Supports UserCommand NoGetINFO NoHello UserIP2 |
[23:32]  (81.193.58.65) > $Key ????A ????0?R??????1"sp??1?S?C??aq??|
[23:32]  (81.193.58.65) > $ValidateNick norcy|
[23:32] norcy (81.193.58.65) > $Version 78551224731|
[23:32] norcy (81.193.58.65) > $GetNickList|
[23:32] norcy (81.193.58.65) > $MyINFO $ALL norcy ? faxo nepias!!!!?<++ V:0.305,M:A,H:5/4/1,S:3>$ $DSL$norcy_k023@hotmail.com$34749520462$|
[23:32] norcy (81.193.58.65) > $Version 78551224731|
[23:32] x User removed: norcy (Socket 856)

Any sugestions?
Rede-DC Comunidade Portuguesa de DC

Herodes

#12
$Version 78551224731|
shitty ... that looks pretty bad to me .. normally this should read
$Version 1,0091|
Then it there is the mistake of sending the $Version again after having requested for a NickList and having sent a MyINFO!! That should be the reason Ptx gets this client disconn...

btw .. from the $Supports I figure that it is pretty back in time .. y do those hubs force you to use that client ? it looks quite shauvinists' behaviour... :(

Genius

And my script???

   :(  :(  :(  :(  :(  :(

Herodes

#14
there is your script .. but really try and synchronise ( update your Ptx!!) cause I dont think that ppl around here are willing to continue writing scripts for older Ptxs ..
--- SayOnTime by Herodes v -1
--- displays a msg when the hour changes.
--- request by genius
--- for oooolllddd ptx...

curHour = date("%H")

function DataArrival( user, data )
	---// Configure your Messages Here!
local tMessages = {
	-- [hour] = { "nick", "msg" },
	[0] = { "Hour", "The message" },
	[1] = { "Hour", "The message" },
	[2] = { "Hour", "The message" },
	[3] = { "Hour", "The message" },
	[4] = { "Hour", "The message" },
	[5] = { "Hour", "The message" },
	[6] = { "Hour", "The message" },
	[7] = { "Hour", "The message" },
	[8] = { "Hour", "The message" },
	[9] = { "Hour", "The message" },
	[10] = { "Hour", "The message" },
	[11] = { "Hour", "The message" },
	[12] = { "Hour", "The message" },
	[13] = { "Hour", "The message" },
	[14] = { "Hour", "The message" },
	[15] = { "Hour", "The message" },
	[16] = { "Hour", "The message" },
	[17] = { "Hour", "The message" },
	[18] = { "Hour", "The message" },
	[19] = { "Hour", "The message" },
	[20] = { "Hour", "The message" },
	[21] = { "Hour", "The message" },
	[22] = { "Hour", "The message" },
	[23] = { "Hour", "The message" },
}

	if curHour ~= date("%H") then
		curHour = date("%H")
		SendToAll( tMessages[tonumber(curHour)][1], tMessages[tonumber(curHour)][2])
	end
end

Genius

#15
Hi again :)

Sory but the script have errors :(



Syntax error: attempt to index global `os' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 38 [file `...nte de trabalho\Mp3-World novo\scripts\hora.lua']

Herodes

QuoteOriginally posted by ?[-?Genius?-]?
Hi again :)

Sory but the script have errors :(



Syntax error: attempt to index global `os' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 38 [file `...nte de trabalho\Mp3-World novo\scripts\hora.lua']

fixed .. re-copy pls..

ConejoDelMal

QuoteOriginally posted by Herodes
Then it there is the mistake of sending the $Version again after having requested for a NickList and having sent a MyINFO!! That should be the reason Ptx gets this client disconn...
Well, so maybe it wont be possible to get them in...
QuoteOriginally posted by Herodes
btw .. from the $Supports I figure that it is pretty back in time .. y do those hubs force you to use that client ? it looks quite shauvinists' behaviour... :(
yep, its old and dead i guess, and no, we do not force them to use this client, but a lot of people like to, and i dont want them to stay out when i change Ptokax...
Rede-DC Comunidade Portuguesa de DC

Genius

hi again

the script don?t work :(
don?t have errors
No syntax errors in the script.

Herodes

QuoteOriginally posted by ?[-?Genius?-]?
hi again

the script don?t work :(
don?t have errors
No syntax errors in the script.
it hasn't been left running for an hour yet ..

Genius

the bot send this for main chat

  The message

don?t show the time

Psycho_Chihuahua

#21
well you have to do something to  :D

you can edit to your choosing in this part of the script

Example:

[9] = { "Hour", "The message" },

where:

[9] is 9 oclock
"Hour" you can write like "9 O'clock"
"The message" here you enter the message you want to be shown at the set time
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

bastya_elvtars

QuoteOriginally posted by ?[-?Genius?-]?
the bot send this for main chat

  The message

don?t show the time

Enter /ts in mainchat and press Enter.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk