Lore changing

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

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Hello, im making a custom enchantment script, and im having a small issue. Im setting the lore to the players tool, with the correct custom enchantment "Explosive". But the issue im having is, how can I add multiple levels to the lore of the players tool? So like: Explosive 1, Explosive 2 ect. But it will delete the old explosive lore and add the new lore, explosive 2. I kinda have a thing going now, but im very stumped right now and don't know how to finish this. Ive redone this whole thing a hand full of times, and I really need answers.

Thanks!

code_language.skript:
variables:
    {explosive::buy::%player%} = 0
command /tntexpick:
    trigger:
        if {ringss::%player%} is more than or equal to 500:
            remove 500 from {ringss::%player%}
            add 1 to {explosion::buy::%player%}
            execute player command "/enchant"
            if {explosion::buy::%player%} = 5:
                send "&c(&4!&c) &7Your explosive is max level!"
        else:
            send "&c(&4!&c) &7You dont have enough rings!"
        if lore of player's held item contains colored "&cExplosive":
            set {_lore::*} to lore of player's held item
            set {_size} to size of {_lore::*} + 1
            set {_lore::%{_size}%} to "&cExplosive %{explosive::buy::%player%}%"
            set lore of player's held item to join {_lore::*} with "||"
        else:
            set {_lore::*} to lore of player's held item
            set {_size} to size of {_lore::*} + 1
            set {_lore::%{_size}%} to "&cExplosive"
            set lore of player's held item to join {_lore::*} with "||"
            add 1 to {explosive::buy::%player%}
 
Try deleting the item you want to upgrade explosive on,
and then giving it in the same slot of the player with the upgrade in the old state.
 
Status
Not open for further replies.