;Bomb Game
on *:text:!timebomb*:#: {
:start1
if (%bombnick) {
describe $chan points at the bulge in [ %bombnick ] $+ 's pants. They have only $timer(bomb).secs seconds left.
}
else {
if ($2 == $me) { halt }
if ($2 ison $chan) {
set %bombnick $2
set %colorarray red,orange,yellow,green,blue,purple,black,brown,white,neon,funky,all,lego,violet
set %bombcolor %colorarray
set %bombwirecount $rand(1,14)
set %bombwires1 0
; set %bombwires $gettok(%bombcolor,$rand(1,$gettok(%bombcolor,0,44))
while (%bombwirecount > %bombwires1) {
;while (%bombwirecount > $gettok(%bombwires,0,44)) {
; set %bombwires $addtok(%bombwires,$gettok(%bombcolor,$rand(1,$gettok(%bombcolor,0,44)),44)
set %bombwirenew $gettok( %bombcolor , $rand(1,$gettok(%bombcolor,0,44)) , 44)
set %bombwires %bombwires %bombwirenew
set %bombcolor $remtok(%bombcolor,%bombwirenew,44)
inc %bombwires1
}
set %bombtime $rand(10,45)
if (%nobomb) {
msg $chan $nick $+ : you douche, you ran out with a timebomb and the persons pants you wanted to stuff isn't even here! FOOL! YOU HAVE THE BOMB!
}
else {
describe $chan stuffs a time bomb into $2 $+ 's pants. The display reads $chr(91) $+ %bombtime $+ $chr(93) seconds. $+ $chr(1) tick tock....
}
unset %nobomb
unset %wasop
if ($2 isop $chan) {
mode $chan -o $2
set %wasop 1
}
msg $chan $2 $+ : Diffuse the bomb by cutting the correct wire, type: !cutwire <color> -- There are $gettok(%bombwires,0,32) wires, they are: $replace(%bombwires,$chr(32),$chr(44) $+ $chr(32))
set %bombright $gettok(%bombwires,$rand(1,$gettok(%bombwires,0,32)),32)
timerbomb 1 %bombtime bombkick $chan $2 *BOOM!* (Correct wire was: %bombright $+ )
}
else {
tokenize 32 timebomb $nick
set %nobomb 1
goto start1
}
}
}
on *:text:!cutwire*:# {
if ($nick == %bombnick) {
timerbomb off
if ($2 == %bombright) {
msg $chan $nick cut the %bombright wire. Hooray! We dont have to clean your genitals from the walls!
if (%wasop > 0) { mode $chan +o $nick }
}
else {
kick $chan $nick snip...*BOOM!* (Correct wire was: %bombright $+ )
}
unset %bombnick
unset %bombwires
}
else {
if (%bombnick) {
msg $chan You cannot decide %bombnick $+ 's future, they will need to cutwire themselves.
}
}
}
alias bombkick {
kick $1-
unset %bombnick
unset %bombwires
}