#Inventory slots?

1 messages · Page 1 of 1 (latest)

narrow plover
#
    permission: op
    permission message: &cYou don't have permission to use this command
    trigger:
        if arg-1 is "create":
            if arg-2 is set:
                if {kit::%arg-2%::*} is set:
                    send "&cA kit named %arg-2% already exists."
                else:
                    set {kit::%arg-2%::*} to all items of player's inventory
                    send "&bKit named %arg-2% has been created."
            else:
                send "&cCorrect usage: /kit create <kit-name>"
        if arg-1 is "give":
            if {kit::%arg-2%::*} is set:
                if arg-3 is set:
                    clear inventory of arg-3
                    clear all the potion effects of arg-3
                    heal arg-3
                    add {kit::%arg-2%::*} to arg-3's inventory
                    send "&bYou received %arg-2% kit." to arg-3
                else:
                    clear inventory of player
                    clear all the potion effects of player
                    heal player
                    add {kit::%arg-2%::*} to player's inventory
                    send "&bYou received %arg-2% kit." to player
            else:
                send "&cKit named %arg-2% does not exist."```
#

Few people asked me to use loop but I am not able to get an idea about it even after reading the docs.

#

That's why I am not able to proceed further with my skript

#

Inventory slots?

azure patrol
#

So whats the issue, you can't figure out how to save a kit?

#

or just to give them in the right order

#

it looks like it should work

#

can't see why it might just duplicate your inv

narrow plover
# azure patrol or just to give them in the right order

Like if I wear armour or I have something in offhand and I do /kit create xyz. It creates a kit
Then if I do /kit give xyz it just gives me the items in inventory no matter if I had armour slots or offhand equipped or not.

azure patrol
#

i mean you never told it to manually equip armour if that was in the kit list

#

just go check helm, chest, leg and boot slots individually, set them to the first 4 arguments

#

set the 5th argument to the player's offhand tool

#

then set the player's armour to the list indexes 1-4, offhand list index 5

#

give them the rest

narrow plover
#

like can you give an example of how to check and stuff @azure patrol

azure patrol
#

player's helmet

#

player's offhand tool

narrow plover
azure patrol
#

i mean if you wanted to check if a kit has the player's helmet, sure ig

#

pretty sure that is not what you're trying to do though

narrow plover