Help save and take 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.

Gherrix

New Member
May 21, 2020
6
0
1
24
hi, I have a problem with my skript (I just started!)
How do I save a player's inventory and get it back?

command /totem:
trigger:
give player 1 emerald named "&6Totem"
message "&7&m--------------------"
send "&4&lHai rivevuto il &6&lTotem"
message "&7&m--------------------"

on death of player:
if player has 1 emerald named "&6Totem":
set {inv::*} to all items in player's inventory
clear drops

 
loop the list variable "{inv::*}" and then give the loop-value to the desired player
[doublepost=1590084395,1590084361][/doublepost]also use code format when sending code
 
try this
Code:
loop {yourlist::*}:
    give loop-value to YourTarget
 
mmmh not work

What about it doesn't work? Please be very clear.

Also, did you just copy my code without changing anything, or did you replace my variables ect. with the ones used in your code?
 
command /totem:
trigger:
give player 1 emerald of protection 1 named "&6Totem"
message "&7&m--------------------"
send "&3Hai rivevuto un &6Totem"
message "&7&m--------------------"
loop {inv::*}:
loop-value to player
 
please do use the code format when sending code, that being said, try this code
Code:
command /totem:
    trigger:
        give player 1 emerald of protection 1 named "&6Totem"
        message "&7&m--------------------"
        send "&3Hai rivevuto un &6Totem"
        message "&7&m--------------------"
        loop {inv::*}:
            give loop-value to player

also, instead of enchant items, you can simply do

Code:
give player 1 of glowing emerald named "&6Totem"
 
please do use the code format when sending code, that being said, try this code
Code:
command /totem:
    trigger:
        give player 1 emerald of protection 1 named "&6Totem"
        message "&7&m--------------------"
        send "&3Hai rivevuto un &6Totem"
        message "&7&m--------------------"
        loop {inv::*}:
            give loop-value to player

also, instead of enchant items, you can simply do

Code:
give player 1 of glowing emerald named "&6Totem"

ok it works, but I only save the inventory but not the armor. how can I do ?
 
Status
Not open for further replies.