mIRC Bot

By iAdam on Jul 14, 2011

Cool Bot Script! CHANNEL PROTECTION COMING SOON! NEW VERSION RELEASED (And Quick As Well)

  1. Its Simplicity. Just Load the Script, Fill in the Info, and make the bot an owner (If Available) and your almost set! Just type !ownercmds for the owner commands.
  2. Its Addons. I don't make any addons my own if someone else made it and I didn't edit it. I used Shampi's GuestBook Script, Mass Hug Script Based off of Mass Slap Script by Lindrian, and more features soon. This is Version 1.0 of the Bot. If you want anything to make it cooler, just comment here.

REQUEST: If you like this bot script, please join the FlameChat IRC Network. /server irc.flamechat.com. Thanks!

  1. Correct any mistakes in this Source Code. This is my FIRST Heavily Done Script, and to be honest, I made most of this, and I am a novice scripter!

INFORMATION: Change the Names GigaOptic, and iAdam, Adam, and others to your liking. For the variables, the Master var is %Master, Bot Name is $me, and others is just the nick.
BUGS FIXED NEXT RELEASE WILL HAVE EVEN MORE FEATURES!
Thanks!
iAdam

--iAdam--

##############################################################################################
#####Adam's Bot Script######ANYTHING ELSE YOU WANT ME TO INCORPORATE? COMMENT ON THIS SCRIPT!#
##############################################################################################  #Official Bot Script of FlameChat. Irc.flamechat.com#
on *:load: {
  echo -a 3,4Thank you for using GigaOptic's Bot Script for mIRC!
  echo -a 1,4Please be wary, I need Master Access in this room for me to use certain commands. Type !Masteronlycommands for more information on this subject
  set %password $$?="Enter the Bot's Password. This will be used for special commands dealing with the password."
  set %Master $$?="Enter the Nick that owns this bot"
  /auser Master %Master
}
#Greet
on Master:join:#: {
  if ($nick != $me) {
    if ($me isop $chan) {
      if ($nick isvoice $chan) { noop }
      else {
        mode $chan +v $nick
      }
    }
    timer 1 1 msg $chan 4,2 Yay! My Master is back! His name is %Master | timer 1 2 describe $chan bows down to %Master 's feet. 
  }
}

#GUESTBOOK

on *:TEXT:!guestbook:#: {
  .timer1 1 1 notice $nick Guestbook v1.2 by ShAmPi
  .timer2 1 2 notice $nick 12-----------------------------------------------------------
  .timer3 1 3 notice $nick 7With this you can leave a message into the guestbook
  .timer4 1 4 notice $nick 7Do NOT abuse this script!
  .timer5 1 5 notice $nick 7The triggers should be typed in the channel the bot is in.
  .timer6 1 6 notice $nick 7The triggers are shown below. Have fun
  .timer7 1 7 notice $nick 12-----------------------------------------------------------
  .timer8 1 8 notice $nick 7The commands are:
  .timer9 1 9 notice $nick 4!writegb <message> - To leave a message in the guestbook
  .timer10 1 9 notice $nick 4!viewgb - to view the guestbook messages
  .timer11 1 11 notice $nick 12-----------------------------------------------------------
}

on *:text:!viewgb:#:{
  set %guestbook.c 1
  /filter -c " $+ $mircdirguest.txt $+ " c:\lines.txt * $+ *
  set %guestbook.total $filtered
  while (%guestbook.c <= %guestbook.total) {
    set %guestbook.msg $read($mircdirguest.txt, %guestbook.c)
    set %gb.nick $gettok(%guestbook.msg,2,32)
    set %gb.time $gettok(%guestbook.msg,1,32)
    set %gb.hour $asctime(%gb.time , HH:nn:ss)
    set %gb.date $asctime(%gb.time , dd/mm/yyyy)
    set %gb.msg $gettok(%guestbook.msg,3-,32)
    .timermsgguestbooknick $+ %guestbook.c $+ $nick 1 $calc( %guestbook.c * 2) .msg $nick 7[ $+ %gb.nick $+ 7]-[ $+ %gb.hour %gb.date $+ ]-7[ $+ %gb.msg $+ 7]
    inc %guestbook.c
  }
}

on *:text:!writegb*:#:{
  if ($2- != $null) {
    /write -a " $+ $mircdirguest.txt $+ " $ctime $nick $2-
    .notice $nick Your message ( $+ $2- $+ )
    .notice $nick is succesfully submitted into the list!
  }
  else {
    .notice $nick Please Fill in Your Message!
  }
}

