rendered paste bodyon $*:TEXT:/^[@!.]rps */Si:#:{
if ($nick !isreg $chan) {
if (!$2) {
$iif($left($1,1) == @,msg $chan,notice $nick) $logo(Error!) You have to specify someone to play with!! | halt
}
else {
var %list Rock|Paper|Scissors
inc %games [ $+ [ $nick ] ]
set %opponent $2
set %opponenthand $gettok(%list,$r(1,$numtok(%list,124)),124)
set %nickhand $gettok(%list,$r(1,$numtok(%list,124)),124)
msg $chan $logo(Rock-Paper-Scissors) 04 $+ $nick 14has challenged04 %opponent 14to a "Rock, Paper, Scissors" match!
describe $chan watches both competators shaking fists up and down 3 times then waits...
if (%nickhand == %opponenthand) {
inc %draws [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(DRAW) Both04 $nick 14and04 %opponent 14have the same hand shape! It's a 04draw!
.timer 1 2 notice $nick $logo(Round-Up) You have drew04 %draws [ $+ [ $nick ] ] 14 time(s)! | halt
}
if (%nickhand == Rock) && (%opponenthand == Scissors) {
inc %wins [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(WIN) 04 $+ $nick $+ 's %nickhand 14smashes14 %opponent $+ 's Scissors 14making04 $nick 14take the victory!
.timer 1 2 notice $nick $logo(Round-Up) You have won04 %wins [ $+ [ $nick ] ] 14time(s)! To view your overall performance, type !roundup | halt
}
if (%nickhand == Scissors) && (%opponenthand == Rock) {
inc %losses [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(LOSE) 04 $+ $nick $+ 's Scissors14 were smashed by04 %opponent $+ 's Rock 14making04 %opponent 14take the victory!
.timer 1 2 notice $nick $logo(Round-Up) You have lost04 %losses [ $+ [ $nick ] ] 14time(s)! To view your overall performance, type !roundup | halt
}
if (%nickhand == scissors) && (%opponenthand == paper) {
inc %wins [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(WIN) 04 $+ $nick $+ 's %nickhand 14chops up14 %opponent $+ 's paper 14making04 $nick 14take the victory!
.timer 1 2 notice $nick $logo(Round-Up) You have won04 %wins [ $+ [ $nick ] ] 14time(s)! To view your overall performance, type !roundup | halt
}
if (%nickhand == paper) && (%opponenthand == scissors) {
inc %losses [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(LOSE) 04 $+ $nick $+ 's paper14 gets chopped up by04 %opponent $+ 's scissors 14making04 %opponent 14take the victory!
.timer 1 2 notice $nick $logo(Round-Up) You have lost04 %losses [ $+ [ $nick ] ] 14time(s)! To view your overall performance, type !roundup | halt
}
if (%nickhand == Rock) && (%opponenthand == Paper) {
inc %losses [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(LOSE) 04 $+ %opponent $+ 's %opponenthand 14covers over04 $nick $+ 's %nickhand 14making04 $nick 14take the victory!
.timer 1 2 notice $nick $logo(Round-Up) You have lost04 %losses [ $+ [ $nick ] ] 14time(s)! To view your overall performance, type !roundup | halt
}
if (%nickhand == Paper) && (%opponenthand == Rock) {
inc %wins [ $+ [ $nick ] ]
.timer 1 2 msg $chan $logo(WIN) 04 $+ %opponent $+ 's %opponenthand 14gets stuck under04 $nick $+ 's %nickhand 14making04 %opponent 14take the victory!
.timer 1 2 notice $nick $logo(Round-Up) You have won04 %wins [ $+ [ $nick ] ] 14time(s)! To view your overall performance, type !roundup | halt
}
}
}
else {
notice $nick $logo(NOOOO) You're not using it! | halt
}
}
on $*:TEXT:/^[@!.]roundup\b/Si:#:{
if (%games [ $+ [ $nick ] ] >= 1) {
$iif($left($1,1) == @,msg $chan,notice $nick) $logo(Round-Up) 04 $+ $nick $+ 14's personal score: Total number of games04 %games [ $+ [ $nick ] ] $+ 14, Total wins:04 $calc(%wins [ $+ [ $nick ] ] ) 14, Total losses:04 $calc(%losses [ $+ [ $nick ] ] ) 14, And total number of draws:04 $calc(%draws [ $+ [ $nick ] ] ) 14. | halt
}
else {
$iif($left($1,1) == @,msg $chan,notice $nick) $logo(Round-Up) Silly04 $nick 14! You must start your own game before you get scores! | halt
}
}