Please help

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

cuddlytrap

Member
Dec 18, 2020
26
0
1
54
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"​
[doublepost=1611850543,1611850445][/doublepost]and i know it doesnt look like there are indents int he firest message/thread desrciption, but it is indented correclty in the skript
[doublepost=1611850586][/doublepost]also there are no errors in the skript, it just doesnt work
[doublepost=1611864522][/doublepost]:/
no replies :emoji_frowning:
 
umm i dont know what you mean but you should only get the effect while wearing all 4 armour peices at the same time
[doublepost=1611909273,1611906081][/doublepost]
I interested.
[doublepost=1611871211,1611871139][/doublepost]Should all pieces work when worn?
no it should be you only get the effect if you are wearing all 4 peices at the same time
 
Code:
every 2 seconds:
    loop all players:
        If loop-player is wearing a leather helmet named "Helmet":
            apply speed 2 to loop-player
 
umm i dont know what you mean but you should only get the effect while wearing all 4 armour peices at the same time
[doublepost=1611909273,1611906081][/doublepost]
no it should be you only get the effect if you are wearing all 4 peices at the same time

Ok, i wrote the script, i will share it soon, i have an internet problem in my office now.
 
Ok, i wrote the script, i will share it soon, i have an internet problem in my office now.
ok
Code:
every 2 seconds:
    loop all players:
        If loop-player is wearing a leather helmet named "Helmet":
            apply speed 2 to loop-player
ok ill try that
[doublepost=1611927818,1611927445][/doublepost]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:
on armor change:
              execute console command "/effect clear %player%"
              wait 1 tick
                if name of helmet is "<green>Frog Helmet":
                  if name of chestplate is "<green>Frog Chestplate":
                    if name of leggings is "<green>Frog Trousers":
                      if name of boots is "<green>Frog Feet":
                        execute console command "/effect give %player% minecraft:jump_boost 1000000 3"
 
Code:
on armor equip:
    execute console command "/effect %player% clear"
    
    if event-item is leather helmet named "&2Frog Helmet":
        set {helmet.%player%} to true
    if event-item is leather chestplate named "&2Frog Chestplate":
        set {chest.%player%} to true
    if event-item is leather leggings named "&2Frog Trousers":
        set {legg.%player%} to true
    if event-item is leather boots named "&2Frog Feet":
        set {boots.%player%} to true
        
    if {helmet.%player%} is true:
        if {chest.%player%} is true:
            if {legg.%player%} is true:
                if {boots.%player%} is true:
                    #GİVE EFFECTS
                    
on armor unequip:
    execute console command "/effect %player% clear"
    
    if event-item is leather helmet named "&2Frog Helmet":
        set {helmet.%player%} to false
    if event-item is leather chestplate named "&2Frog Chestplate":
        set {chest.%player%} to false
    if event-item is leather leggings named "&2Frog Trousers":
        set {legg.%player%} to false
    if event-item is leather boots named "&2Frog Feet":
        set {boots.%player%} to false

Requires: SharpSK
[doublepost=1611932464,1611932307][/doublepost]
Code:
on armor equip:
    execute console command "/effect %player% clear"
   
    if event-item is leather helmet named "&2Frog Helmet":
        set {helmet.%player%} to true
    if event-item is leather chestplate named "&2Frog Chestplate":
        set {chest.%player%} to true
    if event-item is leather leggings named "&2Frog Trousers":
        set {legg.%player%} to true
    if event-item is leather boots named "&2Frog Feet":
        set {boots.%player%} to true
       
    if {helmet.%player%} is true:
        if {chest.%player%} is true:
            if {legg.%player%} is true:
                if {boots.%player%} is true:
                    #GİVE EFFECTS
                   
on armor unequip:
    execute console command "/effect %player% clear"
   
    if event-item is leather helmet named "&2Frog Helmet":
        set {helmet.%player%} to false
    if event-item is leather chestplate named "&2Frog Chestplate":
        set {chest.%player%} to false
    if event-item is leather leggings named "&2Frog Trousers":
        set {legg.%player%} to false
    if event-item is leather boots named "&2Frog Feet":
        set {boots.%player%} to false

Requires: SharpSK

Code:
on armor equip:
    if event-item is unbreakable leather helmet named "&b&lName" with lore "&3Lore 1" and "&3Lore 2":

You should state the attributes like this.
 
Code:
on armor equip:
    execute console command "/effect %player% clear"
   
    if event-item is leather helmet named "&2Frog Helmet":
        set {helmet.%player%} to true
    if event-item is leather chestplate named "&2Frog Chestplate":
        set {chest.%player%} to true
    if event-item is leather leggings named "&2Frog Trousers":
        set {legg.%player%} to true
    if event-item is leather boots named "&2Frog Feet":
        set {boots.%player%} to true
       
    if {helmet.%player%} is true:
        if {chest.%player%} is true:
            if {legg.%player%} is true:
                if {boots.%player%} is true:
                    #GİVE EFFECTS
                   
on armor unequip:
    execute console command "/effect %player% clear"
   
    if event-item is leather helmet named "&2Frog Helmet":
        set {helmet.%player%} to false
    if event-item is leather chestplate named "&2Frog Chestplate":
        set {chest.%player%} to false
    if event-item is leather leggings named "&2Frog Trousers":
        set {legg.%player%} to false
    if event-item is leather boots named "&2Frog Feet":
        set {boots.%player%} to false

Requires: SharpSK
[doublepost=1611932464,1611932307][/doublepost]

Code:
on armor equip:
    if event-item is unbreakable leather helmet named "&b&lName" with lore "&3Lore 1" and "&3Lore 2":

You should state the attributes like this.

THX that seems like it should work! Ill try it soon :emoji_grinning: got school stuff to do atm
[doublepost=1611995046][/doublepost]minehut doesnt let you install SharpSK :emoji_frowning:
 
oki :emoji_grinning:
[doublepost=1612040619,1612040348][/doublepost]how would i do that :/
[doublepost=1612041852][/doublepost]i tried this using a mix of ur help and my own ideas but didnt work oof
Code:
on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick
    if player is wearing leather helmet named "&2Frog Hat":
        set {helmetFrog.%player%} to true
        send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    else:
        set {helmetFrog.%player%} to false

on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick
    if player is wearing leather chestplate named "&2Frog Torso":
        set {chestFrog.%player%} to true
        send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    else:
        set {chestFrog.%player%} to false

on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick
    if player is wearing leather leggings named "&2Frog Trousers":
        set {leggFrog.%player%} to true
        send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    else:
        set {leggFrog.%player%} to false

on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick
    if player is wearing leather boots named "&2Frog Shoes":
        set {bootsFrog.%player%} to true
        send "&6&l[&b&lArmour&6&l] &eEquipped &2Frog Torso&e."
    else:
        set {bootsFrog.%player%} to false

on armor change:
    wait 3 ticks
    if {helmetFrog.%player%} is true:
        if {chestFrog.%player%} is true:
            if {leggFrog.%player%} is true:
                if {bootsFrog.%player%} is true:
                    execute console command "/effect give %player% jump_boost 1000000 3"
 
Code:
on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick

    if player is wearing leather helmet named "A":
        set {helmetFrog.%player%} to true
    else:
        set {helmetFrog.%player%} to false
     
    if player is wearing leather chestplate named "B":
        set {chestFrog.%player%} to true
    else:
        set {chestFrog.%player%} to false
     
    if player is wearing leather leggings named "C":
        set {leggFrog.%player%} to true
    else:
        set {leggFrog.%player%} to false
     
    if player is wearing leather boots named "D":
        set {bootsFrog.%player%} to true
    else:
        set {bootsFrog.%player%} to false
 
    wait 1 tick
    if {helmetFrog.%player%} is true:
        if {chestFrog.%player%} is true:
            if {leggFrog.%player%} is true:
                if {bootsFrog.%player%} is true:
                    execute console command "/effect give %player% jump_boost 1000000 3"
 
Code:
on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick

    if player is wearing leather helmet named "A":
        set {helmetFrog.%player%} to true
    else:
        set {helmetFrog.%player%} to false
    
    if player is wearing leather chestplate named "B":
        set {chestFrog.%player%} to true
    else:
        set {chestFrog.%player%} to false
    
    if player is wearing leather leggings named "C":
        set {leggFrog.%player%} to true
    else:
        set {leggFrog.%player%} to false
    
    if player is wearing leather boots named "D":
        set {bootsFrog.%player%} to true
    else:
        set {bootsFrog.%player%} to false
 
    wait 1 tick
    if {helmetFrog.%player%} is true:
        if {chestFrog.%player%} is true:
            if {leggFrog.%player%} is true:
                if {bootsFrog.%player%} is true:
                    execute console command "/effect give %player% jump_boost 1000000 3"
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:
[doublepost=1612109884,1612109820][/doublepost]nope not to do with the colour of armour
[doublepost=1612109944][/doublepost]if needed, this is the ENTIRE skript:
Code:
command /undoarmourvariables:
  trigger:
    set {helmetFrog.%player%} to false
    set {chestFrog.%player%} to false
    set {leggFrog.%player%} to false
    set {bootsFrog.%player%} to false
    send "&6&l[&b&lArmour&6&l] &eSuccessfully set all armour variables to false."
on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick
    if player is wearing leather helmet named "&2Frog Hat":
        set {helmetFrog.%player%} to true
    else:
        set {helmetFrog.%player%} to false
     
    if player is wearing leather chestplate named "&2Frog Torso":
        set {chestFrog.%player%} to true
    else:
        set {chestFrog.%player%} to false
     
    if player is wearing leather leggings named "&2Frog Trousers":
        set {leggFrog.%player%} to true
    else:
        set {leggFrog.%player%} to false
     
    if player is wearing leather boots named "&2Frog Shoes":
        set {bootsFrog.%player%} to true
    else:
        set {bootsFrog.%player%} to false
    wait 1 tick
    if {helmetFrog.%player%} is true:
        if {chestFrog.%player%} is true:
            if {leggFrog.%player%} is true:
                if {bootsFrog.%player%} is true:
                    execute console command "/effect give %player% jump_boost 1000000 3"
                   
command /armourgive [<player>] [<text>]:
  permission: armour.give
  trigger:
    if arg-player is set:
      if arg-2 is "frog_helmet":
        set {_item.%player%} to leather helmet
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_chestplate":
        set {_item.%player%} to leather chestplate
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_leggings":
        set {_item.%player%} to leather leggings
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_boots":
        set {_item.%player%} to leather boots
        dye {_item.%player%} lime
        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"
 
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:
[doublepost=1612109884,1612109820][/doublepost]nope not to do with the colour of armour
[doublepost=1612109944][/doublepost]if needed, this is the ENTIRE skript:
Code:
command /undoarmourvariables:
  trigger:
    set {helmetFrog.%player%} to false
    set {chestFrog.%player%} to false
    set {leggFrog.%player%} to false
    set {bootsFrog.%player%} to false
    send "&6&l[&b&lArmour&6&l] &eSuccessfully set all armour variables to false."
on armor change:
    execute console command "/effect %player% clear"
    wait 1 tick
    if player is wearing leather helmet named "&2Frog Hat":
        set {helmetFrog.%player%} to true
    else:
        set {helmetFrog.%player%} to false
    
    if player is wearing leather chestplate named "&2Frog Torso":
        set {chestFrog.%player%} to true
    else:
        set {chestFrog.%player%} to false
    
    if player is wearing leather leggings named "&2Frog Trousers":
        set {leggFrog.%player%} to true
    else:
        set {leggFrog.%player%} to false
    
    if player is wearing leather boots named "&2Frog Shoes":
        set {bootsFrog.%player%} to true
    else:
        set {bootsFrog.%player%} to false
    wait 1 tick
    if {helmetFrog.%player%} is true:
        if {chestFrog.%player%} is true:
            if {leggFrog.%player%} is true:
                if {bootsFrog.%player%} is true:
                    execute console command "/effect give %player% jump_boost 1000000 3"
                  
command /armourgive [<player>] [<text>]:
  permission: armour.give
  trigger:
    if arg-player is set:
      if arg-2 is "frog_helmet":
        set {_item.%player%} to leather helmet
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_chestplate":
        set {_item.%player%} to leather chestplate
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_leggings":
        set {_item.%player%} to leather leggings
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_boots":
        set {_item.%player%} to leather boots
        dye {_item.%player%} lime
        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"

Can you send me the item. I will look at your attributes.
[doublepost=1612114456][/doublepost]
Can you send me the item. I will look at your attributes.

Misinterpretation, colors and descriptions will cause it to not work.
 
Can you send me the item. I will look at your attributes.
[doublepost=1612114456][/doublepost]

Misinterpretation, colors and descriptions will cause it to not work.
this is the part of the skript that gives you the armour:
Code:
command /armourgive [<player>] [<text>]:
  permission: armour.give
  trigger:
    if arg-player is set:
      if arg-2 is "frog_helmet":
        set {_item.%player%} to leather helmet
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_chestplate":
        set {_item.%player%} to leather chestplate
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_leggings":
        set {_item.%player%} to leather leggings
        dye {_item.%player%} lime
        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"
      else if arg-2 is "frog_boots":
        set {_item.%player%} to leather boots
        dye {_item.%player%} lime
        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"
 
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
Reactions: Yaşarhan
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.
ok ill try :emoji_grinning:
[doublepost=1612355390,1612354889][/doublepost]nope didnt work
:emoji_frowning:
 
Status
Not open for further replies.