on player move:
if player is in world "survival":
add player's current inventory to {loopitemslist::*}
on teleport:
if player is in world "hub":
give {loopitemslist::*} to player
``` this skript doesnt work. i want this skript to save the players inventory example:
in hub ur inv is cleared and u get a server list compass
when you go back to survival world you get the items you had last. it doesnt work. i even moved.
#inventory save!
1 messages · Page 1 of 1 (latest)
why use on player move?
also I think you need to specify what element you want to give to the player out of {loopsitemslist::*}
Just save the inv on quit/world change
Id recommend storing the items as {inventory::%player’s uuid%::(slot number)}
Wdym
idk how to use ()
could you show example
of storing items
because that didnt work
Those are just there for you not the code
Thats just where u put the slot number
There are many examples/snippets on the internet, look at those.
wait do i have to put the slot number there?? then that wouldnt work
like
{inventory::%player’s uuid%::(slot 5)}
No….
{inventory::%player’s uuid%::(slot number)}
do i do
add player's current inventory to {inventory::%player’s uuid%::(slot number)}
And just skript in general
The p a r e n t h e s i s are there for a reason
how is this not correct
i wanna learn this
You have to put the number there, not hope skript can figure it out
for every single damn inventory slot
Yes. Thats why you are LOOPING
No….
add player's current inventory to {inventory::%player’s uuid%::(slot number 0)}
```?
Plus armour slots and offhand its around 40 slots, but with a LOOP it will take less than 5 lines
yeah
ex
loop all players
give player loop-value
@sacred hinge when you got a answer of help
nvm
command /showinv:
trigger:
restore inventory of player from {Stuff}
set {_inv} to chest with 6 rows named "Stuff"
set {_inv}'s serialized contents to {Stuff}
open {_inv} to player
command /saveinv:
set {Stuff} to player's serialized inventory
send "&a&l[✓] &fSaved"
``` got this from internet is that still a good working skript?
@pseudo garden
command /showinv:
trigger:
set {inventory::%uuid of player%} to the player's serialized inventory
wait 1 tick
clear the player's inventory
command /giveinv:
trigger:
restore inventory of player from {inventory::%uuid of player%}
``` doesnt work
please help
got from google
That might be why it doesn’t work
try looking at this https://forums.skunity.com/threads/save-restore-inventory.8380/
Thanks I Will Test It Out
worked
i will try with worlds now
what variable i use to save player's inventory
@pseudo garden
Whatever you want to call it…..
every 1 second in world "blisssmp":
loop 41 times:
set {save::%uuid of player%::slot::%loop-number%} to slot loop-number - 1 of player
clear inventory of player
``` i got stuck with errors for line 4 and 3 periodical event
any other variables i could use?
Please
looping 41 times every second is a great lag machine
not to mention you are planning on looping all players with that too
and the error you would be getting will tell you whats wrong
(syntaxically)
can you just tell me another variable that wont give me errors and that will work
i will figure everything else out
i just need a variable that could work
with worlds inv clear all that
i tried to do
Why are you doing this every second
You should pick a better event
Like on world change
Or make it a function and call it when you teleport them
Or anything thats less laggy
Please
Ive tried helping you, but you just dont listen
set … to slot (loop-number - 1) of player**’s inventory**
Dont come crying to others if you havent tried looking at it yourself
i will try that
chill out im just trying to get a working inventory