Minecraft Maps / Redstone Device

[Mapping Utilities] - Module #6 - Random number generator

  • 355 views, 2 today
  • 38 downloads, 0 today
  • 1
  • 0
Noricum's Avatar Noricum
Level 20 : Expert Engineer
23
A real "random" number generator that create number from 0 to 9999 each gametick. This can be used for calculating chances for different custom mechanics like drop chances, unqiue paths based on values and such things.

These scoreboard values contains the generated numbers
▷ TargetName ▷ TargetObjective ▷ Description
▷ rand_10 ▷ RandomGen ▷ contains values from 0 to 9
▷ rand_100 ▷ RandomGen ▷ contains values from 0 to 99
▷ rand_1000 ▷ RandomGen ▷ contains values from 0 to 999
▷ rand_10000 ▷ RandomGen ▷ contains values from 0 to 9999

Transfer a number (0-99) to the nearest player
▷ /scoreboard players operation @p {yourobjective} rand_100 RandomGen

Testing for a value
▷/execute @a[score_{yourobjective}_min=0,score_{yourobjective}_min=9] ~ ~ ~ /{actions}
this a 10% chance to get executed
Progress100% complete
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome