napa182 commented on a Page, 8ball script  -  Feb 10, 2009

or you can use regex to make sure it is in a question format.
trigger 8ball question here? it has to have 8ball at the start and a ? at the end for it to work also add a bit of flood control to it.

on *:text:*:#:{
  if ($regex($1-,/^(8ball\s(.*)\?)$/S) && !$($+(%,ball8flood),2)) { 
    set -u3 $+(%,ball8flood) $nick 
    var %^ = Ask again later.|Not a chance.|As I see it, yes.|Don't count on it.|My sources say no.|Yes.
    describe # shakes up the 8ball...
    .timer8ball 1 2 msg # The magic 8ball says: $gettok(%^,$r(1,6),124)
  }
}
 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.