Neep desperate help! I am trying to make a /baltop exactly like DonutSMP using Skript, however, loading all offline players balances (vault plugin) causes IMMENSE server lag. How do I make the baltop load every single player without lag, so I can make a proper baltop system. I don't need to be spoon fed or whatever but if anyone can send me skript documentations or an example skript or ANYTHING PLEASE that does this without server lag.
#/baltop skript GUI
1 messages · Page 1 of 1 (latest)
anyone
Keep the Baltop as its dictionary (position, username). It’s pretty unlikely that a players balance will change while they are offline so just update a player’s position in baltop every 5 mins or whatever and when they leave the game.
Also do what the guy above me said with waiting a tick
Save old baltop and display that while new baltop is calculated
huh
Check and update a list when someone joins and leaves or checks baltop. Sort the list after. This way you're only sorting through 10 entries
There's already a plugin for that
This is probably deleted on every platform but I'm glad I downloaded it before it was taken down
@crisp gust I would be wary of downloading plugins from random people on discord, it could easily have malware
plugin just for baltop 😭
i can show its not malware but i understand ur concern
why not, plugins aren't solely for big projects
Ok show it’s not malware
u want video or live stream
???
there are couple of ways to show it
How would a video or live stream prove its not malware
how else would i prove its not malware
Send source code
Its not even mine
as i told u, its already been deleted. i searched my browser history and the page is gone
Ok yeah the one u sent is def malware, you claimed it’s was deleted yet I just found it on Google with like 30 seconds of searching https://www.spigotmc.org/resources/baltop.126566/updates
I believe you have some trust issues.
what i sent and this is not same
Yes it is
ive used both
When you go to download the file the file name is exactly the same
So if it’s been re uploaded to a site that checks for malware why wouldn’t you just link it?
u just sent me the link bro
how braindead are u
i noticed it NOW
Ah
You said “I noticed too” which made me think you meant you noticed it was on spigot too
yea no i noticed after u sent it
Also this isn’t a reupload
i downloaded the file back in august so yea its had more updates sicne then i see
If it was a reupload it wouldn’t have an update history
you're not thinking straight buddy
The one I linked to was up long before august
It has an update history going back to July
It seems to me like this is the one you downloaded
could be the problem it got deleted then
most likely not but file, sure
the one i got it from had no images
Sounds like ur the one who got it from a reupload
Well even if u didn’t put malware in it then the fact that it’s reuploaded makes me think that rhe one u sent has malware in it even more
Cause that’s like the #1 reason people reupload plugins
To upload them with malware
i didnt receive anything from it tho
or idk
possible i need to check it
lemme check the one u sent
Yeah that’s usually the case with malware
You dont realize anything happend
well ive been using the one i sent since i downloaded it
works fine
comparing it with the one u sent Zev
They're almost same
the colors changed a bit
I didnt click on mine, i suggest y'all dont either
when i get home ill check the code
ok
i used to use that zbaltop
but i wanna learn how to code it on skript for other leaderboards so
x8ight suggests that you read this embed
Sorted Indices
The sorted indices expression returns a new list of indices sorted by the value of the index. This can be very helpful for making all sorts of leaderboards. Lets say we have the balances of our players saved in the variable {balance::%player's uuid%}. To create our leaderboard we can use```vb
set {_sorted::} to sorted indices of {balance::} in descending order````{_sorted::*}will be a list of uuids with{_sorted::1}being the person with the most money. If we wanted to check how much money they had we could plug the uuid back into the original variable:{balance::%{_sorted::1}%}`
Leaderboard Example
command /baltop:
trigger:
set {_sorted::*} to sorted indices of {balance::*} in descending order
send "<aqua>Baltop"
loop first 10 elements of {_sorted::*}:
send "<gold>%loop-iteration%. <white>%offlineplayer(loop-value)% <gray>- <green>$%{balance::%loop-value%}%"```
I saw that on another forum
the problem is that i still need
to like
load all balances
is there like any way on skript to load something like instantly or soemthing
there are many plugins that can do it so idk
Just save a players balance to {var::%player’s uuid%} periodically
And sort that variable
it need to reload everytime i open /baltop tho or when i press reload button which is basically just executing command /baltop
you can wait a tick after loading every page in the GUI
also getting skins of offline players is a bit laggy (so if you use their skulls there's that too)
how much does waiting a tick help?
depends how often you do it and what exactly your loop is doing in the first place
alr ty
Im so dumb bro i spent 3 hours coding it and kept wondering why it was so laggy
but forgot player heads loading cause lag
ill just make the playerhead like steve or something unless they are online ig
Or save the head with the texture whenever a player leaves so you don’t have to fetch all the offline players heads
you're not indexing 1,000,000 balances in 1 second with skript
with paginated formatting and being able to handle 100s of page indexes and updates per second from 100 players spamming through pages
why do you have 1 million balances and why do you need to do it in 1 second
Scalability and no one wants to wait 5 seconds for a gui to open
Just bad user experience
I was lowk gonna do that
Update the baltop once every minute and fetch the cached copy instead of recalculating it every time
"Scalability" when servers will never have 100k players let alone 1m
Sorting through 10,000s of values every minute on the main thread is not optimized
100k joins is not rare, if you’re not thinking of scalability when designing a system then you should stick to personal projects
how many of those 100k leave to never rejoin?
no need to list a bunch of 0s; make them qualify for baltop
https://www.virustotal.com/gui/file/dae2aecac8072e3bbb7732595e075227e02a4064bf96c9c61fdc9139fffcbdc3
VirusTotal
Doesnt appear to be malware
thats because virustotal is not meant to detect minecraft backdoors
even the most basic minecraft backdoors dont get detected by virustotal
