Advertisement
kama6012

HandyCraft

May 2nd, 2019 (edited)
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. options:
  2. handycraft: crafting table named "&r手持ち作業台"
  3. backpack: chest named "&rバックパック"
  4.  
  5. on load:
  6. register new shapeless recipe for {@handycraft} using crafting table, air, air, air, air, air, air, air, air
  7. register new shaped recipe for {@backpack} using leather, air, leather, tripwire hook, chest, tripwire hook, iron ingot, air, iron ingot
  8. register new shaped recipe for saddle using leather, string, leather, string, boat, string, leather, string, leather
  9. broadcast "&r[HandyTools] Loaded"
  10. broadcast "&r[HandyTools] Added Saddle Recipe[Ride on!]"
  11.  
  12. on right click:
  13. if event-item's name contains "&r手持ち作業台":
  14. cancel event
  15. open workbench inventory for the player
  16. else if event-item's name contains "&rバックパック":
  17. cancel event
  18. if 1st line of player's tool's lore is not set:
  19. set {_first} to random integer between 10000 and 99999
  20. set 1st line of player's tool's lore to "%{_first}%"
  21. set {bpopen::%{_first}%} to false
  22.  
  23. {bpopen::%1st line of player's tool's lore%} is false
  24. open chest with 3 row named "&rバックパック" to player
  25. wait 5 tick
  26. loop {backpack::%1st line of player's tool's lore%::*}:
  27. add loop-value to current inventory of player
  28. set {bpopen::%1st line of player's tool's lore%} to true
  29.  
  30. on inventory close:
  31. player's tool's name contains "バックパック"
  32. {bpopen::%1st line of player's tool's lore%} is true
  33. set {_cnt} to 0
  34. loop 27 times:
  35. set {backpack::%1st line of player's tool's lore%::%{_cnt}%} to slot {_cnt} of event-inventory
  36. set {_cnt} to {_cnt} + 1
  37. set {bpopen::%1st line of player's tool's lore%} to false
  38.  
  39. command /bp [<text>]:
  40. trigger:
  41. if arg 1 is "check":
  42. set {_cnt} to 0
  43. loop 27 times:
  44. message "%{_cnt}% %{backpack::%1st line of player's tool's lore%::%{_cnt}%}%" to player
  45. set {_cnt} to {_cnt} + 1
  46. else if arg 1 is "open":
  47. set {bpopen::%1st line of player's tool's lore%} to false
  48. message "complete"
  49. else:
  50. message "&rsub-command check or open"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement