responce 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

responce bot

Started by b_w_johan, 29 March, 2004, 10:51:38

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

b_w_johan

heey all,

i use:

-- TrickerBot by Ptaczek
-- Random syntax by Skrollster (http://lua.bcs-solutions.de/thread.php?t...2a4078fa73ba6be)
-- Based on SeNsI Bot by Guibs(if I understood  correct)
-- Modifyed a bit(as always lame) by piglja - 14/03/03
but it only respond to words in the mainchat now im looking for a way to change it to PM to the bot..
how do i change the script or is there another script

(if you need the hole script say in response then ill post it totally)

greetings,
Johan :P
checkout http://wwhublist.com/index.php for my World Wide HubList project!

b_w_johan

hmmm whatever ill postt the hole script..


-- TrickerBot by Ptaczek
-- Random syntax by Skrollster (http://lua.bcs-solutions.de/thread.php?t...2a4078fa73ba6be)
-- Based on SeNsI Bot by Guibs(if I understood  correct)
-- Modifyed a bit(as always lame) by piglja - 14/03/03

Bot = "[bot]flapkees"

trigs = {
goodnight="Sleep Well [USER]",
kazaa="why the hell are u talking about that stupid prog [USER] you ******* ******",
adres="do not say any adresses in ths hub it will leed to a kick ! [USER], a long one! and if you want to visit a hub s\checkout JOHAN-FORUM.TK!!",
porn="there is no porn aloud in here [USER], yust remember that other rules you will find with !rules !!!",
nigga="Any More Racism [USER], And You Will Be BANNED!!!",
}

idlequestions = {
}

idleanswers = {
}

sec = 1000
min = 60 * sec
hour = 60 * min
index = nil
function Main()
a = 0
SetTimer(0*min)
StartTimer()
end

function DataArrival(user, data)
if( strsub(data, 1, 1) == "<" ) then
-- get the msg only using regular expression
data=strsub(data,1,strlen(data)-1)
-- parse the command
s,e,cmd = strfind( data, "%b<>%s+(%S+)" )
s,e,mess = strfind(data, "%b<> ([%w ]*)")
local nick = user.sName
if (cmd=="+go") then
if user.bOperator then
a = 3
SendToAll(nick,"+go")
SendToAll(Bot, "I Shall Now go get some new Games !!!.")
StopTimer()
return 1
else
if a == 1 or a == 2 then
SendToAll(Bot, "rolling...hum...hum...")
a = 0
end
end
end
if (cmd=="+talk") then
if user.bOperator then
a = 2
SendToAll(nick,"+talk")
SendToAll(Bot, "Why Do You call me from the shop?")
return 1
else
if a == 1 or a == 2 then
SendToAll(Bot, "hum...here now ....wasup ?")
a = 0
end
end
end
-- look in the table
for key, value in trigs do
if mess and a == 0 or a == 2 then
if( strfind( strlower(mess), key) ) then
answer, x = gsub(value, "%b[]", user.sName)
SendToAll(nick,""..mess.."")
SendToAll(Bot, answer )
return 1
end
end
end
if cmd and a == 1 then
if (cmd=="+go") or (cmd=="+talk") then
else
index = random(1,getn(idleanswers))
answer, x = gsub(idleanswers[index], "%b[]", user.sName)
SendToAll(Bot, answer)
a = 0
end
else
if a == 2 then
StartTimer()
end
end
end
end

function OnTimer()
index = random(1,getn(idlequestions))
SendToAll(Bot, idlequestions[index])
a=1  
end
checkout http://wwhublist.com/index.php for my World Wide HubList project!

plop

this is used 2 proces mainchat events, "if( strsub(data, 1, 1) == "<" ) then".
and this for pm, " if(strsub(data, 1, 4) == "$To:") then".

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

b_w_johan

thnx plop ill try if it will work

 :))  :))  :))  :))  :))  :))  :))  :))  :))
checkout http://wwhublist.com/index.php for my World Wide HubList project!

SMF spam blocked by CleanTalk