#Is there way to skript a kills leaderboard with decentholograms?
1 messages · Page 1 of 1 (latest)
save your kills (or use skbee to get the statistic) and then slap it into some holograms
Could you help me?
well, do you have any code at all?
No not yet,
only thing i got rn lol
i have like no clue how to code a leaderboard
looks like you arent even keeping track of kills yet
yeah. i dont know how tbh
since you only have 1 script, im assuming youre pretty new to skript and can use some tutorials
https://x8ight.gitbook.io/syntask/resources
command /killset <offlineplayer>:
trigger:
add 1 to {kills::%arg-1%}
command /resetleaderboard:
trigger:
set {_sorted::} to sort((indices of {kills::}, {kills::*}))
loop 10 times:
set {_leaderboardset} to loop-number + 3
set {_player} to {_sorted::%loop-value%}
set {_P} to {_sorted::%loop-value%} parsed as offlineplayer
set {_v} to {kills::%{_player}%}
set {_l} to "&a&l##%loop-number% &f%{_P}%&7 - &a%{_v}% Kill(s)"
if {_v} is set:
execute console command "dh l set VarTest 1 %{_leaderboardset}% %{_l}%"
else:
execute console command "dh l set VarTest 1 %{_leaderboardset}% &a&l##%loop-number% &fNobody&7 - &a0 Kill(s)"
command /killreset:
trigger:
delete {kills::*}
on death:
if attacker is a player:
add 1 to {kills::%attacker's uuid%}
every 1 minute:
#broadcast "&f[All leaderboards have been reset]"
set {_sorted::} to sort((indices of {kills::}, {kills::*}))
loop 10 times:
set {_leaderboardset} to loop-number + 3
set {_player} to {_sorted::%loop-value%}
set {_P} to {_sorted::%loop-value%} parsed as offlineplayer
set {_v} to {kills::%{_player}%}
set {_l} to "&a&l##%loop-number% &f%{_P}%&7 - &a%{_v}% Kill(s)"
if {_v} is set:
execute console command "dh l set VarTest 1 %{_leaderboardset}% %{_l}%"
else:
execute console command "dh l set VarTest 1 %{_leaderboardset}% &a&l##%loop-number% &fNobody&7 - &a0 Kill(s)"
would this be the script to do so?
and if so, how do i make the leaderboard now
- code blocks
- you're missing the
sort()function - Use UUIDs in variables
seems like that code is using console commands to manually edit an existing holo, so create one
After i do that. then what? it just goes to that one i create automatically?
command /killreset:
trigger:
delete {kills::*}
on death:
if attacker is a player:
add 1 to {kills::%attacker's uuid%}
every 1 minute:
#broadcast "&f[All leaderboards have been reset]"
set {_sorted::} to sort((indices of {kills::}, {kills::*}))
loop 10 times:
set {_leaderboardset} to loop-number + 3
set {_player} to {_sorted::%loop-value%}
set {_P} to {_sorted::%loop-value%} parsed as offlineplayer
set {_v} to {kills::%{_player}%}
set {_l} to "&a&l##%loop-number% &f%{_P}%&7 - &a%{_v}% Kill(s)"
if {_v} is set:
execute console command "dh l set VarTest 1 %{_leaderboardset}% %{_l}%"
else:
execute console command "dh l set VarTest 1 %{_leaderboardset}% &a&l##%loop-number% &fNobody&7 - &a0 Kill(s)"
function sort(indices: strings, values: numbers, descending: boolean = true) :: strings:
loop {_indices::}:
set {_sort::%{_values::%loop-index%}%.%loop-index%} to loop-value
return (reversed {_sort::}) if {_descending} is true, else {_sort::*}
(this is the rest of that code)
what would the command to make the hologram look like?
@pseudo nymph
you should use ajlb
but if you need to use skript i can send a old one i had from a while ago
i have a jib. i just cant find a tut on how to make a good leaderboard
that would be amazing
search it up on google
wait actually i might not
it’s so much more optimized than skript
cant find it
i’ll send tmr not on just ping me in like 12h
alright
dude thats a decent holograms question
probably examples and syntax on the bukkit page or something
@tired belfry
ty