leaderboard

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

Ter2FIc

Member
Dec 30, 2020
20
0
1
25
Code:
on death of player:
    add 1 to {honor::%attacker%}
    message "&fYou got &41 &3honor &fby killing %victim%!" to attacker
    remove 10 from {honor::%victim%}
    message "&fYou lost &410 &3honor &f because you were killed by %attacker%." to victim

command /viewpoint:
    trigger:
        send "You have total &3%{honor::%player%}% &fhonor."


command /tophonor:
    trigger:
        loop {honor::*}:
            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
            set {_n} to {_n}-1
        wait 1 tick
        set {_i} to 0
        send "&7&m-----------&8< &6Top10 &8>&7&m-----------"
        loop {_high.to.low.list::*}:
            add 1 to {_topnumber}
            set {_player} to "%loop-value%" parsed as offlineplayer
            send "&7%{_topnumber}% - &c%{_player}% &8» &7%{honor::%loop-value%}% Honors"
            add 1 to {_i}
            if {_topnumber} > 10:
                stop
        send "&7&m------------------------------"

So I wrote those codes to display the player with the most honor in-text :emoji_grinning:
But I wanted to display it on the leaderboard with a placeholder.
But I don't know how. :emoji_frowning:
What variables should I write for the placeholder?
%skript_?%
 
Yeah I know I need to use skript in placeholder. But I am asking what variable name I need to use.
 
so should I use %skript_low.to.high.list::{loop-value}% or what. I don't know what variable.
 
Status
Not open for further replies.