Solved Refreshing lore of item on event On break:

  • 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.

AvantyCZ

Member
Jul 10, 2017
15
0
1
24
Hello, is there anyone who can me help with Lore refreshing of item on event on break: ?
My problem is: I want to refresh lore every, if player break a block, bcs i have integer variables in that lore.
On skript reload is anything OK, but it doesn't work.

Server version: 1.18.1
Addons: Using only skript, without addons.

Code:

Code:
on break:
    if player's name is "AvantyCZ":
        if player's tool is any pickaxe named "{@ttkrump}" with lore "{@ttkrumplore}" and " " and "&f- &7XP: &c%{tt.krump.xp.%player%}%&f/&c%{tt.krump.xpmax.%player%}%" and "&f- &7Level: &b%{tt.krump.%player%}%" and " " and "{@ttkrumplore}":
            if {tt.krump.xp.%player%} is less than {tt.krump.xpmax.%player%}:
                add 1 to {tt.krump.xp.%player%}
                set the 3rd line of the item's lore to "&f- &7XP: &c%{tt.krump.xp.%player%}%&f/&c%{tt.krump.xpmax.%player%}%"
                set the 4st line of the item's lore to "&f- &7Level: &b%{tt.krump.%player%}%"
            else:

SOLUTION:
I change variables into action bar. So it works good.
 
Last edited:
Status
Not open for further replies.