on *:TEXT:!bomb:#:{ if (%playing [ $+ [ $nick ] ] == 1) { notice $nick You're already playing! | halt } ; If they're already playing, they can't begin a new game.
else { set %wire [ $+ [ $nick ] ] $rand(1,4) ; set %wireNICK to 1, 2, 3, or 4.
set %playing [ $+ [ $nick ] ] 1 ; set %playingNICK to say that they're playing.
notice $nick There's a bomb under your seat... You have a chance to disarm it... if you cut the right wire. Make your choice by typing 2!cutblue1, 4!cutred1, !cutblack, or 3!cutgreen1. Choose wisely... } } ; Tells them what to do.
; ^ Begins the game
on *:TEXT:!cutred:#:{ if (!%playing [ $+ [ $nick ] ] ) { notice $nick Hey, you haven't started this game yet! Type 4!bomb1 to start it! | halt } ; If %playingNICK doesn't exist, they haven't started the game yet.
else { ; %playingNICK exists, so they must be playing.
if (%wire [ $+ [ $nick ] ] == 1) { ; If %wireNICK is equal to 1 (red), they win!
notice $nick Congratz $nick $+ ! You defused the bomb!
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] ; unset %playingNICK so they can play again
}
else { ; They lost, didn't choose the right wire :(
notice $nick Aww you lose! And you're dead.
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] } } } ; unset %playingNICK so they can play again.
on *:TEXT:!cutblack:#:{ if (!%playing [ $+ [ $nick ] ] ) { notice $nick Hey, you haven't started this game yet! Type 4!bomb1 to start it! | halt } ; If %playingNICK doesn't exist, they haven't started the game yet.
else { ; %playingNICK exists, so they must be playing.
if (%wire [ $+ [ $nick ] ] == 2) { ; If %wireNICK is equal to 2 (black), they win!
notice $nick Congratz $nick $+ ! You defused the bomb!
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] ; unset %playingNICK so they can play again
}
else { ; They lost, didn't choose the right wire :(
notice $nick Aww you lose! And you're dead.
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] } } } ; unset %playingNICK so they can play again.
on *:TEXT:!cutblue:#:{ if (!%playing [ $+ [ $nick ] ] ) { notice $nick Hey, you haven't started this game yet! Type 4!bomb1 to start it! | halt } ; If %playingNICK doesn't exist, they haven't started the game yet.
else { ; %playingNICK exists, so they must be playing.
if (%wire [ $+ [ $nick ] ] == 3) { ; If %wireNICK is equal to 3 (blue), they win!
notice $nick Congratz $nick $+ ! You defused the bomb!
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] ; unset %playingNICK so they can play again
}
else { ; They lost, didn't choose the right wire :(
notice $nick Aww you lose! And you're dead.
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] } } } ; unset %playingNICK so they can play again.
on *:TEXT:!cutgreen:#:{ if (!%playing [ $+ [ $nick ] ] ) { notice $nick Hey, you haven't started this game yet! Type 4!bomb1 to start it! | halt } ; If %playingNICK doesn't exist, they haven't started the game yet.
else { ; %playingNICK exists, so they must be playing.
if (%wire [ $+ [ $nick ] ] == 4) { ; If %wireNICK is equal to 4 (green), they win!
notice $nick Congratz $nick $+ ! You defused the bomb!
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] ; unset %playingNICK so they can play again
}
else { ; They lost, didn't choose the right wire :(
notice $nick Aww you lose! And you're dead.
unset %wire [ $+ [ $nick ] ] ; unset %wireNICK because the game is over
unset %playing [ $+ [ $nick ] ] } } } ; unset %playingNICK so they can play again.