#=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Autor: Kusko321 # Version: 1.0 # Website: Kusko321.pl | 178.33.45.181 # Skrypt Wymaga: AutoIn, Skript, WildSkript, SkQuery # Dodatek: Dodatek do KXvsx.sk #=-=-=-=-=-=-=-=-=-=-=-=-=-=- #------------------------------------------------------------ # Wzor na ranking # RankingWygranej: W # RankingPrzegranej: P # P - W = X # X € (-1,-50) | W +30 -(-x) | P -50 -x # X € (-51,-100) | W + 10 -(-x)*0.5 | P - 10 -x*0.4 # X € (-101,-500) | W -(-x)*0.1 | P -x*0.01 # X € (-∞,-501) | W -(-x)*0.01 | P - 0 # X € (0,50) | W + 50 + x | P - 50 -x # X € (51,-100) | W + 51 + x*1.1| P - 51 -x*1.1 # X € (101,-100) | W + 53 + x*1.2| P - 40 -x*1.2 # X € (501,∞) | W + 55 + x*1.3| P - 30 -x*0.8 #------------------------------------------------------------ options: fileKTCT: plugins/Skript/scripts/YML/KTeam/Teamy/ fileKTZT: YML/KTeam/Teamy/ fileKTCG: plugins/Skript/scripts/YML/KTeam/Gracze/ fileKTZG: YML/KTeam/Gracze/ fileKTC: YML/KTeam/Config.yml fileKPC: YML/KParty/Config.yml fileKPCP: plugins/Skript/scripts/YML/KParty/Party/ fileKPZP: YML/KParty/Party/ fileKPCG: plugins/Skript/scripts/YML/KParty/Gracze/ fileKPZG: YML/KParty/Gracze/ fileKRCG: plugins/Skript/scripts/YML/KRanking/Gracze/ fileKRZG: YML/KRanking/Gracze/ fileKXCK: plugins/Skript/scripts/YML/KXvsx/Kolejka/ fileKXZK: YML/KXvsx/Kolejka/ fileKXCG: plugins/Skript/scripts/YML/KXvsx/Gry/ fileKXZG: YML/KXvsx/Gry/ fileKXCA: plugins/Skript/scripts/YML/KXvsx/Areny/ fileKXZA: YML/KXvsx/Areny/ fileKXCC: plugins/Skript/scripts/YML/KXvsx/Config/ fileKXZC: YML/KXvsx/Config/ fileVer: YML/Version/ on load: set yaml value "KRanking" from file "{@fileVer}Version.yml" to "1.0" # ------------------------------------------------- Start [Sprawdzanie Rankingu (BEZ UUID)] On join: if file "{@fileKRCG}%player%.yml" doesn't exists: set yaml value "Ranking" from file "{@fileKRZG}%player%.yml" to "1000" set yaml value "Zabic" from file "{@fileKRZG}%player%.yml" to "0" set yaml value "Zgonow" from file "{@fileKRZG}%player%.yml" to "0" stop # ------------------------------------------------- Koniec [Sprawdzanie Rankingu (BEZ UUID)] on damage: if attacker is a player: if victim is a player: if {Rank::Combat::%attacker%::Tak} is not set: set {Rank::Combat::%attacker%::Tak} to true wait 15 seconds delete {Rank::Combat::%attacker%::Tak} if {Rank::Combat::%victim%::Tak} is not set: set {Rank::Combat::%victim%::Tak} to true wait 15 seconds delete {Rank::Combat::%victim%::Tak} on quit: if {Rank::Combat::%player%} is set: set {_Ranking} to yaml value "Ranking" from file "{@fileKRZG}%player%.yml" set {_Zgony} to yaml value "Zgonow" from file "{@fileKRZG}%player%.yml" set {_Zgony} to {_Zgony} parsed as number set {_Ranking} to {_Ranking} parsed as number set {_Remove} to 20%*{_Ranking} remove {_Remove} from {_Ranking} add 1 to {_Zgony} kill player set yaml value "Ranking" from file "{@fileKRZG}%player%.yml" to "%{_Ranking}%" set yaml value "Zgonow" from file "{@fileKRZG}%player%.yml" to "%{_Zgony}%" on death: if victim is a player: if attacker is a player: delete {Rank::Combat::%attacker%::Tak} delete {Rank::Combat::%victim%::Tak} set {_KillAtt} to yaml value "Zabic" from file "{@fileKRZG}%attacker%.yml" set {_DeadVic} to yaml value "Zgonow" from file "{@fileKRZG}%victim%.yml" set {_KillAtt} to {_KillAtt} parsed as number set {_DeadVic} to {_DeadVic} parsed as number Add 1 to {_KillAtt} Add 1 to {_DeadVic} set {_RankAtt} to yaml value "Ranking" from file "{@fileKRZG}%attacker%.yml" set {_RankVic} to yaml value "Ranking" from file "{@fileKRZG}%victim%.yml" set {_RankVic} to {_RankVic} parsed as number set {_RankAtt} to {_RankAtt} parsed as number Set {_Roznica} to rounded down {_RankVic}-{_RankAtt} if {_Roznica} <= -500: if {_Roznica} > -99999999: set {_wi} to 0 set {_pi} to 0 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} <= -250: if {_Roznica} > -500: set {_wi} to rounded down {_RankAtt}*0.1*0.02 set {_pi} to rounded down {_RankVic}*0.1*0.02 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} <= -100: if {_Roznica} > -250: set {_wi} to rounded down {_RankAtt}*0.1*0.04 set {_pi} to rounded down {_RankVic}*0.1*0.04 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} <= -1: if {_Roznica} > -100: set {_wi} to rounded down {_RankAtt}*0.1*0.06 set {_pi} to rounded down {_RankVic}*0.1*0.06 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} = 0: set {_wi} to rounded down {_RankAtt}*0.1*0.15 set {_pi} to rounded down {_RankVic}*0.1*0.15 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} >= 1: if {_Roznica} < 100: set {_wi} to rounded down {_RankAtt}*0.1*0.20 set {_pi} to rounded down {_RankVic}*0.1*0.20 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} >= 100: if {_Roznica} < 250: set {_wi} to rounded down {_RankAtt}*0.1*0.23 set {_pi} to rounded down {_RankVic}*0.1*0.23 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} >= 250: if {_Roznica} < 500: set {_wi} to rounded down {_RankAtt}*0.1*0.25 set {_pi} to rounded down {_RankVic}*0.1*0.25 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} if {_Roznica} >= 500: if {_Roznica} < 9999999: set {_wi} to rounded down {_RankAtt}*0.1*0.33 set {_pi} to rounded down {_RankVic}*0.1*0.33 Add {_wi} to {_RankAtt} Remove {_pi} from {_RankVic} wait 2 tick broadcast "&eGracz &6%victim% &8[&c- %{_pi}%&8] &ezostal zabity przez &6%attacker% &8[&a+ %{_wi}%&8] " set yaml value "Ranking" from file "{@fileKRZG}%attacker%.yml" to "%{_RankAtt}%" set yaml value "Zabic" from file "{@fileKRZG}%attacker%.yml" to "%{_KillAtt}%" set yaml value "Ranking" from file "{@fileKRZG}%victim%.yml" to "%{_RankVic}%" set yaml value "Zgonow" from file "{@fileKRZG}%victim%.yml" to "%{_DeadVic}%"