Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Author: TheFallingCookie - http://skript.pl/index.php?/user/130-thefallingcookie/
- # Name: psRanking
- # Version: 1.0
- variables:
- {battle::%player%} = -1
- on load:
- send "[psRanking] Succesfully loaded." to the console
- send "[psRanking] Developed by TheFallingCookie." to the console
- execute console command "scoreboard objectives add pkt dummy &7pkt"
- execute console command "scoreboard objectives setdisplay belowName pkt"
- loop all players:
- kick loop-player due to "&7Wejdz ponownie na serwer!"
- on unload:
- execute console command "scoreboard objectives remove pkt"
- on join:
- set {battle::%player%} to -1
- {punkty::%player%} is not set:
- set {punkty::%player%} to 1000
- {zabojstwa.%player%} is not set:
- set {zabojstwa.%player%} to 0
- {smierci.%player%} is not set:
- set {smierci.%player%} to 0
- execute console command "scoreboard players set %player% pkt %{punkty::%player%}%"
- set {_x} to name of player
- if {_x} is "TheFallingCookie":
- send "&8> &7Na tym serwerze znajduje sie skrypt &6psRanking &7by TheFallingCookie"
- on death of player:
- set {battle::%victim%} to 0
- set {battle::%attacker%} to 0
- strike lightning effect at the player
- {atakujacy.%victim%} is set:
- set {_attacker.%victim%} to {atakujacy.%victim%}
- drop victim's skull at location of victim
- add 1 to {smierci.%victim%}
- add 1 to {zabojstwa.%{_attacker}%}
- set {_punkty.%victim%} to rounded down {punkty::%victim%}*0.10
- add {_punkty.%victim%} to {punkty::%{_attacker.%victim%}%}
- remove {_punkty.%victim%} from {punkty::%victim%}
- set death message to "&8> &6%victim% &czostal zabity przez &6%{_attacker.%victim%}% &7(&6+%{_punkty.%victim%}%&7)"
- execute console command "scoreboard players set %victim% pkt %{punkty::%victim%}%"
- execute console command "scoreboard players set %{_attacker.%victim%}% pkt %{punkty::%{_attacker.%victim%}%}%"
- delete {atakujacy.%victim%}
- stop
- {atakujacy.%victim%} is not set:
- add 1 to {smierci.%victim%}
- remove 30 from {punkty::%victim%}
- execute console command "scoreboard players set %victim% pkt %{punkty::%victim%}%"
- stop
- on quit:
- if {atakujacy.%player%} is set:
- set {_attacker.%player%} to {atakujacy.%player%}
- delete {atakujacy.%player%}
- kill player
- drop player's skull at location of player
- add 1 to {smierci.%player%}
- add 1 to {zabojstwa.%{_attacker.%player%}%}
- set {_punkty.%player%} to rounded down {punkty::%player%}*0.10
- add {_punkty.%player%} to {punkty::%{_attacker.%player%}%}
- remove {_punkty.%player%} from {punkty::%player%}
- broadcast "&8> &6%player% wylogowal sie podczas walki!"
- broadcast "&8> &6%player% &czostal zabity przez &6%{_attacker.%player%}% &7(&6+%{_punkty.%player%}%&7)"
- execute console command "scoreboard players set %player% pkt %{punkty::%player%}%"
- execute console command "scoreboard players set %{_attacker.%player%}% pkt %{punkty::%{_attacker.%player%}%}%"
- delete {atakujacy.%player%}
- every 1 second:
- loop all players:
- if {battle::%loop-player%} is not more than 0:
- add -1 to {battle::%loop-player%}
- if {battle::%loop-player%} is 0:
- send "&aOkres PVP mina, mozesz sie wylogowac." to loop-player
- add -1 to {battle::%loop-player%}
- on damage of player:
- {punkty::%attacker%} is set:
- if {battle::%victim%} is -1:
- send "&cZaczoles PVP, pamietaj nie mozesz sie wylogowac!" to victim
- if {battle::%attacker%} is -1:
- send "&cZaczoles PVP, pamietaj nie mozesz sie wylogowac!" to attacker
- set {battle::%victim%} to 10
- set {battle::%attacker%} to 10
- set {atakujacy.%victim%} to name of attacker
- wait 15 seconds
- delete {atakujacy.%victim%}
- command /gracz [<offline player=%player%>]:
- description: Pozwala na sprawdzenie rankingu innego gracza
- trigger:
- if arg is set:
- {punkty::%arg%} is set:
- send "&8> &7Ranking gracza: &6%arg%"
- send "&8> &7Punkty: &6%{punkty::%arg%}%"
- send "&8> &7Zabojstwa: &6%{zabojstwa.%arg%}%"
- send "&8> &7Smierci: &6%{smierci.%arg%}%"
- {punkty::%arg%} is not set:
- send "&8> &cGracza o takim nicku nie ma w bazie danych!"
- stop
- else:
- send "&8> &7Ranking gracza: &6%player% &7(Ty)"
- send "&8> &7Punkty: &6%{punkty::%player%}%"
- send "&8> &7Zabojstwa: &6%{zabojstwa.%player%}%"
- send "&8> &7Smierci: &6%{smierci.%player%}%"
- command /top10:
- description: Top 10 graczy z najwyzsza iloscia punktow
- aliases: /top, /topka
- trigger:
- send "&8> &6Top 10 najlepszych graczy:"
- set {_num} to size of {punkty::*}
- loop {_num} times:
- loop {punkty::*}:
- {_v.%loop-number%} is not set:
- set {_v.%loop-number%} to loop-value
- set {_n.%loop-number%} to loop-index
- loop-value is greater than {_v.%loop-number%}:
- set {_v.%loop-number%} to loop-value
- set {_n.%loop-number%} to loop-index
- remove {_v.%loop-number%} from {punkty::*}
- loop {_num} times:
- loop-number is less than or equal to 10:
- send "&8> &7%loop-number%. &6%{_n.%loop-number%}% &8(&6%{_v.%loop-number%}%&8)"
- set {punkty::%{_n.%loop-number%}%} to {_v.%loop-number%}
- command /ranking [<text>] [<player>] [<integer>]:
- description: Pozwala na zarzadzanie rankingiem innego gracza
- trigger:
- if player has permission "psranking.*":
- arg 1 is not set:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- arg 1 is not "set" or "add" or "remove":
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- arg 1 is "set":
- if arg 2 is set:
- if arg 3 is set:
- if {punkty::%arg 2%} is set:
- set {punkty::%arg 2%} to arg 3
- send "&8> &7Zaaktualizowano ranking gracza: &6%arg 2%&7!"
- execute console command "scoreboard players set %arg 2% pkt %{punkty::%arg 2%}%"
- else:
- send "&8> &cGracza o takim nicku nie ma w bazie danych!"
- else:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- else:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- arg 1 is "add":
- if arg 2 is set:
- if arg 3 is set:
- if {punkty::%arg 2%} is set:
- add arg 3 to {punkty::%arg 2%}
- send "&8> &7Zaaktualizowano ranking gracza: &6%arg 2%&7!"
- execute console command "scoreboard players set %arg 2% pkt %{punkty::%arg 2%}%"
- else:
- send "&8> &cGracza o takim nicku nie ma w bazie danych!"
- else:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- else:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- arg 1 is "remove":
- if arg 2 is set:
- if arg 3 is set:
- if {punkty::%arg 2%} is set:
- remove arg 3 from {punkty::%arg 2%}
- send "&8> &7Zaaktualizowano ranking gracza: &6%arg 2%&7!"
- execute console command "scoreboard players set %arg 2% pkt %{punkty::%arg 2%}%"
- else:
- send "&8> &cGracza o takim nicku nie ma w bazie danych!"
- else:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- else:
- send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
- stop
- else:
- send "&8> &cNie masz uprawnien do uzywania tej komendy! &7(&6psranking.*&7)"
Advertisement
Add Comment
Please, Sign In to add comment