Jethro commented on a Page, Magic 8-ball  -  Nov 01, 2009

This will make sure anything asked follows with the question mark at the end of a question:

on $*:TEXT:/(?<=\x3F)/S:#: {
  msg $chan Original question: $strip($2-) And the answer is:
  var %8ball = $rand(1,11)
  if (%8ball == 1) { msg $chan No! }
  if (%8ball == 2) { msg $chan Yes! }
  if (%8ball == 3) { msg $chan Of course }
  if (%8ball == 4) { msg $chan Have you gone mad?! I think you have }
  if (%8ball == 5) { msg $chan How should I know? Its not like I'm magic }
  if (%8ball == 6) { msg $chan Heck no! }
  if (%8ball == 7) { msg $chan Maybe... yeah }
  if (%8ball == 8) { msg $chan Why should I tell you? }
  if (%8ball == 9) { msg $chan If I say yes will you be quiet? }
  if (%8ball == 10) { msg $chan Yes... that will be 30 dollars }
  if (%8ball == 11) { msg $chan How should I say this? Um... no }
}

Last but not least, you could have chosen the local variable instead of the global variable. This uses the same command that you've indicated.

 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.