Advertisement
CREAMPAN0408

Untitled

Feb 28th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. #
  2. # BetterMining.sk
  3. # By nfell2009
  4. # All rights reserved
  5. #
  6.  
  7. options:
  8. ChanceToSpawn: 50
  9.  
  10. diamonds-Chance: 100
  11. diamonds-Y-Top: 12
  12. diamonds-Y-Low: 5
  13. diamonds-Spawned-Max: 4
  14. diamonds-Spawned-Min: 1
  15.  
  16. iron-Chance: 160
  17. iron-Y-Top: 54
  18. iron-Y-Low: 5
  19. iron-Spawned-Max: 6
  20. iron-Spawned-Min: 2
  21.  
  22. gold-Chance: 100
  23. gold-Y-Top: 29
  24. gold-Y-Low: 5
  25. gold-Spawned-Max: 4
  26. gold-Spawned-Min: 2
  27.  
  28. coal-Chance: 200
  29. coal-Y-Top: 52
  30. coal-Y-Low: 5
  31. coal-Spawned-Max: 9
  32. coal-Spawned-Min: 3
  33.  
  34. lapis-Chance: 100
  35. lapis-Y-Top: 16
  36. lapis-Y-Low: 14
  37. lapis-Spawned-Max: 8
  38. lapis-Spawned-Min: 4
  39.  
  40. redstone-Chance: 180
  41. redstone-Y-Top: 12
  42. redstone-Y-Low: 5
  43. redstone-Spawned-Max: 6
  44. redstone-Spawned-Min: 2
  45.  
  46. emerald-Chance: 120
  47. emerald-Y-Top: 29
  48. emerald-Y-Low: 5
  49. emerald-Spawned-Max: 2
  50. emerald-Spawned-Min: 1
  51.  
  52. OreRadius: 5
  53.  
  54. on script load:
  55. delete {bm::*}
  56. 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}"
  57. 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}"
  58.  
  59. set {_ores} to {bm::SupportedOres}
  60. replace all " " in {_ores} with ""
  61. set {_1.ores::*} to {_ores} split at ","
  62. loop {_1.ores::*}:
  63. set {_1.o::*} to loop-value split at ":"
  64. set {bm::ores.o::%{_1.o::1}%::ore} to {_1.o::1}
  65. set {bm::ores.o::%{_1.o::1}%::chance} to {_1.o::2}
  66. set {bm::ores.list::%{_1.o::1}%} to {_1.o::1}
  67.  
  68. set {_ttospawn} to {bm::SpawnAmount}
  69. replace all " " in {_ttospawn} with ""
  70. set {_1.tospawn::*} to {_ttospawn} split at ","
  71. loop {_1.tospawn::*}:
  72. set {_1.t::*} to loop-value split at ":"
  73. set {bm::ores.t::%{_1.t::1}%::ore} to {_1.t::1} parsed as integer
  74. set {bm::ores.t::%{_1.t::1}%::max} to {_1.t::2} parsed as integer
  75. set {bm::ores.t::%{_1.t::1}%::min} to {_1.t::3} parsed as integer
  76.  
  77. on mine of lapis block:
  78. chance of {@ChanceToSpawn}:
  79. loop blocks in radius {@OreRadius} around event-location:
  80. if loop-block is lapis block:
  81. if {_ore} is not set:
  82. set {_ore} to random element out of {bm::ores.list::*}
  83. if {_tospawn} is not set:
  84. set {_min} to {bm::ores.t::%{_ore}%::min}
  85. set {_max} to {bm::ores.t::%{_ore}%::max}
  86. set {_dif} to {_max} - {_min}
  87. set {_num} to {_min}
  88. loop {_dif} times:
  89. set {_numbers::%{_num}%} to {_num}
  90. add 1 to {_num}
  91.  
  92. set {_tospawn} to random element out of {_numbers::*}
  93. if {_spawned} is greater than or equal to {_tospawn}:
  94. stop
  95. if {_ore} is "diamond":
  96. set loop-block to diamond ore
  97. add 1 to {_spawned}
  98. else if {_ore} is "iron":
  99. set loop-block to iron ore
  100. add 1 to {_spawned}
  101. else if {_ore} is "gold":
  102. set loop-block to gold ore
  103. add 1 to {_spawned}
  104. else if {_ore} is "coal":
  105. set loop-block to coal ore
  106. add 1 to {_spawned}
  107. else if {_ore} is "lapis":
  108. set loop-block to lapis ore
  109. add 1 to {_spawned}
  110. else if {_ore} is "redstone":
  111. set loop-block to redstone ore
  112. add 1 to {_spawned}
  113. else if {_ore} is "emerald":
  114. set loop-block to emerald ore
  115. add 1 to {_spawned}
  116. message "set block at %location of loop-block% to %loop-block%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement