Bielie commented on a Page, Cookies!  -  Apr 22, 2010

this cant be done with a on text event?

Just make it randomize some cookie name u made up. And put it in a .txt file.

on *:text:!cookie*:#: {
 if ($(,$+(%,flood,$nick))) { return }
    set -u3 $+(%,flood,$nick)

var %cookie = $read(Cookie.txt)
var %cookie2 = $readini(Cookie.ini,cookie,$nick)
var %true = 1
var %false = 0

if ( %cookie2 == %true ) { notice $nick You already have a cookie. You can get rid of it by eating it. (Syntax: !eat cookie) | return }

describe $chan $2 Received a %cookie .
writeini cookie.ini Cookie $nick %true
halt
}

on *:text:!eat cookie:#: {
 if ($(,$+(%,flood2,$nick))) { return }
    set -u3 $+(%,flood2,$nick)

if (%cookie2 == 0) { notice $nick Sorry but you dont have a cookie. Get one by typing: !cookie | Return }

if (%cookie2 == $null) { notice $nick Sorry but you dont have a cookie. Get one by typing: !cookie | Return }

if (%cookie2 == 1) { 
notice $nick You just ate your cookie! 
writeini Cookie.ini Cookie $nick %false
halt
}
 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.