on *:TEXT:!challenge:#: {
set %player1 $nick
set %join on
.msg $chan %player1 has started a game of rr type !accept to join.
}
on *:TEXT:!accept:#: {
if (%join == on) {
set %player2 $nick
set %join off
set %play on
.msg $chan %player2 has challanged %player1 to a game of RR
set %go $rand(1,2)
if (%go = 1) {
msg $chan %player1 to go 1st
set %go 1
}
else {
msg $chan %player2 to go 1st
set %go 2
}
}
}
on *:TEXT:!shoot:#: {
if (%play = on) && ($nick = %player1 ) {
set %gun $rand(1,2)
if (%go = 1) {
if (%gun = 1) {
msg $chan CLICK! No bullet in there
set %go 2
}
else if (%gun = 2) {
msg $chan BAM %player1 died
set %play off
unset %gun
unset %gun1
}
}
else {
notice $nick its not your go!
}
}
else if (%play = on) && ($nick = %player2) {
set %gun1 $rand(1,2)
if (%go = 2) {
if (%gun1 = 1) {
msg $chan CLICK! No bullet in there
set %go 1
}
else if (%gun1 = 2) {
msg $chan BAM %player2 died
set %play off
unset %gun
unset %gun1
}
}
else {
notice $nick its not your go!
}
}
}