Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on click:
- if event-item is stick named "inv1":
- set {inv.%uuid%} to 0
- if event-item is stick named "inv2":
- delete {inv.%uuid%}
- on inventory click:
- if {inv.%uuid%} is 0:
- if type of event-inventory is chest inventory:
- set {i.num} to the clicked slot
- send "チェストインベントリ&a%{i.num}%"
- if name of player's current inventory contain "%{shop::%{shop.set.%uuid%}%::name}%":
- cancel event
- if event-item is diamond named "商品設定":
- set {_shop} to chest with 6 row named "%{shop::%{shop.set.%uuid%}%::name}%&f:商品設定"
- loop 54 time:
- set slot loop-number - 1 of {_shop} to black stained glass pane named "&c未設定" with lore "クリックで設定"
- loop {shop::%{shop.set.%uuid%}%::*}:
- set slot loop-index parsed as number - 1 of {_shop} to loop-value
- open {_shop} to player
- if event-item is writable book named "&e&lショップの名前変更" with lore "&f現在:%{shop::%{shop.set.%uuid%}%::name}%":
- set {shop.n.%player%} to on
- send "&aガチャの名前をチャットに入力してください%{shop.n.%uuid%}%"
- close player's inventory
- if name of player's current inventory contain "%{shop::%{shop.set.%uuid%}%::name}%&f:商品設定":
- cancel event
- set {_num.s} to 0
- loop {shop::%{shop.set.%uuid%}%::*}:
- if {_num.s} < 55:
- add 1 to {_num.s}
- if {_num.s} >= 55:
- stop
- if event-item is {shop::%{shop.set.%uuid%}%::%{_num.s}%}:
- set {_i.n} to the clicked slot if name of player's current inventory contain "%{shop::%{shop.set.%uuid%}%::name}%&f:商品設定"
- open chest with 1 row named "%{shop::%{shop.set.%uuid%}%::name}%&f:商品設定:slot[%{_i.n}%]" to player
- if event-item is black stained glass pane named "&c未設定" with lore "クリックで設定":
- set {_i.n} to the clicked slot if name of player's current inventory contain "%{shop::%{shop.set.%uuid%}%::name}%&f:商品設定"
- open chest with 1 row named "%{shop::%{shop.set.%uuid%}%::name}%&f:商品設定:slot[%{_i.n}%]" to player
- on chat:
- if {shop.n.%player%} is on:
- cancel event
- set {shop::%{shop.set.%uuid%}%::name} to the chat message
- set {shop.n.%uuid%} to off
- send "&eガチャの名前を&f[%{shop::%{shop.set.%uuid%}%::name}%&f]&eに変更しました"
- command /shop <num>:
- permission: op
- trigger:
- set {shop.set.%uuid%} to arg 1
- if {shop::%{shop.set.%uuid%}%::name} is not set:
- set {shop::%{shop.set.%uuid%}%::name} to "&5&l名称未設定の店"
- open chest with 1 row named "%{shop::%{shop.set.%uuid%}%::name}%" to player
- set slot 0 of player's current inventory to diamond named "商品設定"
- set slot 1 of player's current inventory to writable book named "&e&lショップの名前変更" with lore "&f現在:%{shop::%{shop.set.%uuid%}%::name}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement