#How do I make a baltop skript

1 messages · Page 1 of 1 (latest)

ember sorrel
#

I looked it up online but couldn't find any easy answers
I found this Skript online but don't know how it works
and am trying to figure out how to make it start at the richest not the poorest

  headerbaltopmsg: &6===== BalTop =====     # Message above baltop message

  baltopamount: 10                 # how many people it will show in baltop

  footerbaltopmsg: &6===== BalTop =====     # Message under baltop message

  currency: $                     # currency type example: 100 $/ 100 coins

  setbalperm: bal.set                 # Perm to set players balance

  economynotify: bal.notify             # Perm to get notified on any change in this skript. 

  addbalperm: bal.add                 # Perm to add money to someone's balance.

  removebalperm: bal.remove             # Perm to remove money from someone's balance.

  resetbalperm: bal.reset             # Perm to reset everyone's balance


#{coins::%player's uuid%}
command /baltop:
  trigger:
    loop {coins::*}:
      add 1 to {_size}
      if {_low.to.high.list::%loop-value%} is not set:
        set {_low.to.high.list::%loop-value%} to loop-index
      else:
        set {_n} to 0
        loop {_size} times:
          set {_n} to {_n}+1
          {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
          set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
          stop loop
    wait 1 tick
    set {_n} to size of {_low.to.high.list::*}
    loop {_low.to.high.list::*}:
      set {_high.to.low.list::%{_n}%} to loop-value
      set {_n} to {_n}-1
    wait 1 tick
    set {_i} to 0
    send "{@headerbaltopmsg}"
    loop {_high.to.low.list::*}:
      add 1 to {_topnumber}
      set {_player} to "%loop-value%" parsed as offlineplayer
      send "&7%{_topnumber}% - &c%{_player}% &8» &7%{coins::%loop-value%}%"
      add 1 to {_i}
      #if {_topnumber} > {coins::%player's uuid%}: #this is top 10 you can change it
        stop
    send "{@footerbaltopmsg}"```
glass fjord
#

i mean if it goes from 0 to the negatives, looks like its already going from greatest to least

ember sorrel
#

i mean like make it go the other way

#

from greatest to lowest

glass fjord
#

As I said, seems like it’s already doing that

wicked stone
#

i think he means talking about a limiter, just the first few values, with over 1k entries you can't scroll to the top and see who is on top

glass fjord
#

then just stop after loop-iteration reaches the number you want

wicked stone
#

there is a {baltopamount} variable in options but it's currently unused and will make it show all values

#

or that too yeah

#

you don't need options here

ember sorrel
glass fjord
#

literally that

#

check if loop-teration = x and then stop