All pastes #293834 Raw Edit

EraBotMain File

public text v1 · immutable
#293834 ·published 2006-12-27 22:58 UTC
rendered paste body
--------------------------------------------------------------------------

on *:text:!opcomms:#,?:{ mn 4 You, and I, need to be a Half-Operator or Operator to use these:
  mn 12 "!tb Nickname Minutes Reason" - Timed Ban Nickname for ___ Minutes for ___ Reason
  mn 12 "!ekick Nickname Reason" - Kicks the user with the reason you chose
  mn 12 "!ekb Nickname Reason" - Kick-Bans the nickname with the reason you chose
  mn 12 "!ub Nickname" - Unbans the nickname you chose -User must be online (BanMask 2)
  mn 12 "!cmute / !cdmute" - Mutes / DeMutes the channel
  mn 12 "!nmute Nickname / !ndmute Nickname" - Mutes /DeMutes a user by their hostname
  mn 4 Type "!scomms" for my status commands. Such as !v and !h. (Voice and Half-Op User)
mn 1 -- End -- }

on *:text:!scomms:#,?:{ mn 4 Key: [MH] = I Need At Least Half-Op * [MO] = I Need Op * [YH] = You Need At Least Half-Op * [YO] = You Need Op
  mn 4 All of these commands can have up to 15 nicknames on one line! (I.E. !v Nick Nick Nick Nick...)
  mn 12 "!v Nick / !dv Nick" - Voices / DeVoices The User [MH] [YH]
  mn 12 "!hop Nick / !dhop Nick" - Half-Ops / DeHalf-Ops The User [MO] [YO]
  mn 12 "!oper Nick / !doper Nick" - Ops / DeOps The User [MO] [YO]
mn 1 -- End -- }

Half-Op+ Commands:

on *:text:!ekick*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { inc %kcount 1 | kick $chan $2 1- 12Reason:4 $3- 1- 12EraKickCount: 1(4 %kcount 1) 1- } }
on *:text:!ekb*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { inc %kbcount 1 | mode $chan +b $address($2,2) | kick $chan $2 1- 12Reason:4 $3- 1- 12EraKickBanCount: 1(4 %kbcount 1) 1- } }
on *:text:!ub*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan -b $address($2,2) } }
on *:text:!cmute:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan +m } }
on *:text:!cdmute:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan -m } }
on *:text:!nmute*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan +b ~q: $+ $address($2,2) } }
on *:text:!ndmute*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan -b ~q: $+ $address($2,2) } }

on *:text:!v*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan +vvvvvvvvvvvvvvv $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 } }
on *:text:!dv*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan -vvvvvvvvvvvvvvv $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 } }
on *:text:!hop*:#:{ if ($nick isop $chan) { mode $chan +hhhhhhhhhhhhhhh $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 } }
on *:text:!dhop*:#:{ if ($nick isop $chan) { mode $chan -hhhhhhhhhhhhhhh $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 } }
on *:text:!oper*:#:{ if ($nick isop $chan) { mode $chan +ooooooooooooooo $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 } }
on *:text:!doper*:#:{ if ($nick isop $chan) { mode $chan -ooooooooooooooo $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 } }

on *:text:!tb*:#:{
  if ($2 isop $chan) || ($2 ishop $chan) {
    notice $nick 12I have been 4forbidden12 to use this command on 4Operators 12and 4Half-Operators12!
    halt 
  } 
  else {
    if ($nick isop $chan) || ($nick ishop $chan) { 
      inc %kcount 
      /ban -ku $+ $calc( $3 * 60 ) $chan $2 2 7 Reason: $4- 1- 11 $3 Minute Ban 1- 12Noobs Pwnt: 1(4 %kcount 1)
} } }

off *:text:!timebomb*:#:{ if ($nick ishop $chan) || ($nick isop $chan) {
    if ($me !isop $chan) || ($me !ishop $chan) {
      msg $chan $nick $+ , I don't timebomb without Operator/Half-Operator status.
      halt
    }
    :start1
    if (%bombnick) {
      msg $chan $chr(1) $+ ACTION  points at the bulge in [ %bombnick ] $+ 's pants. They have only $timer(bomb).secs seconds left. $+ $chr(1)
    }
    else {
      if ($2 ison $chan) {
        set %bombnick $2
        set %colorarray red,orange,yellow,green,blue,purple,black,brown,white
        set %bombcolor %colorarray
        set %bombwirecount $rand(1,6)
        set %bombwires1 0
        ;    set %bombwires $gettok(%bombcolor,$rand(1,$gettok(%bombcolor,0,44))
        while (%bombwirecount > %bombwires1) {
          ;while (%bombwirecount > $gettok(%bombwires,0,44)) {
          ;      set %bombwires $addtok(%bombwires,$gettok(%bombcolor,$rand(1,$gettok(%bombcolor,0,44)),44)
          set %bombwirenew $gettok( %bombcolor , $rand(1,$gettok(%bombcolor,0,44)) , 44)
          set %bombwires %bombwires %bombwirenew
          set %bombcolor $remtok(%bombcolor,%bombwirenew,44)
          inc %bombwires1
        }
        set %bombtime $rand(10,45)
        if (%nobomb) {
          msg $chan 4 $nick $+ 12: Haha, I don't know who you are talking about so.......   4YOU HAVE THE BOMB!
        }
        else {
          msg $chan $chr(1) $+ ACTION  stuffs a time bomb into $2 $+ 's pants. The display reads $chr(91) $+ %bombtime $+ $chr(93) seconds. $+ $chr(1)
        }
        unset %nobomb
      }
      msg $chan $2 $+ : Diffuse the bomb by cutting the correct wire, type: !cw COLOR -- There are $gettok(%bombwires,0,32) wires, they are: $replace(%bombwires,$chr(32),$chr(44) $+ $chr(32))
      set %bombright $gettok(%bombwires,$rand(1,$gettok(%bombwires,0,32)),32)
      timerbomb 1 %bombtime bombkick $chan $2 12You have failed to defuse the bomb.4 *BOOM!* 1(12Correct Wire:4 %bombright 1)
    }
    else {
      tokenize 32 timebomb $nick
      set %nobomb 1
      goto start1
    }
  }
}
on *:text:!cw*:# {
  if ($nick == %bombnick) {
    timerbomb off
    if ($2 == %bombright) {
      msg $chan $nick cut the %bombright wire. This has defused the bomb!
    }
    else {
      kick $chan $nick 12Snip...4*BOOM!* 1(12Correct wire was:4 %bombright $+ 1)
    }
    unset %bombnick
    unset %bombwires
  }
  else {
    if (%bombnick) {
      msg $chan 12You cannot decide4 %bombnick $+ 12's future, they will need to cutwire themselves.
    }
  }
}

alias bombkick {
  kick $1-
  unset %bombnick
  unset %bombwires
} 
--------------------------------------------------------------------------

FEATURES:

on *:text:!features:#,?:{ mn 4 These are my features:
  mn 4 Type "!fo" , not as big features - "!counts" , counter scripts - "!games" , games
  mn 12 "!hsm" - RuneScape HighScores Menu (How To Use)
  mn 12 "!ipm" - RuneScape Item Pricer Menu (How To Use)
  mn 12 "!polli" - Make A Poll (How To Use)
  mn 12 "!calcm" - Calculator Menu (How To Use)
  mn 12 "!binfo" - Info on my current statistics
  mn 12 "!/@monster Monster Name - Search RuneScape For Monster Information
  mn 12 "!/@kbase Search Word - Search the RS Knowledge Base
  mn 12 "!/@rss Server - See the statistics of that RuneScape2 Server (Is a bit laggy)
  mn 12 "!/@time s Minutes / !/@time m Seconds" - Convert Seconds To Minutes and Vise-Versa
mn 1 -- End -- }

