Cookie pwnzor

By Ghost-writer on Oct 03, 2009

cookie! type !launch and itl start fucking up your channel :).

Updated. you can now give cookies - and gain cookies randomly at any time by typing !cookie - slow and tedious way, you may now also view others cookies, !cookie person.

on $*:TEXT:/^[!@.]launch/Si:#:{
  if (!$timer(cookies).secs) {
    set %chan $chan
    describe $chan Loads the legendery cookie launcher full of cookies!
    .timer 1 2 cookie
    .timercookies 0 600 cookie
    halt
  }
  if ( %c. [ $+ [ $nick ] ] >= 3 ) { halt }
  inc %c. [ $+ [ $nick ] ]
  .timerunset 1 60 unset %c.*
  .notice $nick next launch in $duration($timer(cookies).secs) $+ , in %chan $+ .
}
on $*:TEXT:/^[!@.]give/Si:#:{
  if ( $2 ison $chan ) && ( $3 isnum ) && ( $4 == cookies ) {
    if ( $2 == $nick ) || if ( $3 < 1 ) { notice $nick $iif( $3 > 0,you cannot give yourself cookies,You cannot give negitive cookies) | halt }
    if ( $readini(cookie.ini, jar, $nick) >= $3 ) {
      var %cookies1 $Readini(cookie.ini, jar, $nick)
      var %cookies2 $readini(cookie.ini, jar, $2)
      dec %cookies1 $3
      inc %cookies2 $3
      writeini cookie.ini jar $nick %cookies1
      writeini cookie.ini jar $2 %cookies2
      msg $chan $nick has given $2 $3 cookies and $nick now has $readini(cookie.ini, jar, $nick) cookies.
      msg $chan $2 now has $readini(cookie.ini, jar, $2) cookies.
    }
    else { msg $chan You do not have $3 cookies, you $iif(!$readini(cookie.ini, jar, $nick), have no cookies,only have $readini(cookie.ini, jar, $nick) cookies) }
  }
  else { notice $nick wrong syntax. The syntax is !give <person> <amount> cookies. }
}
alias cookie {
  if (!%chan) { var %chan $chan(1) }
  var %x $rand(1,$nick(%chan,0))
  var %person $nick(%chan,%x)
  :check
  if ( %x > $nick($chan,0)) { msg %chan not enough people to launch the cookies | halt } 
  if ( $readini(theme.ini, bots, %person) == 1 ) || ( %person == $me ) { inc %x | var %person $nick(%chan,%x) | goto check }
  var %roos $rand(1,100)
  .timer 1 1 describe %chan takes out the legendery cookie launcher, aims at %person
  .timer 1 3 describe %chan shoots out %roos $read(cookie.txt)
  var %cookies $readini(Cookie.ini, jar, %person)
  if (%cookies) { writeini cookie.ini jar %person $calc(%roos + %cookies) }
  if (!%cookies) { writeini cookie.ini jar %person %roos }
  .timer 1 5 msg %chan %person now has $readini(cookie.ini, jar, %person) cookies :).
}
on $*:TEXT:/^[!@.]cookies/Si:#:{
  .timer 1 5 unset %flood
  if ( %flood == 1 ) { halt }
  set %flood 1
  if ($2) {
    msg $chan $2 has $iif($readini(cookie.ini, jar, $2),$readini(cookie.ini, jar, $2) cookies,no cookies)
    halt
  }
  msg $chan $nick has $iif($readini(cookie.ini, jar, $nick),$readini(cookie.ini, jar, $nick) cookies,no cookies)
}
on *:TEXT:!cookie:#: {
  .timerc 1 5 set %floodc 1
  if ( %floodc == 1 ) {
    unset %floodc
    var %num $Rand(1,5)
    describe $chan gives $nick %num $read(cookie.txt)
    var %cookie 0
    var %cookie $readini(cookie.ini, jar, $nick)
    inc %cookie %num
    writeini cookie.ini jar $nick %cookie
    msg $chan $nick now has $iif($readini(cookie.ini, jar, $nick),$readini(cookie.ini, jar, $nick) cookies,no cookies)
  }
}
on *:load: {
writeini theme.ini bots $$?"What bot is in your channel that you dont want getting cookies ;\. feel free to do this multiple times." 1
write cookie.txt warm freshly baked chocolate chip cookies
write cookie.txt oreo cookies
write cookie.txt peanut butter cookies
write cookie.txt ginger bread men
write cookie.txt rainbow cookies!
write cookie.txt dunkeroos!
}

Comments

Sign in to comment.
vinyltm   -  Feb 26, 2010

Might i recommend a way to eat cookies, and steal cookies, for the stealing cookies it might be more fun to have it randomly steal from someone in the chat, !steal cookies would take a random amount of cookies from a random member... just a thought that came up in a chat.

 Respond  
vinyltm   -  Feb 24, 2010

theres no way to eat the cookies? what a tease!

 Respond  
wizard38   -  Oct 11, 2009

is a very nice game, but could be better
the script gives the cookies, and the first person to reach the 100 points wins points:
Script_Game gives Gandalf 4 rainbow cookies!
Script_Game: Gandalf now has 15 cookies, missing xxxx cookies to be 100 and earn 100 points

 Respond  
Cracker200   -  Oct 04, 2009

LOL I lol'd so hard at this good work :D:D:D

 Respond  
Ghost-writer   -  Oct 03, 2009

fixed it :) ty :P.

 Respond  
sunslayer   -  Oct 03, 2009
writeini theme.ini, bots, $$?"What bot is in your channel that you dont want getting cookies ;\. feel free to do this multiple times." 1

remove the comma's after theme.ini and bots

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.