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.

skript armor

Discussion in 'Skript' started by mr_kb, May 27, 2021.

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

    mr_kb New Member

    Joined:
    May 27, 2021
    Messages:
    5
    Likes Received:
    0
    My friend and I are trying to make a Skript where if you are wearing a full armor set, it effects you with resistance. Here's the code we have:


    Code (Text):
    1. variables:
    2.     {superior.%player%} = "False"
    3.     {superior.count.%player%} = 0
    4.  
    5. on player armor change:
    6.     if new chestplate is named "&6Superior Dragon Chestplate":
    7.         add 1 to {superior.count.%player%}
    8.     if new leggings is named "&6Superior Dragon Leggings":
    9.         add 1 to {superior.count.%player%}
    10.     if new boots is named "&6Superior Dragon Boots":
    11.         add 1 to {superior.count.%player%}
    12.     if new helmet is named "&6Superior Dragon Helmet":
    13.         add 1 to {superior.count.%player%}
    14.     if {superior.count.%player%} = 4:
    15.         set {superior.%player%} to "True"
    16.     if {superior.%player%} = "True":
    17.         apply resistance 255 for 999 days to player

    Any help would be appreciated. Thanks! (remember, we are limited to minehut's plugin list. we can't go beyond what minehut has.)
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    40
    But keep in mind, if the player switched the armor the effect stays.
    Code (Text):
    1. on player armor change:
    2.   if player's helmet is named "&6Superior Dragon Chestplate":
    3.     if player's chestplate is named "&6Superior Dragon Chestplate":
    4.       if player's leggings is named "&6Superior Dragon Chestplate":
    5.         if player's boots is named "&6Superior Dragon Chestplate":
    6.           apply resistance 255 for 999 days to player
     
  3. mr_kb

    mr_kb New Member

    Joined:
    May 27, 2021
    Messages:
    5
    Likes Received:
    0
    Hey! Thanks for responding, but it isn't exactly working out. Do you have any other ideas? We can't seem to find anywhere else where the answer is.(edited)
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    40
    What exactly isn't working out?
     
  5. mr_kb

    mr_kb New Member

    Joined:
    May 27, 2021
    Messages:
    5
    Likes Received:
    0
    [​IMG]
     
  6. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    40
    Oh I see, we have to work with slots. Idk which slot is which armor thing but this is the helmet for example:
    slot 39 of player's inventory
     
Thread Status:
Not open for further replies.

Share This Page

Loading...