It seems the tDice script hates 1. - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: It seems the tDice script hates 1. (/showthread.php?tid=89979) It seems the tDice script hates 1. by Goomba on 03-30-2009 at 03:54 AM
I've been using the tDice script for a looong time now, and just now I have realized that it's rare that 1 is rolled. If you roll a series of die with 2 sides, it will most likely get 2, like this sequence I have rolled. RE: It seems the tDice script hates 1. by prashker on 03-30-2009 at 04:23 AM
Import the following attachment. js code:The round() method rounds a number to the nearest integer. to js code:The floor() method returns the value of a number rounded DOWNWARDS to the nearest integer. Now with your 2 tests it returns each more randomly. Throwing 20 Dices with 2 Sides each: 1. Dice: 1 2. Dice: 1 3. Dice: 2 4. Dice: 1 5. Dice: 1 6. Dice: 1 7. Dice: 2 8. Dice: 1 9. Dice: 2 10. Dice: 1 11. Dice: 2 12. Dice: 2 13. Dice: 1 14. Dice: 1 15. Dice: 2 16. Dice: 1 17. Dice: 1 18. Dice: 2 19. Dice: 1 20. Dice: 1 Throwing 20 Dices with 4 Sides each: 1. Dice: 2 2. Dice: 4 3. Dice: 3 4. Dice: 1 5. Dice: 3 6. Dice: 1 7. Dice: 2 8. Dice: 3 9. Dice: 2 10. Dice: 1 11. Dice: 4 12. Dice: 1 13. Dice: 1 14. Dice: 3 15. Dice: 4 16. Dice: 1 17. Dice: 4 18. Dice: 3 19. Dice: 2 20. Dice: 2 Enjoy RE: RE: It seems the tDice script hates 1. by Goomba on 03-30-2009 at 10:19 PM
THANKS! |