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.

Please help

Discussion in 'Skript' started by cuddlytrap, Jan 28, 2021.

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

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    I have tried making a skript where if you wear armour with a certain name, you get an effect. It detects when you change your armour but it doesnt give you the effect when you have the full set on. Please help
    This is my skript:

    on armor change:
    execute console command "/effect clear %player%"
    wait 1 tick
    if name of helmet is "&2Frog Helmet":
    if name of chestplate is "&2Frog Chestplate":
    if name of leggings is "&2Frog Trousers":
    if name of boots is "&2Frog Feet":
    execute console command "/effect give %player% minecraft:jump_boost 1000000 3"​
    --- Double Post Merged, Jan 28, 2021, Original Post Date: Jan 28, 2021 ---
    and i know it doesnt look like there are indents int he firest message/thread desrciption, but it is indented correclty in the skript
    --- Double Post Merged, Jan 28, 2021 ---
    also there are no errors in the skript, it just doesnt work
    --- Double Post Merged, Jan 28, 2021 ---
    :/
    no replies :emoji_frowning:
     
  2. Yaşarhan

    Yaşarhan Active Member

    Joined:
    May 16, 2020
    Messages:
    87
    Likes Received:
    6
    I interested.
    --- Double Post Merged, Jan 28, 2021, Original Post Date: Jan 28, 2021 ---
    Should all pieces work when worn?
     
  3. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    umm i dont know what you mean but you should only get the effect while wearing all 4 armour peices at the same time
    --- Double Post Merged, Jan 29, 2021, Original Post Date: Jan 29, 2021 ---
    no it should be you only get the effect if you are wearing all 4 peices at the same time
     
  4. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Code (Text):
    1.  
    2. every 2 seconds:
    3.     loop all players:
    4.         If loop-player is wearing a leather helmet named "Helmet":
    5.             apply speed 2 to loop-player
    6.  
     
  5. Yaşarhan

    Yaşarhan Active Member

    Joined:
    May 16, 2020
    Messages:
    87
    Likes Received:
    6
    Ok, i wrote the script, i will share it soon, i have an internet problem in my office now.
     
  6. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    ok
    ok ill try that
    --- Double Post Merged, Jan 29, 2021, Original Post Date: Jan 29, 2021 ---
    i had a thought:
    what if the reason it wasnt working was cos i was using colour codes instead of things like <green>
    ill check this thought before i check ur idea marc :emoji_grinning: cos i think this thought, if it works would cause less lag
    so i think it may work like something like this:
    Code (Text):
    1. on armor change:
    2.               execute console command "/effect clear %player%"
    3.               wait 1 tick
    4.                 if name of helmet is "<green>Frog Helmet":
    5.                   if name of chestplate is "<green>Frog Chestplate":
    6.                     if name of leggings is "<green>Frog Trousers":
    7.                       if name of boots is "<green>Frog Feet":
    8.                         execute console command "/effect give %player% minecraft:jump_boost 1000000 3"
     
  7. Yaşarhan

    Yaşarhan Active Member

    Joined:
    May 16, 2020
    Messages:
    87
    Likes Received:
    6
    Code (Text):
    1. on armor equip:
    2.     execute console command "/effect %player% clear"
    3.    
    4.     if event-item is leather helmet named "&2Frog Helmet":
    5.         set {helmet.%player%} to true
    6.     if event-item is leather chestplate named "&2Frog Chestplate":
    7.         set {chest.%player%} to true
    8.     if event-item is leather leggings named "&2Frog Trousers":
    9.         set {legg.%player%} to true
    10.     if event-item is leather boots named "&2Frog Feet":
    11.         set {boots.%player%} to true
    12.        
    13.     if {helmet.%player%} is true:
    14.         if {chest.%player%} is true:
    15.             if {legg.%player%} is true:
    16.                 if {boots.%player%} is true:
    17.                     #GİVE EFFECTS
    18.                    
    19. on armor unequip:
    20.     execute console command "/effect %player% clear"
    21.    
    22.     if event-item is leather helmet named "&2Frog Helmet":
    23.         set {helmet.%player%} to false
    24.     if event-item is leather chestplate named "&2Frog Chestplate":
    25.         set {chest.%player%} to false
    26.     if event-item is leather leggings named "&2Frog Trousers":
    27.         set {legg.%player%} to false
    28.     if event-item is leather boots named "&2Frog Feet":
    29.         set {boots.%player%} to false
    Requires: SharpSK
    --- Double Post Merged, Jan 29, 2021, Original Post Date: Jan 29, 2021 ---
    Code (Text):
    1. on armor equip:
    2.     if event-item is unbreakable leather helmet named "&b&lName" with lore "&3Lore 1" and "&3Lore 2":
    You should state the attributes like this.
     
  8. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    THX that seems like it should work! Ill try it soon :emoji_grinning: got school stuff to do atm
    --- Double Post Merged, Jan 30, 2021 ---
    minehut doesnt let you install SharpSK :emoji_frowning:
     
  9. Yaşarhan

    Yaşarhan Active Member

    Joined:
    May 16, 2020
    Messages:
    87
    Likes Received:
    6
    "on armor change" You can also use it with this event.
     
  10. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    oki :emoji_grinning:
    --- Double Post Merged, Jan 30, 2021, Original Post Date: Jan 30, 2021 ---
    how would i do that :/
    --- Double Post Merged, Jan 30, 2021 ---
    i tried this using a mix of ur help and my own ideas but didnt work oof
    Code (Text):
    1.  
    2. on armor change:
    3.     execute console command "/effect %player% clear"
    4.     wait 1 tick
    5.     if player is wearing leather helmet named "&2Frog Hat":
    6.         set {helmetFrog.%player%} to true
    7.         send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    8.     else:
    9.         set {helmetFrog.%player%} to false
    10.  
    11. on armor change:
    12.     execute console command "/effect %player% clear"
    13.     wait 1 tick
    14.     if player is wearing leather chestplate named "&2Frog Torso":
    15.         set {chestFrog.%player%} to true
    16.         send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    17.     else:
    18.         set {chestFrog.%player%} to false
    19.  
    20. on armor change:
    21.     execute console command "/effect %player% clear"
    22.     wait 1 tick
    23.     if player is wearing leather leggings named "&2Frog Trousers":
    24.         set {leggFrog.%player%} to true
    25.         send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    26.     else:
    27.         set {leggFrog.%player%} to false
    28.  
    29. on armor change:
    30.     execute console command "/effect %player% clear"
    31.     wait 1 tick
    32.     if player is wearing leather boots named "&2Frog Shoes":
    33.         set {bootsFrog.%player%} to true
    34.         send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    35.     else:
    36.         set {bootsFrog.%player%} to false
    37.  
    38. on armor change:
    39.     wait 3 ticks
    40.     if {helmetFrog.%player%} is true:
    41.         if {chestFrog.%player%} is true:
    42.             if {leggFrog.%player%} is true:
    43.                 if {bootsFrog.%player%} is true:
    44.                     execute console command "/effect give %player% jump_boost 1000000 3"
     
  11. Yaşarhan

    Yaşarhan Active Member

    Joined:
    May 16, 2020
    Messages:
    87
    Likes Received:
    6
    Code (Text):
    1. on armor change:
    2.     execute console command "/effect %player% clear"
    3.     wait 1 tick
    4.  
    5.     if player is wearing leather helmet named "A":
    6.         set {helmetFrog.%player%} to true
    7.     else:
    8.         set {helmetFrog.%player%} to false
    9.      
    10.     if player is wearing leather chestplate named "B":
    11.         set {chestFrog.%player%} to true
    12.     else:
    13.         set {chestFrog.%player%} to false
    14.      
    15.     if player is wearing leather leggings named "C":
    16.         set {leggFrog.%player%} to true
    17.     else:
    18.         set {leggFrog.%player%} to false
    19.      
    20.     if player is wearing leather boots named "D":
    21.         set {bootsFrog.%player%} to true
    22.     else:
    23.         set {bootsFrog.%player%} to false
    24.  
    25.     wait 1 tick
    26.     if {helmetFrog.%player%} is true:
    27.         if {chestFrog.%player%} is true:
    28.             if {leggFrog.%player%} is true:
    29.                 if {bootsFrog.%player%} is true:
    30.                     execute console command "/effect give %player% jump_boost 1000000 3"
     
  12. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    still doesnt work :/ it could be a problem to be witht he fact that the leather armour is dyed maybe? ill check and try remove the dye :emoji_grinning:
    --- Double Post Merged, Jan 31, 2021, Original Post Date: Jan 31, 2021 ---
    nope not to do with the colour of armour
    --- Double Post Merged, Jan 31, 2021 ---
    if needed, this is the ENTIRE skript:
    Code (Text):
    1.  
    2. command /undoarmourvariables:
    3.   trigger:
    4.     set {helmetFrog.%player%} to false
    5.     set {chestFrog.%player%} to false
    6.     set {leggFrog.%player%} to false
    7.     set {bootsFrog.%player%} to false
    8.     send "&6&l[&b&lArmour&6&l] &eSuccessfully set all armour variables to false."
    9. on armor change:
    10.     execute console command "/effect %player% clear"
    11.     wait 1 tick
    12.     if player is wearing leather helmet named "&2Frog Hat":
    13.         set {helmetFrog.%player%} to true
    14.     else:
    15.         set {helmetFrog.%player%} to false
    16.      
    17.     if player is wearing leather chestplate named "&2Frog Torso":
    18.         set {chestFrog.%player%} to true
    19.     else:
    20.         set {chestFrog.%player%} to false
    21.      
    22.     if player is wearing leather leggings named "&2Frog Trousers":
    23.         set {leggFrog.%player%} to true
    24.     else:
    25.         set {leggFrog.%player%} to false
    26.      
    27.     if player is wearing leather boots named "&2Frog Shoes":
    28.         set {bootsFrog.%player%} to true
    29.     else:
    30.         set {bootsFrog.%player%} to false
    31.     wait 1 tick
    32.     if {helmetFrog.%player%} is true:
    33.         if {chestFrog.%player%} is true:
    34.             if {leggFrog.%player%} is true:
    35.                 if {bootsFrog.%player%} is true:
    36.                     execute console command "/effect give %player% jump_boost 1000000 3"
    37.                    
    38. command /armourgive [<player>] [<text>]:
    39.   permission: armour.give
    40.   trigger:
    41.     if arg-player is set:
    42.       if arg-2 is "frog_helmet":
    43.         set {_item.%player%} to leather helmet
    44.         dye {_item.%player%} lime
    45.         give player {_item.%player%} named "&2Frog Hat" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Helmet"
    46.       else if arg-2 is "frog_chestplate":
    47.         set {_item.%player%} to leather chestplate
    48.         dye {_item.%player%} lime
    49.         give player {_item.%player%} named "&2Frog Torso" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Chestplate"
    50.       else if arg-2 is "frog_leggings":
    51.         set {_item.%player%} to leather leggings
    52.         dye {_item.%player%} lime
    53.         give player {_item.%player%} named "&2Frog Trousers" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Leggings"
    54.       else if arg-2 is "frog_boots":
    55.         set {_item.%player%} to leather boots
    56.         dye {_item.%player%} lime
    57.         give player {_item.%player%} named "&2Frog Shoes" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Boots"
     
  13. Yaşarhan

    Yaşarhan Active Member

    Joined:
    May 16, 2020
    Messages:
    87
    Likes Received:
    6
    Can you send me the item. I will look at your attributes.
    --- Double Post Merged, Jan 31, 2021 ---
    Misinterpretation, colors and descriptions will cause it to not work.
     
  14. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    this is the part of the skript that gives you the armour:
    Code (Text):
    1.  
    2. command /armourgive [<player>] [<text>]:
    3.   permission: armour.give
    4.   trigger:
    5.     if arg-player is set:
    6.       if arg-2 is "frog_helmet":
    7.         set {_item.%player%} to leather helmet
    8.         dye {_item.%player%} lime
    9.         give player {_item.%player%} named "&2Frog Hat" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Helmet"
    10.       else if arg-2 is "frog_chestplate":
    11.         set {_item.%player%} to leather chestplate
    12.         dye {_item.%player%} lime
    13.         give player {_item.%player%} named "&2Frog Torso" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Chestplate"
    14.       else if arg-2 is "frog_leggings":
    15.         set {_item.%player%} to leather leggings
    16.         dye {_item.%player%} lime
    17.         give player {_item.%player%} named "&2Frog Trousers" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Leggings"
    18.       else if arg-2 is "frog_boots":
    19.         set {_item.%player%} to leather boots
    20.         dye {_item.%player%} lime
    21.         give player {_item.%player%} named "&2Frog Shoes" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Boots"
     
  15. MinecraftMatthew

    MinecraftMatthew New Member

    Joined:
    Feb 3, 2021
    Messages:
    9
    Likes Received:
    2
    Perhaps the lore messes it up. As Yasarhan said, everything about the armor has to match the description. If the condition doesn't check anything about the lore, it will only work if there is no lore. You could try copying and pasting every attribute of the armor, e.g.

    if player is wearing leather helmet dyed lime named "&2Frog Hat" with lore "&aPart of the &2Frog &aset" and "&6-------------------------" and "&eFull set ability: &c&lFrog Master" and "&a(Jump Boots III)" and "&6-------------------------" and "&b&lRare Helmet":

    I'm not sure if there's a better way to go about it.
     
    • Like Like x 1
  16. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    ok ill try :emoji_grinning:
    --- Double Post Merged, Feb 3, 2021, Original Post Date: Feb 3, 2021 ---
    nope didnt work
    :emoji_frowning:
     
  17. MinecraftMatthew

    MinecraftMatthew New Member

    Joined:
    Feb 3, 2021
    Messages:
    9
    Likes Received:
    2
    I just tested your script myself, and if you remove the "dyed lime" part it should work.
     
  18. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    but then how do i make the leather armour green?
     
  19. MinecraftMatthew

    MinecraftMatthew New Member

    Joined:
    Feb 3, 2021
    Messages:
    9
    Likes Received:
    2
    You can put on the same set of lime armor, and just remove the "dyed lime" out of the if statement.
     
  20. cuddlytrap

    cuddlytrap Member

    Joined:
    Dec 18, 2020
    Messages:
    26
    Likes Received:
    0
    i am confused. there is no part of the skript that says anything like "if armour is dyed lime"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...