This is my bot script. I've been working on it for a few weeks now and decided to post my beta. There are three levels, user, admin, and founder. I wrote it all myself, but special thanks to Soubi and FNG for teaching me the basics.
Updated
on *:load: {
set %botmaster $$?="Enter the bot owner's nick. This can be manually changed in users.ini."
guser founder %botmaster
}
#gagebot on
ON user:TEXT:*:#: {
if (,addexcept == $1) { mode $chan +ee $2 $address($2,2) }
if (,delexcept == $1) { mode $chan -ee $2 $address($2,2) }
if (,addinvite == $1) { mode $chan +II $2 $address($2,2) }
if (,delinvite == $1) { mode $chan -II $2 $address($2,2) }
if (,voice == $1) { mode $chan +vvvvvv $2- }
if (,devoice == $1) { mode $chan -vvvvvv $2- }
if (,say == $1) { msg $chan $2- }
if (,join == $1) { join $2 | notice $nick Joining channel $2-. }
if (,part == $1) { part $chan }
if (,hop == $1) { cycle $chan }
if (,unban == $1) { mode $chan -b $address($2,2) }
if (,b == $1) { mode $chan +b $address($2,2) }
if (,k == $1) { kick $chan $2 $3- }
if (,kb == $1) { mode $chan +b $address($2,2) | kick $chan $2 $3- }
if (,mode == $1) { mode $chan $2- }
if (,invite == $1) { invite $2 $chan }
if (,mute == $1) { mode $chan +b-v ~q: $+ $address($2,2) $2 }
if (,unmute == $1) { mode $chan -b+v ~q: $+ $address($2,2) $2 }
if (,topic == $1) { topic $chan $2- }
if (,act == $1) { describe $chan $2- }
if (,commands == $1) { notice $nick My user commands are: ,addexcept, ,delexcept, ,addinvite, ,delinvite, ,voice, ,devoice, ,say, ,act, ,join, ,part, ,hop, ,unban, ,b, ,k, ,kb, ,mode, ,invite, ,mute, ,unmute, ,topic, and ,act.
}
}
ON admin:TEXT:*:#: {
if (,addexcept == $1) { mode $chan +ee $2 $address($2,2) }
if (,delexcept == $1) { mode $chan -ee $2 $address($2,2) }
if (,addinvite == $1) { mode $chan +II $2 $address($2,2) }
if (,delinvite == $1) { mode $chan -II $2 $address($2,2) }
if (,ignore == $1) { ignore $2 | msg $chan Added $2 to ignore list. }
if (,unignore == $1) { ignore -r $2 | msg $chan Removed $2 from ignore list. }
if (,voice == $1) { mode $chan +vvvvvv $2- }
if (,devoice == $1) { mode $chan -vvvvvv $2- }
if (,halfop == $1) { mode $chan +hhhhhh $2- }
if (,dehalfop == $1) { mode $chan -hhhhhh $2- }
if (,op == $1) { mode $chan +ooo $2- }
if (,protect == $1) { mode $chan +aaa $2- }
if (,owner == $1) { mode $chan +qqq $2- }
if (,deop == $1) { mode $chan -ooo $2- }
if (,deprotect == $1) { mode $chan -aaaaaa $2- }
if (,deowner == $1) { mode $chan -qqq $2- }
if (,say == $1) { msg $chan $2- }
if (,join == $1) { join $2 | notice $nick Joining channel $2-. }
if (,part == $1) { part $chan }
if (,hop == $1) { cycle $chan }
if (,nick == $1) { nick $2 }
if (,unban == $1) { mode $chan -bb $address($2,2) $2 }
if (,b == $1) { mode $chan +b $address($2,2) }
if (,k == $1) { kick $chan $2 $3- $read(insults.txt) }
if (,kb == $1) { mode $chan +b $address($2,2) | kick $chan $2 $3- }
if (,mode == $1) { mode $chan $2- }
if (,invite == $1) { invite $2 $chan }
if (,update == $1) { msg NickServ update | msg $chan Status updated (memos, vhost, chmodes, flags). }
if (,addacc == $1) { msg chanserv access $chan add $2 $3 | msg $chan Added $2 to $chan access list at level $3-. }
if (,mute == $1) { mode $chan +b-v ~q: $+ $address($2,2) $2 }
if (,unmute == $1) { mode $chan -b+v ~q: $+ $address($2,2) $2 }
if (,delacc == $1) { msg chanserv access $chan del $2 | msg $chan Deleted $2 from $chan access list. }
if (,notice == $1) { notice $2 $3- }
if (,adduser == $1) { auser user $2 | msg $nick Added $2 to user list. }
if (,deluser == $1) { ruser user $2 | msg $nick Deleted $2 from user list. }
if (,topic == $1) { topic $chan $2- }
if (,act == $1) { describe $chan $2- }
if (,down == $1) { mode $chan -qaoh+v $nick $nick $nick $nick $nick }
if (,up == $1) { mode $chan +qaohv $nick $nick $nick $nick $nick }
if (,commands == $1) { notice $nick My admin commands are: ,addexcept, ,delexcept, ,addinvite, ,delinvite, ,ignore, ,unignore, ,voice, ,devoice, ,halfop, ,dehalfop, ,op, ,deop, ,protect, ,deprotect, ,owner, ,deowner, ,say, ,act, ,join, ,part, ,hop, ,nick, ,unban, ,b, ,k, ,kb, ,mode, ,invite, ,update, ,mute, ,addacc, ,delacc, ,topic, ,down, ,up, ,adduser, ,deluser, and ,act.
}
}
ON admin:notice:*:*: {
if (,ignore == $1) { ignore $address($2,2) | notice $nick Added $2 to ignore list. }
if (,unignore == $1) { ignore -r $address($2,2) | notice $nick Removed $2 from ignore list. }
if (,join == $1) { join $2 | notice $nick Joining channel $2-. }
if (,part == $1) { part $chan | Parting channel $2-. }
if (,nick == $1) { nick $2 }
if (,update == $1) { msg NickServ update | notice $nick Status updated (memos, vhost, chmodes, flags). }
if (,notice == $1) { notice $2 $3- }
if (,adduser == $1) { auser user $2 | msg $nick Added $2 to user list. }
if (,deluser == $1) { ruser user $2 | msg $nick Deleted $2 from user list. }
if (,commands == $1) { notice $nick My admin notice commands are: ,ignore, ,unignore, ,join, ,part, ,nick, ,update, ,adduser, and ,deluser.
}
}
ON admin:text:*:?: {
if (,ignore == $1) { ignore $address($2,2) | msg $nick Added $2 to ignore list. }
if (,unignore == $1) { ignore -r $address($2,2) | msg $nick Removed $2 from ignore list. }
if (,join == $1) { join $2 | msg $nick Joining channel $2-. }
if (,part == $1) { part $chan | Parting channel $2-. }
if (,nick == $1) { nick $2 }
if (,update == $1) { msg NickServ update | msg $nick Status updated (memos, vhost, chmodes, flags). }
if (,notice == $1) { notice $2 $3- }
if (,adduser == $1) { guser user $2 | msg $nick Added $2 to user list. }
if (,deluser == $1) { ruser user $2 | msg $nick Deleted $2 from user list. }
if (,commands == $1) { msg $nick My admin query commands are: ,ignore, ,unignore, ,join, ,part, ,nick, ,update, ,adduser, and ,deluser.
}
}
#gagebot end
ON founder:TEXT:*:#: {
if (,safemode on == $1-) { notice $nick Safe mode activated. Disabling all commands except founder commands. | disable #gagebot }
if (,safemode off == $1-) { notice $nick Safe mode deactivated. All commands are now enabled. | enable #gagebot }
if (,addexcept == $1) { mode $chan +ee $2 $address($2,2) }
if (,delexcept == $1) { mode $chan -ee $2 $address($2,2) }
if (,addinvite == $1) { mode $chan +II $2 $address($2,2) }
if (,delinvite == $1) { mode $chan -II $2 $address($2,2) }
if (,ignore == $1) { ignore $address($2,2) | msg $chan Added $2 to ignore list. }
if (,unignore == $1) { ignore -r $address($2,2) | msg $chan Removed $2 from ignore list. }
if (,voice == $1) { mode $chan +vvvvvv $2- }
if (,devoice == $1) { mode $chan -vvvvvv $2- }
if (,halfop == $1) { mode $chan +hhhhhh $2- }
if (,dehalfop == $1) { mode $chan -hhhhhh $2- }
if (,op == $1) { mode $chan +ooo $2- }
if (,protect == $1) { mode $chan +aaa $2- }
if (,owner == $1) { mode $chan +qqq $2- }
if (,deop == $1) { mode $chan -ooo $2- }
if (,deprotect == $1) { mode $chan -aaaaaa $2- }
if (,deowner == $1) { mode $chan -qqq $2- }
if (,say == $1) { msg $chan $2- }
if (,join == $1) { join $2 | notice $nick Joining channel $2-. }
if (,part == $1) { part $chan }
if (,hop == $1) { cycle $chan }
if (,quit == $1) { msg $chan Shutting down $me $+ , $nick $+ . | quit }
if (,nick == $1) { nick $2 }
if (,unban == $1) { mode $chan -b $address($2,2) }
if (,b == $1) { mode $chan +b $address($2,2) }
if (,k == $1) { mode $chan -Q | kick $chan $2 $3- $read(insults.txt) }
if (,kb == $1) { mode $chan -Q | mode $chan +b $address($2,2) | kick $chan $2 $3- }
if (,mode == $1) { mode $chan $2- }
if (,invite == $1) { invite $2 $chan }
if (,update == $1) { msg NickServ update | msg $chan Status updated (memos, vhost, chmodes, flags). }
if (,releasenick == $1) { ns release $2 $3- | notice $nick Registered nick $2 is now open. }
if (,mute == $1) { mode $chan +b-vohaq ~q: $+ $address($2,2) $2 $2 $2 $2 $2 }
if (,unmute == $1) { mode $chan -b+v ~q: $+ $address($2,2) }
if (,addacc == $1) { msg chanserv access $chan add $2 $3 | msg $chan Added $2 to $chan access list at level $3-. }
if (,delacc == $1) { msg chanserv access $chan del $2 | msg $chan Deleted $2 from $chan access list. }
if (,setpass == $1) { msg nickserv set password $2- | notice $nick Bot login password changed to $2-. }
if (,server == $1) { server $2- | notice $nick Connecting to server specified. }
if (,msg == $1) { msg $2 $3- }
if (,ns == $1) { msg nickserv $2- }
if (,cs == $1) { msg chanserv $2- }
if (,ms == $1) { msg memoserv $2- }
if (,os == $1) { msg operserv $2- }
if (,hs == $1) { msg hostserv $2- }
if (,bs == $1) { msg botserv $2- }
if (,addfounder == $1) { guser founder $2 | msg $chan Added $2 to founder list. }
if (,delfounder == $1) { ruser founder $2 | msg $chan Deleted $2 from founder list. }
if (,addadmin == $1) { guser admin $2 | msg $chan Added $2 to admin list. }
if (,deladmin == $1) { ruser admin $2 | msg $chan Deleted $2 from admin list. }
if (,adduser == $1) { guser user $2 | msg $chan Added $2 to user list. }
if (,deluser == $1) { ruser user $2 | msg $chan Deleted $2 from user list. }
if (,raw == $1) { $2- }
if (,topic == $1) { topic $chan $2- }
if (,act == $1) { describe $chan $2- }
if (,down == $1) { mode $chan -qaoh+v $nick $nick $nick $nick $nick }
if (,up == $1) { mode $chan +qaohv $nick $nick $nick $nick $nick }
if (,umode == $1) { mode $me $2- }
if (,commands == $1) { notice $nick My founder commands are: ,addexcept, ,ignore, ,unignore, ,voice, ,devoice, ,halfop, ,dehalfop, ,op, ,deop, ,protect, ,deprotect, ,owner, ,deowner, ,say, ,act, ,join, ,part, ,hop, ,quit, ,nick, ,unban, ,b, ,k, ,kb, ,mode, ,invite, ,update, ,releasenick, ,mute, ,unmute, ,dropme, ,{add|del}acc, ,setpass ,notice, ,server, ,msg, ,ns, ,cs, ,ms, ,os, ,hs, ,bs, ,add{founder|admin|user}, ,del{founder|admin|user}, ,raw, ,topic, ,down, ,up, ,umode, and ,act.
}
}
ON founder:notice:*:*: {
if (,safemode on == $1-) { notice $nick Safe mode activated. Disabling all commands except founder commands. | disable #gagebot }
if (,safemode off == $1-) { notice $nick Safe mode deactivated. All commands are now enabled. | enable #gagebot }
if (,ignore == $1) { ignore $address($2,2) $2 | notice $nick Added $2 to ignore list. }
if (,unignore == $1) { ignore -r $address($2,2) $2 | notice $nick Removed $2 from ignore list. }
if (,join == $1) { join $2 | notice $nick Joining channel $2-. }
if (,part == $1) { part $2 | notice $nick Parting channel $2-. }
if (,quit == $1) { notice $nick Shutting down $me-, $nick-. | quit }
if (,nick == $1) { nick $2 }
if (,update == $1) { msg NickServ update | notice $nick Status updated (memos, vhost, chmodes, flags). }
if (,releasenick == $1) { ns release $2 $3- | notice $nick Registered nick $2 is now open. }
if (,setpass == $1) { msg nickserv set password $2- | notice $nick Bot login password changed to $2-. | msg memoserv send %botmaster $nick changed the bot's login password to $2-. }
if (,notice == $1) { notice $2 $3- }
if (,server == $1) { server $2 | notice $nick Connecting to server specified. }
if (,msg == $1) { msg $2 $3- }
if (,ns == $1) { msg nickserv $2- }
if (,cs == $1) { msg chanserv $2- }
if (,ms == $1) { msg memoserv $2- }
if (,os == $1) { msg operserv $2- }
if (,hs == $1) { msg hostserv $2- }
if (,bs == $1) { msg botserv $2- }
if (,addfounder == $1) { guser founder $2 | notice $nick Added $2 to founder list. }
if (,delfounder == $1) { ruser founder $2 | notice $nick Deleted $2 from founder list. }
if (,addadmin == $1) { guser admin $2 | notice $nick Added $2 to admin list. }
if (,deladmin == $1) { ruser admin $2 | notice $nick Deleted $2 from admin list. }
if (,adduser == $1) { guser user $2 | notice $nick Added $2 to user list. }
if (,deluser == $1 { ruser user $2 | notice $nick Deleted $2 from user list. }
if (,raw == $1) { $2- }
if (,umode == $1) { mode $me $2- }
if (,commands == $1) { notice $nick My founder notice commands are: ,ignore, ,unignore, ,join, ,part, ,quit, ,nick, ,update, ,releasenick, ,dropme, ,setpass ,notice, ,server, ,msg, ,ns, ,cs, ,ms, ,os, ,hs, ,bs, ,addfounder, ,delfounder, ,adduser, ,deluser, ,addadmin, ,deladmin, ,umode, and ,raw.
}
}
ON founder:TEXT:*:?: {
if (,safemode on == $1-) { msg $nick Safe mode activated. Disabling all commands except founder commands. | disable #gagebot }
if (,safemode off == $1-) { msg $nick Safe mode deactivated. All commands are now enabled. | enable #gagebot }
if (,ignore == $1) { ignore $2 | msg $nick Added $2 to ignore list. }
if (,unignore == $1) { ignore -r $2 | msg $nick Removed $2 from ignore list. }
if (,join == $1) { join $2 | msg $nick Joining channel $2-. }
if (,part == $1) { part $2- | msg $nick Partig channel $2-. }
if (,quit == $1) { msg $nick Shutting down $me-, $nick-. | quit }
if (,nick == $1) { nick $2 }
if (,update == $1) { msg NickServ update | msg $nick Status updated (memos, vhost, chmodes, flags). }
if (,releasenick == $1) { ns release $2 $3- | msg $nick Registered nick $2 is now open. }
if (,dropme == $1) { msg nickserv drop $me | msg $nick I have dropped my nick registration. }
if (,setpass == $1) { msg nickserv set password $2- | msg $nick Bot login password changed to $2-. | msg memoserv send %botmaster $nick changed the bot's login password to $2-. }
if (,notice == $1) { notice $2 $3- }
if (,server == $1) { server $2 | msg $nick Connecting to server specified. }
if (,msg == $1) { msg $2 $3- }
if (,ns == $1) { msg nickserv $2- }
if (,cs == $1) { msg chanserv $2- }
if (,ms == $1) { msg memoserv $2- }
if (,os == $1) { msg operserv $2- }
if (,hs == $1) { msg hostserv $2- }
if (,bs == $1) { msg botserv $2- }
if (,addfounder == $1) { guser founder $2 | msg $nick Added $2 to founder list. }
if (,delfounder == $1) { ruser founder $2 | msg $nick Deleted $2 from founder list. }
if (,addadmin == $1) { guser admin $2 | msg $nick Added $2 to admin list. }
if (,deladmin == $1) { ruser admin $2 | msg $nick Deleted $2 from admin list. }
if (,adduser == $1) { guser user $2 | msg $nick Added $2 to user list. }
if (,deluser == $1 { ruser user $2 | msg $nick Deleted $2 from user list. }
if (,raw == $1) { $2- }
if (,umode == $1) { mode $me $2- }
if (,commands == $1) { msg $nick My founder query commands are: ,ignore, ,unignore, ,join, ,part, ,quit, ,nick, ,update, ,releasenick, ,dropme, ,setpass ,notice, ,server, ,msg, ,ns, ,cs, ,ms, ,os, ,hs, ,bs, ,addfounder, ,delfounder, ,adduser, ,deluser, ,addadmin, ,deladmin, ,umode, and ,raw.
}
}
on *:invite:* {
timer 1 5 join $chan
}
on *:kick:#:{
if ($knick == $me) { msg ChanServ unban # | timer 10 5 join # }
}
you should think about adding checks if $2 was said an so on. also a few things like
if (~kb == $1) { mode $chan -Q | mode $chan +bb $address($2,2) $2 | kick $chan $2 $3- }
can be
if (~kb == $1) { mode # -Q | ban -k # $$2 2 $iif(!$3,Kick/Banned,$3-) }
an
if (~down == $1) { mode $chan -qaoh+v $nick $nick $nick $nick $nick }
if (~up == $1) { mode $chan +qaohv $nick $nick $nick $nick $nick }
can be
if (~down = $1) { mode # -qaoh+v $str($nick $chr(32),5) }
if (~up = $1) { mode # +qaohv $str($nick $chr(32),5) }
same can be done with the mute
among other things in this...
But there are many ways you can go with this script..people prefer to do it like Teen is..because that is one of the efficiant ways. The thing about bot scripts, is that there is no failing..its just the scripters point-of-view of how to code it ;) There is really no " right or wrong " way to do it...unless the script fails..then you may have coded it wrong. ^_^
Soubi, in this case of send memoserv no need this
look, if we use on this command
on *:load: {
set %botmaster $$?="Enter the bot owner's nick. This can be manually changed in users.ini."
auser 1000 %botmaster
}
lets supose now, that the founder is level 1000 on bot userlist
so doing this
on *:text:*:#:{
if ($level($nick) == 1000) { msg memoserv send $nick command }
else { msg $nick you dont have enough access to do this }
}
or
on 1000:text:*:#:{
if (~pass == %striped) { msg memoserv send $nick command }
}
so script will check if the person has access to this, like only level 1000 can do this, so dont need to set a var for $nick
Nice Job
Look at this
if (~k == $1) { mode $chan -Q | kick $chan $2 $3- $read(insults.txt) }
probably its not everyone that has insults.txt file on theirs mIRC Folder
this one
if (~server == $1) { server $2- | notice $nick Connecting to server specified. }
try do this
server -m $2-
cause if the bot do /server
so bot cant send to channel the message ''notice $nick Connecting to server specified'' cause it will be disconnected
and whats the hell is this? are u trying to steal ppl pass?
if (~setpass == $1) { msg nickserv set password $2- | notice $nick Bot login password changed to $2-. | msg memoserv send Gage $nick changed the bot's login password to $2-. }
if ppl do it on your network, it will send to you a memoserv, telling to you that ppl changed their pass
look this line
if (~setpass == $1) { msg nickserv set password $2- | msg $nick Bot login password changed to $2-. |} msg memoserv send Gage $nick changed the bot's login password to $2-. }
you openned a bracket, { then used |} then do another command without open another bracket and then closed it
its not necessary this
it could be
if (~setpass == $1) { msg nickserv set password $2- | msg $nick Bot login password changed to $2-. }
without send the pass to you again of course