How to save player's armor

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

Dxstin

Member
Oct 1, 2020
15
1
3
24
Hey,
I'm trying to write an inventory save script for my citybuild script, everything works fine except the armor is not saved? Does anyone know maybe how to save the armor in a value and recall it?

Thanks already!
 
Hey,
I'm trying to write an inventory save script for my citybuild script, everything works fine except the armor is not saved? Does anyone know maybe how to save the armor in a value and recall it?

Thanks already!
This method is easy and should even save the armor
code_language.skript:
command /saveinv:
    trigger:
        loop 41 times:
            set {inv.%player%::%loop-number%} to slot loop-number -1 of player
        send "&aInventory saved!"

command /loadinv:
    trigger:
        loop 41 times:
            set slot loop-number -1 of player to {inv.%player%::%loop-number%}
        send "&aInventory loaded!"
 
This method is easy and should even save the armor
code_language.skript:
command /saveinv:
    trigger:
        loop 41 times:
            set {inv.%player%::%loop-number%} to slot loop-number -1 of player
        send "&aInventory saved!"

command /loadinv:
    trigger:
        loop 41 times:
            set slot loop-number -1 of player to {inv.%player%::%loop-number%}
        send "&aInventory loaded!"
Thank you! I will test it out! :emoji_wink:
 
Status
Not open for further replies.