--Change these Variables
--Script By Blam
user = "Enter Here"
pass = "Enter Here"
blacklist = {
"Name1",
"Name2",
--add more here. (aka add ' "Blam", ' )
}
badwords = {
"shit",
"fuck",
"balls",
}
check = 0
lastplayer = ""
dofile("Scripts/BaseBot.lua")
Connect("66.230.224.106",20232)
if(user ~= "Enter Here") then
Login(user,pass)
Say(".:SBot Online:.")
Spec(" - TATE")
else
print("Please Enter a Username and Password for the bot")
end
i = 0
form1 = form()
form1.Text = "Sbot Disconnector"
button1 = button()
button1.Text = "Disconnect"
button1.Dock = dockStyle.Fill
button1.Click:Add(function() timer1.Enabled = false; Disconnect(); form1:Close() end)
form1.Controls:Add(button1)
form1:Show()
--
timer1 = timer()
timer1.Interval = 5000
timer1.Enabled = true
timer1.Tick:Add(
function()
i = i + 1
--Say("Test" .. i)
Send("PING")
end
)
function LineChanged(Line)
if(Line:sub(0,3) == "SAY") then
math.randomseed( os.time() )
math.random(); math.random(); math.random();
for i = 0,math.random(1,10) do
math.random();
end
A = Line:find(";")
print("> " ..Line:sub(A+1))
B = Line:find(" ",A+1)
if(B ~= nil) then
Chat = Line:sub(B+1)
Player = Line:sub(A+1,B-2)
Chatl = Chat:lower()
Playerl = Player:lower()
logfile = io.open("Log.txt","a+")
if(logfile == nil) then logfile = io.open("Log.txt","w") end
logfile:write(os.date("%c") .. " " .. Player .. ": " .. Chat .. "\n")
logfile:close()
if(Chat == "!go") then
check = 1
end
for i = 1,#badwords do
curword = string.lower(badwords[i])
if(Chatl:find(curword) ~= nil) then
Send("mute " .. Player)
--Send("kick " .. Player)
end
end
end
elseif(Line:sub(0,4) == "BOUT") then
if(check == 1) then
a = 0
for word in string.gmatch(Line, "%w+") do a = a + 1; if (a == 10) then player = word end end
if(player ~= "nil") then -- lastplayer ~= player) then
for i = 1,#blacklist do
if(blacklist[i] == player) then
Send("kick " .. player .. " you are banned.")
print("Attempted to kick: " .. player)
--lastplayer = player
end
end
end
end
elseif(Line:sub(0,4) == "SPEC") then
if(check == 1) then
for word in string.gmatch(Line:sub(9), "%w+") do
player = word
for i = 1,#blacklist do
if(blacklist[i] == player) then
Send("kick " .. player .. " you are banned.")
print("Attempted to kick: " .. player)
end
end
end
end
end
end
Update: Added curseword muter/kicker. :P