Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To Sparks:
- I was thinking that since the Sunken Treasure module runs off a Pheudo Random Number Generator. It would be a appropriate to have a standard "RNG" score for any module running this. It would be quite benificial for many GM4 Modules! Including Sunken Treasure!
- We can then have modules execute commands when a players' RNG score is a specific value!
- The First Command Block:
- /scoreboard objectives add GM4_RNG dummy
- --Adds the score
- The Second Command Block:
- /scoreboard players add @a GM4_RNG 1
- --This adds a score to all Online players an RNG score.
- The Third Command Block:
- /scoreboard players operation @a[score_GM4_RNG_min=100] GM4_RNG /= @r[score_GM4_RNG_min=2] GM4_RNG
- --This is detecting whether or not any players with a score greater than 100 will have their score devided by another random player's score (This includes the player him/herself). Since this detecting off of everyone, the scores never surpass 100. When alone, it resets to 1, since 100/100=1. The more players the more random this value is, but players will never truely know the value anyway!
- I tried tweaking it be any entity, but there's no "Select Random Entity", it would only select the closest (or furthest) entity and use that score :(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement