Lore of 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.

Hartvig

Member
Apr 18, 2017
39
1
0
Skript Version: 2.4
Minecraft Version: 1.12
To check all lore of item

tried this but it doesn't work, i can add smelt as long it isn't on the 1st line of lore
Code:
            if event-item's lore doesn't contain "&eSmelt":
                set {_a} to event-item
                cancel event
                set lore of {_a} to "%lore of {_a}%" and "&eSmelt"
                wait 2 ticks
                set cursor slot of player to air
                set event-slot to {_a}
            else:
                cancel event
                send "&7You already have that enchantment!"
 
Skript Version: 2.4
Minecraft Version: 1.12

To check all lore of item

tried this but it doesn't work, i can add smelt as long it isn't on the 1st line of lore
Code:
            if event-item's lore doesn't contain "&eSmelt":
                set {_a} to event-item
                cancel event
                set lore of {_a} to "%lore of {_a}%" and "&eSmelt"
                wait 2 ticks
                set cursor slot of player to air
                set event-slot to {_a}
            else:
                cancel event
                send "&7You already have that enchantment!"
Can you please clarify what you are trying to here and send the full code?
 
Status
Not open for further replies.