Mega Bot (Aucun50)

By Aucun50 on Jan 26, 2009

Image
Image
I added ever bot script i had into one plus added some nice dialogs and more options then ever!

If you spot anything wrong please post it.

Mega Bot:
Script shutdown
Auto oper on connect (if your oper)
Auto id on connect
Main Channel option + Second channel + Third channel
Games on/off option
Easy Botowner setup
+v on join/no +v on join

Credits to PunkTured for help with before scripts and everyone who help me on the forum with before scripts.

You must load before connecting, put in remotes and click on to the option to add file.

dialog Setup {
  title "Setup Editor"
  size -1 -1 200 200
  option dbu
  tab "Auto Connect", 3, 4 13 192 183
  box "Password", 4, 8 27 185 38, tab 3
  edit "", 5, 12 36 177 13, tab 3 pass
  button "Set Password", 8, 12 51 53 10, tab 3
  button "Unset Password", 9, 72 51 53 10, tab 3
  box "Three Optional Channels to Join", 10, 8 70 185 123, tab 3
  edit "<Channel 1>", 11, 16 88 73 11, tab 3
  box "Channel 1", 12, 12 79 81 38, tab 3
  button "Set", 13, 15 101 37 10, tab 3
  button "Unset", 14, 52 101 37 10, tab 3
  box "Channel 2", 15, 108 79 81 38, tab 3
  edit "<Channel 2>", 16, 112 88 72 11, tab 3
  button "Set", 17, 111 101 37 10, tab 3
  button "Unset", 18, 148 101 37 10, tab 3
  box "Channel 3", 19, 60 124 81 35, tab 3
  edit "<Channel 3>", 20, 64 132 73 11, tab 3
  button "Set", 21, 64 145 37 10, tab 3
  button "Unset", 22, 101 145 37 10, tab 3
  tab "Main Options", 23
  box "Bot Owner", 24, 8 27 185 42, tab 23
  edit "<Bot Owner>", 25, 12 36 177 13, tab 23
  button "Set", 26, 12 53 57 10, tab 23
  button "Unset", 27, 72 53 57 10, tab 23
  box "Game Options", 28, 8 72 85 41, tab 23
  button "On", 29, 11 81 37 10, tab 23
  button "Off", 30, 52 81 37 10, tab 23
  edit "", 31, 12 96 77 13, tab 23, read
  box "Voice on Join", 32, 108 72 85 41, tab 23
  button "On", 33, 112 80 37 10, tab 23
  button "Off", 34, 152 80 37 10, tab 23
  edit "", 35, 112 96 77 13, tab 23, read
  box "Hello on Join", 36, 8 120 85 41, tab 23
  button "On", 37, 12 128 37 10, tab 23
  button "Off", 38, 52 128 37 10, tab 23
  edit "", 39, 12 144 77 13, tab 23, read
  box "Oper Status", 40, 108 120 85 41, tab 23
  button "Yes", 41, 112 128 37 10, tab 23
  button "No", 42, 152 128 37 10, tab 23
  edit "", 43, 111 144 78 13, tab 23, read
  box "Script on/off Setting", 44, 39 163 122 24, tab 23
  button "On", 45, 43 172 54 10, tab 23
  button "Off", 46, 104 172 54 10, tab 23
  text "Setup Editor", 2, 85 5 30 8
  box "", 47, 16 164 169 24, tab 3
  text "Oper Identify ", 53, 83 160 33 8, tab 3
  edit "</oper Name Password>", 48, 20 173 161 11, tab 3 
  box "", 49, 16 140 40 28, tab 3
  button "Set", 50, 23 149 27 14, tab 3
  box "", 51, 145 140 40 28, tab 3
  button "Unset", 52, 151 148 27 14, tab 3
}
on *:dialog:Setup:*:*:{
  if ($devent == sclick) {
    if ($did == 8) { set %pass $did(5) }
    elseif ($did == 9) { unset %pass | did -ra Setup 5 }
    elseif ($did == 11) { did -ra Setup 11 } 
    elseif ($did == 13) { set %Mchan $did(11) }
    elseif ($did == 14) { unset %Mchan | did -ra Setup 11 <Channel 1> }
    elseif ($did == 16) { did -ra Setup 16 }
    elseif ($did == 17) { set %Schan $did(16) }
    elseif ($did == 18) { unset %Schan | did -ra Setup 16 <Channel 2> }
    elseif ($did == 20) { did -ra Setup 20 }
    elseif ($did == 21) { set %Tchan $did(20) }
    elseif ($did == 22) { unset %Tchan | did -ra Setup 20 <Channel 3> }
    elseif ($did == 25) { did -ra Setup 25 }
    elseif ($did == 26) { set %botowner $did(25) }
    elseif ($did == 27) { unset %botowner | did -ra Setup 25 }
    elseif ($did == 29) { did -ra Setup 31 Status:On | set %gon 1 }
    elseif ($did == 30) { did -ra Setup 31 Status:Off | set %gon 2 }
    elseif ($did == 33) { did -ra Setup 35 Status:On | set %autov 1 }
    elseif ($did == 34) { did -ra Setup 35 Status:Off | unset %autov }    
    elseif ($did == 37) { did -ra Setup 39 Status:On | set %autoj 1 }
    elseif ($did == 38) { did -ra Setup 39 Status:Off | unset %autoj }
    elseif ($did == 41) { did -ra Setup 43 Status:Yes | set %oper 1 }
    elseif ($did == 42) { did -ra Setup 43 Status:No | unset %oper }
    elseif ($did == 45) { unset %ssu }
    elseif ($did == 46) { set %ssu off }
    elseif ($did == 50) { set %operpass $did(48) }
    elseif ($did == 52) { unset %operpass | did -ra Setup 48 </oper Name Password> }
  }
  if ($devent == init) {
    if (%pass) { did -ra Setup 5 %pass }
    if (%Mchan) { did -ra Setup 11 %Mchan }
    else { did -ra Setup 11 <Channel 1> }
    if (%Schan) { did -ra Setup 16 %Schan }
    else { did -ra Setup 16 <Channel 2> }
    if (%Tchan) { did -ra Setup 20 %Tchan }
    else { did -ra Setup 20 <Channel 3> }
    if (%botowner) { did -ra Setup 25 %botowner }
    else { did -ra Setup 25 <Bot Owner> }
    if (%gon == 1) { did -ra Setup 31 Status:On }
    elseif (%gon == 2) { did -ra Setup 31 Status:Off }
    else { did -ra Setup 31 Status:Not Set }
    if (%autov == 1) { did -ra Setup 35 Status:On }
    else { did -ra Setup 35 Status:Off or not Set }
    if (%autoj == 1) { did -ra Setup 39 Status:On }
    else { did -ra Setup 39 Status:Off or not Set }
    if (%oper == 1) { did -ra Setup 43 Status:On }
    else { did -ra Setup 43 Status:Off or not Set }
    if (%operpass) { did -ra Setup 48 %operpass }
    else { did -ra Setup 48 </oper Name Password> }
  }
}
menu * {
  Mega Bot
  .Setup Editor: dialog $iif($dialog(Setup),-v,-m) Setup Setup
  .Unset All: unset %Mchan %Schan %Tchan %autoj %autov %oper %gon %voice %operpass
}
on *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  if (!%ssu) {
    if ( %flood [ $+ [ $nick ] ] == $null ) {
      set -u2 %flood [ $+ [ $nick ] ] 1
      if (!Commands == $1) { .notice $nick My commands are: !Game commands, !Help, !Help (What you need help with), !User commands, !Master commands, !Owner commands }
      elseif (!killme == $1) { kill $nick Requested }
      elseif (!Game == $1) && (commands == $2) { .notice $nick Game commands are: !8ball, !Countdown, !Hide&seek (If you have the addon), !Aim, !Slots, !Blowup/!Defuse, !Pcall, !Number/!Guess }
      elseif (!Owner == $1) && (Commands == $2) { .notice $nick Owner commands are: !v (Nick), !dv (Nick), !h (Nick), !dh (Nick), !op (Nick), !deop (Nick), !a (Nick), !da (Nick) }
      elseif (!Master == $1) && (Commands == $2) { .notice $nick Master commands are: !v (Nick), !dv (Nick), !h (Nick), !dh (Nick), !op (Nick), !deop (Nick), !kick, !unban, !ban } 
      elseif (!User == $1) && (Commands == $2) { .notice $nick User commands are: !v (Nick), !dv (Nick), !kick }
      elseif (!help == $1) && (!$2) { .notice $nick If you are looking for help try !help (What you need help with), If your looking for more help try %botowner }
      elseif (!help == $1) && (Games == $2) { .notice $nick For a list of Games type !Game Commands, If you have a problem with the games try talking to %botowner }
      elseif (!help == $1) && (owner == $2) { .notice $nick For a list of Owner Commands type !Owner Commands, If you have a problem with the commands talk to %botowner }
      elseif (!help == $1) && (master == $2) { .notice $nick For a list of Master Commands type !Master Commands, If you have a problem with the commands talk to %botowner }
      elseif (!help == $1) && (user == $2) { .notice $nick For a list of User Commands type !User commands, If you have a problem with the commands talk to %botowner }
      elseif (!help == $1) && (commands == $2) { .notice $nick For a list commands type !Commands, If you have a problem with the commands talk to %botowner }
      elseif (!give == $1) { msg $chan $nick gives $2 $3- }
      ;The following is the games part of the script
      ;If you are thinking of adding a game put it here
      ;If you don't know how to add one talk to Aucun at irc.AUserv.com.strangled.net
      ;Do not change "if (%gon == 1) {" or "if ( %flood [ $+ [ $nick ] ] == $null ) {" and "set -u5 %gflood [ $+ [ $nick ] ] 1"
      if (%gon == 1) {
        if (!countdown == $1) {
          if ($3) { goto count2 }
          if (!$2) { msg $chan Useage: !countdown (second), are you can set a Id to it Useage: !countdown (number) (Id) | halt }
          elseif ($2) && ($2 >= 500001) { msg $chan Sorry number is to big | halt }
          else { goto count }
          :count
          if (%count5) && (%count4) && (%count3) && (%count2) && (%count) && ($2) { msg $chan There is already 5 counts going | halt } 
          if (!%count) { .timer 1 2 set -z %count $2 | set %countp1.1 $2 | set %countp2.1 $nick | msg $chan It will now count down from $2 (Count Id 1) | halt }
          elseif (%count) && (!%count2) && (!%count3) && (!%count4) && (!%count5) { .timer 1 2 set -z %count2 $2 | set %countp1.2 $2 | set %countp2.2 $nick | msg $chan It will now count down from $2 (Count Id 2) | halt }
          elseif (%count) && (%count2) && (!%count3) && (!%count4) && (!%count5) { .timer 1 2 set -z %count3 $2 | set %countp1.3 $2 | set %countp2.3 $nick | msg $chan It will now count down from $2 (Count Id 3) | halt }
          elseif (%count) && (%count2) && (%count3) && (!%count4) && (!%count5) { .timer 1 2 set -z %count4 $2 | set %countp1.4 $2 | set %countp2.4 $nick | msg $chan It will now count down from $2 (Count Id 4) | halt }
          elseif (%count) && (%count2) && (%count3) && (%count4) && (!%count5) { .timer 1 2 set -z %count5 $2 | set %countp1.5 $2 | set %countp2.5 $nick | msg $chan It will now count down from $2 (Count Id 5) | halt }
          :count2
          if ($3 == 1) && (!%count) { .timer 1 2 set -z %count $2 | set %countp1.1 $2 | set %countp2.1 $nick | msg $chan It will now count down from $2 (Count Id 1) | halt }
          elseif ($3 == 2) && (!%count2) { .timer 1 2 set -z %count2 $2 | set %countp1.2 $2 | set %countp2.2 $nick | msg $chan It will now count down from $2 (Count Id 2) | halt }
          elseif ($3 == 3) && (!%count3) { .timer 1 2 set -z %count3 $2 | set %countp1.3 $2 | set %countp2.3 $nick | msg $chan It will now count down from $2 (Count Id 3) | halt }
          elseif ($3 == 4) && (!%count4) { .timer 1 2 set -z %count3 $2 | set %countp1.3 $2 | set %countp2.3 $nick | msg $chan It will now count down from $2 (Count Id 3) | halt }
          elseif ($3 == 5) && (!%count5) { .timer 1 2 set -z %count5 $2 | set %countp1.5 $2 | set %countp2.5 $nick | msg $chan It will now count down from $2 (Count Id 5) | halt }
          else { msg $chan Count Id in use }
        }
        if (!viewcount == $1) {
          if (!$2) { msg $chan You need to type a count Id ranging from 1 to 5 | halt }
          if ($2 == 1) && (%count) { msg $chan $calc(%countp1.1 - %count) has gone by. Count has been running for $duration($calc(%countp1.1 - %count)) }
          elseif ($2 == 2) && (%count2) { msg $chan $calc(%countp1.2 - %count2) has gone by. Count has been running for $duration($calc(%countp1.2 - %count2)) }
          elseif ($2 == 3) && (%count3) { msg $chan $calc(%countp1.3 - %count3) has gone by. Count has been running for $duration($calc(%countp1.3 - %count3)) }
          elseif ($2 == 4) && (%count4) { msg $chan $calc(%countp1.4 - %count4) has gone by. Count has been running for $duration($calc(%countp1.4 - %count4)) }
          elseif ($2 == 5) && (%count5) { msg $chan $calc(%countp1.5 - %count5) has gone by. Count has been running for $duration($calc(%countp1.5 - %count5)) }
          elseif ($2 == 1) && (%count.pause1) { msg $chan That count has been stopped by %countp2.1 }
          elseif ($2 == 2) && (%count.pause2) { msg $chan That count has been stopped by %countp2.2 }
          elseif ($2 == 3) && (%count.pause3) { msg $chan That count has been stopped by %countp2.3 }
          elseif ($2 == 4) && (%count.pause4) { msg $chan That count has been stopped by %countp2.4 }
          elseif ($2 == 5) && (%count.pause5) { msg $chan That count has been stopped by %countp2.5 }
          else { msg $chan Count Id doesn't exist }
        }
        if (!countstarted == $1) {
          if (!$2) { msg $chan You need to type a count Id ranging from 1 to 5 | halt }
          if ($nick isop $chan) || ($nick == %countp2.1) && ($2 == 1) { msg $chan $calc(%countp1.1 - %count) has gone by. Count has been running for $duration($calc(%countp1.1 - %count)), Count stated by %countp2.1 it was set to countdown from %countp1.1 }
          elseif ($nick isop $chan) || ($nick == %countp2.2) && ($2 == 2) { msg $chan $calc(%countp1.2 - %count2) has gone by. Count has been running for $duration($calc(%countp1.2 - %count2)), Count stated by %countp2.2 it was set to countdown from %countp1.2 }
          elseif ($nick isop $chan) || ($nick == %countp2.3) && ($2 == 3) { msg $chan $calc(%countp1.3 - %count3) has gone by. Count has been running for $duration($calc(%countp1.3 - %count3)), Count stated by %countp2.3 it was set to countdown from %countp1.3 }
          elseif ($nick isop $chan) || ($nick == %countp2.4) && ($2 == 4) { msg $chan $calc(%countp1.4 - %count4) has gone by. Count has been running for $duration($calc(%countp1.4 - %count4)), Count stated by %countp2.4 it was set to countdown from %countp1.4 }
          elseif ($nick isop $chan) || ($nick == %countp2.5) && ($2 == 5) { msg $chan $calc(%countp1.5 - %count5) has gone by. Count has been running for $duration($calc(%countp1.5 - %count5)), Count stated by %countp2.5 it was set to countdown from %countp1.5 }
          else { msg $chan Count Id doesn't exist }
        }
        if (!countstop == $1) {
          if (!$2) { msg $chan No count Id typed | halt }
          if ($nick isop $chan) || ($nick == %countp2.1) && ($2 == 1) && (%count) { unset %count %countp1.1 %countp2.1 | msg $chan $nick stopped the count number 1 }       
          elseif ($nick isop $chan) || ($nick == %countp2.2) && ($2 == 2) && (%count2) { unset %count2 %countp1.2 %countp2.2 | msg $chan $nick stopped the count number 2 }
          elseif ($nick isop $chan) || ($nick == %countp2.3) && ($2 == 3) && (%count3) { unset %count3 %countp1.3 %countp2.3 | msg $chan $nick stopped the count number 3 }
          elseif ($nick isop $chan) || ($nick == %countp2.4) && ($2 == 4) && (%count4) { unset %count4 %countp1.4 %countp2.4 | msg $chan $nick stopped the count number 4 }
          elseif ($nick isop $chan) || ($nick == %countp2.5) && ($2 == 5) && (%count5) { unset %count5 %countp1.5 %countp2.5 | msg $chan $nick stopped the count number 5 }
          else { msg $chan Count Id doesn't exist }
        }
        if (!countpause == $1) {
          if (!$2) { msg $chan No count Id typed | halt }
          if ($nick isop $chan) || ($nick == %countp2.1) && ($2 == 1) && (%count) { set %count.pause1 $calc(%countp1.1 - %count) | unset %count | msg $chan Count 1 was paused by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.2) && ($2 == 2) && (%count2) { set %count.pause2 $calc(%countp1.2 - %count2) | unset %count2 | msg $chan Count 2 was paused by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.3) && ($2 == 3) && (%count3) { set %count.pause3 $calc(%countp1.3 - %count3) | unset %count3 | msg $chan Count 3 was paused by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.4) && ($2 == 4) && (%count4) { set %count.pause4 $calc(%countp1.4 - %count4) | unset %count4 | msg $chan Count 4 was paused by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.5) && ($2 == 5) && (%count5) { set %count.pause5 $calc(%countp1.5 - %count5) | unset %count5 | msg $chan Count 5 was paused by $nick }
          else { msg $chan Count Id doesn't exist }
        }
        if (!countrestart == $1) {
          if (!$2) { msg $chan No count Id typed | halt }
          if ($nick isop $chan) || ($nick == %countp2.1) && ($2 == 1) && (%count.pause1) { set -z %count %count.pause1 | unset %count.pause1 | msg $chan Count 1 restarted by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.2) && ($2 == 2) && (%count.pause2) { set -z %count %count.pause2 | unset %count.pause2 | msg $chan Count 2 restarted by $nick } 
          elseif ($nick isop $chan) || ($nick == %countp2.3) && ($2 == 3) && (%count.pause3) { set -z %count %count.pause3 | unset %count.pause3 | msg $chan Count 3 restarted by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.4) && ($2 == 4) && (%count.pause4) { set -z %count %count.pause4 | unset %count.pause4 | msg $chan Count 4 restarted by $nick }
          elseif ($nick isop $chan) || ($nick == %countp2.5) && ($2 == 5) && (%count.pause5) { set -z %count %count.pause5 | unset %count.pause5 | msg $chan Count 5 restarted by $nick }
          else { msg $chan Count Id doesn't exist }
        }
        if (!viewid == $1) {
          if ($2 == 1) && (%count) { msg $chan Id in use }
          elseif ($2 == 2) && (%count2) { msg $chan Id in use }
          elseif ($2 == 3) && (%count3) { msg $chan Id in use }
          elseif ($2 == 4) && (%count4) { msg $chan Id in use }
          elseif ($2 == 5) && (%count5) { msg $chan Id in use }
          else { msg $chan Id not in use }
        }
        if (!8ball == $1) {
          if (!$2) { msg $chan No Question | halt }
          set %8ball $rand(1,6)
          if (%8ball == 1) { msg $chan Yes! }
          elseif (%8ball == 2) { .timer 1 2 msg $chan No! }
          elseif (%8ball == 3) { .timer 1 2 msg $chan Maybe... }
          elseif (%8ball == 4) { .timer 1 2 msg $chan Depends }
          elseif (%8ball == 5) { .timer 1 2 msg $chan How should i know? }
          elseif (%8ball == 6) { .timer 1 2 msg $chan Ask again later }
          unset %8ball
        }
        if (!Slots == $1) {
          set -u25 %s1 $rand(1,3)
          set -u25 %s2 $rand(1,3)
          set -u25 %s3 $rand(1,3)
          if (%s1 == 1) { .timer 1 2 msg $chan Fisrt one is OP }
          elseif (%s1 == 2) { .timer 1 2 msg $chan Fisrt is HOP }
          elseif (%s1 == 3) { .timer 1 2 msg $chan First is VOP }
          if (%s2 == 1) { .timer 1 4 msg $chan Second one is OP }
          elseif (%s2 == 2) { .timer 1 4 msg $chan Second is HOP }
          elseif (%s2 == 3) { .timer 1 4 msg $chan Second is VOP }
          set -u25 %s3 $rand(1,3)
          if (%s3 == 1) { .timer 1 6 msg $chan Third one is OP }
          elseif (%s3 == 2) { .timer 1 6 msg $chan Third is HOP }
          elseif (%s3 == 3) { .timer 1 6 msg $chan Third is VOP }
          $iif(((%s1 == 1) && (%s2 == 1) && (%s3 == 1)) || ((%s1 == 2) && (%s2 == 2) && (%s3 == 2)) || ((%s1 == 3) && (%s2 == 3) && (%s3 == 3)),.timer 1 7 msg $chan Winner!,.timer 1 8 msg $chan Loser!)    
        }
        if (!Number == $1) {
          if (!%num) {
            set -u60 %num $rand(1,100)
            msg $chan I have set a number, it is between 1 and 100.
            msg $chan To make a guess, type: !guess Number_Here
            msg $chan Start guessing now, you have one minute to guess the number.
          }
          else { msg $chan There is not game going right now to start one type !Number }
        }
        if (!Guess == $strip($1)) {
          if (!%num) { msg $chan There is no game in progress. }
          else {
            if ($2 < $($+(%,num),2)) { msg $chan Higher. }
            if ($2 > $($+(%,num),2)) { msg $chan Lower. }
            if ($2 == $($+(%,num),2)) { msg $chan Bingo. $nick guessed the right number %num $+ . | unset %num }
          }
        } 
        if (!Pcall == $1) {
          if ($me isin $2-) { msg $chan Not me you fool! | halt }
          elseif (!$2) { msg $chan You didn't ask me to pcall anyone. Usage: !pcall (Nick) | halt }
          elseif ($2 !ison $chan) { msg $chan I don't pay long distance | halt }
          msg $chan Calling $2... 
          set %pcall $rand(1,3)
          if (%pcall == 1) { .timer 1 5 msg $chan $2 is your refrigerator running? Then you better catch it! }
          elseif (%pcall == 2) { .timer 1 5 msg $chan $2 is there an I.P. Freely there? }
          elseif (%pcall == 3) { .timer 1 5 msg $chan $2 is there a john there? Then how do you goto the washroom? }
          unset %pcall
        }
        if (!blowup == $1) {
          if ($me isin $2-) { msg $chan Not me you fool! | halt }
          elseif (!$2) { msg $chan You didn't give me a target | halt }
          elseif ($2 !ison $chan) { msg $chan There to far away to hit with a Time Bomb | halt }
          set -u120 %bomb $2 | msg $chan $nick planted a Time Bomb on $2, If you don't want to die $2 type !Defuse or it's Bye Bye, You have 2mins left.
        }
        if (!defuse == $1) {
          if ($nick !== %bomb) { msg $chan You don't have a Time Bomb on you | halt }
          msg $chan Here it goes... 
          set %defuse $rand(1,5)  
          if (%defuse == 1) { .timer 1 5 msg $chan You did it *relief* }
          elseif (%defuse == 2) { .timer 1 5 msg $chan Wrong Wire Wrong Wire! NO! }
          elseif (%defuse == 3) { .timer 1 5 msg $chan I don't know what you did but that worked }
          elseif (%defuse == 4) { .timer 1 5 msg $chan You Stupid *BOOM* }
          elseif (%defuse == 5) { .timer 1 5 msg $chan $me whips it up in the air You Dummy }
          unset %defuse
        }
        if (!Aim == $1) {
          if ($me isin $2-) { msg $chan Not me you fool! | halt }
          elseif (!$2) { msg $chan You didn't aim at anyone | halt }
          elseif ($2 == me) || ($2 == you) { msg $chan Word BANNED! | halt }
          elseif ($2 !ison $chan) { msg $chan $nick looks into the scope but can't see $2 | halt }
          msg $chan $nick Aims at $2  
          set %aim $rand(1,5) 
          if (%aim == 1) { .timer 1 5 msg $chan $nick hits $2 in the leg }
          elseif (%aim == 2) { .timer 1 5 msg $chan $nick hits $2 in the head }
          elseif (%aim == 3) { .timer 1 5 msg $chan $2 sees $nick before $nick sees $2 and hits $nick }
          elseif (%aim == 4) { .timer 1 5 msg $chan but misses }
          elseif (%aim == 5) { .timer 1 5 msg $chan then slips on a rock and... }
          unset %aim
        }
      }
      elseif (%gon == 2) { halt }
    }
    ;The following is the Botowner, Owner, Master, User commands section 
    ;If your bot is an oper on the irc check the oper in the dialog
    ;If you are looking to add a command put it in here
    ;If you need some help adding commands talk to Aucun at irc.AUserv.com.strangled.net
    if (!%oper) {
      if ($nick == %botowner) {
        if (!aowner == $1) { writeini users.ini BotOwners Nicks $2 $readini(users.ini,BotOwners,Nicks) | msg $chan Added $2 as owner of $me }
        elseif (!downer == $1) { writeini users.ini BotOwners Nicks $remove($readini(users.ini,BotOwners,Nicks),$2,) | msg $chan Deleted $2 as owner of $me }   
        elseif (!amaster == $1) { writeini users.ini BotMasters Nicks $2 $readini(users.ini,BotMasters,Nicks) | msg $chan Added $2 as master of $me }
        elseif (!dmaster == $1) { writeini users.ini BotMasters Nicks $remove($readini(users.ini,BotMasters,Nicks),$2) | msg $chan Deleted $2 as master of $me }
        elseif (!auser == $1) { writeini users.ini BotUsers Nicks $2 $readini(users.ini,BotUsers,Nicks) | msg $chan Added $2 as user of $me }
        elseif (!duser == $1) { writeini users.ini BotUsers Nicks $remove($readini(users.ini,BotUsers,Nicks),$2) | msg $chan Deleted $2 as user of $me }      
        elseif (!V == $1) { mode $chan +v $2 }
        elseif (!dv == $1) { mode $chan -v $2 }
        elseif (!h == $1) { mode $chan +h $2 }
        elseif (!dh == $1) { mode $chan -h $2 }
        elseif (!op == $1) { mode $chan +o $2 }
        elseif (!deop == $1) { mode $chan -o $2 }
        elseif (!a == $1) { mode $chan +a $2 }
        elseif (!da == $1) { mode $chan -a $2 }
        elseif (!kick == $1) { kick $chan $2 }
        elseif (!ban == $1) { mode $chan +b $2 }
        elseif (!unban == $1) { mode $chan -b $2 }
        elseif (!part == $1) { part $2 }
        elseif (!join == $1) { join $2 }
      }
      elseif ($nick isin $readini(users.ini,BotOwners,Nicks)) { 
        if (!V == $1) { mode $chan +v $2 }
        elseif (!dv == $1) { mode $chan -v $2 }
        elseif (!h == $1) { mode $chan +h $2 }
        elseif (!dh == $1) { mode $chan -h $2 }
        elseif (!op == $1) { mode $chan +o $2 }
        elseif (!deop == $1) { mode $chan -o $2 }
        elseif (!a == $1) { mode $chan +a $2 }
        elseif (!da == $1) { mode $chan -a $2 }
        elseif (!kick == $1) { mode kick $chan $2 }
        elseif (!ban == $1) { mode $chan +b $2 }
        elseif (!unban == $1) { mode $chan -b $2 }
      }
      elseif ($nick isin $readini(users.ini,BotMasters,Nicks)) {
        if (!V == $1) { mode $chan +v $2 }
        elseif (!dv == $1) { mode $chan -v $2 }
        elseif (!h == $1) { mode $chan +h $2 }
        elseif (!dh == $1) { mode $chan -h $2 }
        elseif (!op == $1) { mode $chan +o $2 }
        elseif (!deop == $1) { mode $chan -o $2 }
        elseif (!kick == $1) { mode kick $chan $2 }
        elseif (!ban == $1) { mode $chan +b $2 }
        elseif (!unban == $1) { mode $chan -b $2 }
      }
      elseif ($nick isin $readini(users.ini,BotUsers,Nicks)) {
        if (!v == $1) { mode $chan +v $2 }
        elseif (!dv == $1) { mode $chan -v $2 }
        elseif (!kick == $1) { mode kick $chan $2 } 
      }
    }
    ;The following is the oper part of the script 
    ;If you are going to add oper commands add them here
    ;If you need some help adding commands talk to Aucun at irc.AUserv.com.strangled.net
    if (%oper == 1) {
      if ($nick == %botowner) {
        if (!aowner == $1) { writeini users.ini BotOwners Nicks $2 $readini(users.ini,BotOwners,Nicks) | msg $chan Added $2 as owner of $me }
        elseif (!downer == $1) { writeini users.ini BotOwners Nicks $remove($readini(users.ini,BotOwners,Nicks),$2,) | msg $chan Deleted $2 as owner of $me }   
        elseif (!amaster == $1) { writeini users.ini BotMasters Nicks $2 $readini(users.ini,BotMasters,Nicks) | msg $chan Added $2 as master of $me }
        elseif (!dmaster == $1) { writeini users.ini BotMasters Nicks $remove($readini(users.ini,BotMasters,Nicks),$2) | msg $chan Deleted $2 as master of $me }
        elseif (!auser == $1) { writeini users.ini BotUsers Nicks $2 $readini(users.ini,BotUsers,Nicks) | msg $chan Added $2 as user of $me }
        elseif (!duser == $1) { writeini users.ini BotUsers Nicks $remove($readini(users.ini,BotUsers,Nicks),$2) | msg $chan Deleted $2 as user of $me }      
        elseif (!q == $1) { samode $chan +q $2 }
        elseif (!dq == $1) { samode $chan -q $2 }
        elseif (!V == $1) { samode $chan +v $2 }
        elseif (!dv == $1) { samode $chan -v $2 }
        elseif (!h == $1) { samode $chan +h $2 }
        elseif (!dh == $1) { samode $chan -h $2 }
        elseif (!op == $1) { samode $chan +o $2 }
        elseif (!deop == $1) { samode $chan -o $2 }
        elseif (!a == $1) { samode $chan +a $2 }
        elseif (!da == $1) { samode $chan -a $2 }
        elseif (!kick == $1) { samode kick $chan $2 }
        elseif (!ban == $1) { samode $chan +b $2 }
        elseif (!unban == $1) { samode $chan -b $2 }
        elseif (!part == $1) { part $2 }
        elseif (!join == $1) { join $2 }
      }
      if ($nick isin $readini(users.ini,BotOwners,Nicks)) { 
        if (!V == $strip($1)) { mode $chan +v $2 }
        elseif (!dv == $1) { samode $chan -v $2 }
        elseif (!h == $1) { samode $chan +h $2 }
        elseif (!dh == $1) { samode $chan -h $2 }
        elseif (!op == $1) { samode $chan +o $2 }
        elseif (!deop == 1) { samode $chan -o $2 }
        elseif (!a == $1) { samode $chan +a $2 }
        elseif (!da == $1) { samode $chan -a $2 }
        elseif (!kick == $1) { samode kick $chan $2 }
        elseif (!ban == $1) { samode $chan +b $2 }
        elseif (!unban == $1) { samode $chan -b $2 }
      }
      elseif ($nick isin $readini(users.ini,BotMasters,Nicks)) {
        if (!V == $1) { samode $chan +v $2 }
        elseif (!dv == $1) { samode $chan -v $2 }
        elseif (!h == $1) { samode $chan +h $2 }
        elseif (!dh == $1) { samode $chan -h $2 }
        elseif (!op == $1) { samode $chan +o $2 }
        elseif (!deop == $1) { samode $chan -o $2 }
        elseif (!kick == $1) { samode kick $chan $2 }
        elseif (!ban == $1) { samode $chan +b $2 }
        elseif (!unban == $1) { samode $chan -b $2 }
      }
      elseif ($nick isin $readini(users.ini,BotUsers,Nicks)) {
        if (!v == $1) { samode $chan +v $2 }
        elseif (!dv == $1) { samode $chan -v $2 }
        elseif (!kick == $1) { samode kick $chan $2 } 
      }
    }
  }
  elseif (%ssu == off) { halt }
}
on !*:JOIN:#: {
  if (!%ssu) {
    if (%autoj == 1) && (%autov == 1) { msg $chan Hello $nick welcome to $chan | mode $chan +v $nick }
    if (%autoj == 1) && (!%autov) { msg $chan Hello $nick welcome to $chan }
    if (!%autoj) && (%autov == 1) { mode $chan +v $nick }
    elseif (!%autoj) && (!%autov) { }
  }
  elseif (%ssu == off) { halt }
}
on *:LOAD: { .notice $me You have loaded Mega Bot script, to set it up use the dialogs (Right Click in any channel). If you need help talk to Aucun at irc.AUserv.com.strangled.net | writeini users.ini Botowners Nicks Test | writeini users.ini BotMasters Nicks Test | writeini users.ini BotUsers Nicks Test }
on *:UNLOAD: { .notice $me Thank you for using Aucun's Mega Bot, you can unset all var by deleting them in the Variables or reload the script open the dialog and click unset all }
on *:CONNECT: { 
  if (!%ssu) {
    /ns identify %pass  
    if (%Mchan) { join %Mchan }  
    if (%Schan) { join %Schan }  
    if (%Tchan) { join %Tchan }
    if (%operpass) { %operpass }
  }
  elseif (%ssu == off) { halt } 
}

Comments

Sign in to comment.
PuNkTuReD   -  Apr 16, 2009
Keiro   -  Apr 16, 2009

http://www.hawkee.com/snippet/1140/

No longer maintained by the author.

If I can get something like that working by relaying to both servers... then it'd be awesome.

I tested it... didn't quite work as the user stated: " PisangGoreng
Comments: 4

mIRC Snippet: Relay Script
Posted on Nov 21, 2007 4:18 am
Me Have Done Relay Chat But Only this

irc.server1.net

hi hi irc.server2.net (mike@server1) hi (PisangGoreng@server1) hi - but if i chat in server2 .. it dosent paste to server1... ... how to relay to both server ?" Essentially: How to get the bot to relay to both servers, to and from... so that what one user says in one server shows up in the other. It didn't work like it should, so... yeah. ;x Other than that, this would complete the script I think... but that's just me, lol.
 Respond  
Skylar   -  Apr 09, 2009

i think u did a great job. keep up the good work. 5/10

 Respond  
Aucun50   -  Apr 09, 2009

I'm planning on redoing a lot of it to make it better also add new things.

A relay script? Can you give me a link or explain if you don't mind

 Respond  
Keiro   -  Apr 09, 2009

Can you see if you can set up the oper part to only oper on certain servers if you don't have oper access on all servers?

Also, damn, too bad it doesn't have a relay script.

 Respond  
GrimReefer   -  Mar 05, 2009

very nice ty

 Respond  
Aucun50   -  Feb 16, 2009

Updated again

 Respond  
Aucun50   -  Feb 05, 2009

Updated fixed games

 Respond  
Aucun50   -  Jan 29, 2009

Updated made buttons "unset all" and "ok" smaller plus i added some more status checks for games and addtext.

If you find a bug tell me

 Respond  
Aucun50   -  Jan 27, 2009

Updated fixed an on join error plus added an ok button :D

 Respond  
Cheiron   -  Jan 27, 2009

just to remind you that that protection module of mine is for a per command useage otherwise looking good

 Respond  
Aucun50   -  Jan 27, 2009

Flood protection added

 Respond  
Cheiron   -  Jan 27, 2009

no worries Aucun50.. it was only a suggestion. as for the hash tables.. i would look into them if you can get your head around them :) they will make the script quicker and less demanding on the hard drive accessing all the time

 Respond  
Aucun50   -  Jan 27, 2009

"if ($($+(%,flood,$nick),2) == 2) { ignore -u180 $nick | unset $+(%,flood,$nick) | halt }"
"$iif($($+(%,flood,$nick),2),inc $+(%,flood,$nick) 1,set -u10 $+(%,flood,$nick) 1)"

Are in there, your 10 sec delay looks nice might add it.

Also i have had way to much trouble with /auser so i went to my own.

 Respond  
Cheiron   -  Jan 27, 2009

if you know how too that is... lose the ini files an use hash tables. that will save the wear and tear on your hard drives. also for the addition of the Master/assistant etc... use /auser , /guser etc. cleaner and simpler. other than that some flood protection wouldnt go amiss. a simple stopcheck would be sufficent as per my snippet on page http://www.hawkee.com/snippet/3874/ where i posted this code

on *:TEXT:<whatever in here>:#:{
  if ( %test. [ $+ [ $nick ] ] == $null ) {
    set %test. [ $+ [ $nick ] ] 1
    .msg $nick <message or action>
    .timer 1 10 unset %test. [ $+ [ $nick ] ]
  }
}

that there is a simple stop timer of 10secs for any single user trying to access the same command during that time.

other than that you have a nice code there and i am gonna give you a 4 for when you update to include some flood protection on the command access etc

 Respond  
PuNkTuReD   -  Jan 27, 2009

2.6 total , thats bulls*
this is at least usefull and thats a 3
i mean
coooooome ooooooon nooooooow
at least give your reasons for low scores

 Respond  
Aucun50   -  Jan 27, 2009

Updated all setting are now saved to look at for next time you open it.

 Respond  
Aucun50   -  Jan 27, 2009

Update added second and third channels and website, dialog compacted to look better.

Plans for more updates add Join First second third channel on connect and join first only second only third only or first and second only so on.

 Respond  
Aucun50   -  Jan 26, 2009

Thank you updates coming soon like Website, Main + Second + Third channel and any suggestion that anyone has.

 Respond  
PuNkTuReD   -  Jan 26, 2009

nice work on getting all your scripts into one file m8. 7/10

 Respond  
Aucun50   -  Jan 26, 2009

You have to say !master commands :) that's why it says that.
If you are trying to add a master its !amaster (If you filled your name in the dialog screen under Bot master)

 Respond  
Bluepower10   -  Jan 26, 2009

When you say !master it says Did you mean !master commands?.
Same with the rest of them.

 Respond  
Aucun50   -  Jan 26, 2009

Thanks for the suggestion all try that next time, it does work i tested all the commands i would take a screen shot but i have no idea how to.

 Respond  
Blitzjager   -  Jan 26, 2009

Instead of all those $strips I think you could do "tokenize 32 $strip($1-)" at the beginning and you wouldn't need to $strip everything.

I don't need a bot but this looks good. Assuming it works I'd say it's worth more than a 3/10.

 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.