Chest Inventory

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

    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.
command /vault:
trigger:
open chest with 6 rows named "&6Vault: &7(1/1)" to player
loop {Player.Vault.1.%player%::*}:
set {_} to loop-index
set {_} to {_} parsed as a number
remove 1 from {_}
set {_s} to loop-value
set {_s} to {_s} parsed as an itemtype
set slot {_} of player's current inventory to {_s}

on inventory close:
if inventory name of player's current inventory is "&6Vault: &7(1/1)":
set {_} to 0
delete {Player.Vault.1.%player%::*}
loop 54 times:
set {_s} to slot {_} of player's current inventory
add {_s} to {Player.Vault.1.%player%::*}
add 1 to {_}
 
command /vault:
trigger:
open chest with 6 rows named "&6Vault: &7(1/1)" to player
loop {Player.Vault.1.%player%::*}:
set {_} to loop-index
set {_} to {_} parsed as a number
remove 1 from {_}
set {_s} to loop-value
set {_s} to {_s} parsed as an itemtype
set slot {_} of player's current inventory to {_s}

on inventory close:
if inventory name of player's current inventory is "&6Vault: &7(1/1)":
set {_} to 0
delete {Player.Vault.1.%player%::*}
loop 54 times:
set {_s} to slot {_} of player's current inventory
add {_s} to {Player.Vault.1.%player%::*}
add 1 to {_}
I cant take stuff out of it...
 
Status
Not open for further replies.