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.

Armor lore not registering

Discussion in 'Skript' started by WiebeHero, Feb 17, 2018.

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

    WiebeHero Active Member

    Joined:
    Aug 23, 2017
    Messages:
    135
    Likes Received:
    5
    Hello everyone WiebeHero here! So i have been working with tools and nbt and lore a lot and i wanted to try it out with armor! But sadly it didnt work out really, the thing is it loads no errors but it doesnt update the lore or do anything with it.
    What it is supposed to do is if you get above 0 damage damaged it is suposed to count 2 up {_o} but it doesnt do that. Here is the code:
    Code (Text):
    1.  
    2. on damage:
    3.     victim is a player
    4.     victim's item is golden helmet
    5.     name of victim's helmet contains "&7Divine Helmet "
    6.     lore of victim's helmet contains "&7Rarity: Common"
    7.     lore of victim's helmet contains "&7Upgrade Progress: "
    8.     set {_I::*} to lore of victim's helmet split at "||"
    9.     loop {_I::*}:
    10.         if "%loop-value%" contains "&7Upgrade Progress: ":
    11.             set {_t} to loop-index parsed as integer
    12.             stop loop
    13.     set {_I} to "%uncolored {_I::%{_t}%}%"
    14.     replace every "Upgrade Progress: " with "" in {_I}
    15.     replace every " " with "" in {_I}
    16.     set {_A::*} to {_I} split at "/"
    17.     set {_O} to {_A::1} parsed as number
    18.     set {_P} to {_A::2} parsed as number
    19.     if damage is more than 0:
    20.         add 2 to {_o}
    21.     if {_o} is more than or equal to {_p}:
    22.         send "&aYoure armor just &eEvolved!"
    23.         if {_p} is 500:
    24.             give victim unbreakable golden helmet with nbt "{AttributeModifiers:[{AttributeName:""generic.armor"",Name:""armor"",Amount:0.50,Operation:0,Slot:""head"",UUIDLeast:1,UUIDMost:1}]}" named "&7Divine Helmet [Lv 1]" with lore "&7---------------------||&7Armor Defense: 0.50||&7---------------------||&7Upgrade Progress: 0 / 1000||&7Rarity: Common"
    25.            
    26.        
    27. command /DivineHelmet1:
    28.     trigger:
    29.         give player unbreakable golden helmet with nbt "{AttributeModifiers:[{AttributeName:""generic.armor"",Name:""armor"",Amount:0.40,Operation:0,Slot:""head"",UUIDLeast:1,UUIDMost:1}]}" named "&7Divine Helmet [Lv 1]" with lore "&7---------------------||&7Armor Defense: 0.50||&7---------------------||&7Upgrade Progress: 0 / 500||&7Rarity: Common"
    --- Double Post Merged, Feb 18, 2018, Original Post Date: Feb 17, 2018 ---
    Please guys! Help me with this if it helps. It DOES work when i change ''Victim'' to "Attacker" and change the helmet and item to held item then it does work but only when you attack with the helmet....
     
  2. it_twit

    it_twit Member

    Joined:
    Jan 26, 2017
    Messages:
    37
    Likes Received:
    3
    Medals:
    It doesn't look like you're ever actually updating the lore of the item to the latest progress of it
     
Thread Status:
Not open for further replies.

Share This Page

Loading...