on *:text:!fo:#,?:{ mn 4 These are my not as big features:
  mn 12 "!lgm" - See the latest Global Message sent
  mn 12 "*See End Level Skill" - Congrats on your level (Triggers: !lvl, !level, !lvlup, !levelup)
  mn 12 "!sex Nick / !sex Nick Nick / !sex Nick Nick Nick" - You can guess
  mn 12 "!/@8ball Question" - Let EraBot answer your questions
  mn 12 "!/@chuck" - Get a random Chuck Norris fact (Over 600!)
  mn 12 "!/@yourmom" - Get a random your mom joke (Over 300!)
  mn 12 "!/@ctime" - See The Current Time (-6 GMT)
  mn 12 "!/@time s Minutes / !/@time m Seconds" - Convert Seconds To Minutes and Vise-Versa
mn 1 -- End -- }
on *:text:!counts:#,?:{ mn 4 These are my counter scripts:
  mn 12 "!/@ncount" - See how many users are in your channel
  mn 12 "!/@lcount" - See the current "Lol-Count"
  mn 12 "!/@rcount" - See the current "Rofl-Count"
  mn 12 "!/@hcount" - See the current "Huggle-Count"
  mn 12 "!/@tcount" - See the current "Trouts-Saved-Count"
  mn 12 "!/@ycount" - See the current "Hungry-Count"
mn 1 -- End -- }
on *:text:!games:#,?:{ mn 4 These are my game menus:
  mn 12 "!cstart" - Start Using the Casino
  mn 12 "!ngm" - Number Game Menu
  mn 12 "!hmm" - Hangman Menu
  mn 12 "!trivia" - Trivia
mn 1 -- End -- }

on *:text:!casino:#:{
  notice $nick 1| Casino Menu |
  notice $nick 12Games:4 !cgames
  notice $nick 12Start an Account:4 !cstart
  notice $nick 12See User's Cash:4 !cash Nick
  notice $nick 12Broke? Use:4 !cbroke
  notice $nick 1-- End --
}

on *:text:!trivia:#,?:{ mn 4 Trivia Menu:
  mn 12 "!triviaon" - Starts Trivia
  mn 12 "!triviaoff" - Stops Trivia
  mn 12 "!trivcomms" - Trivia Commands (Staff Only)
  mn 12 "!trivinfo" - Trivia Info (Staff Only)
mn 1 -- End -- }

on *:TEXT:!hmm*:#,?:{ mn 4 Hangman Menu:
  mn 12 "!hangman" - Start up a game
  mn 12 "!shangman" - Stop a game
  mn 12 "!hang Letter" - Guess a letter
  mn 12 "!answer Answer" - Guess the answer
  mn 12 The @'s are the length of the words/word, the end shows how many letters are left to guess.  Chooses random person from channel to hang, but if you die, nothing happens.
mn 1 -- End -- }

on *:text:!binfo:#,?:{ nnbc 1 Some Of My Current Statistics:
  nnbc 12 Channels I'm Currently In:1 (4 $chan(0) 1)
  nnbc 12 Queries I Currently Have Open:1 (4 $query(0) 1)
  nnbc 12 My mIRC Version:1 (4 $version 1)
  nnbc 12 My Window Is Currently:1 (4 $appstate 1)
nnbc 1 -- End -- }

on *:text:!ycount:#:{ notice $nick 12The current "Hungry-Count" is:4 %hungryc  }
on *:text:@ycount:#:{ msg # 12The current "Hungry-Count" is:4 %hungryc  }
on *:text:!hcount:#:{ notice $nick 12The current "Huggle-Count" is:4 %huggles  }
on *:text:@hcount:#:{ msg # 12The current "Huggle-Count" is:4 %huggles  }
on *:text:!tcount:#:{ notice $nick 12The current "Trout-Saved-Count" is:4 %trout  }
on *:text:@tcount:#:{ msg # 12The current "Trout-Saved-Count" is:4 %trout  }

on *:text:*ncount:#:{ if (*!* iswm $1-) { notice $nick 12The current amount of users on4 $chan 12is4 $nick($chan,0)
  }
  else {
    if (*@* iswm $1-) { msg $chan 12The current amount of users on4 $chan 12is4 $nick($chan,0)
} } }

on *:action:*trout*:#:{ if ($chan == #pc-hq) || ($chan == #TAOM) { halt
  }
  else {
    inc %trout 1
describe $chan 7throws the trout back into the river. 12Trouts Saved: 1(4 %trout 1) } }
on *:action:*huggles EraBot*:#:{ if ($chan == #pc-hq) || ($chan == #TAOM) { halt
  }
  else {
    inc %huggles 1
describe $chan 7huggles $nick back. 12Huggles Recieved: 1(4 %huggles 1) } }

on *:text:*hungry*:#:{ inc %hungryc 1 }
on *:text:*eating*:#:{ inc %hungryc 1 }
on *:text:*food*:#:{ inc %hungryc 1 }
on *:text:*lol*:#:{ inc %lolcount 1 }
on *:text:!lcount:#:{ notice $nick 12The current "Lol-Count" is:4 %lolcount  }
on *:text:@lcount:#:{ msg # 12The current "Lol-Count" is:4 %lolcount  }
on *:text:*rofl*:#:{ inc %roflcount 1 }
on *:text:!rcount:#:{ notice $nick 12The current "Rofl-Count" is:4 %roflcount  }
on *:text:@rcount:#:{ msg # 12The current "Rofl-Count" is:4 %roflcount  }

on *:text:!hsm:#,?:{ mn 4 RuneScape HighScores Script:
  mn 4 Use ! for notice and @ for messaging the channel
  mn 12 "!/@stats Username" - Look up a user's stats
  mn 12 "!/@cmb Username" - Look up a user's combat
  mn 12 "!/@overall Username - Look up a user's overall
  mn 12 "!/@SeperateSkill Username - Look up a user's specific skill
mn 1 -- End -- }
on *:text:!ipm:#,?:{ mn 4 RuneScape Item Price Script:
  mn 4 Use ! for notice and @ for messaging the channel
  mn 12 Syntax: !/@price ITEM - You can use a general item and you will get multiple results
mn 1 -- End -- }

on *:text:!ctime:#,?:{ notice $nick 12The current time is (-6 GMT Central Time) :4 $time } 
on *:text:@ctime:#:{ msg # 12The current time is (-6 GMT Central Time) :4 $time } 

