Advertisement
Guest User

,,da

a guest
Jan 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.57 KB | None | 0 0
  1. on inventory click:
  2. inventory name of player's current inventory is "&c&lDaily &c&lCrate"
  3. cancel event
  4.  
  5. on inventory close:
  6. if {crate::%player%} is set:
  7. loop 9 times:
  8. set {slot.%loop-number%.%player%} to slot 8 + loop-number of player's current inventory
  9. wait a tick
  10. open chest with 3 row named "&c&lDaily &c&lCrate" to player
  11. loop 18 times:
  12. if loop-number is smaller than 9:
  13. if loop-number - 1 is 4:
  14. set slot loop-number - 1 of player's current inventory to light green stained glass pane
  15. else:
  16. set slot loop-number - 1 of player's current inventory to black stained glass pane
  17. else:
  18. if loop-number + 9 is 22:
  19. set slot loop-number + 9 of player's current inventory to light green stained glass pane
  20. else:
  21. set slot loop-number + 9 of player's current inventory to black stained glass pane
  22. loop 9 times:
  23. set slot 8 + loop-number of player's current inventory to {slot.%loop-number%.%player%}
  24. delete {slot.%loop-number%.%player%}
  25.  
  26. on right click on Trapped Chest:
  27. if {crate::%player%} is set:
  28. stop
  29.  
  30. on right click on Trapped Chest:
  31. cancel event
  32. if name of player's held item contains "&cDaily &7key":
  33. remove glowing tripwire hook named "&cDaily &7key" from player's tool
  34. set {crate::%player%} to 0
  35. set {dailyprizes::helmet} to iron helmet of protection 2
  36. set {dailyprizes::chestplate} to iron chestplate of protection 2
  37. set {dailyprizes::leggings} to iron leggings of protection 2
  38. set {dailyprizes::boots} to iron boots of protection 2
  39. set {dailyprizes::sword} to iron sword of sharpness 4
  40. set {dailyprizes::bow} to bow of power 2
  41. set {dailyprizes::rod} to fishing rod of knockback 2
  42. set {dailyprizes::firecharge} to fire charge of fire aspect 2
  43. set {dailyprizes::blood} to redstone named "&7&lx64 &4&lBlood"
  44. set {dailyprizes::golden_apple} to golden_apple named "&7&lx2 &e&lGolden Apples"
  45. set {dailyprizes::experience} to bottle_o'_enchanting named "&7&lx4 &b&lBottle of Xp"
  46. set {dailyprizes::speed} to water_bottle:8226 named "&7&lx2 &9&lSpeed Potion"
  47. set {dailyprizes::strength} to water_bottle:8233 named "&7&lx2 &5&lStrength Potion"
  48. set {dailyprizes::axe} to iron axe of sharpness 4
  49. set {dailyprizes::goldkit} to gold ingot named "&6&lGold Kit"
  50. set {dailyprizes::rank} to gold block named "&7&lPro Rank"
  51. open chest with 3 row named "&c&lDaily &c&lCrate" to player
  52. set slot 0 of player's current inventory to black stained glass pane
  53. set slot 1 of player's current inventory to black stained glass pane
  54. set slot 2 of player's current inventory to black stained glass pane
  55. set slot 3 of player's current inventory to black stained glass pane
  56. set slot 4 of player's current inventory to light green stained glass pane
  57. set slot 5 of player's current inventory to black stained glass pane
  58. set slot 6 of player's current inventory to black stained glass pane
  59. set slot 7 of player's current inventory to black stained glass pane
  60. set slot 8 of player's current inventory to black stained glass pane
  61. set slot 18 of player's current inventory to black stained glass pane
  62. set slot 19 of player's current inventory to black stained glass pane
  63. set slot 20 of player's current inventory to black stained glass pane
  64. set slot 21 of player's current inventory to black stained glass pane
  65. set slot 22 of player's current inventory to light green stained glass pane
  66. set slot 23 of player's current inventory to black stained glass pane
  67. set slot 24 of player's current inventory to black stained glass pane
  68. set slot 25 of player's current inventory to black stained glass pane
  69. set slot 26 of player's current inventory to black stained glass pane
  70. loop 25 times:
  71. wait 0.15 seconds
  72. play "click" to the player at volume 10
  73. loop 8 times:
  74. set slot loop-number-2 + 8 of player's current inventory to slot loop-number-2 + 9 of player's current inventory
  75. if loop-number is 20:
  76. set slot 17 of player's current inventory to air
  77. chance of 90%:
  78. set slot 17 of player's current inventory to iron helmet of protection 2
  79. if slot 17 of player's current inventory is air:
  80. chance of 60%:
  81. set slot 17 of player's current inventory to iron chestplate of protection 2
  82. if slot 17 of player's current inventory is air:
  83. chance of 70%:
  84. set slot 17 of player's current inventory to iron leggings of protection 2
  85. if slot 17 of player's current inventory is air:
  86. chance of 80%:
  87. set slot 17 of player's current inventory to iron boots of protection 2
  88. if slot 17 of player's current inventory is air:
  89. chance of 50%:
  90. set slot 17 of player's current inventory to iron sword of sharpness 2
  91. if slot 17 of player's current inventory is air:
  92. chance of 50%:
  93. set slot 17 of player's current inventory to bow of power 2
  94. if slot 17 of player's current inventory is air:
  95. chance of 70%:
  96. set slot 17 of player's current inventory to fishing rod of knockback 2
  97. if slot 17 of player's current inventory is air:
  98. chance of 80%:
  99. set slot 17 of player's current inventory to fire charge of fire aspect 2
  100. if slot 17 of player's current inventory is air:
  101. chance of 45%:
  102. set slot 17 of player's current inventory to redstone named "&7&lx64 &4&lBlood"
  103. if slot 17 of player's current inventory is air:
  104. chance of 40%:
  105. set slot 17 of player's current inventory to golden apple named "&7&lx2 &e&lGolden Apples"
  106. if slot 17 of player's current inventory is air:
  107. chance of 40%:
  108. set slot 17 of player's current inventory to bottle_o'_enchanting named "&7&lx4 &b&lBottle of Xp"
  109. if slot 17 of player's current inventory is air:
  110. chance of 30%:
  111. set slot 17 of player's current inventory to water_bottle:8226 named "&7&lx2 &9&lSpeed Potion"
  112. if slot 17 of player's current inventory is air:
  113. chance of 15%:
  114. set slot 17 of player's current inventory to water_bottle:8233 named "&7&lx2 &5&lStrength Potion"
  115. if slot 17 of player's current inventory is air:
  116. chance of 7%:
  117. set slot 17 of player's current inventory to iron axe of sharpness 4
  118. if slot 17 of player's current inventory is air:
  119. chance of 5%:
  120. set slot 17 of player's current inventory to gold ingot named "&6&lGold Kit"
  121. if slot 17 of player's current inventory is air:
  122. chance of 3%:
  123. set slot 17 of player's current inventory to gold block named "&7&lPro Rank"
  124. if slot 17 of player's current inventory is air:
  125. set slot 17 of player's current inventory to iron helmet of protection 2
  126. else:
  127. set {temp} to random element of {dailyprizes::*}
  128. set slot 17 of player's current inventory to {temp}
  129. delete {temp}
  130. play "level up" to the player at volume 50
  131. if slot 13 of player's current inventory is iron helmet:
  132. give iron helmet of protection 2 to player
  133. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lhelmet &efrom &cDaily Key."
  134. if slot 13 of player's current inventory is iron chestplate:
  135. give iron chestplate of protection 2 to player
  136. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lChestplate &efrom &cDaily Key."
  137. if slot 13 of player's current inventory is iron leggings:
  138. give iron leggings of protection 2 to player
  139. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lLeggings &efrom &cDaily Key."
  140. if slot 13 of player's current inventory is iron boots:
  141. give iron boots of protection 2 to player
  142. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lBoots &efrom &cDaily Key."
  143. if slot 13 of player's current inventory is iron sword:
  144. give iron sword of sharpness 2 to player
  145. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lSword &efrom &cDaily Key."
  146. if slot 13 of player's current inventory is bow:
  147. give bow of power 2 to player
  148. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lBow &efrom &cDaily Key."
  149. if slot 13 of player's current inventory is fishing rod:
  150. give fishing rod of knockback 2 to player
  151. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lRod &efrom &cDaily Key."
  152. if slot 13 of player's current inventory is fire charge:
  153. give fire charge of fire aspect 2 to player
  154. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lFire Charge &efrom &cDaily Key."
  155. if slot 13 of player's current inventory is redstone:
  156. give 64 of redstone named "&4&lBlood" to player
  157. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx64 Blood &cDaily Key."
  158. if slot 13 of player's current inventory is golden apple:
  159. give 2 of golden apple to player
  160. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx2 Gapples &efrom &cDaily Key."
  161. if slot 13 of player's current inventory is bottle_o'_enchanting:
  162. give 4 of bottle_o'_enchanting to player
  163. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx4 Xp Bottle &efrom &cDaily Key."
  164. if slot 13 of player's current inventory is water_bottle:8226:
  165. give 2 of water_bottle:8226 to player
  166. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx2 Speed Potion &efrom &cDaily Key."
  167. if slot 13 of player's current inventory is water_bottle:8233:
  168. give 2 of water_bottle:8233 to player
  169. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lx2 Strength Potion &efrom &cDaily Key."
  170. if slot 13 of player's current inventory is iron axe:
  171. give iron axe of sharpness 4 to player
  172. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lAxe &efrom &cDaily Key."
  173. if slot 13 of player's current inventory is gold ingot:
  174. give gold ingot named "&6&lGold Kit" with lore "&b► right-click to recieve your reward." to player
  175. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lGold Kit &efrom &cDaily Key."
  176. if slot 13 of player's current inventory is gold block:
  177. make console execute command "rank"
  178. broadcast "&eKalimeraMc &8» &c%player% &ehas won &b&lPro Rank &efrom &cDaily Key."
  179. delete {dailyprizes::*}
  180. delete {crate::%player%}
  181. else:
  182. send "&eKalimeraMc &8» &cYou don't have any crate key in your hand."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement