Category: Skript Addon addition(maybe)
Suggested name: -
What I want:
Hello. This is more likely request function on add on but, I don't see request page for addon, so I am posting here.
I have seen very similar thread about this, asked some questions in skript discord, and put some time to think about it, and researched , but still could not find a way to do this! , and I believe there is no elegant way to make ranking system with existing functions ( It I am wrong please correct me! ).
Currently, sorted (list) is availabe for Bensku's fork.
Let's say I have a {score::%player%} that stores some kind of score of player.
Now from the ranking system
I want to identify ...
1. ranking number of specific player
2. corresponding score.
Let's say ,
( player )A has 200 points.
B has 300 points
C has 100 points
D has 50 points.
which is
{score::A} = 200
{score::B} = 300
{score::C} = 100
{score:: D} = 50
at the end, I want to identify
B is #1 , who has 300 points
A is #2 , who has 200 points
C is #3 , who has 100 points
D is #4 , who has 50 points.
The only sorting function I could find is sorted , and something from randomSK(same as sorted ) at this moment.
when I do
set {sorted::*} to sorted {score::*}
above list will be sorted like this
{sorted::1} = 50
{sorted::2} = 100
{sorted::3} = 200
{sorted::4} = 300
basically, it loses "index" , so there is really no way I can know who has 50 points, and who has 300 points from {sorted::*} list.
If I write a sorting function from Skript, all I can think of is bubble sorting which is really really bad decision while I have thousands of scores! I don't think that's elegant way of sorting for sure.
Is this already possible to implement with current skript and addons, or is it something that anyone can implement? Thanks for reading !
Ideas for commands: -
Ideas for permissions: -
When I'd like it by: doesn't matter
Suggested name: -
What I want:
Hello. This is more likely request function on add on but, I don't see request page for addon, so I am posting here.
I have seen very similar thread about this, asked some questions in skript discord, and put some time to think about it, and researched , but still could not find a way to do this! , and I believe there is no elegant way to make ranking system with existing functions ( It I am wrong please correct me! ).
Currently, sorted (list) is availabe for Bensku's fork.
Let's say I have a {score::%player%} that stores some kind of score of player.
Now from the ranking system
I want to identify ...
1. ranking number of specific player
2. corresponding score.
Let's say ,
( player )A has 200 points.
B has 300 points
C has 100 points
D has 50 points.
which is
{score::A} = 200
{score::B} = 300
{score::C} = 100
{score:: D} = 50
at the end, I want to identify
B is #1 , who has 300 points
A is #2 , who has 200 points
C is #3 , who has 100 points
D is #4 , who has 50 points.
The only sorting function I could find is sorted , and something from randomSK(same as sorted ) at this moment.
when I do
set {sorted::*} to sorted {score::*}
above list will be sorted like this
{sorted::1} = 50
{sorted::2} = 100
{sorted::3} = 200
{sorted::4} = 300
basically, it loses "index" , so there is really no way I can know who has 50 points, and who has 300 points from {sorted::*} list.
If I write a sorting function from Skript, all I can think of is bubble sorting which is really really bad decision while I have thousands of scores! I don't think that's elegant way of sorting for sure.
Is this already possible to implement with current skript and addons, or is it something that anyone can implement? Thanks for reading !
Ideas for commands: -
Ideas for permissions: -
When I'd like it by: doesn't matter
Last edited: