Kirby commented on a Page, Magic 8-Ball  -  Mar 09, 2009
    var %8ball = As I see it, yes_It is certain_It is decidedly so_Most likely_Outlook good_Signs point $&
      to yes_Without a doubt_Yes_Yes - definitely_You may rely on it_Reply hazy, try again_Ask again later $&
      _Better not tell you now_Cannot predict now_Concentrate and ask again_Don't count on it_My reply is no $&
      _My sources say no_Outlook not so good_Very doubtful, %rand = $rand(1,3)
    if (%rand == 1) { var %result = $gettok(%8ball,$rand(1,10),95) }
    if (%rand == 2) { var %result = $gettok(%8ball,$rand(11,15),95) }
    if (%rand == 3) { var %result = $gettok(%8ball,$rand(16,20),95) }

Even though the tokens are separated through "yes, maybe, and no" sections, if you are going to just take one item from the entire list, then there's no need to create another, separate random sequence that separates each of them. :\
I can understand that you're trying to change chances with 10 good (50%), 5 neutral (25%), 5 bad (25%).
But I think you're better off with:

var %8ball = As I see it, yes_It is certain_It is decidedly so_Most likely_Outlook good_Signs point $&
      to yes_Without a doubt_Yes_Yes - definitely_You may rely on it_Reply hazy, try again_Ask again later $&
      _Better not tell you now_Cannot predict now_Concentrate and ask again_Don't count on it_My reply is no $&
      _My sources say no_Outlook not so good_Very doubtful
msg $chan $gettok(%8ball,$r(1,$numtok(%8ball,95)),95)

, where $numtok(%8ball,95) can be substituted with 20, in this case.

 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.