All pastes #347920 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-09 20:12 UTC
rendered paste body
on *:TEXT:!cookie *:#kimahri:{
  if ($address($nick,2) == $address($me,2)) {
    if ($eval($+(%,coo.,$chan),2) == 0) { .msg $chan You cannot give $2 a Cookie when there are none left in the Jar! type !refill to re-fill it! }
    else { dec $+(%,coo.,$chan) | .describe $chan hands $2 a Cookie. Cookies left in Jar: $eval($+(%,coo.,$chan),2) }
  }
  else { .notice $nick Sorry...you cannot hand out cookies. | halt }
}

on *:TEXT:!refill:#kimahri:{
  if ($address($nick,2) == $address($me,2)) { .set $+(%,coo.,$chan) 10 | $iif($eval($+(%,coo.,$chan),2) != 10,.msg $chan Tell Someone To FIX!,.msg $chan The Cookie Jar has been re-filled!) }
  else { .notice $nick Sorry...you cannot refill the cookie jar. | halt }
}

try that my good sir. -Vulcan