#Is there way to skript a kills leaderboard with decentholograms?

1 messages · Page 1 of 1 (latest)

frigid sail
#

yes there is

#

save your kills (or use skbee to get the statistic) and then slap it into some holograms

pseudo nymph
#

Could you help me?

frigid sail
#

well, do you have any code at all?

pseudo nymph
#

No not yet,

#

only thing i got rn lol

#

i have like no clue how to code a leaderboard

frigid sail
#

looks like you arent even keeping track of kills yet

pseudo nymph
#

yeah. i dont know how tbh

frigid sail
pseudo nymph
#

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

frigid sail
#
  1. code blocks
  2. you're missing the sort() function
  3. Use UUIDs in variables
frigid sail
pseudo nymph
#

After i do that. then what? it just goes to that one i create automatically?

pseudo nymph
# pseudo nymph command /killset <offlineplayer>: trigger: add 1 to {kills::%arg-1%}...

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?

tired belfry
#

@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

pseudo nymph
#

i have a jib. i just cant find a tut on how to make a good leaderboard

tired belfry
pseudo nymph
#

wait actually i might not

tired belfry
#

it’s so much more optimized than skript

pseudo nymph
#

i may be slow

#

whats it called like exactly?

pseudo nymph
tired belfry
pseudo nymph
#

alright

frigid sail
#

probably examples and syntax on the bukkit page or something

pseudo nymph
#

i tihnk

pseudo nymph
#

@tired belfry

tired belfry
#

just search it up

#

ajlb leaderboard placehodlers

pseudo nymph
#

ty