Solved Lore of player's held 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.

Mattllama987

Supporter
Aug 5, 2018
225
7
18
Hello, im making custom enchantments and seem to be having a little issue. I updated skript to 2.4, and now i cant check the lore of a player;s held item. I tried "If lore of player's held item contains "&cExplosive":" but it wont read it. Ive tried many many different things, and cant get it to work. It will work if i chose the exact line of the lore i want. "if line 1 of lore of player's held item contains "&cExplosive":" that works. But i need a way to check all the lore lines. How can i do this with 2.4? I also have this now, and it doesnt work.

Thanks!
~Matt


Code:
on mine:
    set {_lore::*} to lore of tool of player
    if {_lore::*} contains colored "&cExplosive 1":
        send "test" to player

EDIT:
I updated to 2.4.1 and same issue.
 
Last edited:
Code:
on mine:
    if lore of player's tool contains "&cExplosive I":
        send "&cREEEEE"
 
Nope, that didnt work. Im not sure if its because of the other lores i have?
upload_2019-12-25_17-59-41.png

[doublepost=1577318420,1577318387][/doublepost]Those are the enchants on the tool i have now
[doublepost=1577320013][/doublepost]I have solved this issue.

FIX:
Code:
on mine:
    set {_lore::*} to lore of player's tool
    loop {_lore::*}:
        if "%loop-value%" contains "&cExplosive":
 
Status
Not open for further replies.