on *:text:!time*:#:{ if ($2 == s) { notice $nick 12Converting4 $3 12second(s) into minutes...4 $calc( $3 / 60 ) 12minutes(s). } 
else { if ($2 == m) { notice $nick 12Converting4 $3 12minute(s) into seconds...4 $calc( $3 * 60 ) 12second(s). } } } 
on *:text:@time*:#:{ if ($2 == s) { msg # 12Converting4 $3 12second(s) into minutes...4 $calc( $3 / 60 ) 12minutes(s). } 
else { if ($2 == m) { msg # 12Converting4 $3 12minute(s) into seconds...4 $calc( $3 * 60 ) 12second(s). } } } 

on *:text:!lgm:#:{ notice $nick 1| 12My latest Global Message sent was:4 %lgm 1| 12It was sent4 $duration($calc($ctime - %lgmt)) 12ago 1| }

on $*:text:/^!(lvl|level|lvlup|levelup)/i:#:{ if ($3 == $null) { msg # 4Error - $nick - Syntax: "!level Level Skill" (Prefixes: !lvl,!level,!lvlup,!levelup) | halt
  }
  else {
    if ($2 > 99) && (*total* !iswm $3-) && (*overall* !iswm $3-) && (*combat* !iswm $3-) && (*cmb* !iswm $3-) { msg # 4Error - $nick - $2 Is Not A Possible Skill Level | halt
    }
    else {
      if ($2 > 126) && (*combat* iswm $3- || *cmb* iswm $3-) { msg # 4Error - $nick - $2 Is Not A Possible Combat Level | halt
      }
      else {
        if ($2 > 2277) && (*overall* iswm $3- || *total* iswm $3-) { msg # 4Error - $nick - $2 Is Not A Possible Total level | halt
        }
        else {
          if (*-* iswm $2) || (*-* iswm $3-) { msg # 4Error - $nick - Negatives Not Allowed | halt
          }
          else {
            if (*.* iswm $2) || (*.* iswm $3-) { msg # 4Error - $nick - Decimals Not Allowed | halt
            }
            else {
              set %clvl $rand(1,3)
              set %ctlvl $2
              set %ctskill $3
              if ($read(allrsskills.txt,w,$+(*,%ctskill,*))) {
                if (%clvl == 1) msg # 7«4|12 $nick 4|7» 2,1\1,2\12,2\2,12\11,12\12,11\0,11\11,0\0,0-15,0\0,15\14,15\15,14\1,14\14,1\1,1-0,1 Congrats on your level %ctlvl %ctskill $nick $+ ! 1,1-14,1/1,14/15,14/14,15/0,15/15,0/0,0-11,0/0,11/12,11/11,12/2,12/12,2/1,2/2,1/
                if (%clvl == 2) msg # 7«4|12 $nick 4|7» 4,1\1,4\7,4\4,7\8,7\7,8\0,8\8,0\0,0-15,0\0,15\14,15\15,14\1,14\14,1\1,1-0,1 Congrats on your level %ctlvl %ctskill $nick $+ ! 1,1-14,1/1,14/15,14/14,15/0,15/15,0/0,0-8,0/0,8/7,8/8,7/4,7/7,4/1,4/4,1/
                if (%clvl == 3) msg # 7«4|12 $nick 4|7» 3,1\1,3\10,3\3,10\9,10\10,9\0,9\9,0\0,0-15,0\0,15\14,15\15,14\1,14\14,1\1,1-0,1 Congrats on your level %ctlvl %ctskill $nick $+ ! 1,1-14,1/1,14/15,14/14,15/0,15/15,0/0,0-9,0/0,9/10,9/9,10/3,10/10,3/1,3/3,1/
                unset %ctlvl
                unset %ctskill
                unset %clvl
              }
              else { msg # 4Error - $nick - $3 Is Not A Skill | halt
} } } } } } } }

on *:text:!ascii:#:{
  notice $nick 1| ASCII Lookup |
  notice $nick 12"!ascii n Number" - converts Number to Symbol
  notice $nick 12"!ascii s Symbol" - converts Symbol to Number
  notice $nick 12"!ascii c" - ASCII Charts
  notice $nick 1-- End --
}

on *:text:!ascii n *:#:{
  if ($3 == $null) {
    notice $nick 12Error 4ASCII 1-12 Syntax: "!ascii n Number", converts the Number to the ASCII symbol.
    halt
  }
  else {
    if ($3 > 255 || $3 < 33) {
      notice $nick 12Error 4ASCII 1-12 The ASCII characters only go from 33-255.
      halt
    }
    else {
      if (*a* iswm $3- || *b* iswm $3- || *d* iswm $3- || *e* iswm $3- || *j* iswm $3- || *r* iswm $3-) {
        notice $nick 12Error 4ASCII 1-12 No letters are allowed in the Number to Symbol ASCII Lookup!
        halt
      }
      else {
        notice $nick 12The ASCII symbol for4 number $3 12is4 $chr( $+ $3 $+ ) $+ 12.
} } } }
on *:text:!ascii s *:#:{
  if ($3 == $null) {
    notice $nick 12Error 4ASCII 1-12 Syntax: "!ascii s Symbol", converts the Symbol to the ASCII number.
    halt
  }
  else {
    set %ascii.find $read(ascii.txt, s, $3 $+ )
    notice $nick 12The ASCII number for4 $3 12is4 $calc( $readn + 32 ) $+ 12.
    unset %ascii.find
} }
on *:text:!ascii c:#:{
  notice $nick 1| ASCII Charts |
  notice $nick 12#32-#127:4 http://www.asciitable.com/asciifull.gif $+ 
  notice $nick 12#128-#240:4 http://www.asciitable.com/extend.gif $+ 
  notice $nick 1 -- End --
}
on *:text:@ascii n *:#:{
  if ($3 == $null) {
    msg $chan 12Error 4ASCII 1-12 Syntax: "!ascii n Number", converts the Number to the ASCII symbol.
    halt
  }
  else {
    if ($3 > 255 || $3 < 33) {
      msg $chan 12Error 4ASCII 1-12 The ASCII characters only go from 33-255.
      halt
    }
    else {
      if (*a* iswm $3- || *b* iswm $3- || *d* iswm $3- || *e* iswm $3- || *j* iswm $3- || *r* iswm $3-) {
        msg $chan 12Error 4ASCII 1-12 No letters are allowed in the Number to Symbol ASCII Lookup!
        halt
      }
      else {
        msg $chan 12The ASCII symbol for4 number $3 12is4 $chr( $+ $3 $+ ) $+ 12.
} } } }
on *:text:@ascii s *:#:{
  if ($3 == $null) {
    msg $chan 12Error 4ASCII 1-12 Syntax: "!ascii s Symbol", converts the Symbol to the ASCII number.
    halt
  }
  else {
    set %ascii.find $read(ascii.txt, s, $3 $+ )
    msg $chan 12The ASCII number for4 $3 12is4 $calc( $readn + 32 ) $+ 12.
    unset %ascii.find
} }
on *:text:@ascii c:#:{
  msg $chan 1| ASCII Charts |
  msg $chan 12#32-#127:4 http://www.asciitable.com/asciifull.gif $+ 
  msg $chan 12#128-#240:4 http://www.asciitable.com/extend.gif $+ 
  msg $chan 1 -- End --
}

on *:text:!l*:#:{
  if ($1 == !l) {
    set %capsam $regex($2-,/[A-Z]/g)
    set %capsper $calc(100 * $regex($2-,/[A-Z]/g) / $len($2-))
    notice $nick 1-12 Characters:4 $len( $+ $2- $+ ) 1-12 Letters In Caps:4 %capsam 1-12 Caps Percent:4 %capsper $+ % 1-
    unset %capsam | unset %capsper
  }
  else { halt
} }
on *:text:@l*:#:{
  if ($1 == @l) {
    set %capsam $regex($2-,/[A-Z]/g)
    set %capsper $calc(100 * $regex($2-,/[A-Z]/g) / $len($2-))
    msg # 3<7|4 $+ $nick $+ 7|3>1-12 Characters:4 $len( $+ $2- $+ ) 1-12 Letters In Caps:4 %capsam 1-12 Caps Percent:4 %capsper $+ % 1-
    unset %capsam | unset %capsper
  }
  else { halt
} }

on *:text:!yourmom:#:{ if ($chan == #pc-hq) { notice $nick Please use this in another channel that I am in to reduce spam in #PC-HQ. Thank you! | halt
  }
  else {
    notice $nick 12 $+ $read(yourmom.txt)
} }

on *:text:@yourmom:#:{ if ($chan == #pc-hq) { notice $nick Please use this in another channel that I am in to reduce spam in #PC-HQ. Thank you! | halt
  }
  else {
    msg # 3<7|4 $+ $nick $+ 7|3>12 $read(yourmom.txt)
} }
on *:text:!chuck:#:{ if ($chan == #pc-hq) { notice $nick Please use this in another channel that I am in to reduce spam in #PC-HQ. Thank you! | halt
  }
  else {
    notice $nick 12 $+ $read(chucknorris.txt)
} }
on *:text:@chuck:#:{ if ($chan == #pc-hq) { notice $nick Please use this in another channel that I am in to reduce spam in #PC-HQ. Thank you! | halt
  }
  else {
    msg # 3<|4 $+ $nick $+ 7|3>12 $read(chucknorris.txt)
} }

on *:text:!8ball*:#:{ if ($chan == #pc-hq) { notice $nick Please use this in another channel that I am in to reduce spam in #PC-HQ. Thank you! | halt
  }
  else {
    notice $nick 12 $+ $read(eightball.txt)
} }
on *:text:@8ball*:#:{ if ($chan == #pc-hq) { notice $nick Please use this in another channel that I am in to reduce spam in #PC-HQ. Thank you! | halt
  }
  else {
    msg # 3<7|4 $+ $nick $+ 7|3>12 $read(eightball.txt)
} }

on *:text:!sex*:#:{ if ($2 == $null) { msg # 4Error - No User Specified | halt
  }
  else {
    if ($3 == $null) { msg # 4EraBot 12has4 rough sex12 with4 $2 $+ 12.
    }
    else {
      if ($4 == $null) { msg # 4 $+ $2 12has 4rough sex12 with4 $3 $+ 12.
      }
      else {
        if ($5 == $null) { msg # 4EraBot12 has 4rough sex12 with4 $2 $+ 12,4 $3 $+ 12, and4 $4 $+ 12.
} } } } }

-------------------- YOUTUBE SEARCH ---------------------------------

alias c1 { return $+($chr(3),12,$1-) }
alias c2 { return $+($chr(3),04,$1-) }
alias c3 { return $+($chr(3),14,$1-) }

alias urlencode {
  var %a = $regsubex($$1,/([^\w\s])/Sg,$+(%,$base($asc(\t),10,16,2)))
  return $replace(%a,$chr(32),$chr(43))
}

on $*:text:/^[!@]youtube */Si:#: {
  if ($sock(ytube)) {
    .sockclose ytube
  }
  set %ytubeway $iif($left($1,1) == @,msg $chan,notice $nick)
  set %ytubeorigquery $2-
  set %ytubequery $urlencode($2-)
  set %ytubetimes 1

  if ($2 isnum) {
    $iif(%ytubetimes <= 6,set %ytubetimes $2,set %ytubetimes 6)
    set %ytubequery $urlencode($3-)
    set %ytubeorigquery $3-
  }
  set %ytuberept %ytubetimes
  .sockopen ytube www.youtube.com 80
}


on *:SOCKOPEN:ytube: {
  sockwrite -nt $sockname GET $+(/results?search_query=,%ytubequery,&search=Search)
  sockwrite -nt $sockname Host: www.youtube.com
  sockwrite -nt $sockname $crlf
}

on *:SOCKREAD:ytube: {
  if ($sockerr) {
    %ytubeway $c1(Socket Error - Name:) $c2($sockname) $c1(Error code:) ( $+ $c2($sockerr) $+ ) $c1(Please inform $me of this error message)
    halt
  }
  else {
    var %sockreader
    sockread %sockreader
    if (%sockreader) {
      if (*No Videos found for* iswm %sockreader) {
        %ytubeway $c1(No results found for:) $c2($+(",%ytubeorigquery,"))
        unset %ytube*
        sockclose ytube
      }
      if (*<div class="my" style="padding-top: 8px; font-size: 12px;">Results*</div>* iswm %sockreader) {
        noop $regex(%sockreader,/of (.*?)</div>/Si)
        set %ytuberesnum $regml(1)
        %ytubeway $c1(Your search of:) $c2(%ytubeorigquery) $c1(returned) $c2($bytes(%ytuberesnum,b)) $c1(results. Displaying the top) $c2($iif(%ytubetimes <= $calc(%ytuberesnum - 1),%ytubetimes,%ytuberesnum)) $+ $c1(:)
      }
      if (*<a href="*" onclick="_hbLink*;">*</a><br/>* iswm %sockreader) {
        noop $regex(%sockreader,/<a href="(.*?)" onclick="_hbLink(?:.*?);">(.*?)</a><br/>/Si)
        set %ytube.url $+(http://www.youtube.com,$regml(1))
        set %ytube.name $regml(2)
      }
      if (*<span class="runtime">*</span>* iswm %sockreader) {
        noop $regex(%sockreader,/<span class="runtime">(.*?)</span>/Si)
        set %ytube.runtime $regml(1)
      }
      if (*<span id="BeginvidDesc*">* iswm %lastline) {
        set %ytube.desc $remove($nohtml(%sockreader),   )
      }
      if (*<div class="vtagValue"><a href="/results?search_query=* iswm %sockreader) {
        set %ytube.tags $replace($nohtml(%sockreader), &nbsp; ,$chr(44),   ,$null,$+($chr(32),$chr(44)),$chr(44))
      }
      if (*<span class="grayText">Views:</span>* iswm %sockreader) {
        set %ytube.views $remove($nohtml(%sockreader),Views:,$chr(32),   $chr(9))
      }
      if (*<img class="rating" src="/img/star_sm.gif* iswm %sockreader) {
        inc %ytube.rating
      }
      if (*<img class="rating" src="/img/star_sm_half.gif* iswm %sockreader) {
        inc %ytube.rating 0.5
      }
      if ($len(%sockreader) <= 850) set %lastline %sockreader
    }
    if (*</div> <!-- end vEntry -->* iswm %sockreader) {
      if (%ytuberept != 0) {
        set %ytube.picrating $+($chr(3),[,$c2)
        set %ytube.picrating %ytube.picrating $+ $str($chr(127),$calc(%ytube.rating * 2))
        set %ytube.picrating $+(%ytube.picrating,$chr(3),15)
        set %ytube.picrating %ytube.picrating $+ $str($chr(127),$calc(10 - $count(%ytube.picrating,$chr(127))))
        set %ytube.picrating %ytube.picrating $+ $+($chr(3),])

        %ytubeway $c1($qt($chr(2) $+ %ytube.name $+ $chr(2))) $c2($+($chr(40),%ytube.runtime,$chr(41)))
        %ytubeway $c1(Description:) $c2(%ytube.desc)
        %ytubeway $c1(Views:) $c2(%ytube.views) $c1(| Rating:) %ytube.picrating $c1(| Tags:) $c2(%ytube.tags)
        %ytubeway $c1(Url:) $c3(%ytube.url)
        dec %ytuberept
      }
      unset %ytube.*
      if (%ytuberept == 0) { .sockclose ytube | unset %ytube* }
    }
  }
}

------------- END YOUTUBE SEARCH ----------------------
---------------------MONSTER LOOKUP------------------------

on $*:text:/^[!@]monster?/Si:#:{
  set %chan $chan
  VAR %q = 1
  WHILE ($Sock($+(monster.,%q))) INC %q
  SET $+(%,monster.,%q,.output) $iif($left($1,1) == @,msg $chan,!notice $nick) 

  sockopen $+(monster.,%q) www.o-ss.net 80
  SockMark $+(monster.,%q) $replace($2-,$chr(32),+)
}


on *:sockopen:monster.*:{
  if ($sockerr > 0) { $($+(%,$sockname,.output),2) Socket Error | sockclose $sockname | halt }
  sockwrite -nt $sockname GET /parsers/monster.php?monster= $+ $sock($sockname).mark HTTP/1.1
  sockwrite -nt $sockname Host: www.o-ss.net $+ $crlf $+ $crlf
}

on *:sockread:monster.*:{
  if ($sockerr) msg %chan There was a socket error getting monster information, please try again later.
  else {
    Var %read
    sockread %read
    if (*Race* iswm %read) {
      if (*database* iswm %read) { msg %chan 4Search Returned No Results | /cleanup $sockname | /halt }
      else {
        $($+(%,$sockname,.output),2) 1- 12Monster:4 $gettok(%read,1,42) 1-12 $remove($replace($gettok(%read,2-,42),M:,1- 12Members Only:4,Q:,1- 12Quest Only:4,level:,1- 12Level:4),END) 1-
      }
    }
  }
}

-----------------END MONSTER LOOKUP-------------
----------- Number Game --------------
on *:text:!ngm:#,?:{ mn 4 This is my Number Game:
  mn 12 Start Game: !sng
  mn 12 Stop Game: !tng
  mn 12 Guess A Number: !guess 1-100
  mn 12 See Your Own/Others Won Games: !wng / !wng Nick
mn 1 -- End -- }
on *:text:!sng:#:{ if ($chan == #pc-hq) || ($chan == #taomclan) || ($chan == #castlewars) {
    notice $nick Please join #EraBot or another channel that I am in to play this game. (Quite Spammy)
  }
  else {
    if (%snumgame [ $+ [ $chan ] ] != on) {
      set %snumgame [ $+ [ $chan ] ] on
      set %snumgamenum [ $+ [ $chan ] ] $rand(1,100)
      msg # 4 $+ $nick 12has started a number guessing game! Type "4!guess 1-10012" to guess.
      echo 1- 12Game:4 Number Game 1- 12Channel:4 $chan 1- 12Answer:4 %snumgamenum [ $+ [ $chan ] ] 1-
    }
    else { msg # 12Sorry4 $nick $+ 12, but there is already a game running on4 $chan $+ 12.  To stop it type "4!tng12", or keep playing with "4!guess 1-10012".
} } }
on *:text:!tng:#:{ if (%snumgame [ $+ [ $chan ] ] == on) {
    unset %snumgamenum [ $+ [ $chan ] ]
    unset %snumgame [ $+ [ $chan ] ]
    msg # 12Number Game stopped early by4 $nick $+ 12.
  }
  else { msg # 12Sorry4 $nick $+ 12, but there is no current game running.  Type "4!sng12" to start a game.
} }
on *:text:!guess*:#:{ if (%snumgame [ $+ [ $chan ] ] != on) {
    msg # 12Sorry4 $nick $+ 12, but there is no current game running.  Type "4!sng12" to start a game.
  }
  else {
    if ($2 > 100) { notice $nick 12The number limit is4 100 $+ 12. | halt
    }
    else {
      if ($2 < %snumgamenum [ $+ [ $chan ] ]) { msg # 12Sorry,4 $nick $+ 12, but4 $2 12is too4 low12.
      }
      else {
        if ($2 > %snumgamenum [ $+ [ $chan ] ]) { msg # 12Sorry,4 $nick $+ 12, but4 $2 12is too4 high12.
        }
        else {
          if ($2 == %snumgamenum [ $+ [ $chan ] ]) { msg # 4 $+ $nick 12has guessed correctly!7 Answer: 1(4 %snumgamenum [ $+ [ $chan ] ] 1) 
            inc %numgames [ $+ [ $nick ] ] 1
            set %numgames.status [ $+ [ $nick ] ] on
            unset %snumgamenum [ $+ [ $chan ] ]
            unset %snumgame [ $+ [ $chan ] ]
} } } } } }
on *:text:!wng:#:{ if (%numgames.status [ $+ [ $nick ] ] == on) {
    msg # 4 $+ $nick $+ 12, you have won the number game4 %numgames [ $+ [ $nick ] ] 12times.
  }
  else { msg # 4 $+ $nick $+ 12, you have not won any games.
} }
on *:text:!wng*:#:{ if (%numgames.status [ $+ [ $2 ] ] == on) {
    msg # 4 $+ $2 12has won the number game4 %numgames [ $+ [ $2 ] ] 12times.
  }
  else { msg # 4 $+ $2 12has not won any games.
} }
-------- End Number Game --------

--------------------------------------------------------------------------
HANGMAN:

alias hc1 { return 12 }
alias hc2 { return 4 }
on *:Text:!*:#:{ do.hang $1- }
on *:Input:#:{
if ((.* iswm $1) || (!* iswm $1)) { do.hang ! $+ $right($1-,-1) } }
alias do.hang {
  if (($1 == !hangman) && (!$hget(hangman))) {
    set %hangman [ $+ [ $chan ] ] on
    hmake hangman 10
    set %hangmanword [ $+ [ $chan ] ] $read(hangman.txt)
    hadd hangman word %hangmanword [ $+ [ $chan ] ]
    hadd hangman chan $chan
    hadd hangman man $iif($2 ison $chan, $2, $nick($chan, $rand(1,$nick($chan,0))))
    echo 1-12 Game:4 Hangman 1- Channel:4 $chan 1- 12Answer:4 %hangmanword [ $+ [ $chan ] ] 1-
    hmsg $msg.hang.start
  }
  if ($1 == !shangman) {
    if (%hangman [ $+ [ $chan ] ] == on) {
      hfree hangman
      set %hangman [ $+ [ $chan ] ] off
      unset %hangmanword [ $+ [ $chan ] ]
      msg $chan 12Hangman game has been stopped in4 $chan 12by4 $nick $+ 12.
    }
    else {
      msg $chan 12There is not a current hangman game on. Type "4!hangman12" to start one.
  } }
  if ($1 == !answer) {
    if ($2- == %hangmanword [ $+ [ $chan ] ]) {
      msg $chan 12Good job4 $nick $+ 12! You have just saved4 $hget(hangman,man) 12by guessing the correct word.7 Answer:1 (4 %hangmanword [ $+ [ $chan ] ] 1)
      hfree hangman
      set %hangman [ $+ [ $chan ] ] off
      unset %hangmanword [ $+ [ $chan ] ]
      halt
    }
    else { msg $chan 12Sorry4 $nick $+ 12, but that is not the correct answer.
  } }
  if (!$hget(hangman)) { return }
  if ($1 == !hang) {
    if (%hangman [ $+ [ $chan ] ] == on) {
      if (($2 !isalpha) || ($len($2) != 1)) {
        hmsg $hc1 $+  $+ You gotta pick a letter moron.
        return 
      }
      elseif (%hangman [ $+ [ $chan ] ] == off) { 
        msg # 12There is no hangman game currently on. Type: "4!hangman12" to start one.
      }
      elseif ($hget(hangman,Picked. $+ $2)) {
        hmsg $hc1 $+  $+ Idiot... Try picking a letter that somebody else hasn't picked.
        return
      }
      else {
        hadd hangman Picked. $+ $2 1
        if ($2 isin $hget(hangman,word)) { 
          hmsg $msg.hang.right
          hang.checkwin
        }
        else { 
          var %hang.part = $hang.part
          hmsg $msg.hang.wrong(%hang.part)
        }
      }
    }
} }
alias hang.part {
  hadd hangman wrong $calc($hget(hangman, wrong) + 1)
  if ($hang.partname($hget(hangman, wrong)) == hanging) {
    hmsg $msg.hang.dead
    hfree hangman
    set %hangman [ $+ [ $chan ] ] off
    unset %hangmanword [ $+ [ $chan ] ]
    halt
  }
  return $hang.partname($hget(hangman, wrong))
}
alias hang.checkwin {
  if ($hang.got != $hget(hangman,word)) { return }
  hmsg $msg.hang.save
  hfree hangman
  set %hangman [ $+ [ $chan ] ] off
  unset %hangmanword [ $+ [ $chan ] ]
  halt
}
alias hang.partname { return $gettok(a head;a neck;torso;arms;hands;legs;feet;hanging, $1, $asc(;)) }
alias hang.got {
  var %i = 1,%hang.got = $hget(hangman, word)
  unset %hang.left
  while (%i <= 26) {
    if (!$hget(hangman, Picked. $+ $chr($calc(96 + %i)))) { 
      %hang.got = $replace(%hang.got, $chr($calc(96 + %i)), @) 
      set -u120 %hang.left %hang.left $+ $chr($calc(96 + %i)) 
    }
    inc %i
  }
  return %hang.got
}
alias hmsg { msg $$hget(hangman,chan) $1- }
alias msg.hang.clue { return $hc1 $+ Current clue: $hc2 $+ $hang.got $hc1 $+ Letters remaining: $hc2 $+ %hang.left }
alias msg.hang.save { return $hc2 $+  $+ $hget(hangman,man) $+ $hc1 is saved! You're the best channelmates a person could want. }
alias msg.hang.dead { return $hc2 $+  $+ $hget(hangman,man) $+ $hc1 is DEAD! You all suck. Word: $hc2 $+ $hget(hangman,word) }
alias msg.hang.wrong { return $hc1 $+  $+ Smooth gimp! One step closer to dead. You just got $hc2 $+ $hget(hangman, man) $+ $hc1 $+ : $+ $hc2 $1 $+ $hc1 $+ ! $msg.hang.clue }
alias msg.hang.answerc { return 12You can use "4!answer Word(s)12" to guess the word(s) straight off. }
alias msg.hang.right { return $hc1 $+  $+ Well done, $hc2 $+ $nick $+ $hc1 $+ ! You picked a winning letter. $msg.hang.clue }
alias msg.hang.start { return $hc1 $+  $+ Get ready for some hangman... We are hanging $hc2 $+ $hget(hangman,man) $+ $hc1 $+ , unless you can prevent it. $hc2 $+ !hang <letter> $+ $hc1 to guess a letter. $msg.hang.clue }
-----------------------

on $*:text:/^[!@](rss|server|serv) .{1,4}$/Si:#:{
  if ($sock(server).status != $null) { notice $nick Please Try Again In a Minute. | halt }
  if ($left($1,1) == @) && ($left($remove($chan(#).mode,+),1) === c) || ($right($left($remove($chan(#).mode,+),2),1) === c) { set %rs2.color.strip on }
  set %rs2.nick $nick | set %rs2.send $iif($left($1,1) == @,.msg $chan,.notice $nick) | set %rs2.server $2 | set %rs2.color1 $+($chr(3),12) | set %rs2.color2 $+($chr(3),4))
  if (%rs2.server < 1) || (%rs2.server > 132) { .notice $nick Choose an RS2 Server Between 1-132 | unset %rs2.* | halt }
  sockopen server vulcan.ueuo.com 80
}
on *:sockopen:server:{
  if ($sockerr) { echo -s Rs2 Server Population Script SockOpen Error: $sock(server).wsmsg | .notice %rs2.nick Rs2 Server Population Script SockOpen Error: $sock(server).wsmsg | break }
  sockwrite -nt $sockname GET /genieserv2.php?world= $+ %rs2.server HTTP/1.1
  sockwrite -nt $sockname Host: vulcan.ueuo.com $+ $str($crlf,2)
}
on *:sockread:server:{
  if ($sockerr) { echo -s Rs2 Server Population Script SockRead Error: $sock(server).wsmsg | .notice %rs2.nick Rs2 Server Population Script SockRead Error: $sock(server).wsmsg | break }
  var %read | sockread %read
  tokenize 124 $remove(%read,Genie:)
  if ($0 == 6) { set %rs2.servernum $1 | set %rs2.players $2 | set %rs2.location $3 | set %rs2.servertype $4 | set %rs2.serverpct $5 | set %rs2.totalplayers $6 }
}
on *:sockclose:server:{
  if (%rs2.players == 2000) { %rs2.output = %rs2.color1 $+ 1|12 World $+ %rs2.color2 %rs2.servernum %rs2.color1 $+ is a %rs2.color2 $+ %rs2.servertype %rs2.color1 $+ World 1|12 Located in $+ %rs2.color2 %rs2.location %rs2.color1 $+ 1|12 This world is currently %rs2.color2 $+ FULL $+ %rs2.color1 1|12 %rs2.color2 $+ %rs2.serverpct %rs2.color1 $+ of the %rs2.color2 $+ $bytes(%rs2.totalplayers,b) %rs2.color1 $+ current users playing 1| }
  if (%rs2.players < 2000) { %rs2.output = %rs2.color1 $+ 1|12 World $+ %rs2.color2 %rs2.servernum %rs2.color1 $+ is a %rs2.color2 $+ %rs2.servertype %rs2.color1 $+ World 1|12 Located in $+ %rs2.color2 %rs2.location $+ %rs2.color1 1|12 You can find $+ %rs2.color2 $bytes(%rs2.players,b) %rs2.color1 $+ ( $+ %rs2.color2 $+ $calc((%rs2.players /2000)*100) $+ % Full $+ %rs2.color1 $+ ) players on this world, which is about %rs2.color2 $+ %rs2.serverpct %rs2.color1 $+ of the %rs2.color2 $+ $bytes(%rs2.totalplayers,b) %rs2.color1 $+ current users playing 1| }
  %rs2.send $iif(%rs2.color.strip != $null,$strip(%rs2.output,c),%rs2.output) | unset %rs2.* | halt
}

--------------------------------------------------------------------------
------KBASE SEARCH----------------

alias nohtml {
  var %x,%i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x)
  %x = $replace(%x,&nbsp;,$null)
  return %x
}
alias k.col1 { return $+($chr(3),04,$1,$chr(3)) }
alias k.col2 { return $+($chr(3),12,$1,$chr(3)) }
on $*:TEXT:/^[!@](kbase|knowledge) */Si:#: {
  if ($sock(kbase)) { halt }
  .unset %kbase.*
  .set %kbase.sectread $false
  .set %kbase.explread $false
  .set %kbase.out $iif($left($1,1) == @,msg $chan,notice $nick)
  .set %kbase.string $replace($2-,$chr(32),+)
  .sockopen kbase kbase.runescape.com 80
}
on *:SOCKOPEN:kbase: {
  if ($sockerr) { echo 4 -s ** SockOpen Error ** $sock($sockname).wsmsg | return }
  .sockwrite -n kbase GET /lang/en/aff/runescape/search.ws?submit=Search&category=-1&subcat=-1&q= $+ %kbase.string HTTP/1.1
  .sockwrite -n kbase Host: kbase.runescape.com $+ $crlf $+ $crlf
}
on *:SOCKREAD:kbase: {
  if ($sockerr) { echo 4 -s ** SockRead Error ** $sock($sockname).wsmsg | return }
  .sockread %kbase
  if (!%kbase.expl) {
    if (*results found matching* iswm %kbase) { .set %kbase.total $gettok($nohtml(%kbase),1,32) }
    if (*lang/en/aff/runescape/img/kbase/sword*gif* iswm %kbase) { set %kbase2 $regex(%kbase,/(viewarticle.+?)"/Si) | .set %kbase.url http://kbase.runescape.com/lang/en/aff/runescape/ $+ $regml(1) | .set %kbase.title $nohtml(%kbase) }
    if (%kbase.explread) { .set %kbase.expl $nohtml(%kbase) }
    if (</div> == %kbase && %kbase.sect) { .set %kbase.explread $true }
    if (</ul> == %kbase) { .set %kbase.sectread $false }
    if (%kbase.sectread) { .set %kbase.sect %kbase.sect > $nohtml($remove(%kbase,&gt;)) }
    if (<a href="viewcategory.ws?cat_id=0">Home</a> == %kbase) { .set %kbase.sectread $true | .set %kbase.sect Home }
  }
}
on *:SOCKCLOSE:kbase: {
  if (!%kbase.expl) { %kbase.out $k.col1(KnowledgeBase Lookup) $k.col2(couldn't) $k.col1(find any matches to your search) | halt }
  %kbase.out $k.col1(KnowledgeBase Matches:) $k.col2(%kbase.total) $k.col1(Title:) $k.col2(%kbase.title) $k.col1(Section) $k.col2(%kbase.sect) $k.col1(URL:) $k.col2(%kbase.url)
  %kbase.out $k.col1(Match Exceprt:) $k.col2(%kbase.expl)
  unset %kbase.*
}

----------END KBASE SEARCH----------------------------------

--------------------------------------------------------------------------

Syntax Commands:

on *:text:@syntax:#:{ mc Syntax: !bmd Color Symbol Text - Color can be first letter of the color (Or letter indicated below), use list below. Symbol is one or a couple things, such as "|" or ">".  Text is what you want the text to be in the middle.
  mc Or replace ! with @ for messaging the channel. (! is notice)
}
on *:text:!syntax*:#:{ if ($2 == $null) {
    notice $nick Syntax: !bmd Color Symbol Text - Color can be first letter of the color (Or letter indicated below), use list below. Symbol is one or a couple things, such as "|" or ">".  Text is what you want the text to be in the middle.
    notice $nick Or replace ! with @ for messaging the channel. (! is notice)
  }
  else {
    notice $2 Syntax: !bmd Color Symbol Text - Color can be first letter of the color (Or letter indicated below), use list below. Symbol is one or a couple things, such as "|" or ">".  Text is what you want the text to be in the middle.
    notice $2 Or replace ! with @ for messaging the channel. (! is notice)
} }

on *:text:@syntaxw:#:{ msg # 12Syntax For Rainbow:4 !/@bmd w Symbol TextColor Text }
on *:text:@syntaxcn:#:{ msg # 12Syntax For Caution:4 !/@bmd cn Color1 Color2 TextColor Text }
on *:text:@syntaxr:#:{ msg # 12Syntax For Regular Colors:4 !/@bmd Color Symbol Text }

--------------------------------------------------------------------------

"!BMDS" Script:

on *:text:!bmds:#,?:{ msg $nick 4 My commands are as follows, follow the syntax or it will not work properly!
  msg $nick 4 Syntax: !/@bmd Color Symbol Text - Color can be first letter of the color (Or letter indicated below), use list below. Symbol is one or a couple things, such as "|" or ">".  Text is what you want the text to be in the middle.
  msg $nick 4 Or replace ! with @ for messaging the channel. (! is notice)  
  msg $nick 12 !/@bmd b Symbol Text = Blue
  msg $nick 12 !/@bmd r Symbol Text = Red
  msg $nick 12 !/@bmd o Symbol Text = Orange
  msg $nick 12 !/@bmd g Symbol Text = Green
  msg $nick 12 !/@bmd w Symbol Text Color Text = Rainbow
  msg $nick 12 !/@bmd cn Color1 Color2 Text Color Text = Caution Design
  msg $nick 1 -- End --
}

--------------------------------------------------------------------------

BMD Scripts:

-----------------------------------Blue:

on *:text:!bmd b*:#:{
  set %cd $3 | set %ct $4-
  nn 1||12>4 $+ $nick $+ 112<1|| 2,1 $+ %cd $+ 1,2 $+ %cd $+ 12,2 $+ %cd $+ 2,12 $+ %cd $+ 11,12 $+ %cd $+ 12,11 $+ %cd $+ 0,11 $+ %cd $+ 11,0 $+ %cd $+ 0,0-15,0 $+ %cd $+ 0,15 $+ %cd $+ 14,15 $+ %cd $+ 15,14 $+ %cd $+ 1,14 $+ %cd $+ 14,1 $+ %cd $+ 1,1-0,1 %ct 1,1-14,1 $+ %cd $+ 1,14 $+ %cd $+ 15,14 $+ %cd $+ 14,15 $+ %cd $+ 0,15 $+ %cd $+ 15,0 $+ %cd $+ 0,0-11,0 $+ %cd $+ 0,11 $+ %cd $+ 12,11 $+ %cd $+ 11,12 $+ %cd $+ 2,12 $+ %cd $+ 12,2 $+ %cd $+ 1,2 $+ %cd $+ 2,1 $+ %cd $+ 
}
on *:text:@bmd b*:#:{
  set %cd $3 | set %ct $4-
  mc 1||12>4 $+ $nick $+ 112<1|| 2,1 $+ %cd $+ 1,2 $+ %cd $+ 12,2 $+ %cd $+ 2,12 $+ %cd $+ 11,12 $+ %cd $+ 12,11 $+ %cd $+ 0,11 $+ %cd $+ 11,0 $+ %cd $+ 0,0-15,0 $+ %cd $+ 0,15 $+ %cd $+ 14,15 $+ %cd $+ 15,14 $+ %cd $+ 1,14 $+ %cd $+ 14,1 $+ %cd $+ 1,1-0,1 %ct 1,1-14,1 $+ %cd $+ 1,14 $+ %cd $+ 15,14 $+ %cd $+ 14,15 $+ %cd $+ 0,15 $+ %cd $+ 15,0 $+ %cd $+ 0,0-11,0 $+ %cd $+ 0,11 $+ %cd $+ 12,11 $+ %cd $+ 11,12 $+ %cd $+ 2,12 $+ %cd $+ 12,2 $+ %cd $+ 1,2 $+ %cd $+ 2,1 $+ %cd $+ 
}

-----------------------------------Red:

on *:text:!bmd r*:#:{
  set %cd $3 | set %ct $4-
  nn 1||12>4 $+ $nick $+ 112<1|| 4,1 $+ %cd $+ 1,4 $+ %cd $+ 7,4 $+ %cd $+ 4,7 $+ %cd $+ 8,7 $+ %cd $+ 7,8 $+ %cd $+ 0,8 $+ %cd $+ 8,0 $+ %cd $+ 0,0-15,0 $+ %cd $+ 0,15 $+ %cd $+ 14,15 $+ %cd $+ 15,14 $+ %cd $+ 1,14 $+ %cd $+ 14,1 $+ %cd $+ 1,1-0,1 %ct 1,1-14,1 $+ %cd $+ 1,14 $+ %cd $+ 15,14 $+ %cd $+ 14,15 $+ %cd $+ 0,15 $+ %cd $+ 15,0 $+ %cd $+ 0,0-8,0 $+ %cd $+ 0,8 $+ %cd $+ 7,8 $+ %cd $+ 8,7 $+ %cd $+ 4,7 $+ %cd $+ 7,4 $+ %cd $+ 1,4 $+ %cd $+ 4,1 $+ %cd $+ 
}
on *:text:@bmd r*:#:{
  set %cd $3 | set %ct $4-
  mc 1||12>4 $+ $nick $+ 112<1|| 4,1 $+ %cd $+ 1,4 $+ %cd $+ 7,4 $+ %cd $+ 4,7 $+ %cd $+ 8,7 $+ %cd $+ 7,8 $+ %cd $+ 0,8 $+ %cd $+ 8,0 $+ %cd $+ 0,0-15,0 $+ %cd $+ 0,15 $+ %cd $+ 14,15 $+ %cd $+ 15,14 $+ %cd $+ 1,14 $+ %cd $+ 14,1 $+ %cd $+ 1,1-0,1 %ct 1,1-14,1 $+ %cd $+ 1,14 $+ %cd $+ 15,14 $+ %cd $+ 14,15 $+ %cd $+ 0,15 $+ %cd $+ 15,0 $+ %cd $+ 0,0-8,0 $+ %cd $+ 0,8 $+ %cd $+ 7,8 $+ %cd $+ 8,7 $+ %cd $+ 4,7 $+ %cd $+ 7,4 $+ %cd $+ 1,4 $+ %cd $+ 4,1 $+ %cd $+ 
}

-----------------------------------Green:

