Loop item name, not index or anything

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

Rettox

Member
Feb 21, 2017
21
2
0
24
Hello guys i need to get current item name from loop...
Like
loop index: 1
Loop item name: Rettox ---> {_name}
Loop value: 5 ---> {_kills}

-> send "Name %{_name}% | Kills %{_kills}%

I can't make my clan top list without that.
Thanks!
 
Code:
        arg 1 is "list":
            loop {klan.list::*}:
                add 1 to {_size}
                if {_low.to.high.list::%loop-value%} is not set:
                    set {_low.to.high.list::%loop-value%} to loop-index
                else:
                    set {_n} to 0
                    loop {_size} times:
                        set {_n} to {_n}+1
                        {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                        set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                        stop loop
                wait 1 tick
                set {_n} to size of {_low.to.high.list::*}
                loop {_low.to.high.list::*}:
                    set {_high.to.low.list::%{_n}%} to loop-value-1
                    set {_n} to {_n}-1
                wait 1 tick
                set {_i} to 0

            send "&7&m-----------&8< &6Top10 Klanu &8>&7&m-----------"
            set {_topnumber} to 0
            loop {_high.to.low.list::*}:
                add 1 to {_topnumber}
                set {_player} to "%loop-variable%"
                set {_kills} to {klan.%loop-variable%.coiny}
                if {_%loop-value%} is not set:
                    send "&7%{_topnumber}% - &c%{_player}% &8» &7%{_kills}% Coins"
                    set {_%loop-value%} to true
                    add 1 to {_i}
                if {_topnumber} > 9: #this is top 10 you can change it
                    set {_loopt} to true
                    exit loop
                send "&7&m------------------------------"


[doublepost=1490425039,1490424894][/doublepost]If loop-value is clan name it works of course but. i have this:
klan.list::UNS
klan.list::UNS Value -> 6 coins

SO I NEED TO GET THAT "UNS" FROM LOOP. JUST TO DISPLAY CURRENT ITEM USED IN LOOP...
[doublepost=1490609488][/doublepost]bump
 
Status
Not open for further replies.