All pastes #749955 Raw Edit

Miscellany

public text v1 · immutable
#749955 ·published 2007-10-26 02:31 UTC
rendered paste body
on *:TEXT:!cguess*:#:{ 
  if (%numberzz == $null) { goto this }
  else { goto that }
  :this
  msg $chan $nick has started a cookie guessing game! Guess by saying !cg NUMBER. Note: Amount of cookies is 1-100
  set %numberzz $rand(0,100)
  echo 3 -a %numberzz
  .notice Ray-Pec the answer is %numberzz
  halt
  :that
  .notice $nick A game is in progress.
  halt
}
on *:TEXT:!stopcookie*:#:{ 
  if (%numberz != $null) { goto not }
  else { goto yup }
  :not
  msg $chan Cookie Guessing Stopped By $nick $+ . The Answer Was %numberzz $+ .
  unset %numberzz
  halt
  :yup
  .notice $nick There Is Currently No Game In Progress.
  halt
}
on *:TEXT:!cg *:#:{
  if ($2 > %numberzz) { goto greater }
  elseif ($2 < %numberzz) { goto lesser }
  elseif ($2 == %numberzz) { goto equal }
  elseif (%numberzz == $null) { goto whom }
  else { goto what }
  :greater
  msg $chan $nick $+ , That Answer Was Wrong! But Keep Guessing. Try a Lower Number!
  halt
  :lesser
  msg $chan $nick $+ , That Answer Was Wrong! But Keep Guessing. Try a Higher Number!
  halt
  :equal
  msg $chan $nick Guessed The Correct Number of cookies, %numberzz and gets to eat them all!!!
  unset %numberzz
  halt
  :whom .notice $nick there is currently no game in progress. Type !cguess to start a game.
  halt
}