Skript Restoring Inventories

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

JayJayJay175

New Member
Mar 10, 2017
1
0
0
30
For my sake, I'm making this. It took me forever to remember how to do this so next time I go to look I can look here :emoji_stuck_out_tongue:.

The player's inventory has 36 inventory slots, 1 offhand slot, and 4 armor slots. (As well as crafting slots and whatnot but we aren't going to touch that) The inventory slot's ids are 0-35, the armor slots are 36-39 and the offhand slot id is 40. So, with this information we can make a list variable and loop it to save and restore inventories. Just like so: https://hastebin.com/muzipemaso.vbs
 
I use this, since it's much faster seeing the slots in the inventory visually.
http://wiki.vg/Inventory

You also have this
$

(though the armor slots and stuff is different)
 
Last edited by a moderator: