1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Skript' started by Rina Tennoji, Jan 12, 2019.

Thread Status:
Not open for further replies.
  1. R

    Rina Tennoji Member

    Joined:
    Jan 12, 2019
    Messages:
    5
    Likes Received:
    0
    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 (Skript):
    1. every second:
    2.     loop all players:
    3.         if lore of loop-player's held item contains "&7Haste 1":
    4.             make console execute command "/effect %loop-player% minecraft:haste 3 1"
    5.         else if lore of loop-player's held item contains "&7Haste 2":
    6.             make console execute command "/effect %loop-player% minecraft:haste 3 2"
    7.         else if lore of loop-player's held item contains "&7Haste 3":
    8.             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.

     
  2. Best Answer:
    Post #3 by ShaneBee, Jan 13, 2019
  3. SpinKnight

    Supporter

    Joined:
    May 24, 2017
    Messages:
    30
    Likes Received:
    0
    It works completely fine for me. No errors.
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,683
    Likes Received:
    118
    i think its due to lists being done for lore in 2.3
    try this
    Code (Skript):
    1. if "%lore of loop-player's%" held item contains "&7Haste 1":
     
Thread Status:
Not open for further replies.
Loading...