baltop skript

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

chimchambi

Member
Dec 4, 2019
30
0
0
29
Hi can anyone help me making a baltop skript that list the top 10 people on my server with top balance from essentials..

i have tried to search on google too but i can't find anything that helps me

plz someone :emoji_slight_smile: thx
 
Code:
command /baltop:
    trigger:
        set {_sortedList::*} to sorted {bal::*}
        loop {bal::*}:
            add 1 to {_count}
            set {_indexes::%loop-value%} to loop-index
            if mod({_count}, 20) = 0:
                wait 1 tick
        set {_n} to 0
        loop {_sortedList::*}:
            add 1 to {_n}
            set {_current} to {_indexes::%loop-value%} parsed as offline player
            set {_msg::%{_n}%} to "&7%{_current}% &f- &6%loop-value% bal"
            {_n} = 10
            exit 1 loop
        message "&7&m      &7< &a&lTop Balances &7>&7&m      "
        loop {_msg::*}:
            set {_current} to loop-index parsed as int - 1
            set {_c} to size of {_msg::*} - {_current}
            add {_msg::%{_c}%} to {_invertedList::*}
        set {_n} to 0
        loop {_invertedList::*}:
            add 1 to {_n}
            message "&a##%{_n}% %loop-value%"

store the balance as {bal::%player's uuid%} or it won't work
 
well i am a noobie.... can someone plz make a skript for me that makes baltop plz <3
Look at my above post.
[doublepost=1578117597,1578115880][/doublepost]
i'm desperate
Here's your code.
Code:
command /baltop:
    trigger:
        set {_sortedList::*} to sorted {bal::*}
        loop {bal::*}:
            add 1 to {_count}
            set {_indexes::%loop-value%} to loop-index
            if mod({_count}, 20) = 0:
                wait 1 tick
        set {_n} to 0
        loop {_sortedList::*}:
            add 1 to {_n}
            set {_current} to {_indexes::%loop-value%} parsed as offline player
            set {_msg::%{_n}%} to "&7%{_current}% &f- &6%loop-value% bal"
            {_n} = 10
            exit 1 loop
        message "&7&m      &7< &a&lTop Balances &7>&7&m      "
        loop {_msg::*}:
            set {_current} to loop-index parsed as int - 1
            set {_c} to size of {_msg::*} - {_current}
            add {_msg::%{_c}%} to {_invertedList::*}
        set {_n} to 0
        loop {_invertedList::*}:
            add 1 to {_n}
            message "&a##%{_n}% %loop-value%"

command /setbal <offlineplayer> <integer>:
   permission: sk.eco.setbal
   trigger:
      if arg-1 has joined before:
         set {bal::%arg-1%} to arg-2
         send "&7## &aSet &e%arg-1%&a's balance to &e$%arg-2%" to player
      else:
         send "&cThis player has not joined before. :("
 
  • Like
Reactions: egamer3000
Status
Not open for further replies.