Guest User

Untitled

a guest
Jun 25th, 2015
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.76 KB | None | 0 0
  1. command /nDrop:drop [<player>] [<text>]:
  2. description: nDrop » Informacje o dropie ze stone.
  3. aliases: drop, kamien, stone
  4. trigger:
  5. if executor is player:
  6. if player has permission "nDrop.drop" or "nDrop.*":
  7. open chest with 2 rows named "&aDrop ze stone" to player
  8. wait 1 tick
  9. add "coal" and "iron" and "lapis" and "gold" and "diamond" and "redstone" and "emerald" and "bookshelf" to {_gui1::*}
  10. loop {_gui1::*}:
  11. set {_gui::%loop-value%::chance} to value "configuration.drop.%loop-value%.chance" get of "plugins/nDrop/configuration.yml"
  12. set {_gui::%loop-value%::height} to value "configuration.drop.%loop-value%.height" get of "plugins/nDrop/configuration.yml"
  13. set {_gui::%loop-value%::woodpickaxe} to value "configuration.drop.%loop-value%.pickaxes.wood" get of "plugins/nDrop/configuration.yml"
  14. set {_gui::%loop-value%::stonepickaxe} to value "configuration.drop.%loop-value%.pickaxes.stone" get of "plugins/nDrop/configuration.yml"
  15. set {_gui::%loop-value%::ironpickaxe} to value "configuration.drop.%loop-value%.pickaxes.iron" get of "plugins/nDrop/configuration.yml"
  16. set {_gui::%loop-value%::goldpickaxe} to value "configuration.drop.%loop-value%.pickaxes.gold" get of "plugins/nDrop/configuration.yml"
  17. set {_gui::%loop-value%::diamondpickaxe} to value "configuration.drop.%loop-value%.pickaxes.diamond" get of "plugins/nDrop/configuration.yml"
  18. set {_gui::%loop-value%::ore} to value "configuration.drop.%loop-value%.ore.drop" get of "plugins/nDrop/configuration.yml"
  19. set {_gui::%loop-value%::drop} to value "drop.%loop-value%" get of "plugins/nDrop/players/%player%.yml"
  20. set {_cobblestone-stone-drop} to value "drop.cobble-stone" get of "plugins/nDrop/players/%player%.yml"
  21. set {_fortune1} to value "configuration.multiplier.fortune1" get of "plugins/nDrop/configuration.yml"
  22. set {_fortune2} to value "configuration.multiplier.fortune2" get of "plugins/nDrop/configuration.yml"
  23. set {_fortune3} to value "configuration.multiplier.fortune3" get of "plugins/nDrop/configuration.yml"
  24. set {_superdrop} to value "configuration.multiplier.super-drop" get of "plugins/nDrop/configuration.yml"
  25. set {_turbodrop} to value "configuration.multiplier.turbo-drop" get of "plugins/nDrop/configuration.yml"
  26. set {_turbodrop-active} to value "configuration.other.turbo-drop" get of "plugins/nDrop/configuration.yml"
  27. set {_turboexperience} to value "configuration.multiplier.turbo-drop" get of "plugins/nDrop/configuration.yml"
  28. set {_turboexperience-active} to value "configuration.other.turbo-experience" get of "plugins/nDrop/configuration.yml"
  29. set {_experience} to value "configuration.other.experience" get of "plugins/nDrop/configuration.yml"
  30. set {_turbodrop-help} to ""
  31. if player has permission "nDrop.super-drop" or "nDrop.*":
  32. set {_superdrop-permission} to "&atak"
  33. else:
  34. set {_superdrop-permission} to "&cnie"
  35. if {_turbodrop-active} is "true":
  36. set {_turbodrop-active} to "&atak"
  37. if player has permission "nDrop.turbo-drop" or "nDrop.*":
  38. set {_turbodrop-help} to "||||&7Kliknij, aby &cwylaczyc &7turbo drop"
  39. else:
  40. set {_turbodrop-active} to "&cnie"
  41. if player has permission "nDrop.turbo-drop" or "nDrop.*":
  42. set {_turbodrop-help} to "||||&7Kliknij, aby &awlaczyc &7turbo drop"
  43. if {_turboexperience-active} is "true":
  44. set {_turboexperience-active} to "&atak"
  45. if player has permission "nDrop.turbo-experience" or "nDrop.*":
  46. set {_turboexperience-help} to "||||&7Kliknij, aby &cwylaczyc &7turbo experience"
  47. else:
  48. set {_turboexperience-active} to "&cnie"
  49. if player has permission "nDrop.turbo-experience" or "nDrop.*":
  50. set {_turboexperience-help} to "||||&7Kliknij, aby &awlaczyc &7turbo experience"
  51. loop {_gui1::*}:
  52. loop {_gui::%loop-value-1%::*}:
  53. if {_gui::%loop-value-1%::%loop-index-2%} is "true":
  54. set {_gui::%loop-value-1%::%loop-index-2%} to "&atak"
  55. set {_gui::%loop-value-1%::%loop-index-2%-help} to "&cwylaczyc"
  56. if {_gui::%loop-value-1%::%loop-index-2%} is "false":
  57. set {_gui::%loop-value-1%::%loop-index-2%} to "&cnie"
  58. set {_gui::%loop-value-1%::%loop-index-2%-help} to "&awlaczyc"
  59. if {_cobblestone-stone-drop} is "true":
  60. set {_cobblestone-stone-drop} to "&atak"
  61. set {_cobblestone-stone-drop-help} to "&cwylaczyc"
  62. if {_cobblestone-stone-drop} is "false":
  63. set {_cobblestone-stone-drop} to "&cnie"
  64. set {_cobblestone-stone-drop-help} to "&awlaczyc"
  65. format slot 1 of player with 1 of coal item named "&8&lWegiel" with lore "&7Szansa: &f%{_gui::coal::chance}%%%||&7Wysokosc: &f<%{_gui::coal::height}%||&7Wylatuje z rudy: &f%{_gui::coal::ore}%||||&7Kliknij, aby &f%colored {_gui::coal::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% coal"
  66. format slot 2 of player with 1 of iron ore named "&7&lZelazo" with lore "&7Szansa: &f%{_gui::iron::chance}%%%||&7Wysokosc: &f<%{_gui::iron::height}%||&7Wylatuje z rudy: &f%{_gui::iron::ore}%||||&7Kliknij, aby &f%colored {_gui::iron::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% iron"
  67. format slot 3 of player with 1 of lapis lazuli named "&9&lLapis" with lore "&7Szansa: &f%{_gui::lapis::chance}%%%||&7Wysokosc: &f<%{_gui::lapis::height}%||&7Wylatuje z rudy: &f%{_gui::lapis::ore}%||||&7Kliknij, aby &f%colored {_gui::lapis::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% lapis"
  68. format slot 4 of player with 1 of gold ore named "&6&lZloto" with lore "&7Szansa: &f%{_gui::gold::chance}%%%||&7Wysokosc: &f<%{_gui::gold::height}%||&7Wylatuje z rudy: &f%{_gui::gold::ore}%||||&7Kliknij, aby &f%colored {_gui::gold::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% gold"
  69. format slot 5 of player with 1 of diamond named "&b&lDiamenty" with lore "&7Szansa: &f%{_gui::diamond::chance}%%%||&7Wysokosc: &f<%{_gui::diamond::height}%||&7Wylatuje z rudy: &f%{_gui::diamond::ore}%||||&7Kliknij, aby &f%colored {_gui::diamond::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% diamond"
  70. format slot 0 of player with 1 of bookshelf named "&b&lDiamenty" with lore "&7Szansa: &f%{_gui::bookshelf::chance}%%%||&7Wysokosc: &f<%{_gui::bookshelf::height}%||&7Wylatuje z rudy: &f%{_gui::bookshelf::ore}%||||&7Kliknij, aby &f%colored {_gui::bookshelf::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% bookshelf"
  71. format slot 6 of player with 1 of redstone named "&c&lRedstone" with lore "&7Szansa: &f%{_gui::redstone::chance}%%%||&7Wysokosc: &f<%{_gui::redstone::height}%||&7Wylatuje z rudy: &f%{_gui::redstone::ore}%||||&7Kliknij, aby &f%colored {_gui::redstone::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% redstone"
  72. format slot 7 of player with 1 of emerald named "&2&lEmeraldy" with lore "&7Szansa: &f%{_gui::emerald::chance}%%%||&7Wysokosc: &f<%{_gui::emerald::height}%||&7Wylatuje z rudy: &f%{_gui::emerald::ore}%||||&7Kliknij, aby &f%colored {_gui::emerald::drop-help}% &7wylatywanie ze stone" to run "nDrop:drop %player% emerald"
  73. format slot 10 of player with 1 of enchanted book named "&6&lSzczescie I" with lore "&7Szczescie I: &f+%{_fortune1}%%%" to be unstealable
  74. format slot 11 of player with 1 of enchanted book named "&6&lSzczescie II" with lore "&7Szczescie II: &f+%{_fortune2}%%%" to be unstealable
  75. format slot 12 of player with 1 of enchanted book named "&6&lSzczescie III" with lore "&7Szczescie III: &f+%{_fortune3}%%%" to be unstealable
  76. format slot 13 of player with 1 of cobblestone named "&7&lCobblestone" with lore "&7Wylatywanie cobblestone: &f%colored {_cobblestone-stone-drop}%||||&7Kliknij, aby &f%colored {_cobblestone-stone-drop-help}% &7wylatywanie cobblestone" to run "nDrop:drop %player% cobble-stone"
  77. format slot 14 of player with 1 of enchanted book named "&6&lWiekszy drop" with lore "&7Super drop: &f+%{_superdrop}%%%||&7Aktywny dla Ciebie: &f%colored {_superdrop-permission}%" to be unstealable
  78. format slot 15 of player with 1 of enchanted book named "&6&lTurbo drop" with lore "&7Turbo drop: &f+%{_turbodrop}%%%||&7Aktywny: &f%colored {_turbodrop-active}%" to be unstealable
  79. format slot 16 of player with 1 of enchanted book named "&6&lTurbo xp" with lore "&7Turbo xp: &f+%{_turboexperience}% exp.||&7Aktywne: &f%colored {_turboexperience-active}%" to be unstealable
  80. if player has permission "nDrop.turbo-drop" or "nDrop.*":
  81. format slot 15 of player with 1 of enchanted book named "&6&lTurbo drop" with lore "&7Turbo drop: &f+%{_turbodrop}%%%||&7Aktywny: &f%colored {_turbodrop-active}%%colored {_turbodrop-help}%" to run "nDrop:drop %player% turbo-drop"
  82. if player has permission "nDrop.turbo-experience" or "nDrop.*":
  83. format slot 16 of player with 1 of enchanted book named "&6&lTurbo xp" with lore "&7Turbo xp: &f+%{_turboexperience}% exp.||&7Aktywny: &f%colored {_turboexperience-active}%" to run "nDrop:drop %player% turbo-experience"
  84. else:
  85. function "nDrop-permissions" {player and "nDrop.drop"}
  86. else:
  87. if arg 1 is set:
  88. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  89. if arg 2 is "turbo-drop":
  90. set {_turbodrop-active} to value "configuration.other.turbo-drop" get of "plugins/nDrop/configuration.yml"
  91. if {_turbodrop-active} is "true":
  92. set "configuration.other.turbo-drop" to "false" in yaml file "plugins/nDrop/configuration.yml"
  93. set {_msg} to value "configuration.messages.turbo-drop.disabled" get of "plugins/nDrop/configuration.yml"
  94. if {_turbodrop-active} is "false":
  95. set "configuration.other.turbo-drop" to "true" in yaml file "plugins/nDrop/configuration.yml"
  96. set {_msg} to value "configuration.messages.turbo-drop.enabled" get of "plugins/nDrop/configuration.yml"
  97. send "%colored {_tag}% %colored {_msg}%" to all players
  98. close arg 1's inventory
  99. wait 1 tick
  100. execute arg 1 command "drop"
  101. if arg 2 is "turbo-experience":
  102. set {_turboexperience-active} to value "configuration.other.turbo-experience" get of "plugins/nDrop/configuration.yml"
  103. if {_turboexperience-active} is "true":
  104. set "configuration.other.turbo-experience" to "false" in yaml file "plugins/nDrop/configuration.yml"
  105. set {_msg} to value "configuration.messages.turbo-experience.disabled" get of "plugins/nDrop/configuration.yml"
  106. if {_turboexperience-active} is "false":
  107. set "configuration.other.turbo-experience" to "true" in yaml file "plugins/nDrop/configuration.yml"
  108. set {_msg} to value "configuration.messages.turbo-experience.enabled" get of "plugins/nDrop/configuration.yml"
  109. send "%colored {_tag}% %colored {_msg}%" to all players
  110. close arg 1's inventory
  111. wait 1 tick
  112. execute arg 1 command "drop"
  113. if arg 2 is not "turbo-drop" or "turbo-experience":
  114. set {_drop} to value "drop.%arg 2%" get of "plugins/nDrop/players/%arg 1%.yml"
  115. if {_drop} is "true":
  116. set "drop.%arg 2%" to "false" in yaml file "plugins/nDrop/players/%arg 1%.yml"
  117. set {_msg} to value "configuration.messages.item-drop.%arg 2%.disabled" get of "plugins/nDrop/configuration.yml"
  118. if {_drop} is "false":
  119. set "drop.%arg 2%" to "true" in yaml file "plugins/nDrop/players/%arg 1%.yml"
  120. set {_msg} to value "configuration.messages.item-drop.%arg 2%.enabled" get of "plugins/nDrop/configuration.yml"
  121. send "%colored {_tag}% %colored {_msg}%" to arg 1
  122. close arg 1's inventory
  123. wait 1 tick
  124. execute arg 1 command "drop"
  125. command /nDrop:statistics [<text="%player%">]:
  126. description: nDrop » Statystyki kopania.
  127. aliases: statistics, stats, statystyki, staty
  128. trigger:
  129. if player has permission "nDrop.statistics" or "nDrop.*":
  130. if file "plugins/nDrop/players/%arg 1 parsed as offlineplayer%.yml" exists:
  131. open chest with 3 rows named "&bStatystyki" to player
  132. wait 1 tick
  133. format slot 4 of player with 1 of book named "&b&lStatystki %arg 1 parsed as offlineplayer%" to be unstealable
  134. add "coal" and "iron" and "lapis" and "gold" and "diamond" and "redstone" and "emerald" and "stone" and "points" and "level" and "needed" to {_gui1::*}
  135. loop {_gui1::*}:
  136. set {_gui::%loop-value%} to value "statistics.%loop-value%" get of "plugins/nDrop/players/%arg 1 parsed as offlineplayer%.yml"
  137. format slot 10 of player with 1 of coal item named "&6&lWegiel" with lore "&7Znaleziono: &f%{_gui::coal}% sztuk" to be unstealable
  138. format slot 11 of player with 1 of iron ingot named "&6&lZelazo" with lore "&7Znaleziono: &f%{_gui::iron}% sztuk" to be unstealable
  139. format slot 12 of player with 1 of lapis lazuli named "&6&lLazuryt" with lore "&7Znaleziono: &f%{_gui::lapis}% sztuk" to be unstealable
  140. format slot 13 of player with 1 of gold ingot named "&6&lZloto" with lore "&7Znaleziono: &f%{_gui::gold}% sztuk" to be unstealable
  141. format slot 14 of player with 1 of diamond named "&6&lDiamenty" with lore "&7Znaleziono: &f%{_gui::diamond}% sztuk" to be unstealable
  142. format slot 15 of player with 1 of redstone named "&6&lCzerwony kamien" with lore "&7Znaleziono: &f%{_gui::redstone}% sztuk" to be unstealable
  143. format slot 16 of player with 1 of emerald named "&6&lSzmaragdy" with lore "&7Znaleziono: &f%{_gui::emerald}% sztuk" to be unstealable
  144. format slot 21 of player with 1 of stone named "&6&lKamien" with lore "&7Wykopano: &f%{_gui::stone}% sztuk" to be unstealable
  145. format slot 23 of player with 1 of xp bottle named "&6&lPoziom" with lore "&7Poziom: &f%{_gui::level}%||&7Punkty: &f%{_gui::points}%&7/&f%{_gui::needed}%" to be unstealable
  146. else:
  147. function "nDrop-playerNotFound" {player}
  148. else:
  149. function "nDrop-permissions" {player and "nDrop.statistics"}
  150. command /nDrop:top10 [<text="help">]:
  151. description: nDrop » Top10 znalezionych surowcow/wykopanego kamienia.
  152. aliases: top, top10, topka
  153. trigger:
  154. if player has permission "nDrop.top10" or "nDrop.*":
  155. if arg 1 is not "coal" or "iron" or "lapis" or "gold" or "diamond" or "redstone" or "emerald" or "stone" or "level":
  156. open chest with 4 rows named "&bTop 10" to player
  157. wait 1 tick
  158. format slot 4 of player with 1 of book named "&b&lTop 10 pomoc" to be unstealable
  159. format slot 10 of player with 1 of coal item named "&6&lWegiel" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionego wegla" to run [execute player command "nDrop:top10 coal"]
  160. format slot 11 of player with 1 of iron ingot named "&6&lZelazo" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionego zelaza" to run [execute player command "nDrop:top10 iron"]
  161. format slot 12 of player with 1 of lapis lazuli named "&6&lLazuryt" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionego lazurytu" to run [execute player command "nDrop:top10 lapis"]
  162. format slot 13 of player with 1 of gold ingot named "&6&lZloto" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionego zlota" to run [execute player command "nDrop:top10 gold"]
  163. format slot 14 of player with 1 of diamond named "&6&lDiamenty" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionych diamentow" to run [execute player command "nDrop:top10 diamond"]
  164. format slot 15 of player with 1 of redstone named "&6&lCzerwony kamien" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionego czerwonego kamienia" to run [execute player command "nDrop:top10 redstone"]
  165. format slot 16 of player with 1 of emerald named "&6&lSzmaragdy" with lore "||&7Kliknij, aby zobaczyc top 10 znalezionych szmaragdow" to run [execute player command "nDrop:top10 emerald"]
  166. format slot 21 of player with 1 of stone named "&6&lKamien" with lore "||&7Kliknij, aby zobaczyc top 10 wykopanego kamienia" to run [execute player command "nDrop:top10 stone"]
  167. format slot 23 of player with 1 of xp bottle named "&6&lPoziom" with lore "||&7Kliknij, aby zobaczyc top 10 poziomow" to run [execute player command "nDrop:top10 level"]
  168. else:
  169. open chest with 4 rows named "&bTop 10" to player
  170. wait 1 tick
  171. set {_top-gui} to arg 1
  172. replace all "coal" with "znalezionego wegla" in {_top-gui}
  173. replace all "iron" with "znalezionego zelaza" in {_top-gui}
  174. replace all "lapis" with "znalezionego lazurytu" in {_top-gui}
  175. replace all "gold" with "znalezionego zlota" in {_top-gui}
  176. replace all "diamond" with "znalezionych diamentow" in {_top-gui}
  177. replace all "redstone" with "znalezionego czerwonego kamienia" in {_top-gui}
  178. replace all "emerald" with "znalezionych szmaragdow" in {_top-gui}
  179. replace all "stone" with "wykopanego kamienia" in {_top-gui}
  180. replace all "level" with "poziomow" in {_top-gui}
  181. format slot 4 of player with 1 of book named "&b&lTop 10 %{_top-gui}%" to be unstealable
  182. set {_files::*} to all files in "plugins/nDrop/players"
  183. loop {_files::*}:
  184. set {_value} to value "statistics.%arg 1%" get of "plugins/nDrop/players/%loop-value%" parsed as number
  185. set {_player.%loop-value%} to value "player" get of "plugins/nDrop/players/%loop-value%"
  186. set {_lista::%loop-value%} to {_value}
  187. set {_num} to size of {_lista::*}
  188. loop 10 times:
  189. loop {_lista::*}:
  190. if {_value.%loop-number%} is not set:
  191. set {_value.%loop-number%} to loop-value
  192. set {_nick.%loop-number%} to loop-index
  193. if loop-value is more than {_value.%loop-number%}:
  194. set {_value.%loop-number%} to loop-value
  195. set {_nick.%loop-number%} to loop-index
  196. replace all ".yml" with "" in {_nick.%loop-number%}
  197. remove {_value.%loop-number%} from {_lista::*}
  198. if loop-number <= {_num}:
  199. if loop-number is 1:
  200. set {_slot} to 12
  201. set {_item} to red wool
  202. set {_color} to "&c&l"
  203. if loop-number is 2:
  204. set {_slot} to 13
  205. set {_item} to orange wool
  206. set {_color} to "&6&l"
  207. if loop-number is 3:
  208. set {_slot} to 14
  209. set {_item} to yellow wool
  210. set {_color} to "&e&l"
  211. if loop-number is 4:
  212. set {_slot} to 19
  213. set {_item} to light green wool
  214. set {_color} to "&a&l"
  215. if loop-number is 5:
  216. set {_slot} to 20
  217. if loop-number is 6:
  218. set {_slot} to 21
  219. if loop-number is 7:
  220. set {_slot} to 22
  221. if loop-number is 8:
  222. set {_slot} to 23
  223. if loop-number is 9:
  224. set {_slot} to 24
  225. if loop-number is 10:
  226. set {_slot} to 25
  227. format slot {_slot} of player with 1 of {_item} named "%colored {_color}%%loop-number%. %{_player.%{_nick.%loop-number%}%.yml}%" with lore "&7Ilosc: &f%{_value.%loop-number%}%" to be unstealable
  228. else:
  229. function "nDrop-permissions" {player and "nDrop.top10"}
  230. on script load:
  231. if file "plugins/nDrop/configuration.yml" doesn't exists:
  232. create file "plugins/nDrop/configuration.yml"
  233. download from "https://raw.githubusercontent.com/norbi002/nDrop/master/Config" to "plugins/nDrop/configuration.yml"
  234. if folder "plugins/nDrop/players" doesn't exists:
  235. create folder "plugins/nDrop/players"
  236. loop all players:
  237. kick loop-player due to "&cWejdz ponownie na serwer!"
  238. send "[nDrop] Script loaded with version: 1.0." to console
  239. send "[nDrop] Author: xNorbi. http://norbieu.tk" to console
  240. set {_generator-enable} to value "configuration.generator.enable" get of "plugins/nDrop/configuration.yml"
  241. if {_generator-enable} is "true":
  242. set {_generator-result-number} to value "configuration.generator.crafting.result-number" get of "plugins/nDrop/configuration.yml" parsed as number
  243. loop 9 times:
  244. set {_generator-crafting.slot%loop-number%.amount} to value "configuration.generator.crafting.slot%loop-number%.amount" get of "plugins/nDrop/configuration.yml" parsed as number
  245. set {_generator-crafting.slot%loop-number%.item} to value "configuration.generator.crafting.slot%loop-number%.item" get of "plugins/nDrop/configuration.yml" parsed as item
  246. new Recipe "nDrop-Generator";
  247. "nDrop-Generator".Recipe.registerIngredient{1, {_generator-crafting.slot1.amount} of {_generator-crafting.slot1.item}}
  248. "nDrop-Generator".Recipe.registerIngredient{2, {_generator-crafting.slot2.amount} of {_generator-crafting.slot2.item}}
  249. "nDrop-Generator".Recipe.registerIngredient{3, {_generator-crafting.slot3.amount} of {_generator-crafting.slot3.item}}
  250. "nDrop-Generator".Recipe.registerIngredient{4, {_generator-crafting.slot4.amount} of {_generator-crafting.slot4.item}}
  251. "nDrop-Generator".Recipe.registerIngredient{5, {_generator-crafting.slot5.amount} of {_generator-crafting.slot5.item}}
  252. "nDrop-Generator".Recipe.registerIngredient{6, {_generator-crafting.slot6.amount} of {_generator-crafting.slot6.item}}
  253. "nDrop-Generator".Recipe.registerIngredient{7, {_generator-crafting.slot7.amount} of {_generator-crafting.slot7.item}}
  254. "nDrop-Generator".Recipe.registerIngredient{8, {_generator-crafting.slot8.amount} of {_generator-crafting.slot8.item}}
  255. "nDrop-Generator".Recipe.registerIngredient{9, {_generator-crafting.slot9.amount} of {_generator-crafting.slot9.item}}
  256. "nDrop-Generator".Recipe.registerResult{{_generator-result-number} of end stone}
  257. "nDrop-Generator".Recipe.register{}
  258. on break of coal ore or iron ore or lapis lazuli ore or gold ore or diamond ore or redstone ore or emerald ore:
  259. set {_ore-block} to "%event-block%"
  260. replace all " ore" and "active " and " lazuli" with "" in {_ore-block}
  261. set {_ore-drop} to value "configuration.drop.%{_ore-block}%.ore.drop" get of "plugins/nDrop/configuration.yml"
  262. if {_ore-drop} is "false":
  263. cancel event
  264. set {_ore-replace} to value "configuration.drop.%{_ore-block}%.ore.replace" get of "plugins/nDrop/configuration.yml"
  265. set event-block to {_ore-replace} parsed as item
  266. set {_ore-message} to value "configuration.drop.%{_ore-block}%.ore.message" get of "plugins/nDrop/configuration.yml"
  267. if {_ore-message} is not "":
  268. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  269. send "%colored {_tag}% %colored {_ore-message}%"
  270. on break of stone or cobblestone:
  271. if player's gamemode is survival:
  272. set {_drop-cobble} to value "drop.cobble-stone" get of "plugins/nDrop/players/%player%.yml"
  273. if {_drop-cobble} is "false":
  274. create file "plugins/nDrop/DROP_COBBLE_OFF.nDrop"
  275. on break of stone:
  276. if player's gamemode is survival:
  277. set {_stats-stone} to value "statistics.stone" get of "plugins/nDrop/players/%player%.yml" parsed as number
  278. add 1 to {_stats-stone}
  279. set "statistics.stone" to "%{_stats-stone}%" in yaml file "plugins/nDrop/players/%player%.yml"
  280. set {_experience} to value "configuration.other.experience" get of "plugins/nDrop/configuration.yml" parsed as number
  281. set {_turbo-experience} to value "configuration.other.turbo-experience" get of "plugins/nDrop/configuration.yml"
  282. if {_turbo-experience} is "true":
  283. set {_multiplier} to value "configuration.multiplier.turbo-experience" get of "plugins/nDrop/configuration.yml" parsed as number
  284. add {_multiplier} to {_experience}
  285. loop {_experience} times:
  286. give 1 exp to player
  287. add "coal" and "iron" and "lapis" and "gold" and "diamond" and "redstone" and "emerald" and "bookshelf" to {_drop1::*}
  288. loop {_drop1::*}:
  289. set {_chance::%loop-value%} to value "configuration.drop.%loop-value%.chance" get of "plugins/nDrop/configuration.yml" parsed as number
  290. loop {_chance::*}:
  291. set {_chance} to loop-value
  292. set {_amount} to 1
  293. if player's tool is any pickaxe of fortune 1:
  294. set {_multiplier} to value "configuration.multiplier.fortune1" get of "plugins/nDrop/configuration.yml" parsed as number
  295. add {_multiplier} to {_chance}
  296. set {_amount} to 2
  297. if player's tool is any pickaxe of fortune 2:
  298. set {_multiplier} to value "configuration.multiplier.fortune2" get of "plugins/nDrop/configuration.yml" parsed as number
  299. add {_multiplier} to {_chance}
  300. set {_amount} to 3
  301. if player's tool is any pickaxe of fortune 3:
  302. set {_multiplier} to value "configuration.multiplier.fortune3" get of "plugins/nDrop/configuration.yml" parsed as number
  303. add {_multiplier} to {_chance}
  304. set {_amount} to 4
  305. set {_turbo-drop} to value "configuration.other.turbo-drop" get of "plugins/nDrop/configuration.yml"
  306. if {_turbo-drop} is "true":
  307. set {_multiplier} to value "configuration.multiplier.turbo-drop" get of "plugins/nDrop/configuration.yml" parsed as number
  308. add {_multiplier} to {_chance}
  309. if player has permission "nDrop.super-drop":
  310. set {_multiplier} to value "configuration.multiplier.super-drop" get of "plugins/nDrop/configuration.yml" parsed as number
  311. add {_multiplier} to {_chance}
  312. if player's tool is any pickaxe of silk touch 1:
  313. set {_amount} to 0
  314. chance of {_chance}%:
  315. set {_height} to value "configuration.drop.%loop-index%.height" get of "plugins/nDrop/configuration.yml" parsed as number
  316. if y-coordinate of event-block is smaller than {_height} + 1:
  317. set {_pickaxe-tool} to "%type of player's tool%"
  318. replace all " pickaxe" and "en" with "" in {_pickaxe-tool}
  319. set {_pickaxe-config} to value "configuration.drop.%loop-index%.pickaxes.%{_pickaxe-tool}%" get of "plugins/nDrop/configuration.yml"
  320. if {_pickaxe-config} is "true":
  321. set {_drop-item} to value "drop.%loop-index%" get of "plugins/nDrop/players/%player%.yml"
  322. if {_drop-item} is "true":
  323. if {_amount} is 1 or 2 or 3 or 4:
  324. set {_item} to loop-index
  325. replace all "iron" with "iron ore" in {_item}
  326. replace all "lapis" with "lapis lazuli" in {_item}
  327. replace all "gold" with "gold ore" in {_item}
  328. if player can hold {_amount} of {_item} parsed as item:
  329. give {_amount} of {_item} parsed as item to player
  330. play raw sound "random.pop" at player with pitch 1 volume 0.3
  331. else:
  332. drop {_amount} of {_item} parsed as item at event-location
  333. set {_drop} to value "configuration.messages.drop" get of "plugins/nDrop/configuration.yml"
  334. if {_drop} is not "":
  335. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  336. replace all "{amount}" with "%{_amount}%" in {_drop}
  337. replace all "{item}" with "%loop-index%" in {_drop}
  338. replace all "{points}" with "%{_amount}%" in {_drop}
  339. send "%colored {_tag}% %colored {_drop}%"
  340. if {_amount} is 0:
  341. set {_item} to loop-index
  342. set {_item} to "%{_item}% ore"
  343. if player can hold 1 of {_item} parsed as item:
  344. give 1 of {_item} parsed as item to player
  345. else:
  346. drop 1 of {_item} parsed as item at event-location
  347. set {_drop} to value "configuration.messages.drop" get of "plugins/nDrop/configuration.yml"
  348. if {_drop} is not "":
  349. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  350. replace all "{amount}" with "1" in {_drop}
  351. replace all "{item}" with "%loop-index% ore" in {_drop}
  352. replace all "{points}" with "1" in {_drop}
  353. send "%colored {_tag}% %colored {_drop}%"
  354. set {_stats-item} to value "statistics.%loop-index%" get of "plugins/nDrop/players/%player%.yml" parsed as number
  355. add {_amount} to {_stats-item}
  356. set "statistics.%loop-index%" to "%{_stats-item}%" in yaml file "plugins/nDrop/players/%player%.yml"
  357. set {_level-enabled} to value "configuration.level.enable" get of "plugins/nDrop/configuration.yml"
  358. if {_level-enabled} is "true":
  359. set {_level-points} to value "statistics.points" get of "plugins/nDrop/players/%player%.yml" parsed as number
  360. add {_amount} to {_level-points}
  361. add 1 to {_level-points}
  362. set "statistics.points" to "%{_level-points}%" in yaml file "plugins/nDrop/players/%player%.yml"
  363. set {_level-needed} to value "statistics.needed" get of "plugins/nDrop/players/%player%.yml" parsed as number
  364. if {_level-points} is greater or equal to {_level-needed}:
  365. set "statistics.points" to "0" in yaml file "plugins/nDrop/players/%player%.yml"
  366. set {_level-level} to value "statistics.level" get of "plugins/nDrop/players/%player%.yml" parsed as number
  367. add 1 to {_level-level}
  368. play raw sound "random.levelup" at player with pitch 1 volume 0.3
  369. set "statistics.level" to "%{_level-level}%" in yaml file "plugins/nDrop/players/%player%.yml"
  370. set {_level-needed-configuration} to value "configuration.level.needed" get of "plugins/nDrop/configuration.yml" parsed as number
  371. set {_level-needed-player} to value "statistics.needed" get of "plugins/nDrop/players/%player%.yml" parsed as number
  372. add {_level-needed-configuration} to {_level-needed-player}
  373. set "statistics.needed" to "%{_level-needed-player}%" in yaml file "plugins/nDrop/players/%player%.yml"
  374. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  375. set {_msg} to value "configuration.messages.newlevel" get of "plugins/nDrop/configuration.yml"
  376. replace all "{player}" with "%player%" in {_msg}
  377. replace all "{level}" with "%{_level-level}%" in {_msg}
  378. send "%colored {_tag}% %colored {_msg}%" to all players
  379. play raw sound "random.levelup" at player with pitch 1 volume 0.1
  380. set {_generator-enable} to value "configuration.generator.enable" get of "plugins/nDrop/configuration.yml"
  381. if {_generator-enable} is "true":
  382. set {_generator-regeneration-time} to value "configuration.generator.regeneration-time" get of "plugins/nDrop/configuration.yml" parsed as number
  383. set {_loc.%event-location%} to event-location
  384. loop {_generator-regeneration-time} times:
  385. wait 1 tick
  386. if block under {_loc.%event-location%} is end stone:
  387. if block at {_loc.%event-location%} is air:
  388. set block at {_loc.%event-location%} to stone
  389. On Level Change:
  390. play raw sound "random.orb" at player with pitch 1 volume 0.5
  391. on item spawn of stone or cobblestone:
  392. if file "plugins/nDrop/DROP_COBBLE_OFF.nDrop" exists:
  393. cancel event
  394. delete file "plugins/nDrop/DROP_COBBLE_OFF.nDrop"
  395. on place of end stone:
  396. set {_generator-enable} to value "configuration.generator.enable" get of "plugins/nDrop/configuration.yml"
  397. if {_generator-enable} is "true":
  398. if block at event-block is end stone:
  399. if block above event-block is air:
  400. set block above event-block to stone
  401. on join:
  402. function "nDrop-reloadPlayerFiles" {player}
  403. function "nDrop-reloadPlayerFiles" {}:
  404. set {_player} to arg{1}
  405. wait 1 tick
  406. if file "plugins/nDrop/players/%{_player}%.yml" doesn't exists:
  407. create file "plugins/nDrop/players/%{_player}%.yml"
  408. set "player" to "%{_player}%" in yaml file "plugins/nDrop/players/%{_player}%.yml"
  409. add "coal" and "iron" and "lapis" and "gold" and "diamond" and "redstone" and "emerald" and "stone" and "points" to {_file::*}
  410. loop {_file::*}:
  411. set "statistics.%loop-value%" to "0" in yaml file "plugins/nDrop/players/%{_player}%.yml"
  412. add "coal" and "iron" and "lapis" and "gold" and "diamond" and "redstone" and "emerald" and "cobble-stone" to {_file2::*}
  413. loop {_file2::*}:
  414. set "drop.%loop-value%" to "true" in yaml file "plugins/nDrop/players/%{_player}%.yml"
  415. set {_level-enabled} to value "configuration.level.enable" get of "plugins/nDrop/configuration.yml"
  416. if {_level-enabled} is "true":
  417. set "statistics.level" to "1" in yaml file "plugins/nDrop/players/%{_player}%.yml"
  418. set {_needed} to value "configuration.level.needed" get of "plugins/nDrop/configuration.yml"
  419. set "statistics.needed" to "%{_needed}%" in yaml file "plugins/nDrop/players/%{_player}%.yml"
  420. function "nDrop-permissions" {}:
  421. set {_player} to arg{1}
  422. set {_permission} to arg{2}
  423. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  424. set {_msg} to value "configuration.messages.nopermission" get of "plugins/nDrop/configuration.yml"
  425. replace all "{permission}" with "%{_permission}%" in {_msg}
  426. send "%colored {_tag}% %colored {_msg}%" to {_player}
  427. function "nDrop-playerNotFound" {}:
  428. set {_player} to arg{1}
  429. set {_tag} to value "configuration.messages.tag" get of "plugins/nDrop/configuration.yml"
  430. set {_msg} to value "configuration.messages.playernotfound" get of "plugins/nDrop/configuration.yml"
  431. send "%colored {_tag}% %colored {_msg}%" to {_player}
Advertisement
Add Comment
Please, Sign In to add comment