;; rps bot on *:TEXT:!rps*:#:{ if ($2 == start) { if ($nick !isreg #) { msg # Starting a game of Rock Paper Scissors msg # Use: !R, !P, !S set %rps on set %uw 0 set %ut 0 set %ul 0 set %bw 0 set %bt 0 set %bl 0 } } if ($2 == stop) { if ($nick !isreg #) { msg # Stopped playing Rock Paper Scissors msg # Use !rps start to play again unset %rps unset %uw unset %ut unset %ul unset %bw unset %bt unset %bl } } } on *:TEXT:!r:#:{ if (%rps) { set %uobj Rock set %bobj $rand(1,9) setobj } } on *:TEXT:!p:#:{ if (%rps) { set %uobj Paper set %bobj $rand(1,9) setobj } } on *:TEXT:!s:#:{ if (%rps) { set %uobj Scissors set %bobj $rand(1,9) setobj } } alias chknmsg { if (%uobj == Scissors) { if (%bobj == Rock) { inc %bw inc %ul msg # I won with  $+ %bobj $+ . You Picked  $+ %uobj $+  msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl msg # User Score: Wins: %uw Ties: %ut Loses: %ul } if (%bobj == Paper) { inc %bl inc %uw msg # You won with  $+ %uobj $+ . I Picked  $+ %bobj $+  msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl msg # User Score: Wins: %uw Ties: %ut Loses: %ul } } if (%uobj == Paper) { if (%bobj == Rock) { inc %uw inc %bl .timer 1 1 msg # You won with  $+ %uobj $+ . I Picked  $+ %bobj $+  .timer 1 2 msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl .timer 1 3 msg # User Score: Wins: %uw Ties: %ut Loses: %ul } if (%bobj == Scissors) { inc %bw inc %ul .timer 1 1 msg # I won with  $+ %bobj $+ . You Picked  $+ %uobj $+  .timer 1 2 msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl .timer 1 3 msg # User Score: Wins: %uw Ties: %ut Loses: %ul } } if (%uobj == Rock) { if (%bobj == Paper) { inc %bw inc %ul .timer 1 1 msg # I won with  $+ %bobj $+ . You Picked  $+ %uobj $+  .timer 1 2 msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl .timer 1 3 msg # User Score: Wins: %uw Ties: %ut Loses: %ul } if (%bobj == Scissors) { inc %bl inc %uw .timer 1 1 msg # You won with  $+ %uobj $+ . I Picked  $+ %bobj $+  .timer 1 2 msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl .timer 1 3 msg # User Score: Wins: %uw Ties: %ut Loses: %ul } } if (%uobj === %bobj) { inc %bt inc %ut .timer 1 1 msg # Draw. We Both Picked  $+ %bobj $+  .timer 1 2 msg # Bot Score: Wins: %bw Ties: %bt Loses: %bl .timer 1 3 msg # User Score: Wins: %uw Ties: $calc(%ut + 1) Loses: %ul } } alias setobj { if ((%bobj == 1) || (%bobj == 5) || (%bobj == 9)) { set %bobj Rock .timer 1 1 chknmsg halt } if ((%bobj == 2) || (%bobj == 6) || (%bobj == 8)) { set %bobj Paper .timer 1 1 chknmsg halt } if ((%bobj == 3) || (%bobj == 4) || (%bobj == 7)) { set %bobj Scissors .timer 1 1 chknmsg halt } } on *:TEXT:*:?:{ if ($1 == SLOTS) { var %p 1 while (%p <= $lines($me $+ .channels.txt)) { if ($2 == $gettok($read($me $+ .channels.txt,%p),2,32)) { .msg $nick SLOTS $3 $2 is already the owner of $gettok($read($me $+ .channels.txt,%p),1,32) $+ . Logged Address: $gettok($read($me $+ .channels.txt,%p),3,32) halt } inc %p } .msg $nick SLOTS $calc(20 - #(0)) $2 } if ($1 == JOIN) { write $me $+ .channels.txt $2 $3 $4 .msg $nick BOTJOIN $3 Bot $me has been dispatched to your channel ( $+ $2 $+ ) You are now the owner of $me in channel $2 $+ . (Your Logged Address: $4 $+ ) join $2 .notice $3 You are now my owner in $2 $+ . Type @commands to view my command list. } if ($1 == BROADCAST) { var %p 1 while (%p <= $lines($me $+ .channels.txt)) { .msg $gettok($read($me $+ .channels.txt,%p),1,32) $2- } } if ($1 == CHANLIST) { var %p 1 var %chans. $+ $me while (%p <= $lines($me $+ .channels.txt)) { set %chans. $+ $me %chans. [ $+ [ $me ] ] $gettok($read($me $+ .channels.txt,%p),1,32) inc %p } .notice $2 Channels: %chans. [ $+ [ $me ] ] } if ($1 == INFO) { var %p 1 var %chans. $+ $me while (%p <= $lines($me $+ .channels.txt)) { if ($2 == $gettok($read($me $+ .channels.txt,%p),1,32)) { .msg $nick INFO $3 Channel: $2 Bot: $me Owner: $gettok($read($me $+ .channels.txt,%p),2-,32) halt } inc %p } } if ($1 == RAW) { $2- } if ($1 == BOTNICKS) { nick $3 $+ $right($me,3) .timer $+ $3 $+ $right($me,3) 1 5 $!iif($3 == $mid($me,1,-3),msg $nick BOTNICKCON Bot $me nick changed successfully!,botnickdeny $4 $2) } if ($1 == BOTNICKCHANGEBACK) { nick $3 $+ $right($me,3) .timer $+ $3 $+ $right($me,3) 1 5 $!iif($3 == $mid($me,1,-3),msg $nick BOTNICKCON Bot $me nick changed back successfully!,botnickdeny %botnicks $2) } } alias botnickdeny { msg $nick BOTNICKDEN $1 $2 Bot $me $+ 's nick was unable to be changed. Nick may already be in use. halt } on *:JOIN:#:{ } /* This section contains the help contents for IRC Uno Commands. !Uno - Use this command in an active Uno channel to start a game of IRC Uno. Join - Use this command to join a game after someone has typed !Uno !Deal - If you started a game with !Uno you will be informed to use this command to deal the cards after 1-9 other players join. !Play - Use !Play to play standard cards, 0-9, Reverse, Skip, DrawTwo. Use !Play W to play a wild and !Play WD4 to play a wild draw for. (Colors, numbers and words are accepted values. Red, r, five, 5, d2, drawtwo, etc.. are all accepted values.) !Draw - Use this if none of your cards play to draw a card off of the top of the deck. !Pass - If enabled use this to pass if your drawn card cannot play. !UnoTop10