Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #変数一覧
- #{shop.set.%player's uuid%}
- #ショップの編集時にどの番号のショップを変更するか決めるための物
- on click:
- if event-item is stick named "inv1":
- send "%{shop.set.%player's uuid%}%"
- if event-item is stick named "inv2":
- delete {inv.%player's uuid%}
- if event-item is stick named "shop3":
- send "%{shop.n.%player's uuid%}%"
- on inventory click:
- if {inv.%player's 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.%player's uuid%}%::name}%":
- cancel event
- if event-item is diamond named "&b商品設定":
- set {_shop} to chest with 6 row named "%{shop::%{shop.set.%player's 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.%player's 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.%player's uuid%}%::name}%":
- set {shop.n.%player%} to true
- send "&aショップの名前をチャットに入力してください"
- close player's inventory
- if name of player's current inventory contain "%{shop::%{shop.set.%player's uuid%}%::name}%&f:商品設定":
- cancel event
- set {_num.s} to 0
- loop {shop::%{shop.set.%player's uuid%}%::item::*}:
- if {_num.s} < 55:
- add 1 to {_num.s}
- if {_num.s} >= 55:
- stop
- if event-item is {shop::%{shop.set.%player's uuid%}%::item::%{_num.s}%}:
- set {i.n.%player%} to the clicked slot's index
- open chest with 1 row named "%{shop::%{shop.set.%player's uuid%}%::name}%&f:商品設定:slot[&a%{i.n.%player%}%&f]" to player
- set slot 2 of player's current inventory to emerald named "&a品物を設定"
- set slot 6 of player's current inventory to gold ingot named "&6金額を設定"
- if event-item is black stained glass pane named "&c未設定" with lore "クリックで設定":
- set {i.n.%player%} to the clicked slot's index
- open chest with 1 row named "%{shop::%{shop.set.%player's uuid%}%::name}%&f:商品設定:slot[&a%{i.n.%player%}%&f]" to player
- set slot 2 of player's current inventory to emerald named "&a品物を設定"
- set slot 6 of player's current inventory to gold ingot named "&6金額を設定"
- if name of player's current inventory contain "%{shop::%{shop.set.%player's uuid%}%::name}%&f:商品設定:slot[&a%{i.n.%player%}%&f]":
- if event-item is emerald:
- open chest with 1 row named "%{shop::%{shop.set.%player's uuid%}%::name}%&f:品物を設定:slot[&a%{i.n.%player%}%&f]" to player
- set slot 0 and 1,2,3,5,6,7,8 of player's current inventory to yellow stained glass pane named "&f中心にアイテムをセット"
- if event-item is gold ingot:
- open chest with 4 row named "%{shop::%{shop.set.%player's uuid%}%::name}%&f:金額を設定:slot[&a%{i.n.%player%}%&f]" to player
- on inventory close:
- if name of event-inventory is "%{shop::%{shop.set.%player's uuid%}%::name}%&f:品物を設定:slot[&a%{i.n.%player%}%&f]":
- set {_set.item} to slot 4 of event-inventory
- if {_set.item} is not air:
- set {shop::%{shop.set.%player's uuid%}%::item::%{i.n.%player%}%} to slot 4 of event-inventory
- on chat:
- if {shop.n.%player%} = true:
- cancel event
- set {shop::%{shop.set.%player's uuid%}%::name} to the chat message
- set {shop.n.%player%} to false
- send "&eガチャの名前を&f[%{shop::%{shop.set.%player's uuid%}%::name}%&f]&eに変更しました"
- stop
- else:
- set {shop.n.%player%} to false
- command /shop <num>:
- permission: op
- trigger:
- set {shop.set.%player's uuid%} to arg 1
- if {shop::%{shop.set.%player's uuid%}%::name} is not set:
- set {shop::%{shop.set.%player's uuid%}%::name} to "&5&l名称未設定の店"
- open chest with 1 row named "%{shop::%{shop.set.%player's uuid%}%::name}%" to player
- set slot 0 of player's current inventory to diamond named "&b商品設定"
- set slot 1 of player's current inventory to writable book named "&e&lショップの名前変更" with lore "&f現在:%{shop::%{shop.set.%player's uuid%}%::name}%"
Advertisement
Add Comment
Please, Sign In to add comment