Duplicate Player Inventory

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

Endas

Member
Jun 22, 2020
10
0
1
44
Hello.

I watched TapL video, and I want to create same skript, but I dont know how to multiple players inventory. Can anyone help me with it?


VIDEO HERE
 
command /invdupe:
trigger:
set slot 0 of player's inventory to {1}
set slot 1 of player's inventory to {2}
set slot 2 of player's inventory to {3}
ETC.

command /inventory:
trigger:
open virtual chest with 1 row named "inv" to player
format gui slot 0 of player with {1}
format gui slot 1 of player with {2}
format gui slot 3 of player with {3}
ETC.
 
command /invdupe:
trigger:
set slot 0 of player's inventory to {1}
set slot 1 of player's inventory to {2}
set slot 2 of player's inventory to {3}
ETC.

command /inventory:
trigger:
open virtual chest with 1 row named "inv" to player
format gui slot 0 of player with {1}
format gui slot 1 of player with {2}
format gui slot 3 of player with {3}
ETC.
Thats not a good way of duplicating the inventory. Just set a var to the player's inventory and open the var to the player
 
OMG, i just did this Yesterday

Code:
command /inv1:
  trigger:
    set {Number} to 0
    loop 36 times:
      set {Inv.%player%::%{Number}%} to slot {Number} of player's inventory
      add 1 to {Number}
    set {Inv.%player%::50} to player's helmet
    set {Inv.%player%::51} to player's chestplate
    set {Inv.%player%::52} to player's leggings
    set {Inv.%player%::53} to player's boots
    set {Inv.%player%::54} to player's offhand tool
    clear player's inventory
    heal the player
    feed the player
    send "Your Inv Has Been Swtched!"
    

    
command /inv2:
  trigger:
    set {Number} to 0
    loop 36 times:
      set slot {Number} of player's inventory to {Inv.%player%::%{Number}%}
      add 1 to {Number}
    set player's helmet to {Inv.%player%::50}
    set player's chestplate to {Inv.%player%::51}
    set player's leggings to {Inv.%player%::52}
    set player's boots to {Inv.%player%::53}
    set player's offhand tool to {Inv.%player%::54}
    delete {Inv.%player%::*}
    send "You Inv Has Been returned!"

This should work, i used it alot, Let me know if it dosen't! <3
 
Status
Not open for further replies.