1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skript Restoring Inventories

Discussion in 'Tutorials' started by JayJayJay175, Mar 18, 2017.

  1. JayJayJay175

    JayJayJay175 New Member

    Joined:
    Mar 10, 2017
    Messages:
    1
    Likes Received:
    0
    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
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    I use this, since it's much faster seeing the slots in the inventory visually.
    http://wiki.vg/Inventory

    You also have this
    [​IMG]
    (though the armor slots and stuff is different)
     
    #2 ShaneBee, Apr 11, 2017
    Last edited by a moderator: Apr 15, 2017

Share This Page

Loading...