FlupMC

Untitled

Sep 23rd, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 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 1 leather helmet to {refill.items::*}
  7. command /refillchest1 [<text>]:
  8. trigger:
  9. if arg-1 is "*" or "all":
  10. loop integers between 1 and 1000:
  11. if {refill.chest1.%loop-number%} is set:
  12. set block at {refill.chest1.%loop-number%} to air
  13. set block at {refill.chest1.%loop-number%} to chest
  14. set {_randomitem1} to random element out of {refill.items::*}
  15. set {_randomitem2} to random element out of {refill.items::*}
  16. set {_randomitem3} to random element out of {refill.items::*}
  17. set {_location1} to a random integer from 4 to 15
  18. set {_location2} to a random integer from 2 to 23
  19. set {_location2} to a random integer from 5 to 20
  20. set slot {_location1} of {refill.chest1.%loop-number%}'s inventory to {_randomitem1}
  21. chance of 25%:
  22. set slot {_location2} of {refill.chest1.%loop-number%}'s inventory to {_randomitem2}
  23. chance of 7%:
  24. set slot {_location3} of {refill.chest1.%loop-number%}'s inventory to {_randomitem3}
  25. command /setchesta1 [<text>]:
  26. permission: refill.admin
  27. trigger:
  28. set {refill.chest1.%arg-1%} to location of target block
  29. send "&6&lREFILL &8» &eDu har sat en lokation for chest %arg-1%"
  30. send "&6&lREFILL &8» &e%{refill.chest1.%arg-1%}%"
  31.  
  32. every 1 second:
  33. loop integers between 1 and 1000:
  34. if {refill.chest1.%loop-number%} is set:
  35. if {sec.refill.chest1.%loop-number%} is less or equal to 0:
  36. if {min.refill.chest1.%loop-number%} is less or equal to 0:
  37. execute console command "refillchest1 %loop-number%"
  38. stop
  39. else:
  40. remove 1 from {min.refill.chest1.%loop-number%}
  41. set {sec.refill.chest1.%loop-number%} to 59
  42. else:
  43. remove 1 from {sec.refill.chest1.%loop-number%}
Advertisement
Add Comment
Please, Sign In to add comment