1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved how do i make a if armour slot?

Discussion in 'Skript' started by Yeet, Nov 16, 2020.

Thread Status:
Not open for further replies.
  1. Yeet

    Yeet Member

    Joined:
    Nov 16, 2020
    Messages:
    4
    Likes Received:
    1
    My code is as follows:
    on inventory click:
    if
    (the clicked slot is a amour slot):

    But I'm not sure how to code it to only happen if the amour slot is
    equipped.

    I'm running Skript 2.5.1
    minecraft version is 1.16.4
     
    #1 Yeet, Nov 16, 2020
    Last edited: Nov 17, 2020
  2. Best Answer:
    Post #2 by KidCraftz, Nov 19, 2020
  3. KidCraftz

    KidCraftz Member

    Joined:
    Nov 17, 2020
    Messages:
    2
    Likes Received:
    0
    Hi @Yeet,
    you can use these syntaxes:

    Code (Text):
    1.  
    2. sharpsk on armour equip:
    3.     if event-item is <helmet/chestplate/leggins/boots>:
    4.  
    5. sharpsk on armour unequip:
    6.     if event-item is <helmet/chestplate/leggins/boots>:
    7.  
    Please, use SharpSk addon for the syntax to work!

    If this helps you, please give a rep and rate this reply :emoji_slight_smile:
     
    #2 KidCraftz, Nov 19, 2020
    Last edited: Nov 19, 2020
  4. Yeet

    Yeet Member

    Joined:
    Nov 16, 2020
    Messages:
    4
    Likes Received:
    1
    Thanks for the response, it's been a great help however, when i run my script it says:
    [Server thread/ERROR]: Can't compare an item stack with '<helmet/chestplate/leggings/boots>' (welcome.sk, line 41: if event-item is <helmet/chestplate/leggings/boots>:')
     
  5. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    use,
    Code (Skript):
    1. if event-item helmet:
    for example not exactly what he typed what he meant is use one of them
     
Thread Status:
Not open for further replies.

Share This Page

Loading...