Oxalist

Generators Part 2

Jul 3rd, 2020 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.04 KB | None | 0 0
  1. on skript load:
  2. loop {generators::*}:
  3. if {generatorstatus::%loop-value%} is true:
  4. create a hologram with lines "&a%{generatortype::%loop-value%}% &aGenerator" and "%{generatorstars::%loop-value%}%" at block above above block at loop-value and store it in {generatorholograms::%loop-value%}
  5. else if {generatorstatus::%loop-value%} is false:
  6. create a hologram with lines "&c%{generatortype::%loop-value%}% &cGenerator" and "%{generatorstars::%loop-value%}%" at block above above block at loop-value and store it in {generatorholograms::%loop-value%}
  7. wait 1 tick
  8.  
  9. command /serveritems:
  10. trigger:
  11. open virtual chest inventory with size 3 named "Server Items" to player
  12. set {_i} to 0
  13. loop 5 times:
  14. if loop-number is 1:
  15. set {_star} to "&e&l✰&f✰✰✰✰"
  16. else if loop-number is 2:
  17. set {_star} to "&e&l✰✰&f✰✰✰"
  18. else if loop-number is 3:
  19. set {_star} to "&e&l✰✰✰&f✰✰"
  20. else if loop-number is 4:
  21. set {_star} to "&e&l✰✰✰✰&f✰"
  22. else if loop-number is 5:
  23. set {_star} to "&e&l✰✰✰✰✰"
  24. format a gui slot {_i} of player with smoker named "&6Plasma Generator &8[%{_star}%&8]" with lore "&7Discovered by %player%" and "" and "&fSimply place the generator and allow" and "&fit to generate the specified items" and "" and "&dDrops: &d&lPlasma Fragment" to run:
  25. give 1 of clicked item to player
  26. format a gui slot 6 of player with black dye named "&ePlasma Fragment" with lore "&7## Craftable & Tradeable ##" and "" and "&fUse this item to craft new generators" and "&for trade them for better equipment/gear" and "" and "&dUses: &d&lCrafting & Trading" to run:
  27. give 1 of clicked item with nbt "{Level:1}" to player
  28. add 1 to {_i}
  29. set {_ii} to 9
  30. loop 5 times:
  31. if loop-number is 1:
  32. set {_star} to "&e&l✰&f✰✰✰✰"
  33. else if loop-number is 2:
  34. set {_star} to "&e&l✰✰&f✰✰✰"
  35. else if loop-number is 3:
  36. set {_star} to "&e&l✰✰✰&f✰✰"
  37. else if loop-number is 4:
  38. set {_star} to "&e&l✰✰✰✰&f✰"
  39. else if loop-number is 5:
  40. set {_star} to "&e&l✰✰✰✰✰"
  41. format a gui slot {_ii} of player with smoker named "&6Magma Generator &8[%{_star}%&8]" with lore "&7Discovered by %player%" and "" and "&fSimply place the generator and allow" and "&fit to generate the specified items" and "" and "&dDrops: &d&lMagma Fragment" to run:
  42. give 1 of clicked item to player
  43. format a gui slot 15 of player with brown dye named "&eMagma Fragment" with lore "&7## Craftable & Tradeable ##" and "" and "&fUse this item to craft new generators" and "&for trade them for better equipment/gear" and "" and "&dUses: &d&lCrafting & Trading" to run:
  44. give 1 of clicked item to player
  45. format a gui slot 16 of player with cauldron named "&6Chunk Buster" with lore "&7## Purchasable & Tradeable ##" and "" and "&fUse this to destroy a chunk" and "&fthis will remove all blocks in the chunk" and "" and "&dUses: &d&lTrading" to run:
  46. give 1 of clicked item to player
  47. add 1 to {_ii}
  48.  
  49. on place of smoker:
  50. if name of player's tool contains "&6Plasma Generator":
  51. if player cannot build at the event-block:
  52. cancel event
  53. send "&cYou cannot build at this area" to player
  54. stop
  55. add event-location to {generators::*}
  56. set {generatortype::%event-location%} to "Plasma"
  57. set {generatordrops::%event-location%} to black dye named "&ePlasma Fragment" with lore "&7## Craftable & Tradeable ##" and "" and "&fUse this item to craft new generators" and "&for trade them for better equipment/gear" and "" and "&dUses: &d&lCrafting & Trading"
  58. set {generatorstatus::%event-location%} to true
  59. if name of player's tool contains "&e&l✰&f✰✰✰✰":
  60. set {generatorlevel::%event-location%} to 1
  61. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰&f✰✰✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  62. set {generatorstars::%event-location%} to "&e&l✰&f✰✰✰✰"
  63. else if name of player's tool contains "&e&l✰✰&f✰✰✰":
  64. set {generatorlevel::%event-location%} to 2
  65. set {generatorstars::%event-location%} to "&e&l✰✰&f✰✰✰"
  66. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰&f✰✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  67. else if name of player's tool contains "&e&l✰✰✰&f✰✰":
  68. set {generatorlevel::%event-location%} to 3
  69. set {generatorstars::%event-location%} to "&e&l✰✰✰&f✰✰"
  70. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰✰&f✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  71. else if name of player's tool contains "&e&l✰✰✰✰&f✰":
  72. set {generatorlevel::%event-location%} to 4
  73. set {generatorstars::%event-location%} to "&e&l✰✰✰✰&f✰"
  74. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰✰✰&f✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  75. else if name of player's tool contains "&e&l✰✰✰✰✰":
  76. set {generatorlevel::%event-location%} to 5
  77. set {generatorstars::%event-location%} to "&e&l✰✰✰✰✰"
  78. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰✰✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  79. remove 1 of player's tool from player
  80. else if name of player's tool contains "&6Magma Generator":
  81. add event-location to {generators::*}
  82. set {generatortype::%event-location%} to "Magma"
  83. set {generatordrops::%event-location%} to brown dye named "&eMagma Fragment" with lore "&7## Craftable & Tradeable ##" and "" and "&fUse this item to craft new generators" and "&for trade them for better equipment/gear" and "" and "&dUses: &d&lCrafting & Trading"
  84. set {generatorstatus::%event-location%} to true
  85. if name of player's tool contains "&e&l✰&f✰✰✰✰":
  86. set {generatorlevel::%event-location%} to 1
  87. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰&f✰✰✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  88. set {generatorstars::%event-location%} to "&e&l✰&f✰✰✰✰"
  89. else if name of player's tool contains "&e&l✰✰&f✰✰✰":
  90. set {generatorlevel::%event-location%} to 2
  91. set {generatorstars::%event-location%} to "&e&l✰✰&f✰✰✰"
  92. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰&f✰✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  93. else if name of player's tool contains "&e&l✰✰✰&f✰✰":
  94. set {generatorlevel::%event-location%} to 3
  95. set {generatorstars::%event-location%} to "&e&l✰✰✰&f✰✰"
  96. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰✰&f✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  97. else if name of player's tool contains "&e&l✰✰✰✰&f✰":
  98. set {generatorlevel::%event-location%} to 4
  99. set {generatorstars::%event-location%} to "&e&l✰✰✰✰&f✰"
  100. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰✰✰&f✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  101. else if name of player's tool contains "&e&l✰✰✰✰✰":
  102. set {generatorlevel::%event-location%} to 5
  103. set {generatorstars::%event-location%} to "&e&l✰✰✰✰✰"
  104. create a hologram with lines "&a%{generatortype::%event-location%}% &aGenerator" and "&e&l✰✰✰✰✰" at block above above event-block and store it in {generatorholograms::%event-location%}
  105. remove 1 of player's tool from player
  106.  
  107. on break of smoker:
  108. if {generators::*} contains event-location:
  109. cancel drops
  110. if {generatortype::%event-location%} is "Plasma":
  111. set {_item} to smoker named "&6Plasma Generator &8[%{generatorstars::%event-location%}%&8]" with lore "&7Discovered by %player%" and "" and "&fSimply place the generator and allow" and "&fit to generate the specified items" and "" and "&dDrops: &d&lPlasma Fragment"
  112. drop 1 of {_item} at event-location without velocity
  113. else if {generatortype::%event-location%} is "Magma":
  114. set {_item} to smoker named "&6Magma Generator &8[%{generatorstars::%event-location%}%&8]" with lore "&7Discovered by %player%" and "" and "&fSimply place the generator and allow" and "&fit to generate the specified items" and "" and "&dDrops: &d&lMagma Fragment"
  115. drop 1 of {_item} at event-location without velocity
  116. remove event-location from {generators::*}
  117. delete {generatortype::%event-location%}
  118. delete {generatordrops::%event-location%}
  119. delete {generatorlevel::%event-location%}
  120. delete {generatorstars::%event-location%}
  121. delete {generatorstatus::%event-location%}
  122. delete holo {generatorholograms::%event-location%}
Add Comment
Please, Sign In to add comment