check if an item has a lore.

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

LoneElf

Active Member
Apr 30, 2017
165
2
18
How would I check if a player's item has a specific lore? I have tried numerous things, but I couldn't find out how to do it because I want to make a soulbound thing, but can't figure out how. Thanks :emoji_slight_smile:
 
code_language.skript:
the 1st line of the lore of the player's tool is "lore here"
 
if you don't like it. other way:

code_language.skript:
set {_L::*} to lore of player's tool split at "||"
if {_L::1} is "bla": #its 1. Line, if doesn't exist, will output <none> btw
if {_L::1} is not set:
    send "No Lore"
 
Here are some examples, although not sure what addons you need, if you even do. Enjoy! :emoji_grinning:
code_language.skript:
lore of player's held item contains "LORE":
#do shtuff
if lore of event-item contains "LORE":
#do shtuff
lore of attacker's held item contains "LORE":
#do shtuff
 
Thanks! It seamed to work! The only one that worked for me was the: if lore of event-item contains "&aSoulbound". Thanks :emoji_slight_smile:
 
Status
Not open for further replies.