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!
command /vault:
trigger:
create a gui with virtual chest with size 6 named "Vault":
run when close:
set {list.variable::*} to all items of gui-inventory
open last created gui to player
set {_x} to 0
loop {list.variable::*}:
set slot {_x} of player's current inventory to loop-value
add 1 to {_x}
It doesn't work it says "create a gui with virtual chest with size 6 named "" is not a boolean (yes/no) (vault.sk, line 16: create a gui with virtual chest with size 6 named "":') 'last created gui' is not an entity type (vault.sk, line 19: open last created gui to player')"code_language.skript:command /vault: trigger: create a gui with virtual chest with size 6 named "Vault": run when close: set {list.variable::*} to all items of gui-inventory open last created gui to player set {_x} to 0 loop {list.variable::*}: set slot {_x} of player's current inventory to loop-value add 1 to {_x}
If you are going for something like playervaults or such, use this syntax with Tuske
#the code to open the chest
open chest with 6 row named "virtual chest" to player
{chest.%player%::0} is set:
loop {chest.%player%::*}:
set slot "%loop-index%" parsed as integer of current inventory of player to loop-value
#the code to save the chest
on inventory close:
inventory name of current inventory of player is "virtual chest"
set {_counter} to 0
loop 54 times:
set {chest.%player%::%{_counter}%} to slot {_counter} of player's current inventory
add 1 to {_counter}
It cant understand event loop {chest.%player%::*}:code_language.skript:#the code to open the chest open chest with 6 row named "virtual chest" to player {chest.%player%::0} is set: loop {chest.%player%::*}: set slot "%loop-index%" parsed as integer of current inventory of player to loop-value #the code to save the chest on inventory close: inventory name of current inventory of player is "virtual chest" set {_counter} to 0 loop 54 times: set {chest.%player%::%{_counter}%} to slot {_counter} of current inventory of player add 1 to {_counter}
If I remember correctly, you need SkQuery for inventory names and to open chests. Skellett has an option too, I think.
It's not an event.event
What do you mean?It's not an event.
You're supposed to place that on an existing code.
He means to put the part of the code he gave under vault command or something.What do you mean?
I didHe means to put the part of the code he gave under vault command or something.
Sorry for late response but here is a code that replaces Essentials echestHow would I create a Storable Inventory so I can store and remove items like a echest?
command /echest:
trigger:
create a gui with virtual chest with size 4 named "Echest":
run when close:
delete {echest::%player's uuid%::*}
set {echest::%player's uuid%::*} to all items of gui-inventory
open last created gui to player
set {_x} to 0
loop {echest::%player's uuid%::*}:
set slot {_x} of player's current inventory to loop-value
add 1 to {_x}
Use the code format so I can see tabulations and stuff, please. Also, post the exact error it gives you on reload.I did
command /stanvault <player>:
permission: vault.create
description: opens a standard vault
trigger:
open chest with 6 row named "virtual chest" to player
{chest.%player%::0} is set:
loop {chest.%player%::*}:
set slot "%loop-index%" parsed as integer of current inventory of player to loop-value
#the code to save the chest
on inventory close:
inventory name of current inventory of player is "virtual chest"
set {_counter} to 0
loop 54 times:
set {chest.%player%::%{_counter}%} to slot {_counter} of player's current inventory
add 1 to {_counter}
I dont know how so i sent the fileUse the code format so I can see tabulations and stuff, please. Also, post the exact error it gives you on reload.
I dont know how so i sent the file
can't understand this event:'{chest.%player%::0} is set'
That code is messed up btw tuske has set {echest::%player's uuid%::*} to all items of gui-inventoryI dont know how so i sent the file
can't understand this event:'{chest.%player%::0} is set'
Tabulate the code...I dont know how so i sent the file
can't understand this event:'{chest.%player%::0} is set'
WHAT DO YOU MEAN?!?!? Im so confused....Tabulate the code...
Every time a line has a : at the end, you intend the next line more than the previous line. Basic stuff, bud.WHAT DO YOU MEAN?!?!? Im so confused....
I did this but it said indentation error.Every time a line has a : at the end, you intend the next line more than the previous line. Basic stuff, bud.
Then fix it. If you literally can't (because indentation errors are the easiest problem to fix), then show your current code and I will point out the indentation mistake.I did this but it said indentation error.