Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # BetterMining.sk
- # By nfell2009
- # All rights reserved
- #
- options:
- ChanceToSpawn: 50
- diamonds-Chance: 100
- diamonds-Y-Top: 12
- diamonds-Y-Low: 5
- diamonds-Spawned-Max: 4
- diamonds-Spawned-Min: 1
- iron-Chance: 160
- iron-Y-Top: 54
- iron-Y-Low: 5
- iron-Spawned-Max: 6
- iron-Spawned-Min: 2
- gold-Chance: 100
- gold-Y-Top: 29
- gold-Y-Low: 5
- gold-Spawned-Max: 4
- gold-Spawned-Min: 2
- coal-Chance: 200
- coal-Y-Top: 52
- coal-Y-Low: 5
- coal-Spawned-Max: 9
- coal-Spawned-Min: 3
- lapis-Chance: 100
- lapis-Y-Top: 16
- lapis-Y-Low: 14
- lapis-Spawned-Max: 8
- lapis-Spawned-Min: 4
- redstone-Chance: 180
- redstone-Y-Top: 12
- redstone-Y-Low: 5
- redstone-Spawned-Max: 6
- redstone-Spawned-Min: 2
- emerald-Chance: 120
- emerald-Y-Top: 29
- emerald-Y-Low: 5
- emerald-Spawned-Max: 2
- emerald-Spawned-Min: 1
- OreRadius: 5
- on script load:
- delete {bm::*}
- set {bm::SupportedOres} to "diamond:{@diamonds-Chance}, iron:{@iron-Chance}, gold:{@gold-Chance}, coal:{@coal-Chance}, lapis:{@lapis-Chance}, redstone:{@redstone-Chance}, emerald:{@emerald-Chance}"
- set {bm::SpawnAmount} to "diamond:{@diamonds-Spawned-Max}:{@diamonds-Spawned-Min}, iron:{@iron-Spawned-Max}:{@iron-Spawned-Min}, gold:{@gold-Spawned-Max}:{@gold-Spawned-Min}, coal:{@coal-Spawned-Max}:{@coal-Spawned-Min}, lapis:{@lapis-Spawned-Max}:{@lapis-Spawned-Min}, redstone:{@redstone-Spawned-Max}:{@redstone-Spawned-Min},emerald:{@emerald-Spawned-Max}:{@emerald-Spawned-Min}"
- set {_ores} to {bm::SupportedOres}
- replace all " " in {_ores} with ""
- set {_1.ores::*} to {_ores} split at ","
- loop {_1.ores::*}:
- set {_1.o::*} to loop-value split at ":"
- set {bm::ores.o::%{_1.o::1}%::ore} to {_1.o::1}
- set {bm::ores.o::%{_1.o::1}%::chance} to {_1.o::2}
- set {bm::ores.list::%{_1.o::1}%} to {_1.o::1}
- set {_ttospawn} to {bm::SpawnAmount}
- replace all " " in {_ttospawn} with ""
- set {_1.tospawn::*} to {_ttospawn} split at ","
- loop {_1.tospawn::*}:
- set {_1.t::*} to loop-value split at ":"
- set {bm::ores.t::%{_1.t::1}%::ore} to {_1.t::1} parsed as integer
- set {bm::ores.t::%{_1.t::1}%::max} to {_1.t::2} parsed as integer
- set {bm::ores.t::%{_1.t::1}%::min} to {_1.t::3} parsed as integer
- on mine of lapis block:
- chance of {@ChanceToSpawn}:
- loop blocks in radius {@OreRadius} around event-location:
- if loop-block is lapis block:
- if {_ore} is not set:
- set {_ore} to random element out of {bm::ores.list::*}
- if {_tospawn} is not set:
- set {_min} to {bm::ores.t::%{_ore}%::min}
- set {_max} to {bm::ores.t::%{_ore}%::max}
- set {_dif} to {_max} - {_min}
- set {_num} to {_min}
- loop {_dif} times:
- set {_numbers::%{_num}%} to {_num}
- add 1 to {_num}
- set {_tospawn} to random element out of {_numbers::*}
- if {_spawned} is greater than or equal to {_tospawn}:
- stop
- if {_ore} is "diamond":
- set loop-block to diamond ore
- add 1 to {_spawned}
- else if {_ore} is "iron":
- set loop-block to iron ore
- add 1 to {_spawned}
- else if {_ore} is "gold":
- set loop-block to gold ore
- add 1 to {_spawned}
- else if {_ore} is "coal":
- set loop-block to coal ore
- add 1 to {_spawned}
- else if {_ore} is "lapis":
- set loop-block to lapis ore
- add 1 to {_spawned}
- else if {_ore} is "redstone":
- set loop-block to redstone ore
- add 1 to {_spawned}
- else if {_ore} is "emerald":
- set loop-block to emerald ore
- add 1 to {_spawned}
- message "set block at %location of loop-block% to %loop-block%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement