just a fun little game i made when i was bored. i havnt posted anything in a LONG time so i figured id post this :/
copy and paste into remotes (alt+R)
on $*:TEXT:/^[!.](hl|highlow)/Si:#: {
if (!%hl) {
if ($2 == on) {
set %hl $nick
set %hl.num $iif($3,$r(1,$3),$r(1,300))
msg # $nick Has Started a new game of HighLow! Type !guess 1- $+ $iif($3,$3,300) $+ to play!
}
}
elseif (%hl) {
if ($2 == off) {
if ($nick == %hl) {
msg # $nick has ended the game of HighLow!
unset %hl %hl.*
}
elseif ($nick != %hl) msg # Sorry $nick $+ , but only %hl can end this game.
}
elseif ($2 == on) msg # sorry $nick $+ , a game is already in progress!
}
}
on $*:TEXT:/^[!.]guess/Si:#: {
if (%hl) {
if ($2 == %hl.num) { msg # Congradulations $nick $+ ! The correct answer was %hl.num $+ . | unset %hl %hl.* }
else msg # Sorry $nick $+ , but $2 is incorrect. try a $iif($2 < %hl.num,higher,lower) number.
}
elseif (!%hl) {
msg # sorry $nick $+ , but there isnt a game in progress at the moment. Type !hl on num to start a game of HighLow!
}
}
so like?
on *:TEXT:*:#: {
if (!Number == $1) {
if (!%num) {
set -u60 %num $rand(1,100)
.timer 1 1 msg $chan 3I 5have set a number, it is between 1 and 100.
.timer 1 2 msg $chan 3To 5make a guess, type: !guess Number_Here
.timer 1 3 msg $chan 3Start 5guessing now, you have one minute to guess the number.
.timermin 1 120 msg $chan 3Game5 is now over you had one minute
}
else { msg $chan 3There 5is a game going right now }
}
if (!Guess == $1) {
if (!%num) { msg $chan 3There 5is no game in progress. }
else {
if ($2 < $($+(%,num),2)) { msg $chan 3Higher. }
if ($2 > $($+(%,num),2)) { msg $chan 3Lower. }
if ($2 == $($+(%,num),2)) { msg $chan 3Bingo. 5 $+ $nick guessed the right number %num $+ . | unset %num | timermin stop }
}
}
}