All pastes #348722 Raw Edit

Untitled

public text v1 · immutable
·published 2007-02-10 10:01 UTC
rendered paste body
on *:TEXT:!cookie *:#:{
  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 Hey! Get off my Cookies! You can't hand those out! }
}

on *:TEXT:!refill:#: {
  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 - Only Effilocher can re-fill the Cookie Jar! }
}

on *:TEXT:!steal:#:{ | halt)
  .set %steal $rand(1,50)
  if (%steal <= 25) { .describe $chan catches $nick with his hand in the cookie jar! } { .notice $nick You have been caught stealing a Cookie! }
  else { /describe $chan doesn't notice as $nick takes one of his cookies! | dec $+(%,coo.,$chan) }} { .notice $nick You have successfully taken one of Kimahri's Cookies! }