#Baltop Skript
1 messages · Page 1 of 1 (latest)
Do you know how to do heads with skript?
wont let me paste skript?
mostly
Its annoying 😭
Are you using ai?
the loop was just a placeholder for the slots
no
the refresh thing yes
cause I thought you had to do some complex closing and reopening system
so anyone got a idea on how to do it?
I know how to get player heads just not automatically, sorry 😞
Sorted Indices
The sorted indices expression returns a new list of indices sorted by the value of the index. This can be very helpful for making all sorts of leaderboards. Lets say we have the balances of our players saved in the variable {balance::%player's uuid%}. To create our leaderboard we can use
set {_sorted::} to sorted indices of {balance::} in descending order
{_sorted::*} will be a list of uuids with {_sorted::1} being the person with the most money. If we wanted to check how much money they had we could plug the uuid back into the original variable: {balance::%{_sorted::1}%}
Leaderboard Example
trigger:
set {_sorted::*} to sorted indices of {balance::*} in descending order
send "<aqua>Baltop"
loop first 10 elements of {_sorted::*}:
send "<gold>%loop-iteration%. <white>%offlineplayer(loop-value)% <gray>- <green>$%{balance::%loop-value%}%"```
Send any suggestions to
^ can't use skunitys helper here so just copy pasted
from there it isn't hard to get the head
alright ty
can you send me the link to the source though?
if not here send me a dm of it
wdym source code..
you mean the original message by the bot?
any idea on how to get the head of the players??
What is that?
You are looping all offline players, and {_target} is never being set? You need the variable {_list::%uuid of loop-player%} to be the player’s balance, and then {_top::%loop-number%} will be the uuid of the player and you can use the uuid to parse it as a offline player and get the balance