Ikey Posted January 3, 2022 Share Posted January 3, 2022 Hey. I am working on a Boat Race event for my server, and I have pretty much finished it, apart from a leaderboard system. Variables I am using: {highscore.%player%} #Player's highscore in minutes to milliseconds If anyone could make a quick leaderboard system that shows the top 10 fastest times on the race event, that would be great. Thanks. Owner of ikeysurviv.minehut.gg ⊱------------------------------⊰ [LEGEND] on Minehut ⊱------------------------------⊰ In-game name - ikeyIX Discord name - ikeyIX#2007 Link to comment Share on other sites More sharing options...
AgentGamerPro Posted January 3, 2022 Share Posted January 3, 2022 20 minutes ago, Ikey said: Hey. I am working on a Boat Race event for my server, and I have pretty much finished it, apart from a leaderboard system. Variables I am using: {highscore.%player%} #Player's highscore in minutes to milliseconds If anyone could make a quick leaderboard system that shows the top 10 fastest times on the race event, that would be great. Thanks. you can refer to the skript found in this post(SOLVED) How do I create a leaderboard for kills? | SpigotMC - High Performance Minecraft Lifestealed | Minecraft Servers OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - Present Link to comment Share on other sites More sharing options...
FlapKakker Posted January 15, 2022 Share Posted January 15, 2022 On 1/4/2022 at 12:38 AM, Ikey said: So, I have added the skript that you sent me and changed it up a little to fit my event skript, but it doesn't seem to be working. I haven't added the variables from my skript to this one yet but I just wanted to test it by itself to see if it worked. Does this look alright? command /event.lb [<text>]: trigger: loop {times::*}: 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-2 set {_n} to {_n}-1 wait 1 tick send "&7 " send "&6&lTop 10 Race Times" loop {_high.to.low.list::*}: add 1 to {_result} set {_player} to loop-value-1 parsed as an offline player if {_player} is offline: send "&e&l%{_result}%. &c%{_player}% &8&l» &e%{race::%loop-value-1%}%" to player else: send "&e&l%{_result}%. &a%{_player}% &8&l» &e%{race::%loop-value-1%}%" to player if {_result} is 10: send "&7 " stop Is there anything you can see that is wrong in here? Thanks. U can skip 80% of that code by doing set {topbal::*} to sorted {balance::*} from highest to lowest with format "@index:@value" Rest u got to figure out Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now