Problems with a chest menu.

Discussion in 'Skript' started by TtHacks66, Aug 16, 2019.

  1. Hi guys. I am new to skript and i wanted to make a kit selection screen. I have a bit of experience in programming, but not a whole lot. But anyways, i wanted to make a code that if you type /kit , you get taken into a chest screen. But the error in the title shows up along with some others, i'll link them below. if someone is able to help me, please say!

    Code:

    Code (Text):
    command /kit:
        trigger:
            open chest with 3 rows to player
            wait a tick
           set slot 10 of player to glowing chainmail helmet of unbreaking 10 named "<grey>Kit PvP!" to close then run [execute player command "/kit1"]
            set slot 12 of player to glowing golden helmet of unbreaking 10 named "<gold>Kit Meteor!" to close then run [execute player command /kit2]
           set slot 14 of player to glowing iron helmet of unbreaking 10 named "<aqua>Kit God!" to close then run [execute player command /kit3]
            set slot 16 of player to glowing diamond helmet of unbreaking 10 named "<red>Kit Admin" to close then run [execute player command /kit4]
    command /kit1:
        trigger:
            equip player with chainmail helmet of protection 1 named "Kit PvP Helmet"
            equip player with chainmail chestplate of protection 1 named "Kit PvP Chestplate"
            equip player with chainmail leggings of protection 1 named "Kit PvP Leggings"
            equip player with chainmail boots of protection 1 named "Kit PvP Boots"
            give player iron sword of sharpness 1 named "Kit PvP Sword"
            loop 10 times:
                give player golden apple
            give player bow
            loop 32 times:
                give player arrow
            message player "You have chosen Kit PvP!"
    (i have only made the first kit, but i wanted to test it first.)
    The errors:
    'chest with 3 rows' is not an entity type (filename.sk, line 3: open chest with 3 rows to player')

    'player' is not an item stack (filename.sk, line 6: set slot 12 of player to glowing chainmail helmet of unbreaking 10 named "<grey>Kit PvP!" to close then run [execute player commant "/kit1"]')

    that 4 times with all the different set slots, then:

    'player "You have chosen Kit PvP!"' is not a text (filename.sk, line 21: message player "You have chosen Kit PvP!"')


    Thanks in advance!!!!
     
  2. you need to use:
    open chest with 3 rows named "something" to player

    and
    set slot 12 of player's current inventory to some item here (WITHOUT command doing part)
    then
    on inventory click:
    inventory name of player's current inventory = "something"
    clicked inventory is not player's inventory
    name of clicked item is "something":
    #do stuff