Lugico

Minecraft Command Randomizer

Jun 11th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. Pseudo Randomizer for Minecraft
  2.  
  3. SETUP:
  4.  
  5. scoreboard objectives add randomizer dummy
  6. scoreboard players set highnr randomizer 1001100010
  7. scoreboard players set one randomizer 1
  8. scoreboard players set nr randomizer **ANY 9 DIGIT NUMBER**
  9.  
  10.  
  11. LOOP:
  12.  
  13. scoreboard players operation nr randomizer *= highnr randomizer
  14. scoreboard players operation nr randomizer += one randomizer
  15. scoreboard players operation nr randomizer %= highnr randomizer
  16.  
  17. scoreboard players operation @a randomizer = nr randomizer
  18.  
  19. execute as @a[scores={randomizer=NUMBER}] run COMMAND
  20.  
  21.  
  22. -------------------------------------
  23.  
  24. the randomizer will create a 'random' number in between of the maximum and minimum possible value of a minecraft scoreboard.
  25.  
  26.  
  27. to execute a command with a certain chance, just do something like:
  28.  
  29. execute as @a[scores={randomizer=999000000..}] run COMMAND
  30.  
  31. using this number the command will get executet with an average of about 2 to 5 times per minute (if the command is executet at 20ticks/sec)
  32.  
  33.  
  34. ------------------------------------
  35.  
  36. Made by Lugico :D
  37. Free 2 Use
Add Comment
Please, Sign In to add comment