Test if player's item's lore contains (need help)

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

timeis

Member
May 19, 2021
27
1
3
Is there a way to test if player's tool's lore contains a certain word like "damage: x"

x would be any number

is there a way to do this without having to hardcode every number
 
Could you put set {_lore} to lore of player's tool into somewhere and send me the output? Because the only way of doing this is by using replace and split, I believe.

But if the lore is only "damage: 21" you can just use:
Code:
set {_lore} to "%lore of player's tool%"
replace all "damage: " with "" in {_lore}
set {_damage} to {_lore} parsed as an integer
 
Status
Not open for further replies.