Interactive custom crafting gui

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Conutik

Member
Jan 12, 2020
19
1
0
17
Category: Custom guis

Suggested name: Custom crafting Gui

Spigot/Skript Version: 2.4

What I want:
I want a skript for my minehut server that when i click on a anvil if the player has permission "basic.weaponsmithing" it opens a gui where people can put stuff in the gui to craft items and they can remove the item they crafted

Ideas for commands: /recipe add

on right click on anvil


Ideas for permissions: {customrecipe.admin} for admin to add recipes

When I'd like it by: 10 days
 
I'll give it a shot, can't guarantee I'll get it in time or right however.
[doublepost=1578869172,1578868191][/doublepost]Yeah I'll have to cancel, in my experience it is kinda impossible to have a skript overwrite code in it's own skript file so I cant do /recipe add + it is too difficult to have the check for recipes. I can give you the gui and have it be opened on right click with anvil:
Code:
on skript load:
    create new gui with id "basws" with virtual chest with 6 rows named "Craft Item":
        wait 2 ticks
        make gui slot 0-8 with gray stained glass pane named " "
        #2nd row
        make gui slot 9 with gray stained glass pane named " "
        make gui slot 13-17 with gray stained glass pane named " "
        #3rd row
        make gui slot 18 with gray stained glass pane named " "
        make gui slot 22-23 with gray stained glass pane named " "
        make gui slot 25-26 with gray stained glass pane named " "
        #4th row
        make gui slot 27 with gray stained glass pane named " "
        make gui slot 31-35 with gray stained glass pane named " "
        #5th row
        make gui slot 36-45 with gray stained glass pane named " "
        #6th row
        make gui slot 46-49 with lime stained glass pane named " "
        make gui slot 50 with arrow named "&cBack":
            stop
        make gui slot 51-54 with lime stained glass pane named " "
on right click:
    if targeted block is anvil:
        if player has permission "basic.weaponsmithing":
            open gui "basws" to player
 
I'll give it a shot, can't guarantee I'll get it in time or right however.
[doublepost=1578869172,1578868191][/doublepost]Yeah I'll have to cancel, in my experience it is kinda impossible to have a skript overwrite code in it's own skript file so I cant do /recipe add + it is too difficult to have the check for recipes. I can give you the gui and have it be opened on right click with anvil:
Code:
on skript load:
    create new gui with id "basws" with virtual chest with 6 rows named "Craft Item":
        wait 2 ticks
        make gui slot 0-8 with gray stained glass pane named " "
        #2nd row
        make gui slot 9 with gray stained glass pane named " "
        make gui slot 13-17 with gray stained glass pane named " "
        #3rd row
        make gui slot 18 with gray stained glass pane named " "
        make gui slot 22-23 with gray stained glass pane named " "
        make gui slot 25-26 with gray stained glass pane named " "
        #4th row
        make gui slot 27 with gray stained glass pane named " "
        make gui slot 31-35 with gray stained glass pane named " "
        #5th row
        make gui slot 36-45 with gray stained glass pane named " "
        #6th row
        make gui slot 46-49 with lime stained glass pane named " "
        make gui slot 50 with arrow named "&cBack":
            stop
        make gui slot 51-54 with lime stained glass pane named " "
on right click:
    if targeted block is anvil:
        if player has permission "basic.weaponsmithing":
            open gui "basws" to player
do you know a way where he can put items in the gui??
 
do you know a way where he can put items in the gui??
You can try removing the "wait 2 ticks" part, but there is a chance they would be able to put in items but be able to take out items from the gui aswell.