Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /stockchests2:
- permission: fuiwfuwoefaw
- trigger:
- loop all blocks in radius 100 of {map}:
- if loop-block is a chest:
- set {_chance} to a random integer between 1 and 5
- if {_chance} is 1:
- spawnJunk(loop-block)
- if {_chance} is 2:
- clear inventory of loop-block
- set {_item} to gold ingot
- loop 10 times:
- add {_item} to inventory of loop-block
- if {_chance} is 3:
- spawnJunk(loop-block)
- if {_chance} is 4:
- spawnJunk(loop-block)
- if {_chance} is 5:
- spawnJunk(loop-block)
- every 5 minutes:
- make console execute command "/stockchests2"
- function spawnJunk(b: block):
- clear inventory of {_b}
- set {_countchance} to a random integer between 1 and 5
- if {_countchance} is 1:
- loop 10 times:
- set {_item} to a random element of {junk::*}
- add {_item} to inventory of {_b}
- if {_countchance} is 2:
- loop 6 times:
- set {_item} to a random element of {junk::*}
- add {_item} to inventory of {_b}
- if {_countchance} is 3:
- loop 3 times:
- set {_item} to a random element of {junk::*}
- add {_item} to inventory of {_b}
- if {_countchance} is 4:
- loop 2 times:
- set {_item} to a random element of {junk::*}
- add {_item} to inventory of {_b}
- if {_countchance} is 5:
- loop 8 times:
- set {_item} to a random element of {junk::*}
- add {_item} to inventory of {_b}
- on craft of golden block:
- cancel event
- on load:
- set {junk::*} to ""
- wait 1 tick
- add 1 mycelium with name "Trash" to {junk::*}
- add 1 glass pane with name "Shard" to {junk::*}
- add 1 dried kelp to {commonchestitems::*}
- command /mapset:
- permission: never
- trigger:
- set {map} to player's location
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement