1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Storage Box

Discussion in 'Skript' started by Dxn, Nov 8, 2021.

Thread Status:
Not open for further replies.
  1. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    Code (Text):
    1. on right click on birch wood stair:
    2.     set {_gui} to a chest inventory with 4 row with name "&6Box"
    3.     set slots (integers from 0 to 35) of {_gui} to {Inventory::*}
    4.     add "%player%" to {lwb::*}
    5.     open {_gui} to player
    6. on inventory close:
    7.     if name of event-inventory is "&6Box":
    8.         loop 36 times:
    9.             set {Inventory::*} to slots (integers from 0 to 35) of player's current inventory
    10.     remove "%player%" from {lwb::*}
    can someone help me making it so u dont see same items every time u place a box so it is like a chest
    --- Double Post Merged, Nov 10, 2021, Original Post Date: Nov 8, 2021 ---
    .
     
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    I don't get what you mean
     
  3. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    So you see that if u right click on birch wood stair it is going to open a gui called box. I am trying to make them like chests, so u don't see the same items every time u put a box on ground, just like chests. But I can't figure it out how to make them. Like atm if u put a box on ground at the coords 100 with -200 then if u put another one at -300 with -250 u will see the items from the other box from the other coords. I need them to be like chests.
     
  4. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    Ohhh, just save the location of the block inside the variable as well, like so: {Inventory::%location of event-block%::*}
     
  5. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    tysm
    --- Double Post Merged, Nov 11, 2021, Original Post Date: Nov 11, 2021 ---
    Can u also help me to save the location of block please? I've been trying to do that for 1 hour and I still can't do it
     
  6. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    Code (Text):
    1. on right click on birch wood stair:
    2.     set {_gui} to a chest inventory with 4 row with name "&6Box"
    3.     set slots (integers from 0 to 35) of {_gui} to {inventory::%event-block's location%::*}
    4.     open {_gui} to player
    5. on inventory close:
    6.     if name of event-inventory is "&6Box":
    7.         loop 36 times:
    8.             set {inventory::%location of target block of player%::*} to slots (integers from 0 to 35) of player's current inventory
    Something like that should work, haven't tested it
     
  7. Dxn

    Dxn New Member

    Joined:
    Nov 8, 2021
    Messages:
    8
    Likes Received:
    0
    it worked, tysm!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...