Advertisement
Guest User

Untitled

a guest
Feb 1st, 2021
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. command /setrecipe:
  2. permission: admin.setrecipe
  3. permission message: &cYou must be admin or higher to do this!
  4. trigger:
  5. set {_} to player's tool
  6. open chest with 5 rows named "&lCREATE CRAFT" to player
  7. set {_a} to 0
  8. loop 45 times:
  9. set slot {_a} of player's current inventory to red stained glass pane named "&a"
  10. add 1 to {_a}
  11. set slot 10 of player's current inventory to air
  12. set slot 11 of player's current inventory to air
  13. set slot 12 of player's current inventory to air
  14. set slot 19 of player's current inventory to air
  15. set slot 20 of player's current inventory to air
  16. set slot 21 of player's current inventory to air
  17. set slot 28 of player's current inventory to air
  18. set slot 29 of player's current inventory to air
  19. set slot 30 of player's current inventory to air
  20. set slot 25 of player's current inventory to player's tool
  21. set slot 34 of player's current inventory to green stained glass pane named "&aSet the recipe!"
  22. set {tool::%player's uuid%} to player's tool
  23.  
  24. on inventory click:
  25. uncolored name of player's current inventory contains "create craft"
  26. if event-item is red stained glass pane named "&a":
  27. cancel event
  28. else if event-item is green stained glass pane named "&aSet the recipe!":
  29. cancel event
  30. set {recipe::%player's tool%} to player's tool
  31. set {recipe1::%player's tool%} to slot 10 of player's current inventory
  32. set {recipe2::%player's tool%} to slot 11 of player's current inventory
  33. set {recipe3::%player's tool%} to slot 12 of player's current inventory
  34. set {recipe4::%player's tool%} to slot 19 of player's current inventory
  35. set {recipe5::%player's tool%} to slot 20 of player's current inventory
  36. set {recipe6::%player's tool%} to slot 21 of player's current inventory
  37. set {recipe7::%player's tool%} to slot 28 of player's current inventory
  38. set {recipe8::%player's tool%} to slot 29 of player's current inventory
  39. set {recipe9::%player's tool%} to slot 30 of player's current inventory
  40. broadcast "%{recipe9::%player's tool%}% - %item in slot 30 of player's current inventory%"
  41. send "&cSet the recipe for %player's tool%&c!"
  42. else if event-item is {tool::%player's uuid%}:
  43. cancel event
  44.  
  45. on right-click:
  46. targeted block is crafting table
  47. cancel event
  48. set {_} to player's tool
  49. open chest with 5 rows named "&lCRAFTING MENU" to player
  50. set {_a} to 0
  51. loop 45 times:
  52. set slot {_a} of player's current inventory to red stained glass pane named "&a"
  53. add 1 to {_a}
  54. set slot 10 of player's current inventory to air
  55. set slot 11 of player's current inventory to air
  56. set slot 12 of player's current inventory to air
  57. set slot 19 of player's current inventory to air
  58. set slot 20 of player's current inventory to air
  59. set slot 21 of player's current inventory to air
  60. set slot 28 of player's current inventory to air
  61. set slot 29 of player's current inventory to air
  62. set slot 30 of player's current inventory to air
  63. set slot 25 of player's current inventory to air
  64.  
  65.  
  66. every 2 ticks in "world":
  67. loop all players:
  68. uncolored name of loop-player's current inventory contains "crafting menu"
  69. loop {recipe::*}:
  70. broadcast "%{recipe1::%loop-var%}% - %loop-var%"
  71. slot 10 of loop-player's current inventory is {recipe1::%loop-var%}
  72. slot 11 of loop-player's current inventory is {recipe2::%loop-var%}
  73. slot 12 of loop-player's current inventory is {recipe3::%loop-var%}
  74. slot 19 of loop-player's current inventory is {recipe4::%loop-var%}
  75. slot 20 of loop-player's current inventory is {recipe5::%loop-var%}
  76. slot 21 of loop-player's current inventory is {recipe6::%loop-var%}
  77. slot 28 of loop-player's current inventory is {recipe7::%loop-var%}
  78. slot 29 of loop-player's current inventory is {recipe8::%loop-var%}
  79. slot 30 of loop-player's current inventory is {recipe9::%loop-var%}
  80. set slot 25 of loop-player's current inventory to loop-var
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement