Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- register new shaped recipe for storage minecart of Unbreaking 1 named "&6バックパック" with lore "&f<Please click...>" with hidden enchant using leather, leather, leather, leather, iron ingot, leather, leather, chest, leather
- on right click with storage minecart:
- name of player's tool is "&6バックパック"
- cancel event
- play sound "block.chest.open" with volume 0.5 and pitch 1 at player
- if lore of player's tool is "&f<Please click...>":
- add 1 to {backpacks}
- set lore of player's tool to "&f<ID : %{backpacks}%>"
- open chest with 3 row named "&8バックパック <ID : %{backpacks}%>" to player
- else:
- set {_id} to the 1st line of lore of player's tool
- replace "&f<ID : " and ">" with "" in {_id}
- open chest with 3 row named "&8バックパック <ID : %{_id}%>" to player
- loop 27 times:
- set slot loop-number - 1 of player's current inventory to {backpacks.%{_id}%.%loop-number%}
- on inventory close:
- name of player's current inventory contains "&8バックパック <ID : " and ">"
- set {_id} to name of player's current inventory
- replace "&8バックパック <ID : " and ">" with "" in {_id}
- loop 27 times:
- set {backpacks.%{_id}%.%loop-number%} to slot loop-number - 1 of player's current inventory
- set lore of player's tool to "&f<ID : %{_id}%>", "&7&o%{backpacks.%{_id}%.1}%", "&7&o%{backpacks.%{_id}%.2}%", "&7&o%{backpacks.%{_id}%.3}%" and "&8&o..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement