Discord Thread how to make gui work

  • 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 community!

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
Well yeah that syntax is from an addon you don't have
You don't need an addon though
I think it's set slot 1 of player's current inventory to barrier named ""

Posted by: nylhus from the skUnity Discord.
 
now i have this
code_language.skript:
command /rewards:
    trigger:
        open chest inventory with 3 rows named "&b&lBoxedSea &f&lMining Rewards" to player
        set slot 0 of player's current inventory to black stained glass pane named " "
        set slot 1 of player's current inventory to black stained glass pane named " "
        set slot 2 of player's current inventory to black stained glass pane named " "
        set slot 3 of player's current inventory to black stained glass pane named " "
        set slot 4 of player's current inventory to black stained glass pane named " "
        set slot 5 of player's current inventory to black stained glass pane named " "
        set slot 6 of player's current inventory to black stained glass pane named " "
        set slot 7 of player's current inventory to black stained glass pane named " "
        set slot 8 of player's current inventory to black stained glass pane named " "

        
        
        
        
on inventory click:
    if name of event-inventory is "&b&lBoxedSea &f&lMining Rewards":
        if index of event slot is 0, 1, 2, 3, 4, 5, 6, 7 ,8
        cancel event
        
        
but the 0, 1, 2, 3, 4, 5, 6, 7, 8 thing is wrong
ok so i have a question
i have this
on inventory click:
    if name of event-inventory is "&b&lBoxedSea &f&lMining Rewards":
        if index of event-slot is 9:
            if %{blocksbroken::%player's uuid%}% > 1000:
                give player 10 warped button of aqua affinity with all flags hidden named "&1Compressed Diamond"
on break:
    add 1 to {blocksbroken::%player's uuid%}


Posted by: shumansenpai from the skUnity Discord.
 
This is skQuery.
Add wait 1 tick before and after opening the inventory. Not on a PC so I cannot write the code for you.
Oh also you need to add to run "" at the end of the format slot line.
That's your issue. Even if it doesn't do anything, it still requires that.

Posted by: microwastaken from the skUnity Discord.
 
<@470241156203282456
Here you have an example.
code_language.skript:
function vanillagui(p: player):
    set metadata tag "vanillagui" of {_p} to chest inventory with 3 rows named "Your fancy title"
    set slot 13 of metadata tag "vanillagui" of {_p} to diamond named "your fancy item" with lore "with fancy lore"
    open (metadata tag "vanillagui" of {_p}) to {_p} #dont forget that.

command /vanillagui:
    trigger:
        vanillagui(player)

on inventory click:
    if name of player's current inventory is "Your fancy title":
        cancel event
        if name of clicked slot is "your fancy item":
            #do stuff

Posted by: cupex_ from the skUnity Discord.
 
Status
Not open for further replies.