Save chest items

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

Lummox

Member
Jan 29, 2017
28
0
1
43
This is my code:

code_language.skript:
on inventory close:
        if inventory name of player's current inventory is "<aqua>Congelador":
            set {caducidad.congeladores::%location of target block%} to player's current inventory

on right click:
    if target block is a chest:
        cancel event
        open chest with 2 rows named "<aqua>Congelador" to player
        set player's current inventory to {caducidad.congeladores::%location of target block%::*}

I want to, when you close the chest, save what you have previously put inside and then restore it when you right click on the chest.

But don't work.

Any idea?
[doublepost=1487547292,1487377873][/doublepost]Any idea?
 
You want to save all the items on that inventory, not the inventory itself. Use the items in expression for that.
 
Status
Not open for further replies.