FlupMC

Untitled

Jul 21st, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. command /firstload:
  2. permission: refill.admin
  3. trigger:
  4. clear {refill.items::*}
  5. add 1 diamond sword of sharpness 1 to {refill.items::*}
  6. add 2 golden apples to {refill.items::*}
  7. add 4 emeralds to {refill.items::*}
  8. add 1 diamond helmet to {refill.items::*}
  9. add 1 diamond chestplate to {refill.items::*}
  10. add 1 diamond leggings to {refill.items::*}
  11. add 1 diamond boots to {refill.items::*}
  12. add 1 nether star to {refill.items::*}
  13. add 1 bow of power 2 to {refill.items::*}
  14. add 1 diamond chestplate of protection 1 to {refill.items::*}
  15. add 1 diamond leggings of protection 1 to {refill.items::*}
  16. add 1 paper named "&6&l$500" with lore "&7&oKlik for at indløse." to {refill.items::*}
  17. command /refill:
  18. permission: refill.admin
  19. trigger:
  20. set {refilltid.min} to 9
  21. set {refilltid.sec} to 59
  22. loop blocks in radius 50 around {refill.chest}:
  23. if loop-block is a chest:
  24. clear loop-block's inventory
  25. set {_randomitem1} to random element out of {refill.items::*}
  26. set {_randomitem2} to random element out of {refill.items::*}
  27. set {_randomitem3} to random element out of {refill.items::*}
  28. set {_location1} to a random integer from 4 to 15
  29. set {_location2} to a random integer from 2 to 23
  30. set {_location2} to a random integer from 5 to 20
  31. set slot {_location1} of loop-block's inventory to {_randomitem1}
  32. chance of 25%:
  33. set slot {_location2} of loop-block's inventory to {_randomitem2}
  34. chance of 7%:
  35. set slot {_location3} of loop-block's inventory to {_randomitem3}
  36. send "&6&lREFILL &8» &eDu har refillet alle kisterne"
  37.  
  38. command /setmiddle:
  39. permission: refill.admin
  40. trigger:
  41. set {refill.chest} to location of player
  42. send "&6&lREFILL &8» &eDu har addet en chest lokation!"
  43.  
  44. every 1 second:
  45. if {refilltid.sec} is less or equal to 0:
  46. if {refilltid.min} is less or equal to 0:
  47. set {_Online} to number of all players
  48. if {_Online} is greater or equal to 8:
  49. execute console command "refill"
  50. stop
  51. else:
  52. remove 1 from {refilltid.min}
  53. set {refilltid.sec} to 59
  54. else:
  55. remove 1 from {refilltid.sec}
  56. on join:
  57. if {refilltid.sec} is less or equal to 0:
  58. if {refilltid.min} is less or equal to 0:
  59. set {_Online} to number of all players
  60. if {_Online} is greater or equal to 8:
  61. execute console command "refill"
  62. on quit:
  63. if {refilltid.sec} is less or equal to 0:
  64. if {refilltid.min} is less or equal to 0:
  65. set {_Online} to number of all players
  66. if {_Online} is greater or equal to 8:
  67. execute console command "refill"
Advertisement
Add Comment
Please, Sign In to add comment