Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /setrecipe:
- permission: admin.setrecipe
- permission message: &cYou must be admin or higher to do this!
- trigger:
- set {_} to player's tool
- open chest with 5 rows named "&lCREATE CRAFT" to player
- set {_a} to 0
- loop 45 times:
- set slot {_a} of player's current inventory to red stained glass pane named "&a"
- add 1 to {_a}
- set slot 10 of player's current inventory to air
- set slot 11 of player's current inventory to air
- set slot 12 of player's current inventory to air
- set slot 19 of player's current inventory to air
- set slot 20 of player's current inventory to air
- set slot 21 of player's current inventory to air
- set slot 28 of player's current inventory to air
- set slot 29 of player's current inventory to air
- set slot 30 of player's current inventory to air
- set slot 25 of player's current inventory to player's tool
- set slot 34 of player's current inventory to green stained glass pane named "&aSet the recipe!"
- set {tool::%player's uuid%} to player's tool
- on inventory click:
- uncolored name of player's current inventory contains "create craft"
- if event-item is red stained glass pane named "&a":
- cancel event
- else if event-item is green stained glass pane named "&aSet the recipe!":
- cancel event
- set {recipe::%player's tool%} to player's tool
- set {recipe1::%player's tool%} to slot 10 of player's current inventory
- set {recipe2::%player's tool%} to slot 11 of player's current inventory
- set {recipe3::%player's tool%} to slot 12 of player's current inventory
- set {recipe4::%player's tool%} to slot 19 of player's current inventory
- set {recipe5::%player's tool%} to slot 20 of player's current inventory
- set {recipe6::%player's tool%} to slot 21 of player's current inventory
- set {recipe7::%player's tool%} to slot 28 of player's current inventory
- set {recipe8::%player's tool%} to slot 29 of player's current inventory
- set {recipe9::%player's tool%} to slot 30 of player's current inventory
- broadcast "%{recipe9::%player's tool%}% - %item in slot 30 of player's current inventory%"
- send "&cSet the recipe for %player's tool%&c!"
- else if event-item is {tool::%player's uuid%}:
- cancel event
- on right-click:
- targeted block is crafting table
- cancel event
- set {_} to player's tool
- open chest with 5 rows named "&lCRAFTING MENU" to player
- set {_a} to 0
- loop 45 times:
- set slot {_a} of player's current inventory to red stained glass pane named "&a"
- add 1 to {_a}
- set slot 10 of player's current inventory to air
- set slot 11 of player's current inventory to air
- set slot 12 of player's current inventory to air
- set slot 19 of player's current inventory to air
- set slot 20 of player's current inventory to air
- set slot 21 of player's current inventory to air
- set slot 28 of player's current inventory to air
- set slot 29 of player's current inventory to air
- set slot 30 of player's current inventory to air
- set slot 25 of player's current inventory to air
- every 2 ticks in "world":
- loop all players:
- uncolored name of loop-player's current inventory contains "crafting menu"
- loop {recipe::*}:
- broadcast "%{recipe1::%loop-var%}% - %loop-var%"
- slot 10 of loop-player's current inventory is {recipe1::%loop-var%}
- slot 11 of loop-player's current inventory is {recipe2::%loop-var%}
- slot 12 of loop-player's current inventory is {recipe3::%loop-var%}
- slot 19 of loop-player's current inventory is {recipe4::%loop-var%}
- slot 20 of loop-player's current inventory is {recipe5::%loop-var%}
- slot 21 of loop-player's current inventory is {recipe6::%loop-var%}
- slot 28 of loop-player's current inventory is {recipe7::%loop-var%}
- slot 29 of loop-player's current inventory is {recipe8::%loop-var%}
- slot 30 of loop-player's current inventory is {recipe9::%loop-var%}
- set slot 25 of loop-player's current inventory to loop-var
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement