Magic 8-Ball
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 0.0 (of 0 scores) |
| Date Added | Mar 08, 2009 |
| Last Updated | Mar 08, 2009 |
| Tags | 8ball |
Introduction
mIRC Snippet:
Magic 8-Ball
Posted on Mar 9, 2009 12:02 am
Posted on Mar 9, 2009 12:02 am
| Code: |
| 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) } |
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:
| Code: |
| 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) |
mIRC Snippet:
Magic 8-Ball
Posted on Mar 9, 2009 1:28 am
Posted on Mar 9, 2009 1:28 am
He has it separated by yes/maybe/no
mIRC Snippet:
Magic 8-Ball
Posted on Mar 9, 2009 1:41 am
Posted on Mar 9, 2009 1:41 am
I can see that, but in the script, he's separating each of the tokens through _ [$chr(95)], so "$&" that potentially separates the whole list into "yes/maybe/no" has no meaning towards the script.
Even if you take a third of the whole set, and then get a random value from the third, it's the same thing as getting one item from the whole list. And yes, I have just realized that the number of values are different for each section.
Even if you take a third of the whole set, and then get a random value from the third, it's the same thing as getting one item from the whole list. And yes, I have just realized that the number of values are different for each section.
mIRC Snippet:
Magic 8-Ball
Posted on Mar 9, 2009 1:49 am
Posted on Mar 9, 2009 1:49 am
My final words: Never mind. Ignore what I said.






