Actually, it is possible to create ranking script without any addon. (Like below)
However, if the data became too big, such script cause heavy heavy lag. (That is fatal!! ;(
So my suggestion is addon which has sorting functions.
(Or anyone know how to create the faster ranking system, only using existing addon?)
I really wish if I could sort variables in faster way.....
However, if the data became too big, such script cause heavy heavy lag. (That is fatal!! ;(
So my suggestion is addon which has sorting functions.
(Or anyone know how to create the faster ranking system, only using existing addon?)
I really wish if I could sort variables in faster way.....
#---- sample of ranking script without addons -----------------------
# * Create data every time Skript launch or when this script reloadedcode_language.skript:on load: set {_players} to 0 loop {kd.kills::*}: if loop-value is greater than 999.5: set {_topkills::%loop-index%} to loop-value add 1 to {_players} set {_high} to 0 loop {_players} times: loop {_topkills::*}: if loop-value-2 > {_high}: set {_high} to loop-value-2 set {_highplayeruuid} to loop-index set {temp.topkills::%loop-number%} to loop-index set {_high} to 0 delete {_topkills::%{_highplayeruuid}%} message "Created Ranking of %{_players}% players." to console set {temp.topkills.NumberOfPlayers} to {_players} command /topkills [<number>]: usage: &b/topkills (pages) trigger: set {_totalpages} to rounded up {temp.topkills.NumberOfPlayers} / 10 if {_totalpages} is 0: message "&b-=-=-=-=- Kill Ranking =-=-=-=-" message "&3There is no data to list...." stop if arg-1 exist: if arg-1 is greater than {_totalpages}: set {_target} to {_totalpages} else if arg-1 is smaller than 1: set {_target} to 1 else: set {_target} to rounded down arg-1 else: set {_target} to 1 set {_start} to (10*{_target}) -9 if (9+{_start}) is greater than {temp.topkills.NumberOfPlayers}: set {_looptimes} to {temp.topkills.NumberOfPlayers} - {_start} + 1 else: set {_looptimes} to 10 message "&b-=-=-=-=- Kill Ranking =-=-=-=-" loop {_looptimes} times: message "&b%{_start}%: %{player.lastknownname::%{temp.topkills::%{_start}%}%}% %{kd.kills::%{temp.topkills::%{_start}%}%}% Kills" add 1 to {_start} message "&3Viewing page %{_target}%/%{_totalpages}%." on death: if attacker exist: add 1 to {kd.kills::%attacker's uuid%} on join: if {player.lastname::%player's uuid%} does not exist: set {player.lastknownname::%player's uuid%} to player's name else if {player.lastknownname::%player's uuid%} is not player's name: set {player.lastknownname::%player's uuid%} to player's name
# Processing times is approximately proportional to the square of the number of datas
# e.g.) 100 data --> loop 5000 times. 14000 datas--> loop 100000000 times. XD
Last edited: