1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lore issue with skript 3.5

Discussion in 'Skript' started by BenzyMATE, Feb 14, 2019 at 4:53 AM.

  1. B

    BenzyMATE Member

    Joined:
    Feb 8, 2019
    Messages:
    5
    Likes Received:
    0
    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
     
  2. matvapes

    matvapes Member

    Joined:
    May 15, 2018
    Messages:
    11
    Likes Received:
    0
    Install SkQuery. It has the new line feature "||"
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,614
    Likes Received:
    108
    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
     
  4. B

    BenzyMATE Member

    Joined:
    Feb 8, 2019
    Messages:
    5
    Likes Received:
    0
    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.
     
  5. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    677
    Likes Received:
    48
    Medals:
    Code (Text):
    1. set {_checkvalue} to "autosmelt"
    2. set {_replacevalue} to "autosmelt||test"
    3.  
    4. set {_l::*} to lore of player's tool
    5. loop {_l::*}:
    6.     set {_l} to loop-value
    7.     if {_l} contains {_checkvalue}:
    8.         replace every {_checkvalue} in {_l} with {_replacevalue}
    9.         set {_l3::*} to split {_l} at "||"
    10.         add {_l3::*} to {_l2::*}
    11.     else:
    12.         add {_l} to {_l2::*}
    13. set lore of tool of player to {_l2::*}
    Be nice to people here they are just trying to help
     
    #5 TPGamesNL, Feb 14, 2019 at 4:23 PM
    Last edited: Feb 14, 2019 at 8:55 PM
    • Like Like x 1
  6. Runakai1

    Runakai1 Well-Known Member

    Joined:
    Apr 27, 2018
    Messages:
    245
    Likes Received:
    14
    Or you could have replaced every || with [ " and "] (brackets not included) with notepad lol
     
  7. B

    BenzyMATE Member

    Joined:
    Feb 8, 2019
    Messages:
    5
    Likes Received:
    0
    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.
     
    • Friendly Friendly x 1
Loading...