Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- if {statystyki::apple::%player%} is not set:
- set {statystyki::%player%} to true
- set {statystyki::apple::%player%} to 0
- set {statystyki::kills::%player%} to 0
- set {statystyki::death::%player%} to 0
- set {statystyki::place::%player%} to 0
- set {statystyki::break::%player%} to 0
- on place:
- add 1 to {statystyki::place::%player%}
- on break:
- add 1 to {statystyki::break::%player%}
- on eat enchanted golden apple:
- add 1 to {statystyki::apple::%player%}
- on death:
- if victim is a player:
- if attacker is a player:
- add 1 to {statystyki::kills::%attacker%}
- add 1 to {statystyki::death::%victim%}
- else:
- add 1 to {statystyki::death::%victim%}
- every 5 minutes:
- set {_list::*} to "apple" and "kills","death","place","break"
- loop {_list::*}:
- clear {top5::%loop-value%::*}
- set {_size} to size of {statystyki::apple::*}
- loop {_list::*}:
- loop {_size} times:
- loop {statystyki::%loop-value%::*}:
- if {_v.%loop-number%.%loop-value-1%} is not set:
- set {_v.%loop-number%.%loop-value-1%} to loop-value-2
- set {_n.%loop-number%.%loop-value-1%} to loop-index-2
- if loop-value-2 is larger than {_v.%loop-number%.%loop-value-1%}:
- set {_v.%loop-number%.%loop-value-1%} to loop-value-2
- set {_n.%loop-number%.%loop-value-1%} to loop-index-2
- remove {_v.%loop-number%.%loop-value-1%} from {statystyki::%loop-value-1%::*}
- loop {_size} times:
- if loop-number is smaller than or equal to 5:
- add "&c%loop-number%. &6%{_n.%loop-number%.%loop-value%}%&8: &7%{_v.%loop-number%.%loop-value%}%" to {top5::%loop-value%::*}
- set {statystyki::%loop-value%::%{_n.%loop-number%.%loop-value%}%} to {_v.%loop-number%.%loop-value%}
- command /statystyki [<text>] [<player>]:
- aliases: staty
- trigger:
- wait 5 tick
- if arg 1 is not set:
- open chest with 1 row named "&cStatystyki" to player
- wait 1 tick
- format slot 2 of player with diamond named "&aTwoje statystyki" to close then run [execute player command "statystyki player"]
- format slot 6 of player with redstone named "&aTop 5" with lore "&aStatystyki odswiezaja sie co 5 minut" to close then run [execute player command "statystyki serwer"]
- format slot 8 of player with paper named "&aWyjscie" to close
- if arg 1 is "serwer":
- open chest with 1 row named "&cTop 5" to player
- wait 1 tick
- set {_lore} to "&aTwoje: &c%{statystyki::kills::%player%}%||%{top5::kills::1}%||%{top5::kills::2}%||%{top5::kills::3}%||%{top5::kills::4}%||%{top5::kills::5}%"
- replace all "<none>" with "" in {_lore}
- format slot 1 of player with diamond sword named "&7Kille" with lore {_lore} to be unstealable
- set {_lore} to "&aTwoje: &c%{statystyki::place::%player%}%||%{top5::place::1}%||%{top5::place::2}%||%{top5::place::3}%||%{top5::place::4}%||%{top5::place::5}%"
- replace all "<none>" with "" in {_lore}
- format slot 2 of player with stone named "&7Postawione bloki" with lore {_lore} to be unstealable
- set {_lore} to "&aTwoje: &4%{statystyki::apple::%player%}%||%{top5::apple::1}%||%{top5::apple::2}%||%{top5::apple::3}%||%{top5::apple::4}%||%{top5::apple::5}%"
- replace all "<none>" with "" in {_lore}
- format slot 3 of player with enchanted golden apple named "&7Zjedzone koxy" with lore {_lore} to be unstealable
- set {_lore} to "&aTwoje: &4%{statystyki::break::%player%}%||%{top5::break::1}%||%{top5::break::2}%||%{top5::break::3}%||%{top5::break::4}%||%{top5::break::5}%"
- replace all "<none>" with "" in {_lore}
- format slot 4 of player with diamond pickaxe named "&7Wykopane bloki" with lore {_lore} to be unstealable
- set {_lore} to "&aTwoje: &4%{statystyki::death::%player%}%||%{top5::death::1}%||%{top5::death::2}%||%{top5::death::3}%||%{top5::death::4}%||%{top5::death::5}%"
- replace all "<none>" with "" in {_lore}
- format slot 5 of player with bone named "&7Smierci" with lore {_lore} to be unstealable
- format slot 8 of player with paper named "&7Powrot" to close then run [execute player command "statystyki"]
- stop
- if arg 1 is "player":
- wait 1 tick
- open chest with 1 row named "&aStatystyki &2%player%" to player
- wait 1 tick
- format slot 1 of player with diamond sword named "&7Twoje kille" with lore "&c%{statystyki::kills::%player%}%" to be unstealable
- format slot 2 of player with stone named "&7Postawione bloki" with lore "&c%{statystyki::place::%player%}%" to be unstealable
- format slot 3 of player with enchanted golden apple named "&7Zjedzone koxy" with lore "&4%{statystyki::apple::%player%}%" to be unstealable
- format slot 4 of player with diamond pickaxe named "&7Wykopane bloki" with lore "&4%{statystyki::break::%player%}%" to be unstealable
- format slot 5 of player with bone named "&7Smierci" with lore "&4%{statystyki::death::%player%}%" to be unstealable
- format slot 8 of player with paper named "&7Powrot" to close then run [execute player command "statystyki"]
- stop
Advertisement
Add Comment
Please, Sign In to add comment