Bot Invincibility, it will reconnect if you were ghosted or killed, but will do so after five seconds to avoid throttle kill. Also it will unban if you were banned, and kick if you were kicked. Keeps bans too. Nick preservation system is in here too. It'll activate on connect, and will definetly help against takeovers. Also has an annoying message system ;D use it to annoy all those ****ers in there ;). All code tested and functional.
Edit: Final debugging done, v2 is released. Enjoy all of you! :)
Enjoy!
-Z
on *:load: {
set %botowner $?="Bot Owner Nick?"
set %channel $?="What channel do you want it on?"
set %botnick $?="What is the nick of the bot?"
set %botpass $?="Nick Password?"
echo -a 4This script has been made to provide full invincibility for your bot. This is v2. Thanks to people who have helped! -Swat-
}
alias protection {
if ($1 == $null) {
echo -a 4Welcome to Protection-Script. Made by -Swat- All systems ready. Please type /protection joinmessage, /protection nick, and /protection topic.
echo -a 4Message system goes with "/message".
}
elseif ($1 == joinmessage) {
echo -a 4Your Join Message has been set to: %protectjoin -Swat-
}
elseif ($1 == nick) {
set %nicktoprotect $?="What will your standard nick be?"
set %nickpassword $?="And it's pass is?"
echo -a 4Nick Protection set for %nicktoprotect. -Swat-
}
elseif ($1 == topic) {
set %topicmessage $?="Topic to hold?"
echo -a 4 Topic held at: %topicmessage 4-Swat-
}
}
on *:TOPIC:#: {
cs topic $chan %topicmessage
}
on !@*:BAN:#: {
if ($banmask iswm $ial($me)) {
cs unban # $v1
mode # -b $2
ban # $nick 2
cs kick # $nick Owned by:
}
}
on !*:JOIN:#: {
/msg $chan Hi, I'm $me . At your service and invincible.
/msg $nick You betta not mess with meh, 'cause that'll be the last thing you do in this channel.
}
on *:connect: {
if ($me == %botnick) {
/msg nickserv identify %botpass
/timer 1 5 cs unban %channel
/timer 2 5 join %channel
}
elseif ($me != %botnick) {
/ns GHOST %botnick %botpass
/nick %botnick
/msg nickserv identify %botpass
if ($me == %botnick) { HALT }
else {
/timer 1 30 /nick %botnick
/timer 2 35 /msg nickserv identify %botpass
/timer 3 40 /join %channel
}
}
}
on @*:unban:#: {
if ($nick != $me) {
mode $chan +bbb $nick $wildsite $2 | kick # $nick
}
}
on *:KICK:#: {
if ($knick == $me) {
cs unban #
join #
kick # $nick
}
}
on *:Disconnect: {
/timer 1 5 server $server
}
alias message {
set %msgchan $?="Channel?"
set %message $?="Message?"
join %msgchan
msg %msgchan %message
part %msgchan
unset %msg*
}
hey dude, i just take a look on it, some advices...
look dont need to do a condition of ''if $nick == me { halt } else { command }
on *:JOIN:#: {
if ($nick != $me) {
/msg $chan Hi, I'm $me. At your service and invincible.
/msg $nick You betta not mess with meh, 'cause that'll be the last thing you do in this channel.
}
}
it will check, if nick is different from your, if yes, do the command, if not, command will not be send
by the way, look at this
on *:UNBAN:#: {
if ($nick == $me) || (<YOURNICK> isin $nick) { HALT }
else {
mode $chan +b $2
ban $chan $address
ban $chan $nick
kick $chan $nick
}
}
you can short this
on @*:unban:#:{
if ($nick != $me) {
mode $chan +bbb $2 $nick $wildsite | kick # $nick
;; for those who will say, yes i will not use ban -k
}
}
and on kick event...
on *:KICK:#: {
if ($knick == $me) {
cs unban $chan
join $chan
/timer 1 1 /join $chan
/timer 2 2 /join $chan
/timer 3 3 /join $chan
/timer 4 4 /join $chan
/timer 5 5 /join $chan
}
}
well, many timers on it, by the way, how could u join on channel, if the channel is with mode +i ? so its supose that you need a
var %x = $chan
cs invite %x ( for networks who has chanserv command invite )
look
on *:BAN:#: {
if ($nick == $me) || (<YOURNICK> isin $nick) { HALT }
else {
cs unban $chan $me
ban $chan $address
ban $chan $nick
cs kick $chan $nick --> Owned by:
/timer 1 5 /cs unban #poker
}
}
you need something to ''check'' if you're opped or not on channel, and then, it will not check if your address its not on banmask
and what about this?
/timer 1 5 /cs unban #poker
this is just a simple example
on @*:BAN:#: {
if (($nick != $me) && ($+(*,$banmask,*) iswm $ial($me))) {
mode $chan -ob+bb $nick $banmask $nick $wildsite | kick # $nick owned by $me
}
}
you can modify it by urself
Your snippet needs some improvement. I don't know what to begin with it. For one thing, the ban event, you should do it as:> on !@:BAN:#: {
if ($banmask iswm $ial($me)) {
cs unban # $v1
ban # $nick 2
cs kick # $nick Owned by:
;I don't know why you place #poker there. Do you expect people have a channel called #poker?
}You need to make sure the client that runs the code is opped by adhering the @ to the event. The number 2 means the offender's type 2 address will be banned: !*@OffenderHost if not specified, type 6 will be used.
elseif ($me !== ) {
/ns GHOST
Instead of people needing to alter the script, you should use input on load.
on *:load: {
set %invincinick $?="Enter your nick here"
set %invincipass $?="Enter pass for the nick"
}
It saves multiple alterations directly into a script, and makes it easier for people to use.
elseif ($me !== %invincinick) {
/ns GHOST %invincinick %invincipass
etc etc.
Keep learning, it does get easier.