Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # _____ _____ ______ _______ _____ _ _ _ __
- # / ____| __ \ /\ | ____|__ __| __ \ /\ | \ | | |/ /
- # | | | |__) | / \ | |__ | | | |__) | / \ | \| | ' /
- # | | | _ / / /\ \ | __| | | | _ / / /\ \ | . ` | <
- # | |____| | \ \ / ____ \| | | | | | \ \ / ____ \| |\ | . \
- # \_____|_| \_\/_/ \_\_| |_| |_| \_\/_/ \_\_| \_|_|\_\
- on load:
- set {format-top10} to colored value "format-top10" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {format-top10header} to colored value "format-top10header" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {format-top10null} to value "format-top10null" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {piorun} to value "piorun" get of "plugins/Skript/scripts/CraftRank/config.yml" parsed as boolean
- set {procent} to value "procent" get of "plugins/Skript/scripts/CraftRank/config.yml" parsed as number
- set {deathformat} to value "format-death" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {relogformat} to value "format-relog" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {relogpoints} to value "relog-points" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {killstreak} to value "format-killstreak" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {relogseconds} to value "relog-seconds" get of "plugins/Skript/scripts/CraftRank/config.yml" parsed as number
- set {o-procent} to value "odejmowany-procent" get of "plugins/Skript/scripts/CraftRank/config.yml" parsed as number
- set {2kill} to value "2kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {3kill} to value "3kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {4kill} to value "4kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {5kill} to value "5kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {6kill} to value "6kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {7kill} to value "7kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {8kill} to value "8kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {9kill} to value "9kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {10kill} to value "10kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {maxkill} to value "maxkill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p2kill} to value "P2kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p3kill} to value "P3kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p4kill} to value "P4kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p5kill} to value "P5kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p6kill} to value "P6kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p7kill} to value "P7kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p8kill} to value "P8kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p9kill} to value "P9kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {p10kill} to value "P10kill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- set {pmaxkill} to value "Pmaxkill" get of "plugins/Skript/scripts/CraftRank/config.yml"
- command /craftrank [<text>]:
- aliases: cr, craftr, crank
- trigger:
- if player has permission "craftrank.admin":
- if arg 1 is "reset":
- clear {CraftRank::*}
- send "&cZresetowano!"
- wait 3 seconds
- kick all players due to "&4[CraftRank] &6Wejdz jeszcze raz! :)"
- stop
- if arg 1 is "plik":
- download from "http://pastebin.com/raw.php?i=9fEkBae6" to "plugins/Skript/scripts/CraftRank/config.yml"
- send "&aUtworzono/Zresetowano plik konfiguracyjny."
- send "&7CraftRank &b1.0.0 &7by &bAdamek/AdamGrzegorz"
- send "&7YouTube: &bhttp://www.youtube.com/AdameQTM"
- stop
- command /ranking [<integer>]:
- usage: /ranking [Liczba wyszukiwanych wynikow]
- trigger:
- if arg 1 is set:
- set {_x} to {format-top10header}
- replace all "{LINES}" with "%arg 1%" in {_x}
- send "%colored {_x}%"
- loop {CraftRank::Punkty::*}:
- set {_o::%loop-index%} to loop-value
- set {_num} to size of {_o::*}
- loop {_num} times:
- loop {_o::*}:
- {_value.%loop-number%} is not set:
- set {_value.%loop-number%} to loop-value
- set {_index.%loop-number%} to loop-index
- loop-value is more than {_value.%loop-number%}:
- set {_value.%loop-number%} to loop-value
- set {_index.%loop-number%} to loop-index
- delete {_o::%{_index.%loop-number%}%}
- loop arg 1 times:
- if loop-number is less than or equal to {_num}:
- set {_f} to {format-top10}
- replace all "{NICK}" with "%{CraftRank::Nick::%{_index.%loop-number%}%}%" in {_f}
- replace all "{POINTS}" with "%{_value.%loop-number%}%" in {_f}
- replace all "{POSITION}" with "%loop-number%" in {_f}
- send "%colored {_f}%"
- else:
- set {_u} to {format-top10null}
- replace all "{POSITION}" with "%loop-number%" in {_u}
- send "%colored {_u}%"
- on death:
- victim is player
- if {piorun} is true:
- strike lightning effect at the victim
- drop victim's skull named "&7Glowa gracza: &b%victim%" at location of victim
- add 1 to {CraftRank::Killstreak::%attacker%}
- add 1 to {CraftRank::Smierci::%victim%}
- add 1 to {CraftRank::Zabojstwa::%attacker%}
- set {_apoints} to rounded down {CraftRank::Punkty::%victim%}*{procent}
- set {_vpoints} to rounded down {_apoints}/2
- if {CraftRank::Killstreak::%attacker%} is equal to 2:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {2kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p2kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 3:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {3kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p3kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 4:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {4kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p4kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 5:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {5kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p5kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 6:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {6kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p6kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 7:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {7kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p7kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 8:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {8kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p8kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 9:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {9kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p9kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 10:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {10kill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {p10kill} to {CraftRank::Punkty::%attacker%}
- if {CraftRank::Killstreak::%attacker%} is equal to 11:
- set {_killstreak} to {killstreak}
- replace all "{KILLSTREAK}" with "%colored {maxkill}%" in {_killstreak}
- send "%colored {_killstreak}%" to attacker
- add {pmaxkill} to {CraftRank::Punkty::%attacker%}
- set {CraftRank::Killstreak::%attacker%} to 0
- remove {_vpoints} from {CraftRank::Punkty::%victim%}
- add {_apoints} to {CraftRank::Punkty::%attacker%}
- set {_df} to {deathformat}
- replace all "{VNICK}" with "%victim%" in {_df}
- replace all "{ANICK}" with "%attacker%" in {_df}
- replace all "{APOINTS}" with "%{_apoints}%" in {_df}
- replace all "{VPOINTS}" with "%{_vpoints}%" in {_df}
- set death message to "%colored {_df}%"
- set {CraftRank::Killstreak::%victim%} to 0
- if {CraftRank::AntyRelog::%victim%} is true:
- delete {CraftRank::AntyRelog::%victim%}
- stop
- stop
- on quit:
- if {CraftRank::AntyRelog::%player%} is true:
- if {piorun} is true:
- strike lightning effect at the player
- kill player
- remove {relogpoints} from {CraftRank::Punkty::%player%}
- set {_rf} to {relogformat}
- replace all "{NICK}" with "%player%" in {_rf}
- replace all "{POINTS}" with "%{_relogpoints}%" in {_rf}
- broadcast "%colored {_rf}%"
- stop
- on damage of player:
- if {CraftRank::AntyRelog::%victim%} is false:
- send "&cJestes podczas walki, nie mozesz sie wylogowac!" to victim
- set {CraftRank::AntyRelog::%victim%} to true
- wait 15 seconds
- if {CraftRank::AntyRelog::%victim%} is true:
- send "&aJuz nie jestes podczas walki, mozesz sie wylogowac!" to victim
- delete {CraftRank::AntyRelog::%victim%}
- stop
- on join:
- if {CraftRank::Smierci::%player%} is not set:
- set {CraftRank::Smierci::%player%} to 0
- stop
- if {CraftRank::Zabojstwa::%player%} is not set:
- set {CraftRank::Zabojstwa::%player%} to 0
- stop
- if {CraftRank::Punkty::%player%} is not set:
- set {CraftRank::Punkty::%player%} to 1000
- stop
- if {CraftRank::AntyRelog::%player%} is set:
- delete {CraftRank::AntyRelog::%player%}
- stop
- set {CraftRank::Nick::%player%} to player
- set {CraftRank::Killstreak::%player%} to 0
- stop
- command /gracz [<offline player=%player%>]:
- aliases: ginfo, infogracz
- trigger:
- if arg 1 is set:
- if {CraftRank::Punkty::%arg 1%} is set:
- send "&8======[ &6%arg 1% &8]======"
- send "&7Punkty: &6%{CraftRank::Punkty::%arg 1%}%"
- send "&7Zabojstwa: &6%{CraftRank::Zabojstwa::%arg 1%}%"
- send "&7Smierci: &6%{CraftRank::Smierci::%arg 1%}%"
- if {CraftRank::Punkty::%arg 1%} is not set:
- send "&cTaki gracz nigdy nie gral na serwerze!"
- stop
- else:
- send "&8======[ &6%player% &8]======"
- send "&8> &7Punkty: &6%{CraftRank::Punkty::%arg 1%}%"
- send "&8> &7Zabojstwa: &6%{CraftRank::Zabojstwa::%arg 1%}%"
- send "&8> &7Smierci: &6%{CraftRank::Smierci::%arg 1%}%"
- stop
Advertisement
Add Comment
Please, Sign In to add comment