Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /chestrandom:
- permission: system.random
- trigger:
- loop {chests::*}:
- set {_items} to random integer between 1 to 10
- set {_mode} to random integer between 1 to 5
- set {_chest} to loop-value
- send "&eLocation:&b %location of loop-value%"
- send "&eItems:&b %{_items}%"
- send "&eMode:&b %{_mode}%"
- remove all items from loop-value's inventory
- loop {_items} times:
- set {_slot} to random integer between 0 to 26
- if {_mode} is 1:
- set slot {_slot} of {_chest} to diamond
- send "&eSlot &b%{_slot}%&e to &aDiamond"
- if {_mode} is 2:
- set slot {_slot} of {_chest} to emerald
- send "&eSlot &b%{_slot}%&e to &aEmerald"
- if {_mode} is 3:
- set slot {_slot} of {_chest} to iron ingot
- send "&eSlot &b%{_slot}%&e to &aIron ingot"
- if {_mode} is 4:
- set slot {_slot} of {_chest} to gold ingot
- send "&eSlot &b%{_slot}%&e to &aGold ingot"
- if {_mode} is 5:
- set {_ingot} to random integer between 1 to 2
- if {_ingot} is 1:
- set slot {_slot} of {_chest} to gold ingot
- send "&eSlot &b%{_slot}%&e to &aGold ingot&7(Mode 5)"
- if {_ingot} is 2:
- set slot {_slot} of {_chest} to iron ingot
- send "&eSlot &b%{_slot}%&e to &aIron ingot&7(Mode 5)"
- command /chests [<text>]:
- permission: system.chestrandom
- trigger:
- if arg 1 is "add":
- send "&b選択するチェストを破壊してください。"
- set {%player%.breakchest} to "addmode"
- if arg 1 is "remove":
- send "&b選択するチェストを破壊してください。"
- set {%player%.breakchest} to "removemode"
- if arg 1 is "adds":
- send "&b選択するチェストを破壊してください。"
- send "&b/chests stopで終了できます。"
- set {%player%.breakchest} to "addsmode"
- if arg 1 is "removes":
- send "&b選択するチェストを破壊してください。"
- send "&b/chests stopで終了できます。"
- set {%player%.breakchest} to "removesmode"
- if arg 1 is "stop":
- send "&b選択を終了しました。"
- set {%player%.breakchest} to ""
- if arg 1 is "reset":
- loop {chests::*}:
- remove loop-value from {chests::*}
- send "&b%location of loop-value%&e のチェストを消去しました。"
- on break:
- if {%player%.breakchest} is "addmode":
- cancel event
- if event-block is not chest:
- send "&c対象のブロックはチェストではありません。"
- set {%player%.breakchest} to ""
- stop
- if event-block contains {chests::*}:
- send "&c既に追加されています。"
- set {%player%.breakchest} to ""
- stop
- add event-block to {chests::*}
- send "&b%location of event-block%&e を追加しました。"
- set {%player%.breakchest} to ""
- stop
- if {%player%.breakchest} is "removemode":
- cancel event
- if event-block is not chest:
- send "&c対象のブロックはチェストではありません。"
- set {%player%.breakchest} to ""
- stop
- if event-block does not contain {chests::*}:
- send "&c追加されていません。"
- set {%player%.breakchest} to ""
- stop
- remove event-block from {chests::*}
- send "&b%location of event-block%&e を削除しました。"
- set {%player%.breakchest} to ""
- stop
- if {%player%.breakchest} is "addsmode":
- cancel event
- if event-block is not chest:
- send "&c対象のブロックはチェストではありません。"
- stop
- if event-block contains {chests::*}:
- send "&c既に追加されています。"
- stop
- add event-block to {chests::*}
- send "&b%location of event-block%&e を追加しました。"
- stop
- if {%player%.breakchest} is "removesmode":
- cancel event
- if event-block is not chest:
- send "&c対象のブロックはチェストではありません。"
- stop
- if event-block does not contain {chests::*}:
- send "&c追加されていません。"
- stop
- remove event-block from {chests::*}
- send "&b%location of event-block%&e を削除しました。"
- stop
Advertisement
Add Comment
Please, Sign In to add comment