How to check if slot (Slot number) is full?

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

retronix

Supporter +
Aug 18, 2018
19
0
1
39
So im creating a gui basically when you put an item in and press recycle it outputs items into another spot in the gui

https://gyazo.com/19662aa9642a01b571f3bdf9a7a96a9f

When it gets to 64 it just dosent add the rest how do i make it so it will add it to a existing slot?

code_language.skript:
on rightclick on recycler:
    if data value of clicked block is 0 or 1 or 2 or 3:
        cancel the event
        open virtual chest inventory with size 5 named "&2&lRECYCLER" to player
        loop 45 times:
            format gui slot loop-number -1 of player with gray stained glass named " " to do nothing
        unformat gui slot 19 of player
        unformat gui slot 23 of player
        unformat gui slot 24 of player
        unformat gui slot 25 of player
        if {gui::recycler::current::1} is set:
            set slot 23 of current inventory of player to {gui::recycler::current::1}
        if {gui::recycler::current} is set:
            set slot 19 of current inventory of player to {gui::recycler::current}
        format gui slot 21 of player with anvil:0 named "&a&lClick to Recycle" to run:
            if slot 19 of current inventory of player is iron sword:
                set slot 19 of current inventory of player to air
                add 2 iron ingot to slot 23 of current inventory of player
                add 1 stick to slot 24 of current inventory of player
on inventory close:
    if name of current inventory of player is "&2&lRECYCLER":
        if slot 19 of current inventory of player is not air:
            set {gui::recycler::current} to slot 19 of current inventory of player
        else:
            delete {gui::recycler::current}
        if slot 23 of current inventory of player is not air:
            set {gui::recycler::current::1} to slot 23 of current inventory of player
        else:
            delete {gui::recycler::current::1}
 
Status
Not open for further replies.