Warning: Undefined variable $http_response_header in /var/www/html/new/skunity/library/skUnity/Util/HTTP.php on line 95

skunitybackup-417.sk

Created by imOfflinezzz

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

#EloSk 1.0
#Made by imOfflinezzz - special for SkUnity

	
#
#Stuff                  
#

on join:
	if {elo::%player%} isn't set:
		set {elo::%player%} to 0

function RateElo(a: player, v: player):
	set {_ega} to 25
	set {_egv} to 1
	set {_eloa} to {elo::%{_a}%}
	set {_na} to 0
	set {_elov} to {elo::%{_v}%}
	set {_nv} to 0
	if {_eloa} is more than 99:
		while {_eloa} is more than 99:
			add 1 to {_na}
			remove 100 from {_eloa}
		loop {_na} times:
			{_ega} is more than 5
			remove 1 from {_ega}
	add {_ega} to {elo::%{_a}%}
	set {_elo.top::*} to sorted {elo::*} from highest to lowest with output "@value"
	loop {_elo.top::*}:
		set {_value} to "%loop-value%"
		replace all ".0" in {_value} with ""
		if "%{elo::%{_a}%}%" is "%{_value}%":
			set {_la} to loop-index
	send "&7You gained &a%{_ega}% &eELO &7(Current ELO is &a%{elo::%{_a}%}%&7 - &e##%{_la}% &7in Global Leaderboard)" to {_a}
	if {_elov} is more than 499:
		while {_elov} is more than 499:
			add 1 to {_nv}
			remove 100 from {_elov}
		loop {_nv} times:
			{_egv} is less than 20
			add 2 to {_egv}
	if {elo::%{_v}%} is more than 0:
		remove {_egv} from {elo::%{_v}%}
	set {_elo.top::*} to sorted {elo::*} from highest to lowest with output "@value"
	loop {_elo.top::*}:
		set {_value} to "%loop-value%"
		replace all ".0" in {_value} with ""
		if "%{elo::%{_v}%}%" is "%{_value}%":
			set {_lv} to loop-index
	send "&7You lost &c%{_egv}% &eELO &7(Current ELO is &c%{elo::%{_v}%}% &7- &e##%{_lv}% &7in Global Leaderboard)" to {_v}

on death of player:
	attacker is a player
	RateElo(attacker, victim)
	#wait 2 ticks
	#force respawn player
		
command /top10:
	trigger:
		set {_elo.top::*} to sorted {elo::*} from highest to lowest with output "&b@index &7with &e@value ELO"
		set {_x} to 1
		send "&7=========&aTop 10 Players&7========="
		loop 10 times:
			set {_v} to "%{_elo.top::%{_x}%}%"
			replace all ".0" in {_v} with ""
			send "&e##%{_x}% %{_v}%" to player
			add 1 to {_x}
			if size of {elo::*} is less than {_x}:
				exit loop
		send "&7================================"
		
command /elosk [<text>]:
	trigger:
		if executor is a player:
			player doesn't have permission "elosk.admin"
			send "&cYou don't have permissions" to player
			stop trigger
		if arg-1 is "reset-signs":
			delete {elo.signs::*}
		
on left click with orange dye:
	player's gamemode is creative
	player has permission "elosk.admin"
	add location of clicked block to {elo.signs::*}
	send "&aELO sign added"
	cancel the event
	
every 60 seconds:
	set {_elo.top::*} to sorted {elo::*} from highest to lowest with output "@index;@value"
	set {_x} to 1
	loop {_elo.top::*}:
		set {_lv} to "%loop-value%" parsed as text
		set {_iv::*} to {_lv} split at ";"
		set {_i.%{_x}%} to {_iv::1}
		set {_v.%{_x}%} to {_iv::2}
		replace all ".0"  with "" in {_v.%{_x}%}
		add 1 to {_x}
	set {_x} to 1
	loop {elo.signs::*}:
		if block at loop-value is sign:
			loop 10 times:
				if line 1 of block at loop-value-1 is "##%{_x}%":
					set line 2 of block at loop-value-1 to "%{_i.%{_x}%}%"
					set line 3 of block at loop-value-1 to "%{_v.%{_x}%}%"
					wait 1 tick
			add 1 to {_x}
		else:
			remove loop-value from {elo.signs::*}