1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Points Leaderboard

Discussion in 'Skript' started by ItsMCB, Jun 8, 2018.

Thread Status:
Not open for further replies.
  1. ItsMCB

    ItsMCB Active Member

    Joined:
    May 20, 2018
    Messages:
    26
    Likes Received:
    1
    I've been trying to create a Points Leaderboard, I'm confused to what I'm doing wrong.
    Code (Skript):
    1. command /egranking:
    2.     trigger:
    3.         loop {Points::%player%}:
    4.             add 1 to {_size}
    5.             if {_low.to.high.list::%loop-value%} is not set:
    6.                 set {_low.to.high.list::%loop-value%} to loop-index
    7.             else:
    8.                 set {_n} to 0
    9.                 loop {_size} times:
    10.                     set {_n} to {_n}+1
    11.                     {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
    12.                     set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
    13.                     stop loop
    14.         wait 1 tick
    15.         set {_n} to size of {_low.to.high.list::*}
    16.         loop {_low.to.high.list::*}:
    17.             set {_high.to.low.list::%{_n}%} to loop-value
    18.             set {_n} to {_n}-1
    19.         wait 1 tick
    20.         set {_i} to 0
    21.         send "&7&m-----------&8< &6Top10 &8>&7&m-----------"
    22.         loop {_high.to.low.list::*}:
    23.             add 1 to {_topnumber}
    24.             set {_player} to "%loop-value%" parsed as offlineplayer
    25.             send "&7%{_topnumber}% - &c%{_player}% &8» &7%{Points::%loop-value%}% Points"
    26.             add 1 to {_i}
    27.             if {_topnumber} > 10:
    28.                 stop
    29.         send "&7&m------------------------------"
     
    #1 ItsMCB, Jun 8, 2018
    Last edited: Jun 8, 2018
  2. P

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    194
    Likes Received:
    4
    So... what's your problem?
     
  3. GlacialDew

    GlacialDew Active Member

    Joined:
    Apr 8, 2018
    Messages:
    38
    Likes Received:
    3
    I am kinda confused on what the problem is
     
  4. ItsMCB

    ItsMCB Active Member

    Joined:
    May 20, 2018
    Messages:
    26
    Likes Received:
    1
    It isn't displaying the player name and score, only the score.
     
  5. GlacialDew

    GlacialDew Active Member

    Joined:
    Apr 8, 2018
    Messages:
    38
    Likes Received:
    3
    Yeah Sorry man im no help.. totally stumped even tho it may be something simple that I missed sorry.
     
  6. P

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    194
    Likes Received:
    4
    I don't know how your variable works, but i Think u need to use "%loop-index%" instead of {_player}
     
  7. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,233
    Likes Received:
    70
    Medals:
    Could you send a screenshot of what it is displaying?
     
Thread Status:
Not open for further replies.
Loading...