on *:text:!bmd g*:#:{
  set %cd $3 | set %ct $4-
  nn 1||12>4 $+ $nick $+ 112<1|| 3,1 $+ %cd $+ 1,3 $+ %cd $+ 10,3 $+ %cd $+ 3,10 $+ %cd $+ 9,10 $+ %cd $+ 10,9 $+ %cd $+ 0,9 $+ %cd $+ 9,0 $+ %cd $+ 0,0-15,0 $+ %cd $+ 0,15 $+ %cd $+ 14,15 $+ %cd $+ 15,14 $+ %cd $+ 1,14 $+ %cd $+ 14,1 $+ %cd $+ 1,1-0,1 %ct 1,1-14,1 $+ %cd $+ 1,14 $+ %cd $+ 15,14 $+ %cd $+ 14,15 $+ %cd $+ 0,15 $+ %cd $+ 15,0 $+ %cd $+ 0,0-9,0 $+ %cd $+ 0,9 $+ %cd $+ 10,9 $+ %cd $+ 9,10 $+ %cd $+ 3,10 $+ %cd $+ 10,3 $+ %cd $+ 1,3 $+ %cd $+ 3,1 $+ %cd $+ 
}
on *:text:@bmd g*:#:{
  set %cd $3 | set %ct $4-
  mc 1||12>4 $+ $nick $+ 112<1|| 3,1 $+ %cd $+ 1,3 $+ %cd $+ 10,3 $+ %cd $+ 3,10 $+ %cd $+ 9,10 $+ %cd $+ 10,9 $+ %cd $+ 0,9 $+ %cd $+ 9,0 $+ %cd $+ 0,0-15,0 $+ %cd $+ 0,15 $+ %cd $+ 14,15 $+ %cd $+ 15,14 $+ %cd $+ 1,14 $+ %cd $+ 14,1 $+ %cd $+ 1,1-0,1 %ct 1,1-14,1 $+ %cd $+ 1,14 $+ %cd $+ 15,14 $+ %cd $+ 14,15 $+ %cd $+ 0,15 $+ %cd $+ 15,0 $+ %cd $+ 0,0-9,0 $+ %cd $+ 0,9 $+ %cd $+ 10,9 $+ %cd $+ 9,10 $+ %cd $+ 3,10 $+ %cd $+ 10,3 $+ %cd $+ 1,3 $+ %cd $+ 3,1 $+ %cd $+ 
}

-----------------------------------Orange:

on *:text:!bmd o*:#:{
  set %cd $3 | set %ct $4-
  nn 1||12>4 $+ $nick $+ 112<1|| 8 $+ %cd $+ 0,8 $+ %cd $+ 7,8 $+ %cd $+ 8,7 $+ %cd $+ 4,7 $+ %cd $+ 7,4 $+ %cd $+ 5,4 $+ %cd $+ 4,5 $+ %cd $+ 1,5 $+ %cd $+ 5,1 $+ %cd $+ 7,1 %ct 5,1 $+ %cd $+ 1,5 $+ %cd $+ 4,5 $+ %cd $+ 5,4 $+ %cd $+ 7,4 $+ %cd $+ 0,7 $+ %cd $+ 8,7 $+ %cd $+ 7,8 $+ %cd $+ 0,8 $+ %cd $+ 8 $+ %cd $+ 
}
on *:text:@bmd o*:#:{
  set %cd $3 | set %ct $4-
  mc 1||12>4 $+ $nick $+ 112<1|| 8 $+ %cd $+ 0,8 $+ %cd $+ 7,8 $+ %cd $+ 8,7 $+ %cd $+ 4,7 $+ %cd $+ 7,4 $+ %cd $+ 5,4 $+ %cd $+ 4,5 $+ %cd $+ 1,5 $+ %cd $+ 5,1 $+ %cd $+ 7,1 %ct 5,1 $+ %cd $+ 1,5 $+ %cd $+ 4,5 $+ %cd $+ 5,4 $+ %cd $+ 7,4 $+ %cd $+ 0,7 $+ %cd $+ 8,7 $+ %cd $+ 7,8 $+ %cd $+ 0,8 $+ %cd $+ 8 $+ %cd $+ 
}

-----------------------------------Rainbow:

on *:text:!bmd w*:#:{
  set %cd $3 | set %tc $4- | set %ct $5-
  nn 1||12>4 $+ $nick $+ 112<1|| 6,12 $+ %cd $+ 12,6 $+ %cd $+ 13,6 $+ %cd $+ 6,13 $+ %cd $+ 4,13 $+ %cd $+ 13,4 $+ %cd $+ 7,4 $+ %cd $+ 4,7 $+ %cd $+ 8,7 $+ %cd $+ 7,8 $+ %cd $+ 9,8 $+ %cd $+ 8,9 $+ %cd $+ 10,9 $+ %cd $+ 9,10 $+ %cd $+ 12,10 $+ %cd $+ 10,12 $+ %cd $+ 0,12 %ct 10,12 $+ %cd $+ 12,10 $+ %cd $+ 9,10 $+ %cd $+ 10,9 $+ %cd $+ 8,9 $+ %cd $+ 9,8 $+ %cd $+ 7,8 $+ %cd $+ 8,7 $+ %cd $+ 4,7 $+ %cd $+ 7,4 $+ %cd $+ 13,4 $+ %cd $+ 4,13 $+ %cd $+ 6,13 $+ %cd $+ 13,6 $+ %cd $+ 12,6 $+ %cd $+ 6,12 $+ %cd $+ 
} 
on *:text:@bmd w*:#:{
  set %cd $3 | set %tc $4 | set %ct $5-
  mc 1||12>4 $+ $nick $+ 112<1|| 6,12 $+ %cd $+ 12,6 $+ %cd $+ 13,6 $+ %cd $+ 6,13 $+ %cd $+ 4,13 $+ %cd $+ 13,4 $+ %cd $+ 7,4 $+ %cd $+ 4,7 $+ %cd $+ 8,7 $+ %cd $+ 7,8 $+ %cd $+ 9,8 $+ %cd $+ 8,9 $+ %cd $+ 10,9 $+ %cd $+ 9,10 $+ %cd $+ 12,10 $+ %cd $+ 10,12 $+ %cd $+  $+ %tc $+ ,12 %ct 10,12 $+ %cd $+ 12,10 $+ %cd $+ 9,10 $+ %cd $+ 10,9 $+ %cd $+ 8,9 $+ %cd $+ 9,8 $+ %cd $+ 7,8 $+ %cd $+ 8,7 $+ %cd $+ 4,7 $+ %cd $+ 7,4 $+ %cd $+ 13,4 $+ %cd $+ 4,13 $+ %cd $+ 6,13 $+ %cd $+ 13,6 $+ %cd $+ 12,6 $+ %cd $+ 6,12 $+ %cd $+ 
} 

-----------------------------------Caution:

on *:text:!bmd cn*:#:{
  set %cc1 $3 | set %cc2 $4 | set %tc $5 | set %ct $6-
  nn 1||12>4 $+ $nick $+ 112<1||  $+ %cc1 $+ , $+ %cc2 $+ C $+ %cc2 $+ , $+ %cc1 $+ A $+ %cc1 $+ , $+ %cc2 $+ U $+ %cc2 $+ , $+ %cc1 $+ T $+ %cc1 $+ , $+ %cc2 $+ I $+ %cc2 $+ , $+ %cc1 $+ O $+ %cc1 $+ , $+ %cc2 $+ N %ct  $+ %cc1 $+ , $+ %cc2 $+ C $+ %cc2 $+ , $+ %cc1 $+ A $+ %cc1 $+ , $+ %cc2 $+ U $+ %cc2 $+ , $+ %cc1 $+ T $+ %cc1 $+ , $+ %cc2 $+ I $+ %cc2 $+ , $+ %cc1 $+ O $+ %cc1 $+ , $+ %cc2 $+ N
}
on *:text:@bmd cn*:#:{
  set %cc1 $3 | set %cc2 $4 | set %tc $5 | set %ct $6-
  mc 1||12>4 $+ $nick $+ 112<1||  $+ %cc1 $+ , $+ %cc2 $+ C $+ %cc2 $+ , $+ %cc1 $+ A $+ %cc1 $+ , $+ %cc2 $+ U $+ %cc2 $+ , $+ %cc1 $+ T $+ %cc1 $+ , $+ %cc2 $+ I $+ %cc2 $+ , $+ %cc1 $+ O $+ %cc1 $+ , $+ %cc2 $+ N $+ %tc %ct  $+ %cc1 $+ , $+ %cc2 $+ C $+ %cc2 $+ , $+ %cc1 $+ A $+ %cc1 $+ , $+ %cc2 $+ U $+ %cc2 $+ , $+ %cc1 $+ T $+ %cc1 $+ , $+ %cc2 $+ I $+ %cc2 $+ , $+ %cc1 $+ O $+ %cc1 $+ , $+ %cc2 $+ N
}


--------------------------------------------------------------------------