Modify a line of a lore based on what it contains

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

Hivane

Member
Jul 1, 2021
1
0
1
Hi, so what I'm trying to do is to add in the lore the statistics of the weapon (Attack Damage and Attack Speed), and I want to make so that the attack damage value, for example, updates itself when a sharpness enchantment gets added, or when the sharpness level increases.

Therefore what I have been trying to do in this scenario, is to replace the previous line containing "Attack Damage" with the new one that contains the actual amount of damage that the weapon can now deal.

Here is what I have been trying to do:
https://pastebin.com/yeAdJQSN

What I noticed is that even if the variable known as {_checkDamage} contains a number, when I do "set line {_checkDamage} of lore of player's tool to... " it won't change that specific line

Could you give me any advise on how I should get this done?
 

Attachments

  • 2021-07-01_23.42.37.png
    2021-07-01_23.42.37.png
    297.4 KB · Views: 197
Status
Not open for further replies.