Hiring Need a Skript Addon done: Sorting Lists

  • Welcome to skUnity!

    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!

pepper82

Member
Jan 26, 2017
272
1
18
41
Person: PN me, no discord, been around here for some years
About: I've been looking for someone to hire to make this for a while and nobody's been able to yet, so I'm asking on here now.
Perm or temp: Temporary, I just need the one skript addon.
Basic idea of request:
In order for me to make toplists for several minigames, I need somebody to write a skript addon that allows me to sort lists like this:

Code:
# Simple List with players and scores:

add "player1" to {_list::*}
add "player2" to {_list::*}
add "player3" to {_list::*}
set {_list::player1} to 100
set {_list::player2} to 200
set {_list::player3} to 20

# Now here comes the magic, that I need to be done:

set {_newlist::*} to numerical sorted list by value descending {_list::*}

# output
loop {_newlist::*}:
  message "%loop-index% %loop-value%"

# Result:
# player2 200
# player1 100
# player3 20

Also other sorting options will be:
set {_newlist::*} to alphabetically sorted list by value [descending/ascending] {_list::*}
set {_newlist::*} to numerical sorted list by index [descending/ascending] {_list::*}
set {_newlist::*} to alphabetically sorted list by index [descending/ascending] {_list::*}

# the syntax is optional and up to you

Budget/offer: Please tell me the price it would cost to do this and I can pay upfront.

Timeframe: Within a week or two would be good, if you need more time than that it's okay.
 
I understand this isn't entirely what you are looking for, but what you can do with this is simply change some of the variables, then in the gui just add a couple of if statement to order them, for this I would simply focus on the concept as it's not hard to code. Obviously no payment for this.
Code:
command /prestigetop:
  trigger:
    send " "
    send "&b&lPrestige Top:"
    send "&3%{prestigetopshow.1}%"
    send "&3%{prestigetopshow.2}%"
    send "&3%{prestigetopshow.3}%"
    send "&3%{prestigetopshow.4}%"
    send "&3%{prestigetopshow.5}%"
    send " "
command /setlb:
  permission: op
  trigger:
    set {prestigetop.5} to 0
    set {prestigetop.4} to 0
    set {prestigetop.3} to 0
    set {prestigetop.2} to 0
    set {prestigetop.1} to 0
    send "&b&lSet lb's"

every 5 seconds:
  loop all players:
    leaderboard(loop-player)

function leaderboard(p: player):
  set {_uuid} to {_p}'s uuid
  if {prestigecounter::%{_uuid}%} is greater than {prestigetop.5}:
    if {prestigecounter::%{_uuid}%} is smaller than {prestigetop.4}:
      set {prestigetop.5} to {prestigecounter::%{_uuid}%}
      set {prestigetopshow.5} to "##5 %{_p}% %{prestigetop.5}%"
    if {prestigecounter::%{_uuid}%} is greater than {prestigetop.4}:
      if {prestigecounter::%{_uuid}%} is smaller than {prestigetop.3}:
        set {prestigetop.4} to {prestigecounter::%{_uuid}%}
        set {prestigetopshow.4} to "##4 %{_p}% %{prestigetop.4}%"
      if {prestigecounter::%{_uuid}%} is greater than {prestigetop.3}:
        if {prestigecounter::%{_uuid}%} is smaller than {prestigetop.2}:
          set {prestigetop.3} to {prestigecounter::%{_uuid}%}
          set {prestigetopshow.3} to "##3 %{_p}% %{prestigetop.3}%"
        if {prestigecounter::%{_uuid}%} is greater than {prestigetop.2}:
          if {prestigecounter::%{_uuid}%} is smaller than {prestigetop.1}:
            set {prestigetop.2} to {prestigecounter::%{_uuid}%}
            set {prestigetopshow.2} to "##2 %{_p}% %{prestigetop.2}%"
          if {prestigecounter::%{_uuid}%} is greater than {prestigetop.1}:
            set {prestigetop.1} to {prestigecounter::%{_uuid}%}
            set {prestigetopshow.1} to "##1 %{_p}% %{prestigetop.1}%"
            set {_vartesting} to "pass"


command /prestigetest:
  trigger:
    send "%{prestigetop.1}%"
    send "%{prestigetopshow.1}%"
    send "%{_vartesting}%"