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!
A ball top using what currency? player's balance?can somebody make a baltop command for me, i'd like it appear before 2/11/2021 (british format) 19:30 GMT+1
i'm using 2.5-beta3 and paperspigot 1.16, skellet, sknbeet, skquery and skript-db
no its like using {###::*} to get the sorted list to the top 10 highest values (biggest to smallest) (including the plr names)A ball top using what currency? player's balance?
i tried one of those but i always get a condition error with 'the size of' something idk, plus im using 2.5-beta3 so yeah thats why lmaoYou know, there are many scripts that already do that, and you just have to change the variable?
no its like using {###::*} to get the sorted list to the top 10 highest values (biggest to smallest) (including the plr names)
function sort(indices: strings, values: numbers, descending: boolean = true) :: strings:
loop {_indices::*}:
set {_whole} to rounded down {_values::%loop-index%}
set {_fraction} to mod({_values::%loop-index%}, 1) * 1E+10
set {_sort::%{_whole}%.%{_fraction}%::%loop-index%} to loop-value
loop indices of {_sort::*}:
loop {_sort::%loop-value%::*}:
add 1 to {_index}
set {_final::%{_index}%} to loop-value-2
return (reversed {_final::*}) if {_descending} is true, else {_final::*}
command /top:
trigger:
set {_sorted::*} to sort((indices of {your variable::*}), {your variable::*})
loop 10 times:
set {_p} to {_sorted::%loop-number%} parsed as offline player
send "%loop-number%. %{_p}%: %{your variable::%{_p}%}%"
didnt work, it uses uuids to store data so when i run the command it always appears with <none> for the balance so like this {eco::###} hashtags are the uuid of the playerThat should work, change "your variable" to the name of your variableCode:function sort(indices: strings, values: numbers, descending: boolean = true) :: strings: loop {_indices::*}: set {_whole} to rounded down {_values::%loop-index%} set {_fraction} to mod({_values::%loop-index%}, 1) * 1E+10 set {_sort::%{_whole}%.%{_fraction}%::%loop-index%} to loop-value loop indices of {_sort::*}: loop {_sort::%loop-value%::*}: add 1 to {_index} set {_final::%{_index}%} to loop-value-2 return (reversed {_final::*}) if {_descending} is true, else {_final::*} command /top: trigger: set {_sorted::*} to sort((indices of {your variable::*}), {your variable::*}) loop 10 times: set {_p} to {_sorted::%loop-number%} parsed as offline player send "%loop-number%. %{_p}%: %{your variable::%{_p}%}%"
send your codealright, will try it later
[doublepost=1635875318,1635868937][/doublepost]
didnt work, it uses uuids to store data so when i run the command it always appears with <none> for the balance so like this {eco::###} hashtags are the uuid of the player
2.5-beta3 btw not the latest because yes (paperspigot 1.16) alsosend your code
function sort(indices: strings, values: numbers, descending: boolean = true) :: strings:
loop {_indices::*}:
set {_whole} to rounded down {_values::%loop-index%}
set {_fraction} to mod({_values::%loop-index%}, 1) * 1E+10
set {_sort::%{_whole}%.%{_fraction}%::%loop-index%} to loop-value
loop indices of {_sort::*}:
loop {_sort::%loop-value%::*}:
add 1 to {_index}
set {_final::%{_index}%} to loop-value-2
return (reversed {_final::*}) if {_descending} is true, else {_final::*}
command /top:
trigger:
set {_sorted::*} to sort((indices of {eco::*}), {eco::*})
loop 10 times:
set {_p} to {_sorted::%loop-number%} parsed as offline player
send "%loop-number%. %{_p}%: %{eco::%uuid of {_p}%}%"
You said you used uuids to store data so why do you parse as offline player then get uuid again2.5-beta3 btw not the latest because yes (paperspigot 1.16) also
Code:function sort(indices: strings, values: numbers, descending: boolean = true) :: strings: loop {_indices::*}: set {_whole} to rounded down {_values::%loop-index%} set {_fraction} to mod({_values::%loop-index%}, 1) * 1E+10 set {_sort::%{_whole}%.%{_fraction}%::%loop-index%} to loop-value loop indices of {_sort::*}: loop {_sort::%loop-value%::*}: add 1 to {_index} set {_final::%{_index}%} to loop-value-2 return (reversed {_final::*}) if {_descending} is true, else {_final::*} command /top: trigger: set {_sorted::*} to sort((indices of {eco::*}), {eco::*}) loop 10 times: set {_p} to {_sorted::%loop-number%} parsed as offline player send "%loop-number%. %{_p}%: %{eco::%uuid of {_p}%}%"
command /top:
trigger:
set {_sorted::*} to sort((indices of {eco::*}), {eco::*})
loop 10 times:
set {_uuid} to {_sorted::%loop-number%}
set {_p} to {_sorted::%loop-number%} parsed as offline player
send "%loop-number%. %{_p}%: %{eco::%{_uuid}%}%"
cant because cubedcraft's limitations are really badYou said you used uuids to store data so why do you parse as offline player then get uuid again
try this
Also please update, you're 10 versions behind.Code:command /top: trigger: set {_sorted::*} to sort((indices of {eco::*}), {eco::*}) loop 10 times: set {_uuid} to {_sorted::%loop-number%} set {_p} to {_sorted::%loop-number%} parsed as offline player send "%loop-number%. %{_p}%: %{eco::%{_uuid}%}%"
anyways it worked aweusm tyYou said you used uuids to store data so why do you parse as offline player then get uuid again
try this
Also please update, you're 10 versions behind.Code:command /top: trigger: set {_sorted::*} to sort((indices of {eco::*}), {eco::*}) loop 10 times: set {_uuid} to {_sorted::%loop-number%} set {_p} to {_sorted::%loop-number%} parsed as offline player send "%loop-number%. %{_p}%: %{eco::%{_uuid}%}%"