It's a bomb game played in a window. It saves the scores and is very fun.
on 1:LOAD:{
set %bwin 0
set %blose 0
set %buse 0
echo -a ***Bomb game loaded. Type /bomb to start.
}
on 1:INPUT:@Bomb:{
if ($1 == bomb) {
set %bomb on
set %bomb.time $r(15,45)
set %bomb.color $r(1,4)
window -xe0 @Bomb
aline -h @Bomb A bomb has just been placed in front of you.
.timer 1 1 aline -h @Bomb You have %bomb.time seconds to defuse it.
.timer 1 2 aline -h @Bomb Colors are 04Red00, 12Blue00, 08Yellow00, and 09Green00.
.timerbomb 1 %bomb.time bomb.time.lose
}
elseif ($1 == red) {
if (%bomb == on) {
if (%bomb.color == 1) {
aline -x @Bomb You defused the bomb!
inc %bwin
.timer 1 2 aline -x @Bomb You've defused the bomb %bwin $iif(%bwin == 1,time,times) $+ .
.timerbomb off
unset %bomb*
unset %bomb
}
else {
aline -x @Bomb BOOM! You died.
inc %blose
.timer 1 2 aline -x @Bomb You've died by the bomb %blose $iif(%blose == 1,time,times) $+ .
.timerbomb off
unset %bomb*
unset %bomb
}
}
}
elseif ($1 == blue) {
if (%bomb == on) {
if (%bomb.color == 2) {
aline -x @Bomb You defused the bomb!
inc %bwin
.timer 1 2 aline -x @Bomb You've defused the bomb %bwin $iif(%bwin == 1,time,times) $+ .
.timerbomb off
unset %bomb*
unset %bomb
}
else {
aline -x @Bomb BOOM! You died.
inc %blose
.timer 1 2 aline -x @Bomb You've died by the bomb %blose $iif(%blose == 1,time,times) $+ .
.timerbomb off
unset %bomb*
unset %bomb
}
}
}
elseif ($1 == yellow) {
if (%bomb == on) {
if (%bomb.color == 3) {
aline -x @Bomb You defused the bomb!
inc %bwin
.timer 1 2 aline -x @Bomb You've defused the bomb %bwin $iif(%bwin == 1,time,times) $+ .
.timerbomb off
unset %bomb*
unset %bomb
}
else {
aline -x @Bomb BOOM! You died.
inc %blose
.timer 1 2 aline -x @Bomb You've died by the bomb %blose $iif(%blose == 1,time,times) $+ .
.timerbomb off
unset %bomb.*
unset %bomb
}
}
}
elseif ($1 == green) {
if (%bomb == on) {
if (%bomb.color == 4) {
aline -x @Bomb You defused the bomb!
inc %bwin
.timer 1 2 aline -x @Bomb You've defused the bomb %bwin $iif(%bwin == 1,time,times) $+ .
.timerbomb off
unset %bomb.*
unset %bomb
}
else {
aline -x @Bomb BOOM! You died.
inc %blose
.timer 1 2 aline -x @Bomb You've died by the bomb %blose $iif(%blose == 1,time,times) $+ .
.timerbomb off
unset %bomb.*
unset %bomb
}
}
}
elseif ($1 == stats) {
aline -x @Bomb The bomb has been used %buse $iif(%buse == 1,time,times) $+ . You've defused it %bwin times and died %blose $iif(%blose == 1,time,times) $+ .
}
}
menu @Bomb {
Bomb:bomb
Colors
.Red:.msg @Bomb Red
.Blue:.msg @Bomb Blue
.Yellow:.msg @Bomb Yellow
.Green:.msg @Bomb Green
Stats:aline -x @Bomb The bomb has been used %buse $iif(%buse == 1,time,times) $+ . You've defused it %bwin $iif(%bwin == 1,time,times) $+ and died %blose $iif(%blose == 1,time,times) $+ .
Reset Stats:{
set %buse 0
set %bwin 0
set %blose 0
aline -x @Bomb Stats have been reset.
}
}
alias bomb {
inc %buse
set %bomb on
set %bomb.time $r(15,45)
set %bomb.color $r(1,4)
window -xe0 @Bomb
aline -h @Bomb A bomb has just been placed in front of you.
.timer 1 1 aline -h @Bomb You have %bomb.time seconds to defuse it.
.timer 1 2 aline -h @Bomb Colors are 04Red00, 12Blue00, 08Yellow00, and 09Green00.
.timerbomb 1 %bomb.time bomb.time.lose
}
alias -l bomb.time.lose {
.timerbomb off
aline -x @Bomb BOOM! You died.
inc %blose
.timer 1 2 aline -x @Bomb You've died by the bomb %blose times.
unset %bomb.*
unset %bomb
}