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
But I wanted to display it on the leaderboard with a placeholder.
But I don't know how.
What variables should I write for the placeholder?
%skript_?%