How to check any item 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.

MateoxPL

Active Member
Jan 27, 2018
116
0
16
Hello
How to check lore of all item in player's inventory

i use:
code_language.skript:
every 1 tick:
      loop all items in the inventory of player:
              if lore of loop item contains "LORE":
                     remove loop-item from the player

Skript notify:
There's no world in a periodic event if no world is given in the event (e.g. like 'every hour in "world"') (xchest - dropy.sk, line 245: loop all items in the inventory of player:')
 
code_language.skript:
every 1 tick:
    loop all players:
        loop all items in the inventory of loop-player:
            if lore of loop item contains "LORE":
                remove loop-item from loop-player
 
@DieHollander_ has the correct solution, but note that looping all items in all players' inventories every tick is a bad idea. Not lag friendly at all.
 
Like

code_language.skript:
[event when you need to loop items lore]:
  loop all items in event-player's inventory:
    lore of loop-item contains "LORE"
    remove loop-item from event-player's inventory
 
Status
Not open for further replies.