Solved Lore deleting all other lores

  • 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.
Hahahaha oh my gosh. Im very very sorry to bother you x2 now xD. But something very very weird is happening. When i add a lore, Earthquake and then a lore Explosive. I click Earthquake again and it replaces Explosive with Earthquake. Here is a video of it happening.

https://gyazo.com/a1ed1164b422da0c977787dda3184ca1

Both of the commands im using.

Code:
command /tntexpick:
    trigger:
        if {explosive::buy::%player%} >= 50:
            set {explosive::buy::%player%} to 50
            send "&c(&4!&c) &7You are at the max level!"
        else if player's balance >= 100000000:
            add 1 to {explosive::buy::%player%}
            remove 100000000 from player's balance
            set {_l::*} to split lore of tool at "||"
            loop {_l::*}:
                set {_l2::*} to uncolored loop-value parsed as "Explosive %integer%"
                {_l2::*} is set
                set {_l::%loop-index%} to "&cExplosive %{explosive::buy::%player%}%"
            set lore of tool to join {_l::*} with "||"
            if {_l2::*} is not set:
                set lore of tool to "%lore of tool%||&cExplosive %{explosive::buy::%player%}%"
            enchanter(player)
        else:
            send "&c(&4!&c) &7Sorry, but you don't have enough money!"
command /earthexpick:
    trigger:
        if {earthquake::buy::%player%} >= 50:
            set {earthquake::buy::%player%} to 50
            send "&c(&4!&c) &7You are at the max level!"
        else if player's balance >= 100000000:
            add 1 to {earthquake::buy::%player%}
            remove 100000000 from player's balance
            set {_l::*} to split lore of tool at "||"
            loop {_l::*}:
                set {_l2::*} to uncolored loop-value parsed as "Earthquake %integer%"
                {_l2::*} is set
                set {_l::%loop-index%} to "&eEarthquake %{earthquake::buy::%player%}%"
            set lore of tool to join {_l::*} with "||"
            if {_l2::*} is not set:
                set lore of tool to "%lore of tool%||&eEarthquake %{earthquake::buy::%player%}%"
            enchanter(player)
        else:
            send "&c(&4!&c) &7Sorry, but you don't have enough money!"
 
Sorry, I forgot about that:
Code:
command /tntexpick:
    trigger:
        if {explosive::buy::%player%} >= 50:
            set {explosive::buy::%player%} to 50
            send "&c(&4!&c) &7You are at the max level!"
        else if player's balance >= 100000000:
            add 1 to {explosive::buy::%player%}
            remove 100000000 from player's balance
            set {_l::*} to split lore of tool at "||"
            loop {_l::*}:
                set {_l2::*} to uncolored loop-value parsed as "Explosive %integer%"
                {_l2::*} is set
                set {_l::%loop-index%} to "&cExplosive %{explosive::buy::%player%}%"
                exit loop
            set lore of tool to join {_l::*} with "||"
            if {_l2::*} is not set:
                set lore of tool to "%lore of tool%||&cExplosive %{explosive::buy::%player%}%"
            enchanter(player)
        else:
            send "&c(&4!&c) &7Sorry, but you don't have enough money!"
command /earthexpick:
    trigger:
        if {earthquake::buy::%player%} >= 50:
            set {earthquake::buy::%player%} to 50
            send "&c(&4!&c) &7You are at the max level!"
        else if player's balance >= 100000000:
            add 1 to {earthquake::buy::%player%}
            remove 100000000 from player's balance
            set {_l::*} to split lore of tool at "||"
            loop {_l::*}:
                set {_l2::*} to uncolored loop-value parsed as "Earthquake %integer%"
                {_l2::*} is set
                set {_l::%loop-index%} to "&eEarthquake %{earthquake::buy::%player%}%"
                exit loop
            set lore of tool to join {_l::*} with "||"
            if {_l2::*} is not set:
                set lore of tool to "%lore of tool%||&eEarthquake %{earthquake::buy::%player%}%"
            enchanter(player)
        else:
            send "&c(&4!&c) &7Sorry, but you don't have enough money!"
 
Sorry, I forgot about that:
Code:
command /tntexpick:
    trigger:
        if {explosive::buy::%player%} >= 50:
            set {explosive::buy::%player%} to 50
            send "&c(&4!&c) &7You are at the max level!"
        else if player's balance >= 100000000:
            add 1 to {explosive::buy::%player%}
            remove 100000000 from player's balance
            set {_l::*} to split lore of tool at "||"
            loop {_l::*}:
                set {_l2::*} to uncolored loop-value parsed as "Explosive %integer%"
                {_l2::*} is set
                set {_l::%loop-index%} to "&cExplosive %{explosive::buy::%player%}%"
                exit loop
            set lore of tool to join {_l::*} with "||"
            if {_l2::*} is not set:
                set lore of tool to "%lore of tool%||&cExplosive %{explosive::buy::%player%}%"
            enchanter(player)
        else:
            send "&c(&4!&c) &7Sorry, but you don't have enough money!"
command /earthexpick:
    trigger:
        if {earthquake::buy::%player%} >= 50:
            set {earthquake::buy::%player%} to 50
            send "&c(&4!&c) &7You are at the max level!"
        else if player's balance >= 100000000:
            add 1 to {earthquake::buy::%player%}
            remove 100000000 from player's balance
            set {_l::*} to split lore of tool at "||"
            loop {_l::*}:
                set {_l2::*} to uncolored loop-value parsed as "Earthquake %integer%"
                {_l2::*} is set
                set {_l::%loop-index%} to "&eEarthquake %{earthquake::buy::%player%}%"
                exit loop
            set lore of tool to join {_l::*} with "||"
            if {_l2::*} is not set:
                set lore of tool to "%lore of tool%||&eEarthquake %{earthquake::buy::%player%}%"
            enchanter(player)
        else:
            send "&c(&4!&c) &7Sorry, but you don't have enough money!"
Not a problem lol. Thank you! :emoji_slight_smile:
 
Status
Not open for further replies.