Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- handycraft: crafting table named "&r手持ち作業台"
- backpack: chest named "&rバックパック"
- on load:
- register new shapeless recipe for {@handycraft} using crafting table, air, air, air, air, air, air, air, air
- register new shaped recipe for {@backpack} using leather, air, leather, tripwire hook, chest, tripwire hook, iron ingot, air, iron ingot
- register new shaped recipe for saddle using leather, string, leather, string, boat, string, leather, string, leather
- broadcast "&r[HandyTools] Loaded"
- broadcast "&r[HandyTools] Added Saddle Recipe[Ride on!]"
- on right click:
- if event-item's name contains "&r手持ち作業台":
- cancel event
- open workbench inventory for the player
- else if event-item's name contains "&rバックパック":
- cancel event
- if 1st line of player's tool's lore is not set:
- set {_first} to random integer between 10000 and 99999
- set 1st line of player's tool's lore to "%{_first}%"
- set {bpopen::%{_first}%} to false
- {bpopen::%1st line of player's tool's lore%} is false
- open chest with 3 row named "&rバックパック" to player
- wait 5 tick
- loop {backpack::%1st line of player's tool's lore%::*}:
- add loop-value to current inventory of player
- set {bpopen::%1st line of player's tool's lore%} to true
- on inventory close:
- player's tool's name contains "バックパック"
- {bpopen::%1st line of player's tool's lore%} is true
- set {_cnt} to 0
- loop 27 times:
- set {backpack::%1st line of player's tool's lore%::%{_cnt}%} to slot {_cnt} of event-inventory
- set {_cnt} to {_cnt} + 1
- set {bpopen::%1st line of player's tool's lore%} to false
- command /bp [<text>]:
- trigger:
- if arg 1 is "check":
- set {_cnt} to 0
- loop 27 times:
- message "%{_cnt}% %{backpack::%1st line of player's tool's lore%::%{_cnt}%}%" to player
- set {_cnt} to {_cnt} + 1
- else if arg 1 is "open":
- set {bpopen::%1st line of player's tool's lore%} to false
- message "complete"
- else:
- message "&rsub-command check or open"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement