I based it on using the Sword in the stone game, changed some text, and BANG! A cookie game! (:
Just type !cookie to play.
Enjoy!
P.S. I wrote atleast 30% of this code :P
on 1:TEXT:*!cookie*:#:{
var %cookie = $rand(1,12)
msg $chan 12,14 $nick steps up to the cookie...
if (%cookie == 1) .timer 1 2 msg $chan 2,0 $nick gobbles up the cookie.
if (%cookie == 2) .timer 1 2 msg $chan 4,7 $nick gobbles the cookie, but then chockes.
if (%cookie == 3) .timer 1 2 msg $chan 4,1 $nick has a bad aim of where his/her mouth is, and gets a chocolate chip cookie in there eye.
if (%cookie == 4) .timer 1 2 msg $chan 13,0 The cookie flies out of $nick 's hands, and falls right into $me 's mouth.
if (%cookie == 5) .timer 1 2 msg $chan 4,1 $nick breaks his/her teeth biting it.
if (%cookie == 6) .timer 1 2 msg $chan 10,0 $nick runs up the hill with the cookie, then loses it on his way back down.
if (%cookie == 7) .timer 1 2 msg $chan 5,0 $nick gets bullied into giving the cookie to $me .
if (%cookie == 8) .timer 1 2 msg $chan 8,1 $nick grabs the cookie, but then is weighed down because $nick is weak.
if (%cookie == 9) .timer 1 2 msg $chan 9,1 $nick gets so excited, he pees his pants.
if (%cookie == 10) .timer 1 2 msg $chan 2,0 $nick loses the cookie in the crowd of people in $chan .
if (%cookie == 11) .timer 1 2 msg $chan 4,0 $nick faints of excitment.
if (%cookie == 12) .timer 1 2 msg $chan 4,0 $nick hides it down his/her pants.
}
Or you could just add a wait time before using the command again. Like so:
Added a 30 second wait time between each command. However it can be changed in this line:
.hadd -mz $+($network,.,$nick) Cookie 30
on $*:TEXT:/^[.!@](cookie(s)?|cookiegame)( |$)/:#:{
set %prefi $iif($left($1,1) == @,msg $chan,msg $chan)
var %cookie = $rand(1,12)
if ($hget($+($network,.,$nick),Cookie)) {
notice $nick 1••• (10CookieGame1): Sorry, you have to wait10 $duration($v1) 1before doing this again | halt }
.hadd -mz $+($network,.,$nick) Cookie 30
describe $chan $nick steps up to the cookie...
if (%cookie == 1) .timer 1 2 %prefi $nick gobbles up the cookie.
if (%cookie == 2) .timer 1 2 %prefi $nick gobbles the cookie, but then chokes!
if (%cookie == 3) .timer 1 2 %prefi $nick has a bad aim of where his/her mouth is, and gets some crumbs in his/her eye.
if (%cookie == 4) .timer 1 2 %prefi but the cookie flies out of $nick $+ 's hands, and falls right into $me $+ 's mouth.
if (%cookie == 5) .timer 1 2 %prefi $nick breaks his/her teeth biting it.
if (%cookie == 6) .timer 1 2 %prefi $nick runs up the hill with the cookie, then loses it on his way back down.
if (%cookie == 7) .timer 1 2 %prefi $nick gets bullied into giving the cookie to $me .
if (%cookie == 8) .timer 1 2 %prefi $nick grabs the cookie, but then is weighed down because $nick is weak.
if (%cookie == 9) .timer 1 2 %prefi $nick gets so excited, he pees his pants.
if (%cookie == 10) .timer 1 2 %prefi $nick loses the cookie in the crowd of people in $chan $+ .
if (%cookie == 11) .timer 1 2 %prefi $nick faints of excitment.
if (%cookie == 12) .timer 1 2 %prefi $nick hides it down his/her pants.
}
This
if (%cookie == 4) .timer 1 2 msg $chan The cookie flies out of $nick 's hands, and falls right into $me 's mouth.
]
Can be this so it would be $nick's instead of $nick 's
if (%cookie == 4) .timer 1 2 msg $chan The cookie flies out of $nick $+ 's hands, and falls right into $me 's mouth.
Or if you wanted Regex, I added some stuff
(07:34:36) <@Dean-> @cookie
(07:34:37) %[eH] Dean- steps up to the cookie...
(07:34:39) <%[eH]> Dean- gobbles up the cookie.
(07:34:41) <@Dean-> .cookie
(07:34:42) %[eH] Dean- steps up to the cookie...
(07:34:43) <%[eH]> Dean- has a bad aim of where his/her mouth is, and gets some crumbs in his/her eye.
(07:34:44) <@Dean-> !cookie
(07:34:45) * %[eH] Dean- steps up to the cookie...
(07:34:47) <%[eH]> Dean- gets bullied into giving the cookie to [eH] .
^Example
on $*:TEXT:/^[.!@](cookie(s)?|cookiegame)( |$)/:#:{
set %prefi $iif($left($1,1) == @,msg $chan,msg $chan)
var %cookie = $rand(1,12)
describe $chan $nick steps up to the cookie...
if (%cookie == 1) .timer 1 2 %prefi $nick gobbles up the cookie.
if (%cookie == 2) .timer 1 2 %prefi $nick gobbles the cookie, but then chokes!
if (%cookie == 3) .timer 1 2 %prefi $nick has a bad aim of where his/her mouth is, and gets some crumbs in his/her eye.
if (%cookie == 4) .timer 1 2 %prefi but the cookie flies out of $nick $+ 's hands, and falls right into $me $+ 's mouth.
if (%cookie == 5) .timer 1 2 %prefi $nick breaks his/her teeth biting it.
if (%cookie == 6) .timer 1 2 %prefi $nick runs up the hill with the cookie, then loses it on his way back down.
if (%cookie == 7) .timer 1 2 %prefi $nick gets bullied into giving the cookie to $me .
if (%cookie == 8) .timer 1 2 %prefi $nick grabs the cookie, but then is weighed down because $nick is weak.
if (%cookie == 9) .timer 1 2 %prefi $nick gets so excited, he pees his pants.
if (%cookie == 10) .timer 1 2 %prefi $nick loses the cookie in the crowd of people in $chan $+ .
if (%cookie == 11) .timer 1 2 %prefi $nick faints of excitment.
if (%cookie == 12) .timer 1 2 %prefi $nick hides it down his/her pants.
}