#KICKTHATASSBAN

on @*:BAN:#: { if ($nick == $me) { .auser nounban $banmask } }
on @*:UNban:#: { if ($nick == $me) { .ruser nounban $banmask | return } | if ($level($banmask) == nounban) && ($nick != $me) { raw -q mode # +b-k $banmask Secured.Ban } }
on *:EXIT: { .rlevel -r nounban }

#Huggie Wuggie
#####################################################################################################
#                                                                                                   #
#        Mass Hug Script Based off of Mass Slap Script by Lindrian                                  #
#                                                                                                   #
#####################################################################################################
#                                                                                                   #
#  TODO's: Add a timer so you don't /QUIT the network or get banned, or get banned from a channel.  #
#                                                                                                   #
#####################################################################################################

menu channel {
  Mass Hug!
  .$iif($group(#Hug) == on,Hug off,Hug on) : $iif($group(#Hug) == on,.disable,.enable) #Hug
  .$iif($group(#Hug) == off,$style(2) Hug all,Hug all) : Hug
}
#Hug on
alias Hug {
  if $($+(%,sent,.,$chan),2) { return }
  beep 2 | var %warn $input(There are $nick($active,0) user(s) in the channel $+ $chr(44) are you sure you wish to continue?,yv,PLEASE READ ME BEFORE YOU DO ANYTHING!!)
  if (%warn == $yes) {
    var %x = 1, %y = $nick($active,0)
    while (%x <= %y) {
      if (!$istok($me,$nick($active,%x),32)) {
        $+(.timer,.,$chan,.,%x) 1 %x describe # hugs $nick($active,%x)
      }
      inc %x
    }
    set -u10 $+(%,sent,.,$chan) 1
  }
}
#Hug end
#MASSTEST
alias MassDevoice {
  if $($+(%,sent,.,$chan),2) { return }
  beep 2 | var %warn $input(There are $nick($active,0) user(s) in the channel $+ $chr(44) are you sure you wish to continue?,yv,PLEASE READ ME BEFORE YOU DO ANYTHING!!)
  if (%warn == $yes) {
    var %x = 1, %y = $nick($active,0)
    while (%x <= %y) {
      if (!$istok($me,$nick($active,%x),32)) {
        $+(.timer,.,$chan,.,%x) 1 %x mode # -v $nick($active,%x)
      }
      inc %x
    }
    set -u10 $+(%,sent,.,$chan) 1
  }
}

alias MassVoice {
  if $($+(%,sent,.,$chan),2) { return }
  beep 2 | var %warn $input(There are $nick($active,0) user(s) in the channel $+ $chr(44) are you sure you wish to continue?,yv,PLEASE READ ME BEFORE YOU DO ANYTHING!!)
  if (%warn == $yes) {
    var %x = 1, %y = $nick($active,0)
    while (%x <= %y) {
      if (!$istok($me,$nick($active,%x),32)) {
        $+(.timer,.,$chan,.,%x) 1 %x mode # +v $nick($active,%x)
      }
      inc %x
    }
    set -u10 $+(%,sent,.,$chan) 1
  }
}

;Just type /massinvite #target #where
;Example: /massinvite #Chan1 #chan2 will mass invite #chan1 to #chan2.

alias massinvite {
  var %x $nick($1,0)
  while (%x) {
    invite $nick($1,%x) $2
    dec %x
  }
}

#Alerts
ON *:TEXT:*!ns*:#: { msg $chan $chan isn't a place for spamming. 0,4Stop now. }
ON *:TEXT:*!nd*:#: { msg $chan You do not disrespect Ops, or any staff. 0,4Stop now. }
ON *:TEXT:*!nt*:#: { msg $chan You do not Troll in here. Lol, just joking. Actually don't troll! I am 10! xP.0,4Stop now. }
#Greet Events
#Topic Changer

ON *:TEXT:!topic *:*: { 
  if ($chan) { 
    topic $chan $2- 
  } 
  else { 
    topic $2 $3- 
  } 
}

#BotScript on

on User:TEXT:*:#: {
  Tokenize 32 $Strip($1-)
  if ($1 == !k) { kick $chan $2 $3- }
  if ($1 == !kb) { kick $chan $2 $3- | mode $chan +b $2 }
  if ($1 == !usercmds) { notice $nick 4,1 This Bot's CURRENT USERCommands are: !k USERNAME REASON (or no reason at all), !kb USERNAME REASON (or no reason), !usercmds (User Commands), !invte USERNAME (Invite to Channel), !accessa USERNAME LEVEL (ChanServ Access Adder), !accessr USERNAME (Remove nick from access list), !deoptemp (Deop a Temporary Op), and !optemp (Make someone an op until they part, quit, or leave). }
  if ($1 == !invite) { invite $2 $chan }
  if ($1 == !accessa $+) { if ($nick isop $chan) cs access $chan add $2 $3 | notice $2 Access level for $2 changed to $3 | notice $2 You can now press /ns update to update your access. }
  if ($1 == !accessr $+) { if ($nick isop $chan) cs access $chan del $2 | notice $2 Access level for $2 changed to $3. You have been removed from the access list. | notice $2 You can now type /ns update }
  if ($1 == !optemp $+) { mode $chan +o $2 }
  if ($1 == !deoptemp $+) { mode $chan -o $2 }
  if ($1 == !pwn $2) { timer 1 1 Time to get pwned $2 ! | timer 1 2 kick $2 mode $chan +b $2 -ku300 | timer 1 3 notice $2 You will be unpwned in two minutes! }
  if ($1 == I am sorry $me) { timer 1 1 msg $chan It's ok. | timer 1 2 describe $chan Hugs %Master }
  if ($1 == !Mastertemp $+) { mode $chan +q $2 }
  if ($1 == !deMastertemp $+) { mode $chan -q $2 }
  if ($1 == !unban) { mode $chan -b+v $2 }
  if ($1 == !ban) { mode $chan +b-v $2 }
  if ($1- == I hate you iAdam) { timer 1 1 msg $chan Cries and Rolls on floor. What did I ever do to you?! | timer 1 2 hop $chan | timer 1 3 msg $chan I hate you too son of a bitch! | timer 1 4 hop $chan | timer 1 5 msg $chan wait's for an apology. }
}
#BotScript End

on Master:TEXT:*:#: {
  Tokenize 32 $Strip($1-)
  if ($1- == Who owns you $me) { timer 1 1 msg $chan You own me %Master | timer 1 2 describe $chan I LOVE YOU %Master ! | timer 1 3 describe $chan Hugz %Master }
  if ($1 == !adduser) { timer 1 1 auser User $address($2,3) | timer 1 2 notice $nick $2 3,4is now ON the USER List! | timer 1 3 notice $2 you are now a BOT USER On $me ! | timer 1 4 descibe $chan has a cup of coffee with $2 }
  if ($1 == !Mastercmds) { msg $nick Master Commands Are: !ban, !unban, !deMastertemp, !optemp, !deoptemp, !BotOff, !BotOn, !l, !kb, !accessa, !accessr, !invite, !restartbot, !Mastertemp, !hop, !info, !adduser, !deluser, !Mastercmds, !moderate, !demoderate, !devoice, !voice, !deMastertemp, !hop, !info, and !notice. }
  if ($1 == !ban) { cs ban $chan $2 3 }
  if ($1 == !unban) { cs unban $chan $2 3 }
  if ($1 == !deMastertemp $+) { mode $chan -q $2 }
  if ($1 == !optemp $+) { mode $chan +o $2 }
  if ($1 == !deoptemp $+) { mode $chan -o $2 }
  if ($1 == !BotOff $+) { amsg 1,5 The Bot as been shut off by $nick Operations on this bot will not work if it is below the #BotScript Paremeter. | timer 1 2msg /disable #BotScript }
  if ($1 == !BotOn $+) { amsg 1,5The Bot has been re-enabled by $nick All Operations on this bot are now working below the #BotScript Parameter | timer 1 2 msg /enable #BotScript }
  if ($1 == !k) { kick $chan $2 $3- }
  if ($1 == !kb) { cs ban $chan $2 3 | kick $chan $2 $3- }
  if ($1 == !accessa $+) { if ($nick isop $chan) cs access $chan add $2 $3 | notice $2 Access level for $2 changed to $3 | notice $2 You can now press /ns update to update your access. }
  if ($1 == !accessr $+) { if ($nick isop $chan) cs access $chan del $2 | notice $2 Access level for $2 changed to $3. You have been removed from the access list. | notice $2 You can now press /ns update to update your access. }
  if ($1 == !devoice) { mode $chan -v $2 }
  if ($1 == !notice) { notice $2 $3 }
  if ($1- == I am sorry $me) { timer 1 1 msg $chan It's ok. | timer 1 2 describe $chan Hugs %Master }
  if ($1 == !voice) { mode $chan +v $2 }
  if ($1 == !moderate) { mode $chan +m }
  if ($1 == !demoderate) { mode $chan -m }
  if ($1 == !invite) { invite $2 $chan }
  if ($1 == !restartbot) { timer 1 1 /amsg Restarting Bot | timer 1 2 describe $chan leaves | timer -o 1 3 server %server | timer 1 4 describe $chan is fully booted up! }
  if ($1- == I hate you iAdam) { timer 1 1 msg $chan Cries and Rolls on floor. What did I ever do to you?! | timer 1 2 hop $chan | timer 1 3 msg $chan I hate you too son of a bitch! | timer 1 4 hop $chan | timer 1 5 describe $chan wait's for an apology. }
  if ($1 == !Mastertemp $+) { mode $chan +q $2 }
  if ($1 == !hop $+) { hop $chan }
  if ($1 == !info $+) { timer 1 1 msg $chan Information for $me : I am a BOT. I run mIRC $version. My nick is $me . I am cooler than service bots. I am very mad that I can't continue developing myself. I am proud to have Adam as an Master! | timer 1 2 describe $chan Hugs Adam. | timer 1 3 describe $chan I LOVE YOU ADAM! }    
}

Comments

Sign in to comment.
KilllerX   -  Jul 31, 2011

Half of the "Master Scripts" do the same thing as "User" Scripts. Topic Script is basic... and


  if ($chan) { 
    topic $chan $2- 
  } 

What the hell are you checking if $chan is used... couldn't that just be if !$2

The Guest book thing is about the only interesting thing in this script.

and this

on *:text:!writegb*:#:{
  if ($2- != $null) {
    /write -a " $+ $mircdirguest.txt $+ " $ctime $nick $2-
    .notice $nick Your message ( $+ $2- $+ )
    .notice $nick is succesfully submitted into the list!
  }
  else {
    .notice $nick Please Fill in Your Message!
  }
}

can be easily switched around with the $null

on *:text:!writegb*:#: {
  if ($2- == $null) {
    .notice $nick Please Fill in Your Message!
  }
  else {
    /write -a " $+ $mircdirguest.txt $+ " $ctime $nick $2-
    .notice $nick Your message ( $+ $2- $+ )
    .notice $nick is succesfully submitted into the list!
  }
}

or

on *:text:!writegb*:#: {
  if (!$2-) {
    .notice $nick Please Fill in Your Message!
  }
  else {
    /write -a " $+ $mircdirguest.txt $+ " $ctime $nick $2-
    .notice $nick Your message ( $+ $2- $+ )
    .notice $nick is succesfully submitted into the list!
  }
}

And really now... what is the use of calling someone names when they are explaining something to someone. And Really User friendlyness is good to work on. Not every person who comes here is going to understand what every little tidbit of information in here is.

 Respond  
Jethro   -  Jul 31, 2011

lol iAdam. I don't know why, but your message cracks me up. I reckon I've seen people like you my whole life already!

 Respond  
iAdam   -  Jul 31, 2011

Jethro_, your a BITCH. Fuck user-friendlyness. IT SAYS SET COMMANDS. He should fucking know the idiot N00B. YOU SHOULD BE EMBARESSED. I AM A NOOB AS WELL!

 Respond  
Jethro   -  Jul 24, 2011

iBen95111, that's because three of those text events and one join event in the script require a user level to trigger, meaning you have to be added to the users list of the client who runs the code. I think it's the submitter's fault not to have made it user-friendly, not to mention he's not mentioned about this in his introduction.

Fortunately, you can fix the issue by changing these events:> on Master:join:#: {
on User:TEXT::#: {
on Master:TEXT:
:#: {to:

on @*:join:#: {
on @*:TEXT:*:#: {
on @*:TEXT:*:#: {

Make sure the client that runs the code is an op.

P.S. > Not to be a noob or anythingYou don't have to feel ashamed or embarrassed to be a newbie. Every one of us starts out as a novice at one point or another.

 Respond  
iBen95111   -  Jul 24, 2011

Not to be a noob or anything, but
I tried putting it in a remote box in a normal mIRC program, some of those commands don't work.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.