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
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
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
thnx plop ill try if it will work
:)) :)) :)) :)) :)) :)) :)) :)) :))