Set a player's inventory to a variable then open it?

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

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

jackYodil

Member
Jan 28, 2017
28
5
0
32
Skript Version: Skript 2.2 (dev20c)
Skript Author: Me
Minecraft Version: 1.7.10/1.8
---
code_language.skript:
open {inventory.%player%}

set {inventory.%player%} to player's inventory
I need to know how to set a player's inventory to a variable then how do I open it? If it's possible thanks! And i don't want "open %player's inventory%"

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? Yes, I've went everywhere on the internet but here.
 
Last edited:
Skript Version: Skript 2.2 (dev20c)
Skript Author: Me
Minecraft Version: 1.7.10/1.8
---
code_language.skript:
open {inventory.%player%}

set {inventory.%player%} to player's inventory
I need to know how to set a player's inventory to a variable then how do I open it? If it's possible thanks! And i don't want "open %player's inventory%"

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? Yes, I've went everywhere on the internet but here.
A player's inventory is 36 slots, a single variable can't hold 36 items. However, a list can!

code_language.skript:
set {inv::*} to player's inventory

And showing it to another player

code_language.skript:
open chest with 6 rows named "Inventory" to player
loop {inv::*}:
    add loop-value to player's current inventory

However, you'll need to add some stuff to make the stuff not be stealable and what not, hope I helped!
 
3606fca48c4b027fae7561496b69f90c.png

Error. I can't do that.
 
Status
Not open for further replies.