Lore issue with skript 3.5

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

BenzyMATE

New Member
Feb 8, 2019
8
0
0
24
Anyway i could do this with the latest version of skript

Replace all "autosmelt" with "autosmelt||test" in lore of player's tool

Because in the new versions of skript i have to do "example", "example", "example" and "example"

What i want to do is add a new line when i replace it
 
Anyway i could do this with the latest version of skript

Replace all "autosmelt" with "autosmelt||test" in lore of player's tool

Because in the new versions of skript i have to do "example", "example", "example" and "example"

What i want to do is add a new line when i replace it
Install SkQuery. It has the new line feature "||"
 
Anyway i could do this with the latest version of skript

Replace all "autosmelt" with "autosmelt||test" in lore of player's tool

Because in the new versions of skript i have to do "example", "example", "example" and "example"

What i want to do is add a new line when i replace it
First of all, Skript 3.5 isnt a thing.... 2.3.5 is.
Second, the double bar "||" was never part of Skript, that is part of SkQuery
Lastly, Lime removed that in SkQuery 3.6.2 since lores were properly added in Skript
 
First of all, Skript 3.5 isnt a thing.... 2.3.5 is.
Second, the double bar "||" was never part of Skript, that is part of SkQuery
Lastly, Lime removed that in SkQuery 3.6.2 since lores were properly added in Skript
Obviously i knew || is with skquery. I tried downgrading the skquery version to work with skript 2.3.5 but it intefears with skript "With lore" and gives loads of errors. Obviously you knew what i meant tho when i said 3.5 you didn't have to call it out. But instead of calling all these things i did "Wrong" in the forum post which i already knew about. You could have answer the question lmao.
 
Code:
set {_checkvalue} to "autosmelt"
set {_replacevalue} to "autosmelt||test"

set {_l::*} to lore of player's tool
loop {_l::*}:
    set {_l} to loop-value
    if {_l} contains {_checkvalue}:
        replace every {_checkvalue} in {_l} with {_replacevalue}
        set {_l3::*} to split {_l} at "||"
        add {_l3::*} to {_l2::*}
    else:
        add {_l} to {_l2::*}
set lore of tool of player to {_l2::*}
Be nice to people here they are just trying to help
 
Last edited:
  • Like
Reactions: BenzyMATE
Or you could have replaced every || with [ " and "] (brackets not included) with notepad lol
 
Code:
set {_checkvalue} to "autosmelt"
set {_replacevalue} to "autosmelt||test"

set {_l::*} to lore of player's tool
loop {_l::*}:
    set {_l} to loop-value
    if {_l} contains {_checkvalue}:
        replace every {_checkvalue} in {_l} with {_replacevalue}
        set {_l3::*} to split {_l} at "||"
        add {_l3::*} to {_l2::*}
    else:
        add {_l} to {_l2::*}
set lore of tool of player to {_l2::*}
Be nice to people here there are just trying to help
Apologies for my behaviour something happened, I blamed it on the people trying to help me out which i shouldn't have done. Thank you for the help.
 
Status
Not open for further replies.