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

Jefy4891

Member
Aug 16, 2022
4
0
1
20
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?
 
Do you mean all of the chests at once? Or just one chest that you can select? (also sorry for not replying i forgot)
 
Do you mean all of the chests at once? Or just one chest that you can select? (also sorry for not replying i forgot)
all of the chests
[doublepost=1665083179,1665083142][/doublepost]
Do you mean all of the chests at once? Or just one chest that you can select? (also sorry for not replying i forgot)
It doesn't matter, that kind of thing happens.
 
Code:
command /togglechest:
  permission: togglechest
  trigger:
    if {inchest::%player%} is true:
      set {inchest::%player%} to false
      send "&aChests you place will no longer count towards the AutoChest"
    else:
      set {inchest::%player%} to true
      "&aChests you place will now count towards the AutoChest"
command /autochest
  permission: autochest
  trigger:
    open chest inventory with 3 rows named "&aAutoChest"
on inventory close:
  if name of event-inventory is "&aAutoChest":
    delete {autochest::*}
    loop all items in player's inventory:
      add loop-item to {autochest::*}
    send "&aAll AutoChests have been set!"
    add {autochest::*} to {chests::*}
on block place:
  if {inchest::%player%} is true:
    if event-block is a chest:
      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)
 
Code:
command /togglechest:
  permission: togglechest
  trigger:
    if {inchest::%player%} is true:
      set {inchest::%player%} to false
      send "&aChests you place will no longer count towards the AutoChest"
    else:
      set {inchest::%player%} to true
      "&aChests you place will now count towards the AutoChest"
command /autochest
  permission: autochest
  trigger:
    open chest inventory with 3 rows named "&aAutoChest"
on inventory close:
  if name of event-inventory is "&aAutoChest":
    delete {autochest::*}
    loop all items in player's inventory:
      add loop-item to {autochest::*}
    send "&aAll AutoChests have been set!"
    add {autochest::*} to {chests::*}
on block place:
  if {inchest::%player%} is true:
    if event-block is a chest:
      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)
thanks
 
Status
Not open for further replies.