Disable custom amor protection.

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

Lummox

Member
Jan 29, 2017
28
0
1
42
code_language.skript:
options:
    gorronox : iron helmet named "<yellow>Gorro anti nox"
    pecheranox : iron chestplate named "<yellow>Pechera anti nox"
    pantalonnox : iron leggings named "<yellow>Pantalones anti nox"
    botasnox : iron boots named "<yellow>Botas anti nox"

on damage:
    victim is wearing {@gorronox} or {@pecheranox} or {@pantalonnox} or {@botasnox}:
        set {_dmg} to damage
        set damage to 0
        subtract {_dmg} from victim's health
        send "Test to see if it works" to victim

75a47d7f4d02bb15c8f80e3b28b5a635.png


I want the customized armor does not protect from damage. I created this code, but it does not work, the armor still offers protection and I do not get the message "Test to see if it works" when receiving damage.

What am I doing wrong?
 
Are you trying to remove the vanilla armor protection from armor? If so, you can change the armor protection value in the item.

You need SkStuff for this:

code_language.skript:
#Make sure to change the UUIDMOST and UUIDLEAST for every item you make!
options:
 gorronox : iron helmet with nbt "{AttributeModifiers:[{Slot:""head"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:0,UUIDMost:0}]}" named "&eGorro anti nox"
 pecheranox : iron chestplate with nbt "{AttributeModifiers:[{Slot:""chest"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:1,UUIDMost:1}]}" named "&ePechera anti nox"
 pantalonnox : iron leggings with nbt "{AttributeModifiers:[{Slot:""legs"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:2,UUIDMost:2}]}" named "&ePantalones anti nox"
 botasnox : iron boots with nbt "{AttributeModifiers:[{Slot:""feet"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:3,UUIDMost:3}]}" named "&eBotas anti nox"
 
Last edited:
Thank, but it gives the same result.



What is it? (UUIDLeast and UUIDMost)
its basically a unique ID for each item. If more than one item have the same ID then the item won't work (or at least I think that's how it works. I did testing and each item needed a unique ID...)
 
I tried with:

code_language.skript:
aliases:
    craft = 58
   
options:
    gorronox : iron helmet with nbt "{AttributeModifiers:[{Slot:""head"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:0,UUIDMost:0}]}" named "&eGorro anti nox"
    pecheranox : iron chestplate with nbt "{AttributeModifiers:[{Slot:""chest"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:1,UUIDMost:1}]}" named "&ePechera anti nox"
    pantalonnox : iron leggings with nbt "{AttributeModifiers:[{Slot:""legs"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:2,UUIDMost:2}]}" named "&ePantalones anti nox"
    botasnox : iron boots with nbt "{AttributeModifiers:[{Slot:""feet"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:3,UUIDMost:3}]}" named "&eBotas anti nox"

on inventory click:
    #message "%clicked slot%"
    if player's target block is craft:
        if clicked slot is 0:
            if event-item is iron helmet:
                if slot 8  of current inventory of player is blaze_rod:
                    add "{AttributeModifiers:[{Slot:""head"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:0,UUIDMost:0}]}" to nbt of event-item
                    message "Work helmet"
                    stop
            if event-item is iron chestplate:
                if slot 2 of current inventory of player is blaze_rod:
                    add "{AttributeModifiers:[{Slot:""head"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:1,UUIDMost:1}]}" to nbt of event-item
                    message "Work chestplate"
                    stop
            if event-item is iron leggings:
                if slot 5 and 5 of current inventory of player is blaze_rod:
                    add "{AttributeModifiers:[{Slot:""head"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:2,UUIDMost:2}]}" to nbt of event-item
                    message "Work leggings"
                    stop
            if event-item is iron boots:
                if slot 1 and 3 of current inventory of player is blaze_rod:
                    add "{AttributeModifiers:[{Slot:""head"",AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:3,UUIDMost:3}]}" to nbt of event-item
                    message "Work boots"
                    stop
                message "Don't work"
                stop

on damage:
    victim is wearing {@gorronox} or {@pecheranox} or {@pantalonnox} or {@botasnox}:
        set {_dmg} to damage
        set damage to 0
        subtract {_dmg} from victim's health
        send "Test to see if it works" to victim

every 5 seconds in world "dangoria":
    loop all players:
        loop-player is in world "dangoria":
            if loop-player has permission "skripts.inmune":
                stop
            if loop-player's gamemode is creative:
                stop
            else:
                loop {radiacion.habitable::*}:
                    distance between the loop-player and loop-value-2 is between 200 and 249:
                        if {radiacion.mensaje.aviso.cooldown::%loop-player%} isn't set:
                            send "{@auraalerta} <orange>El sistema alerta que esta cerca de una zona esta afectada por nox. <red>Equipate con un traje anti nox lo antes posible." to loop-player
                            set {radiacion.mensaje.aviso.cooldown::%loop-player%} to 2
                        else:
                            subtract 1 from {radiacion.mensaje.aviso.cooldown::%loop-player%}
                            if {radiacion.mensaje.aviso.cooldown::%loop-player%} is 0:
                                delete {radiacion.mensaje.aviso.cooldown::%loop-player%}
                        stop
                    distance between the loop-player and loop-value-2 is more than 250:
                        loop-player is wearing a iron helmet:
                            if name of helmet slot of loop-player is "<yellow>Gorro anti nox":
                                loop-player is wearing a iron chestplate:
                                    if name of chestplate slot of loop-player is "<yellow>Pechera anti nox":
                                        loop-player is wearing a iron leggings:
                                            if name of leggings slot of loop-player is "<yellow>Pantalones anti nox":
                                                loop-player is wearing a iron boots:
                                                    if name of boots slot of loop-player is "<yellow>Botas anti nox":
                                                        set {_loreh} to uncolored lore of loop-player's helmet parsed as number
                                                        subtract 5 from {_loreh}
                                                        set line 1 of the lore of loop-player's helmet to "%{_loreh}%"
                                                        set {_lorec} to uncolored lore of loop-player's chestplate parsed as number
                                                        subtract 5 from {_lorec}
                                                        set line 1 of the lore of loop-player's chestplate to "%{_lorec}%"
                                                        set {_lorel} to uncolored lore of loop-player's leggings parsed as number
                                                        subtract 5 from {_lorel}
                                                        set line 1 of the lore of loop-player's leggings to "%{_lorel}%"
                                                        set {_loreb} to uncolored lore of loop-player's boots parsed as number
                                                        subtract 5 from {_loreb}
                                                        set line 1 of the lore of loop-player's boots to "%{_loreb}%"
                                                        if {_loreh} is less than 0:
                                                            set loop-player's helmet to air
                                                            send "<light red>El gorro anti nox ha quedado inservible" to loop-player
                                                        if {_lorec} is less than 0:
                                                            set loop-player's chestplate to air
                                                            send "<light red>El abrigo anti nox ha quedado inservible" to loop-player
                                                        if {_lorel} is less than 0:
                                                            set loop-player's leggings to air
                                                            send "<light red>Las botas anti nox han quedado inservibles" to loop-player
                                                        if {_loreb} is less than 0:
                                                            set loop-player's boots to air
                                                            send "<light red>Las botas anti nox han quedado inservibles" to loop-player
                                                        stop
                        {radiacion.mensaje.daño.cooldown::%loop-player%} isn't set:
                            send "{@auraalerta} <red>PELIGRO: <orange>Se detectan niveles dañinos de nox." to loop-player
                            set {radiacion.mensaje.daño.cooldown::%loop-player%} to 2
                        else:
                            subtract 1 from {radiacion.mensaje.daño.cooldown::%loop-player%}
                            if {radiacion.mensaje.daño.cooldown::%loop-player%} is 0:
                                delete {radiacion.mensaje.daño.cooldown::%loop-player%}
                        damage the loop-player by 1.5
                        apply nausea to loop-player for 10 seconds
                        apply slowness to loop-player for 10 seconds

This is the recipe made with "RecipeManager"

code_language.skript:
// Gorro anti nox
craft
air + air + air
iron_ingot + iron_ingot + iron_ingot
iron_ingot + blaze_rod + iron_ingot
= iron_helmet
@name <yellow>Gorro anti nox
@lore <gold>180

// Pechera anti nox
craft
iron_ingot + blaze_rod + iron_ingot
iron_ingot + iron_ingot + iron_ingot
iron_ingot + iron_ingot + iron_ingot
= iron_chestplate
@name <yellow>Pechera anti nox
@lore <gold>180

// Pantalones anti nox
craft
iron_ingot + iron_ingot + iron_ingot
iron_ingot + blaze_rod + iron_ingot
iron_ingot + blaze_rod + iron_ingot
= iron_leggings
@name <yellow>Pantalones anti nox
@lore <gold>180

// Botas anti nox
craft
blaze_rod + air + blaze_rod
iron_ingot + air + iron_ingot
iron_ingot + air + iron_ingot
= iron_boots
@name <yellow>Botas anti nox
@lore <gold>180

But it does not work :emoji_frowning:
 
Last edited:
Send us your errors, we will solve them asap

Found stupid thing in your skript that you don´t need. Just to tell you out, lul


code_language.skript:
every 5 seconds in world "dangoria":
    loop all players:
        loop-player is in world "dangoria":

2times same thing.

Thanks!!
:emoji_slight_smile:
 
Then tell what part doesnt work...

I have created this image so that it is better understood:

3e0a9a05e0e8807b51d8e6e1dd2754de.jpg


Send us your errors, we will solve them asap

Found stupid thing in your skript that you don´t need. Just to tell you out, lul


code_language.skript:
every 5 seconds in world "dangoria":
    loop all players:
        loop-player is in world "dangoria":

2times same thing.

Thanks!!
:emoji_slight_smile:

What a silly mistake :emoji_blush:, thanks for warning.
[doublepost=1522454189,1522332069][/doublepost]Any idea? :emoji_blush:
[doublepost=1522701249][/doublepost]@Revelationage

Do you have any idea?
 
Status
Not open for further replies.