How can I add name and lore on a item?

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

    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.

dantegamer79

Member
Apr 12, 2020
18
0
1
Hi, I recently created an Item but when you add the Name and Description of the Item and if you use it and consume it (enough to destroy it) it no longer works, I have to make sure that if you add the name and the description of the item functions, even from Unbreakable, is there a way?
Code:
on damage:
    if attacker is a player:
        if attacker's tool is an golden sword named "&dRARE! &9PyramidSword" with lore "&7Every &efourth &7strike strikes" and "your enemy with &elightning &7for" and "&c2❤️ &7true damage":
            if {hits::%uuid of victim%} is equal to 5:
                execute console command "/smite %victim%"
                set {hits::%uuid of victim%} to 0
            add 1 to {hits::%uuid of victim%}
           
           
command /perun:
    trigger:
        player has permission "perun.permission":
            give player a golden sword named "&dRARE! &9PyramidSword" with lore "&7Every &efourth &7strike strikes" and "your enemy with &elightning &7for" and "&c2❤️ &7true damage"
 
if you want it in a specific slot:
format slot (slot - 0 to 8) of player's inventory with a golden sword named "Name" with lore "Lore" and "Lore 2"
 
Hi, I recently created an Item but when you add the Name and Description of the Item and if you use it and consume it (enough to destroy it) it no longer works, I have to make sure that if you add the name and the description of the item functions, even from Unbreakable, is there a way?
Code:
on damage:
    if attacker is a player:
        if attacker's tool is an golden sword named "&dRARE! &9PyramidSword" with lore "&7Every &efourth &7strike strikes" and "your enemy with &elightning &7for" and "&c2❤️ &7true damage":
            if {hits::%uuid of victim%} is equal to 5:
                execute console command "/smite %victim%"
                set {hits::%uuid of victim%} to 0
            add 1 to {hits::%uuid of victim%}
       
       
command /perun:
    trigger:
        player has permission "perun.permission":
            give player a golden sword named "&dRARE! &9PyramidSword" with lore "&7Every &efourth &7strike strikes" and "your enemy with &elightning &7for" and "&c2❤️ &7true damage"
Try:
code_language.skript:
command /perun:
    trigger:
        player has permission "perun.use":
            set {_golden.sword} to "&dRARE! &9PyramidSword"
            set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
            set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
            set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
            give 1 of {_golden.sword} to player
on damage:
    if attacker is a player
        if victim is a player:
           set {_golden.sword} to "&dRARE! &9PyramidSword"
           set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
           set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
           set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
           if attacker's tool is {_golden.sword}:
               if {hits::%uuid of victim%} = 5:
                   console command "/smite %victim%"
                   set {hits::%uuid of victim%} to 0
               add 1 to {hits::%uuid of victim%}
 
Try:
code_language.skript:
command /perun:
    trigger:
        player has permission "perun.use":
            set {_golden.sword} to "&dRARE! &9PyramidSword"
            set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
            set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
            set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
            give 1 of {_golden.sword} to player
on damage:
    if attacker is a player
        if victim is a player:
           set {_golden.sword} to "&dRARE! &9PyramidSword"
           set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
           set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
           set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
           if attacker's tool is {_golden.sword}:
               if {hits::%uuid of victim%} = 5:
                   console command "/smite %victim%"
                   set {hits::%uuid of victim%} to 0
               add 1 to {hits::%uuid of victim%}
Okay, I will try it, thank u!!! Do u have Discord?
[doublepost=1594211074,1594210737][/doublepost]
Try:
code_language.skript:
command /perun:
    trigger:
        player has permission "perun.use":
            set {_golden.sword} to "&dRARE! &9PyramidSword"
            set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
            set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
            set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
            give 1 of {_golden.sword} to player
on damage:
    if attacker is a player
        if victim is a player:
           set {_golden.sword} to "&dRARE! &9PyramidSword"
           set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
           set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
           set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
           if attacker's tool is {_golden.sword}:
               if {hits::%uuid of victim%} = 5:
                   console command "/smite %victim%"
                   set {hits::%uuid of victim%} to 0
               add 1 to {hits::%uuid of victim%}
 

Attachments

  • 2020-07-08_14.23.45.png
    2020-07-08_14.23.45.png
    138.9 KB · Views: 285
  • 2020-07-08_14.23.52.png
    2020-07-08_14.23.52.png
    137.9 KB · Views: 291
Okay, I will try it, thank u!!! Do u have Discord?
[doublepost=1594211074,1594210737][/doublepost]
Oh, my bad. I forgot to add a ':' in the first condition of on damage event.
code_language.skript:
command /perun:
    trigger:
        player has permission "perun.use":
            set {_golden.sword} to "&dRARE! &9PyramidSword"
            set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
            set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
            set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
            give 1 of {_golden.sword} to player
on damage:
    if attacker is a player:
        if victim is a player:
           set {_golden.sword} to "&dRARE! &9PyramidSword"
           set line 1 of lore of {_golden.sword} to "&7Every &efourth &7strike strikes"
           set line 2 of lore of {_golden.sword} to "&7your enemy with &elightning &7for"
           set line 3 of lore of {_golden.sword} to "&c2❤️ &7true damage"
           if attacker's tool is {_golden.sword}:
               if {hits::%uuid of victim%} = 5:
                   console command "/smite %victim%"
                   set {hits::%uuid of victim%} to 0
               add 1 to {hits::%uuid of victim%}
[doublepost=1594248031][/doublepost]And my discord is written at the end of my signature.
upload_2020-7-8_18-40-46.png
 
Status
Not open for further replies.