Request 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

Request Bot

Started by (Mr420), 11 October, 2003, 01:13:42

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

(Mr420)

A Simple Request Bot for your hub

--//Request Board Bot
--//(Mr420)
--//A Simple Request Board For The Hub
--//Version 3.0

botname "Request_Board"
bot_email "mr420smail@yahoo.com" 
bot_speed "Fast Enough" 
bot_descr "Type !help In PM To Me." 
bot_share_size 420.01 1024 *1024
my_info_string 
"$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar).."$"..bot_email
TimeSpanInMinutes 
600   --//You May Change This

function Main()
frmHub:RegBot(botname)
my_info_string "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar).."$"..bot_email.. 
"$"..bot_share_size.."$"
SetTimer(TimeSpanInMinutes*33000
StartTimer() 
end

function NewUserConnected(curUser
curUser:SendDatamy_info_string 
end 

function OpConnected(curUser
curUser:SendDatamy_info_string 
end

function OnTimer() 

--
//Note that a "|" denotes a break in the line

SendToAll("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
SendToAll("
	
HI THERE!!!!, I'm The Request_Board."
)
SendToAll("
	
Do You Need A Specific File???"
)
SendToAll("
	
REQUEST IT!!!"
)
SendToAll("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
SendToAll("  To Request A File, Simply Send !help As A Private Message")
SendToAll("  To Request_Board.  Please Be As Specific As You Can.")
SendToAll("  Remember To Check Back To See If Someone Has Obtained Your File.")
SendToAll("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")

end

function tokenize (inString,token)
_WORDS = {}
local matcher "([^?"..token.."]+)"
gsub(inStringmatcher, function (wtinsert(_WORDS,wend)
return 
_WORDS
end

function GetArgs(data)
s,e,whoTo,from,cmd,arg,arg2 strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)%s+(.*)")
return 
arg,arg2
end

function DataArrival(userdata)
if(
strsub(data14) == "$To:"then
data
=strsub(data,1,strlen(data)-1)
s,e,whoTo strfind(data,"$To:%s+(%S+)")
if (
whoTo == botnamethen
s
,e,whoTo,from,cmd strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)")

if (
cmd=="!help"then
user
:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
user:SendPM(botname,"
	
This is the Request_Board!"
)
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
user:SendPM(botname," Type !help To View This Help Menu.")
user:SendPM(botname," Type !request <file> To Request A File.")
user:SendPM(botname," Type !view To View The Posted Requests/Updates.")
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
user:SendPM(botname," Please Be As Specific As You Can.")
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
end

if (cmd=="!request"then
SendToAll
("***New Request Added***")
argGetArgs(data)
local handle=openfile("request.dat","a")
write(handle,"("..user.sName..") requested :"..arg.."?")
user:SendPM(botname,"Request entry saved ....")
closefile(handle)
end

if (cmd=="!view"then
handle2
=openfile("request.dat","r")
if (
handle2==nilthen
else
line read(handle2,"*a")
line=strsub(line,1,strlen(line)-1)
linearray=tokenize(line,"?")
for 
i=1,linearray.do
user:SendPM(botname,linearray[i])
end
closefile
(handle2)
end

end
end
end
end 


enjoy!

/(Mr420)
Ptokax Owns J000!
Owner of: ??Rg????n R?@LM?
Founder of: 420 ??+?r????

BlazeXxX

Thanks for the Bot :) I would take it :D

sgt_pain36

sumting wrong here


Syntax Error: expected;
  last token read: `<' at line 1 in string "..."


 X(  X(  X(
Greetz :evil:
           Sgt_Pain

sgtpain37@gmail.com


kepp

--//Request Board Bot
--//(Mr420)
--//A Simple Request Board For The Hub
--//Version 3.0

botname = "Request_Board"
bot_email = "mr420smail@yahoo.com" 
bot_speed = "Fast Enough" 
bot_descr = "Type !help In PM To Me." 
bot_share_size = 420.01 * 1024 *1024
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar( 1 ).."$"..bot_email
TimeSpanInMinutes = 600   --//You May Change This

function Main()
frmHub:RegBot(botname)
my_info_string = "$MyINFO $ALL "..botname.." "..bot_descr.."$ $"..bot_speed..strchar( 1 ).."$"..bot_email.. 
"$"..bot_share_size.."$"
SetTimer(TimeSpanInMinutes*33000) 
StartTimer() 
end

function NewUserConnected(curUser) 
curUser:SendData( my_info_string ) 
end 

function OpConnected(curUser) 
curUser:SendData( my_info_string ) 
end

function OnTimer() 

--//Note that a "|" denotes a break in the line

SendToAll("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
SendToAll("    HI THERE!!!!, I'm The Request_Board.")
SendToAll("    Do You Need A Specific File???")
SendToAll("    REQUEST IT!!!")
SendToAll("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
SendToAll("  To Request A File, Simply Send !help As A Private Message")
SendToAll("  To Request_Board.  Please Be As Specific As You Can.")
SendToAll("  Remember To Check Back To See If Someone Has Obtained Your File.")
SendToAll("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")

end

function tokenize (inString,token)
_WORDS = {}
local matcher = "([^?"..token.."]+)"
gsub(inString, matcher, function (w) tinsert(_WORDS,w) end)
return _WORDS
end

function GetArgs(data)
s,e,whoTo,from,cmd,arg,arg2 = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)%s+(.*)")
return arg,arg2
end

function DataArrival(user, data)
if(strsub(data, 1, 4) == "$To:") then
data=strsub(data,1,strlen(data)-1)
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if (whoTo == botname) then
s,e,whoTo,from,cmd = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)")

if (cmd=="!help") then
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
user:SendPM(botname,"    This is the Request_Board!")
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
user:SendPM(botname," Type !help To View This Help Menu.")
user:SendPM(botname," Type !request  To Request A File.")
user:SendPM(botname," Type !view To View The Posted Requests/Updates.")
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
user:SendPM(botname," Please Be As Specific As You Can.")
user:SendPM(botname,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-")
end

if (cmd=="!request") then
SendToAll("***New Request Added***")
arg= GetArgs(data)
local handle=openfile("request.dat","a")
write(handle,"("..user.sName..") requested :"..arg.."?")
user:SendPM(botname,"Request entry saved ....")
closefile(handle)
end

if (cmd=="!view") then
handle2=openfile("request.dat","r")
if (handle2==nil) then
else
line = read(handle2,"*a")
line=strsub(line,1,strlen(line)-1)
linearray=tokenize(line,"?")
for i=1,linearray.n do
user:SendPM(botname,linearray[i])
end
closefile(handle2)
end

end
end
end
end

sgt_Pain, Copy the code now
Guarding    

SMF spam blocked by CleanTalk