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.

automatic chest

Discussion in 'Skript' started by Jefy4891, Aug 16, 2022.

  1. Jefy4891

    Jefy4891 Member

    Joined:
    Aug 16, 2022
    Messages:
    3
    Likes Received:
    0
    Is there a scenario where we will put a gui on our items that will be chests in different parts of the world, and the chest will put multiple empty chests in different parts of the world with odds?
     
  2. Finrex01

    Finrex01 New Member

    Joined:
    Aug 14, 2022
    Messages:
    6
    Likes Received:
    0
    Can you elaborate? I don't understand.
     
  3. Jefy4891

    Jefy4891 Member

    Joined:
    Aug 16, 2022
    Messages:
    3
    Likes Received:
    0
    There are multiple empty chests in different parts of the world. Let there be a menu where we can put items in empty chests with a single command at the same time.
     
  4. Finrex01

    Finrex01 New Member

    Joined:
    Aug 14, 2022
    Messages:
    6
    Likes Received:
    0
    Do you mean all of the chests at once? Or just one chest that you can select? (also sorry for not replying i forgot)
     
  5. Jefy4891

    Jefy4891 Member

    Joined:
    Aug 16, 2022
    Messages:
    3
    Likes Received:
    0
    all of the chests
    --- Double Post Merged, Oct 6, 2022 at 8:06 PM, Original Post Date: Oct 6, 2022 at 8:05 PM ---
    It doesn't matter, that kind of thing happens.
     
  6. Finrex01

    Finrex01 New Member

    Joined:
    Aug 14, 2022
    Messages:
    6
    Likes Received:
    0
    Code (Text):
    1. command /togglechest:
    2.   permission: togglechest
    3.   trigger:
    4.     if {inchest::%player%} is true:
    5.       set {inchest::%player%} to false
    6.       send "&aChests you place will no longer count towards the AutoChest"
    7.     else:
    8.       set {inchest::%player%} to true
    9.       "&aChests you place will now count towards the AutoChest"
    10. command /autochest
    11.   permission: autochest
    12.   trigger:
    13.     open chest inventory with 3 rows named "&aAutoChest"
    14. on inventory close:
    15.   if name of event-inventory is "&aAutoChest":
    16.     delete {autochest::*}
    17.     loop all items in player's inventory:
    18.       add loop-item to {autochest::*}
    19.     send "&aAll AutoChests have been set!"
    20.     add {autochest::*} to {chests::*}
    21. on block place:
    22.   if {inchest::%player%} is true:
    23.     if event-block is a chest:
    24.       add event-block to {chests::*}
    Hopefully that works for what you are asking.
    Uses:
    /togglechest (when you place a chest, it will add to all of the auto chests)
    /autochest (opens the gui where you can put in the items that will go into the chest)
     

Share This Page

Loading...