Solved formatting with morkazsk | parsing uuid to player

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

RonskiYT

Member
Jun 12, 2020
2
0
0
22
Hello good people of skunity, So I've been making a server for a while now and I got halted by a issue I came up with my killtop skript.
Code:
# Kill Top Update, No lag my server!
every 30 seconds:
    set {topkillers::*} to sorted {kills::*} from highest to lowest with format "&e%@index parsed as offline player%: &b@value kills"

# Kill Top Command, Made it update every 30 seconds so people won't lag the server out
command /killtop:
    aliases: /kt
    trigger:
        send "&7&m                  {@p}&7&m                  " to player
        send "&b&lKILLS LEADERBOARD!" to player
        send "&7&m" to player
        loop {topkillers::*}:
            add 1 to {_result}
            add 1 to {_number}
            set {_player} to loop-value parsed as player
            send "&3%{_number}% &7- %{topkillers::*}%" to player
            if {_result} is 10:
                stop
        send "&7&m                  {@p}&7&m                  " to player
upload_2020-6-20_6-25-14.png


I wanna parse the uuid into a playername but I've tried for so long, different methods and stuff, and nothing works. Could anyone pottentially have any ideas?
 
code_language.skript:
set {topkillers::*} to sorted {kills::*} from highest to lowest with format "@index^@value"

        set {_place} to 0
        loop {topkillers::*}:
            add 1 to {_place}
            set {_data::*} to split loop-value by "^"
            set {_player} to "%{_data::1}%" parsed as offline player
            set {_kills} to {_data::2}
            send "&3%{_place}% &7- &e%{_player}%: &b%{_kills}% kills" to player
            if {_place} is 10:
                stop 1 loop
Untested.
 
code_language.skript:
set {topkillers::*} to sorted {kills::*} from highest to lowest with format "@index^@value"

        set {_place} to 0
        loop {topkillers::*}:
            add 1 to {_place}
            set {_data::*} to split loop-value by "^"
            set {_player} to "%{_data::1}%" parsed as offline player
            set {_kills} to {_data::2}
            send "&3%{_place}% &7- &e%{_player}%: &b%{_kills}% kills" to player
            if {_place} is 10:
                stop 1 loop
Untested.
Oh, Thanks.
 
Status
Not open for further replies.