Solved "if lore of player's held item contains" doesn't execute the following code

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

    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.

Rina Tennoji

New Member
Jan 12, 2019
5
0
0
20
So, I am trying to make some custom enchants and I ran into a problem, there is no errors in console, it just doesn't work. I have tried many different things to get it to work but nothing works.

Code:

code_language.skript:
every second:
    loop all players:
        if lore of loop-player's held item contains "&7Haste 1":
            make console execute command "/effect %loop-player% minecraft:haste 3 1"
        else if lore of loop-player's held item contains "&7Haste 2":
            make console execute command "/effect %loop-player% minecraft:haste 3 2"
        else if lore of loop-player's held item contains "&7Haste 3":
            make console execute command "/effect %loop-player% minecraft:haste 3 3"

I also have something similar for an "Explosive" enchant, this used to work before I had more than 1 line of lore, but now it does not.
The pickaxe has the lore of all the other enchants on it such as "Haste 1" and on the next line "Explosive 3" for example. It also has some normal vanilla enchants such as Efficiency and Fortune.
 
i think its due to lists being done for lore in 2.3
try this
code_language.skript:
if "%lore of loop-player's%" held item contains "&7Haste 1":
 
Status
Not open for further replies.