Advertisement
CREAMPAN0408

Untitled

Feb 23rd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.04 KB | None | 0 0
  1. options:
  2. commonLore: ||&f&lCommon Win
  3. rareLore: ||&a&lRare Win
  4. epicLore: ||&9&lEpic Win
  5. legendaryLore: ||&c&lLegendary Win
  6.  
  7. on right click on ender chest:
  8. cancel the event
  9. {bonusbox::%player%} is not set
  10. open chest with 1 row named "&7Bonus Box" to player
  11. wait 1 tick
  12. loop integers between 0 and 3:
  13. set slot loop-number of player's current inventory to a red stained glass pane named "&cCancel"
  14. set slot 4 of player's current inventory to a white stained glass pane named " "
  15. loop integers between 5 and 8:
  16. set slot loop-number of player's current inventory to a green stained glass pane named "&aConfirm" with lore "&7Costs &e1250 coins&7."
  17.  
  18. on inventory close:
  19. {bonusbox::%player%} is true
  20. inventory name of player's current inventory is "&7Bonus Box"
  21. wait 1 tick
  22. open chest with 3 rows named "&7Bonus Box" to player
  23. wait 1 tick
  24. set slot 13 of player's current inventory to {bonusbox::item::%player%}
  25. loop integers between 0 and 26:
  26. loop-number-2 is not 13
  27. set {_dv} to a random integer between 0 and 15
  28. set {_item} to "160:%{_dv}%" parsed as item
  29. set slot loop-number-2 of player's current inventory to {_item} named " "
  30.  
  31. on join:
  32. delete {bonusbox::%player%}
  33. delete {bonusbox::item::%player%}
  34.  
  35. on quit:
  36. delete {bonusbox::%player%}
  37. delete {bonusbox::item::%player%}
  38.  
  39. on inventory click:
  40. inventory name of player's current inventory is "&7Bonus Box"
  41. cancel the event
  42. if clicked item is a red stained glass pane:
  43. name of clicked item is "&cCancel"
  44. close player's inventory
  45. else if clicked item is a green stained glass pane:
  46. name of clicked item is "&aConfirm"
  47. $ thread
  48. set {_coins} to getCoins(player)
  49. if {_coins} is less than 1250:
  50. send "&7You do not have enough coins to do that."
  51. close player's inventory
  52. else:
  53. $ thread
  54. remCoins(player, 1250)
  55. close player's inventory
  56. wait 1 tick
  57. open chest with 3 rows named "&7Bonus Box" to player
  58. $ thread
  59. rewardAchievement(sender, "Use the bonus box", "use-bonus-box")
  60. wait 1 tick
  61. set {bonusbox::%player%} to true
  62. add a stick named "&7&lCHAMPION KIT &e(CTF)" with lore "{@legendaryLore}" to {_legendarywins::*}
  63. add a gold nugget named "&7&l1 DOUBLE COINS MULTIPLIER" with lore "{@commonLore}" to {_commonwins::*}
  64. add a gold ingot named "&7&l1 TRIPLE COINS MULTIPLIER" with lore "{@commonLore}" to {_commonwins::*}
  65. add a gold block named "&7&l1 QUADRUPLE COINS MULTIPLIER" with lore "{@commonLore}" to {_commonwins::*}
  66. add a sunflower named "&7&l500 COINS" with lore "{@commonLore}" to {_commonwins::*}
  67. add a sunflower named "&7&l250 COINS" with lore "{@commonLore}" to {_commonwins::*}
  68. add a sunflower named "&7&l750 COINS" with lore "{@commonLore}" to {_commonwins::*}
  69. add a sunflower named "&7&l1000 COINS" with lore "{@commonLore}" to {_commonwins::*}
  70. add a sunflower named "&7&l1500 COINS" with lore "{@commonLore}" to {_commonwins::*}
  71. add a sunflower named "&7&l2500 COINS" with lore "{@commonLore}" to {_rarewins::*}
  72. add a diamond sword with no nbt named "&7&lGLADIATOR KIT &e(CTF)" with lore "{@rareLore}" to {_rarewins::*}
  73. add a bow named "&7&lARCHER KIT &e(CTF)" with lore "{@rareLore}" to {_rarewins::*}
  74. add a gold ingot named "&7&l10 TRIPLE COINS MULTIPLIERS" with lore "{@epicLore}" to {_epicwins::*}
  75. add a gold block named "&7&l10 QUADRUPLE COINS MULTIPLIERS" with lore "{@epicLore}" to {_epicwins::*}
  76. add a gold nugget named "&7&l10 DOUBLE COINS MULTIPLIERS" with lore "{@legendaryLore}" to {_legendarywins::*}
  77. add a sunflower named "&7&l10000 COINS" with lore "{@commonLore}" to {_legendarywins::*}
  78. set {_changetimes} to a random integer between 15 and 25
  79. set {bonusbox::item::%player%} to a random element out of {_commonwins::*}
  80. loop {_changetimes} times:
  81. set {_olditem} to {bonusbox::item::%player%}
  82. while {bonusbox::item::%player%} is {_olditem}:
  83. set {_pick} to a random integer between 0 and 100
  84. if {_pick} is between 0 and 10:
  85. set {bonusbox::item::%player%} to a random element out of {_epicwins::*}
  86. else if {_pick} is between 10 and 30:
  87. set {bonusbox::item::%player%} to a random element out of {_legendarywins::*}
  88. else if {_pick} is between 30 and 65:
  89. set {bonusbox::item::%player%} to a random element out of {_rarewins::*}
  90. else:
  91. set {bonusbox::item::%player%} to a random element out of {_commonwins::*}
  92. add 0.5 to {_pitch}
  93. command "/playsound note.pling %player% ~ ~ ~ 0.5 %{_pitch}% 0.5"
  94. if inventory name of player's current inventory is "&7Bonus Box":
  95. set slot 13 of player's current inventory to {bonusbox::item::%player%}
  96. loop integers between 0 and 26:
  97. loop-number-2 is not 13
  98. set {_dv} to a random integer between 0 and 15
  99. set {_item} to "160:%{_dv}%" parsed as item
  100. set slot loop-number-2 of player's current inventory to {_item} named " "
  101. if {_pitch} is 2:
  102. set {_pitch} to 0
  103. add 0.67 to {_wait}
  104. wait "%floor({_wait})% ticks" parsed as timespan
  105. set {_name} to name of slot 13 of player's current inventory
  106. set {_lore} to lore of {bonusbox::item::%player%}
  107. set {_item} to type of slot 13 of player's current inventory
  108. delete {bonusbox::%player%}
  109. delete {bonusbox::item::%player%}
  110. send "&7You won %{_name}% &7(&o%uncolored {_lore}%&7) from the &eBonus Box&7."
  111. command "/playsound random.levelup %player% ~ ~ ~ 1 1 1"
  112. if {_name} contains "CHAMPION KIT":
  113. $ thread
  114. set {_owns} to sql var "kits::ctf::champion::%player%" exists
  115. if {_owns} is true:
  116. set {_coins} to a random integer between 100 and 175
  117. send "&7Since you already have the &eChampion Kit&7, you recieved &e%{_coins}% coins&7."
  118. $ thread
  119. addCoins(player, {_coins})
  120. else:
  121. $ thread
  122. set sql var "kits::ctf::champion::%player%" to "true"
  123. else if {_name} contains "ARCHER KIT":
  124. $ thread
  125. set {_owns} to sql var "kits::ctf::archer::%player%" exists
  126. if {_owns} is true:
  127. set {_coins} to a random integer between 50 and 100
  128. send "&7Since you already have the &eArcher Kit&7, you recieved &e%{_coins}% coins&7."
  129. $ thread
  130. addCoins(player, {_coins})
  131. else:
  132. $ thread
  133. set sql var "kits::ctf::archer::%player%" to "true"
  134. else if {_name} contains "GLADIATOR KIT":
  135. $ thread
  136. set {_owns} to sql var "kits::ctf::gladiator::%player%" exists
  137. if {_owns} is true:
  138. set {_coins} to a random integer between 75 and 125
  139. send "&7Since you already have the &eGladiator Kit&7, you recieved &e%{_coins}% coins&7."
  140. $ thread
  141. addCoins(player, {_coins})
  142. else:
  143. $ thread
  144. set sql var "kits::ctf::gladiator::%player%" to "true"
  145. else if {_item} is a sunflower:
  146. set {_coins} to get digits of uncolored {_name} parsed as integer
  147. $ thread
  148. addCoins(player, {_coins})
  149. else if {_name} contains "1 double coins multiplier":
  150. $ thread
  151. set {_multiplier} to value of sql var "multipliers::double::%player%" parsed as integer
  152. $ thread
  153. set sql var "multipliers::double::%player%" to "%{_multiplier} + 1%"
  154. $ thread
  155. set {_multiplier} to value of sql var "multipliers::double::%player%" parsed as integer
  156. else if {_name} contains "10 double coins multiplier":
  157. $ thread
  158. set {_multiplier} to value of sql var "multipliers::double::%player%" parsed as integer
  159. $ thread
  160. set sql var "multipliers::double::%player%" to "%{_multiplier} + 10%"
  161. else if {_name} contains "1 quadruple coins multiplier":
  162. $ thread
  163. set {_multiplier} to value of sql var "multipliers::quadruple::%player%" parsed as integer
  164. $ thread
  165. set sql var "multipliers::quadruple::%player%" to "%{_multiplier} + 1%"
  166. else if {_name} contains "10 quadruple coins multiplier":
  167. $ thread
  168. set {_multiplier} to value of sql var "multipliers::quadruple::%player%" parsed as integer
  169. $ thread
  170. set sql var "multipliers::quadruple::%player%" to "%{_multiplier} + 10%"
  171. else if {_name} contains "1 triple coins multiplier":
  172. $ thread
  173. set {_multiplier} to value of sql var "multipliers::triple::%player%" parsed as integer
  174. $ thread
  175. set sql var "multipliers::triple::%player%" to "%{_multiplier} + 1%"
  176. else if {_name} contains "10 triple coins multiplier":
  177. $ thread
  178. set {_multiplier} to value of sql var "multipliers::triple::%player%" parsed as integer
  179. $ thread
  180. set sql var "multipliers::triple::%player%" to "%{_multiplier} + 10%"
  181.  
  182. on skript load:
  183. delete {bonusbox::*}
  184.  
  185. on skript unload:
  186. delete {bonusbox::*}
  187.  
  188. on load:
  189. loop all armor stands:
  190. uncolored name of loop-entity contains "BONUS BOX"
  191. delete entity from loop-entity
  192. spawn a armor stand at location 1.5 above {bonusbox}
  193. set {_stand} to the last spawned armor stand
  194. add "{Marker:1}" to nbt of entity from {_stand}
  195. add "{CustomNameVisible:true}" to nbt of entity from {_stand}
  196. add "{Invisible:1}" to nbt of entity from {_stand}
  197. add "{NoGravity:1}" to nbt of entity from {_stand}
  198. add "{IsHolo:BonusBox}" to nbt of entity from {_stand}
  199. set name of entity from {_stand} to "&7&l&k...&7 &e&lBONUS BOX&7 &l&k..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement