Solved Adding of armor trim not working

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

ab3ata

New Member
Oct 11, 2023
5
0
1
22
hey,
i am using skript version 2.6.4 and skbee 2.18.3
this is my skript:
command /Halloweenunbreakable:
trigger:
loop all items in the inventory of player:
if loop-value is a leather helmet named "Halloween Helmet":
message "&d[&6BMC Halloween&d] &6Poof!" to player
add nbt compound from "{Unbreakable:1}" to nbt compound of loop-value
add armor trim using gold_material with eye_pattern to armor trim of loop-value

if loop-value is a leather chestplate named "&6Halloween &dTorso":
add nbt compound from "{Unbreakable:1}" to nbt compound of loop-value
if loop-value is a leather Leggings named "&6Halloween &dLeggings":
add nbt compound from "{Unbreakable:1}" to nbt compound of loop-value
if loop-value is a leather Boots named "&6Halloween &dBoots":
add nbt compound from "{Unbreakable:1}" to nbt compound of loop-value
stop
it executes the command and makes the item unbreakable but it does not apply the armor trim, it doesnt give me any errors either and to be honest i dont know what else to try
 
Hello,
here is a partially fixed version of the code.
The trim thingys are not fixed.
SCSS:
command /halloweenunbreakable:
    trigger:
        loop all items in player's inventory:
            if loop-item = leather helmet named "Halloween Helmet":
                add armor trim using gold_material with eye_pattern to armor trim of loop-item
            else if loop-item = leather chestplate named "&6Halloween &dTorso":
            else if loop-item = leather leggings named "&6Halloween &dLeggings":
            else if loop-item = leather boots named "&6Halloween &dBoots":
            else:
                continue

            set tag "Unbreakable" of nbt compound of loop-item to true

            send "&d[&6BMC Halloween&d] &6Poof!"
 
Last edited:
thank you for your reply ;o it is a really weird thing, since just using player's tool or player's helmet does work if the player holds/wears it but it needs to apply if the player has the armor in its inventory and simply using loop-item or loop-value appearently doesn't work
 
thank you for your reply ;o it is a really weird thing, since just using player's tool or player's helmet does work if the player holds/wears it but it needs to apply if the player has the armor in its inventory and simply using loop-item or loop-value appearently doesn't work
Mark this as solved please; whenever I'm trying to help people this pops up and it confuses me-
 
They should making solving a thread easier or so because there are so many solved threads that are not marked as solved and it's really hard to find non answered threads.
 
i am using skbee here
add armor trim using gold_material with eye_pattern to armor trim of loop-item
the issue is that it doesnt apply the trim to the armor pieces in the inventory.
 
I was using skbee too and nothing happened and no errors or warnings where shown.
First of all, wasn't it your advice? lmao
Second, I don't have access to SkUnity docs at the moment, so this is the best you'll get:
Code:
set {_chestplate} to iron chestplate
# apply the armor trim however
set chestplate of %entity% to {_chestplate} # or something like that
 
First of all, wasn't it your advice? lmao
Second, I don't have access to SkUnity docs at the moment, so this is the best you'll get:
Code:
set {_chestplate} to iron chestplate
# apply the armor trim however
set chestplate of %entity% to {_chestplate} # or something like that

thank you for this, i was able to make it work by editing that. I ended up with this code:
Code:
command /halloweenunbreakable:
    trigger:
        loop all items in player's inventory:
            if loop-item = leather helmet named "&6Halloween &dHelmet":
                set {_helmet} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_helmet}
                set loop-item to {_helmet}
            else if loop-item = leather chestplate named "&6Halloween &dTorso":
                set {_chestplate} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_chestplate}
                set loop-item to {_chestplate}
            else if loop-item = leather leggings named "&6Halloween &dLeggings":
                set {_leggings} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_leggings}
                set loop-item to {_leggings}
            else if loop-item = leather boots named "&6Halloween &dBoots":
                set {_boots} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_boots}
                set loop-item to {_boots}
            else:
                continue
            set tag "Unbreakable" of nbt compound of loop-item to true
            
            send "&d[&6BMC Halloween&d] &6Poof!"
 
thank you for this, i was able to make it work by editing that. I ended up with this code:
Code:
command /halloweenunbreakable:
    trigger:
        loop all items in player's inventory:
            if loop-item = leather helmet named "&6Halloween &dHelmet":
                set {_helmet} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_helmet}
                set loop-item to {_helmet}
            else if loop-item = leather chestplate named "&6Halloween &dTorso":
                set {_chestplate} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_chestplate}
                set loop-item to {_chestplate}
            else if loop-item = leather leggings named "&6Halloween &dLeggings":
                set {_leggings} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_leggings}
                set loop-item to {_leggings}
            else if loop-item = leather boots named "&6Halloween &dBoots":
                set {_boots} to loop-item
                add armor trim using redstone_material with silence_pattern to armor trim of {_boots}
                set loop-item to {_boots}
            else:
                continue
            set tag "Unbreakable" of nbt compound of loop-item to true
           
            send "&d[&6BMC Halloween&d] &6Poof!"
I'm glad I could help. If you have any more issues, just ask.