on *:TEXT:!timebomb*:#:{
if ($me !isop $chan) { msg $chan I must be opped to play this game | halt }
if (!$2) { .notice $nick No name specified | halt }
if (%timebomb) { .notice $nick Timebomb is already being used | halt }
else {
set %timebomb 1
set %timebomb.nick $2
set %timebomb.chan $chan
set %timebomb.time $rand(1,60)
set %timebomb.w. $rand(2,5)
if (%timebomb.w. == 2) { .set %timebomb.w Red, Blue }
if (%timebomb.w. == 3) { .set %timebomb.w Red, Blue, Green }
if (%timebomb.w. == 4) { .set %timebomb.w Red, Blue, Green, White }
if (%timebomb.w. == 5) { .set %timebomb.w Red, Blue, Green, White, Black }
set %timebomb.w2 $rand(1,%timebomb.w)
if (%timebomb.w2 == 1) { .set %timebomb.w2 Red }
if (%timebomb.w2 == 2) { .set %timebomb.w2 Blue }
if (%timebomb.w2 == 3) { .set %timebomb.w2 Green }
if (%timebomb.w2 == 4) { .set %timebomb.w2 White }
if (%timebomb.w2 == 5) { .set %timebomb.w2 Black }
/describe $chan stuffs a timebomb down %timebomb.nick $+ 's Pants. The display reads %timebomb.time seconds.
.notice %timebomb.nick You have the choice of %timebomb.w. wires ( $+ %timebomb.w $+ )
.enable #bombon
.timerbomb 1 %timebomb.time /tblose
}
}
#bombon off
on *:TEXT:!cutwire*:%timebomb.chan:{
if ($nick == %timebomb.nick) {
if (!$2) { notice $nick No wire specified | halt }
if ($2 isin %timebomb.w2) {
/.timerbomb off
/msg $chan $nick has cut the $2 wire and has diffused the bomb!
/mode $chan +h $nick
}
else {
/.timerbomb off
/msg $chan $nick has cut the $2 wire. The bomb has EXPLODED!
/kick $chan $nick *BOOM*
}
}
.disable #bombon
.unset %timebomb*
}
#bombon end
alias tblose {
/msg %timebomb.chan %timebomb.nick has failed to defuse the bomb, and it has detonated.
/kick %timebomb.chan %timebomb.nick *BOOM*
.disable #bombon
.unset %timebomb*
}