kjfalkeiae

Untitled

Apr 14th, 2019
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. command /chestrandom:
  2. permission: system.random
  3. trigger:
  4. loop {chests::*}:
  5. set {_items} to random integer between 1 to 10
  6. set {_chest} to loop-value
  7. send "&eLocation:&b %location of loop-value%"
  8. send "&eItems:&b %{_items}%"
  9. remove all items from loop-value's inventory
  10. loop {_items} times:
  11. set {_slot} to random integer between 0 to 26
  12. set slot {_slot} of {_chest} to 320
  13. send "&eSlot &b%{_slot}%&e to &aCooked porkchop"
  14. command /chests [<text>]:
  15. permission: system.chestrandom
  16. trigger:
  17. if arg 1 is "add":
  18. send "&b選択するチェストを破壊してください。"
  19. set {%player%.breakchest} to "addmode"
  20. if arg 1 is "remove":
  21. send "&b選択するチェストを破壊してください。"
  22. set {%player%.breakchest} to "removemode"
  23. if arg 1 is "adds":
  24. send "&b選択するチェストを破壊してください。"
  25. send "&b/chests stopで終了できます。"
  26. set {%player%.breakchest} to "addsmode"
  27. if arg 1 is "removes":
  28. send "&b選択するチェストを破壊してください。"
  29. send "&b/chests stopで終了できます。"
  30. set {%player%.breakchest} to "removesmode"
  31. if arg 1 is "stop":
  32. send "&b選択を終了しました。"
  33. set {%player%.breakchest} to ""
  34. if arg 1 is "reset":
  35. loop {chests::*}:
  36. remove loop-value from {chests::*}
  37. send "&b%location of loop-value%&e のチェストを消去しました。"
  38.  
  39. on break:
  40. if {%player%.breakchest} is "addmode":
  41. cancel event
  42. if event-block is not chest:
  43. send "&c対象のブロックはチェストではありません。"
  44. set {%player%.breakchest} to ""
  45. stop
  46. if event-block contains {chests::*}:
  47. send "&c既に追加されています。"
  48. set {%player%.breakchest} to ""
  49. stop
  50. add event-block to {chests::*}
  51. send "&b%location of event-block%&e を追加しました。"
  52. set {%player%.breakchest} to ""
  53. stop
  54. if {%player%.breakchest} is "removemode":
  55. cancel event
  56. if event-block is not chest:
  57. send "&c対象のブロックはチェストではありません。"
  58. set {%player%.breakchest} to ""
  59. stop
  60. if event-block does not contain {chests::*}:
  61. send "&c追加されていません。"
  62. set {%player%.breakchest} to ""
  63. stop
  64. remove event-block from {chests::*}
  65. send "&b%location of event-block%&e を削除しました。"
  66. set {%player%.breakchest} to ""
  67. stop
  68. if {%player%.breakchest} is "addsmode":
  69. cancel event
  70. if event-block is not chest:
  71. send "&c対象のブロックはチェストではありません。"
  72. stop
  73. if event-block contains {chests::*}:
  74. send "&c既に追加されています。"
  75. stop
  76. add event-block to {chests::*}
  77. send "&b%location of event-block%&e を追加しました。"
  78. stop
  79. if {%player%.breakchest} is "removesmode":
  80. cancel event
  81. if event-block is not chest:
  82. send "&c対象のブロックはチェストではありません。"
  83. stop
  84. if event-block does not contain {chests::*}:
  85. send "&c追加されていません。"
  86. stop
  87. remove event-block from {chests::*}
  88. send "&b%location of event-block%&e を削除しました。"
  89. stop
Advertisement
Add Comment
Please, Sign In to add comment