want to loop lore item

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

jomjonejame

Member
Jan 26, 2017
54
1
8
29
script is now of me, but is not work

code_language.skript:
sub "Buff":
    set {_p} to "%parameter-1%" parsed as player
    set {_lore::*} to lore of {_p}'s tool split at "||"
    loop {_lore::*}:
        set {_buff::*} to uncolored loop-value parsed as "Buff %string%"
        if {_buff::*} is set:
            send "%{_buff::*}%" to {_p}


2560-11-23_09.12.24.png


lore at under buff is error same buff
2560-11-23_09.12.16.png


and i want to keep value is
1. name of buff ( Movement , Jump ) {_buffName}
2. level of buff ( I, II , III , IV , V ) {_buffLevel}
 
Last edited:
i don't know a lot about "parsed" string and "Sub". so i did in my way. this works:

code_language.skript:
command /testa:
    trigger:
        set {_lore::*} to lore of player's tool split at "||"
        loop {_lore::*}:
            set {_buff::*} to loop-value split at " "
            {_buff::1} is "Buff"
            send "%{_Buff::2}% - %{_Buff::3}%"

upload_2017-11-30_3-2-48.png