Solved Set lore of all of an 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 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.

GlacialDew

Member
Apr 8, 2018
40
3
8
Norrland
So I'm trying to figure out a way to set the lore of
all iron swords that dont have lore.

So if a player crafts one, finds one in a chest, gets one off a mob, or through a shop
it will always have the set lore.

I have no idea of how to do this and would like some help getting started.​
 
It has not tested this:
Code:
variables:
    {loressword::*} = "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", " " and "z"

options:
    Text: This is the new lore! #The tool's lore

on inventory click:
    wait 1 tick
    loop all items in player's inventory:
        if loop-item is a iron sword:
            loop {loresword::*}:
                if lore of tool of player does contain "%loop-value%":
                    stop
                set lore of tool of player to "{@Text}"
[doublepost=1557379295,1557326227][/doublepost]Han you add the same code to this event?
[QUOTE="Marsbar,
Code:
variables:
    {loressword::*} = "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", " " and "z"

options:
    Text: This is the new lore! #The tool's lore

on pickup:
    wait 1 tick
    loop all items in player's inventory:
        if loop-item is a iron sword:
            loop {loresword::*}:
                if lore of tool of player does contain "%loop-value%":
                    stop
                set lore of tool of player to "{@Text}"
[/QUOTE]

On pickup:
[doublepost=1557379397][/doublepost]I Hate autocorrect from mobile
But add the two events
 
Status
Not open for further replies.