Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ResetMine(l1: location, l2: location, b: item, luck: number):
- loop all blocks within {_l1} and {_l2}:
- tps is below 10:
- wait 1 tick
- type of loop-block is air or purple glazed terracotta
- set {_d} to a random integer from 1 to 10000
- set {_luck2} to {_luck} * 100
- {_d} is between 1 and {_luck2}:
- set block at location of loop-block to purple glazed terracotta
- else:
- set block at location of loop-block to {_b}
- broadcast "The mine has been reset:"
- broadcast "Air blocks have been set to %{_b}%"
- broadcast "with a %{_luck}%%% chance of a berry block"
- on block break:
- add 1 to {blocks::for::reset}
- if {blocks::for::reset} is more than 10:
- delete {blocks::for::reset}
- wait 1 tick
- {d} is more than 5:
- set {d} to 0
- set {last::reset::mine} to now
- set {_d} to a random integer from 1 to 1000
- {_d} is between 1 and 250:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", red concrete, .5)
- {_d} is between 251 and 450:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", lime concrete, .6)
- {_d} is between 451 and 550:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", pink concrete, .7)
- {_d} is between 551 and 650:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", light blue concrete, .8)
- {_d} is between 651 and 750:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", orange concrete, 1)
- {_d} is between 751 and 800:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", yellow concrete, 1.5)
- {_d} is between 801 and 1000:
- ResetMine(location (0, 1, 0) world "world", location (69, 50, 69) world "world", red concrete, .6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement