Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- #Na jaki format ma skrypt zmienic chat
- Formatowanie_chatu: &8[&2%{pkt::%player%}%&8] &7%display name of player%: %message%
- variables:
- {pkt::%player%} = 1000
- {zabicia.%player%} = 0
- {zginiecia.%player%} = 0
- {walka.%player%} = false
- on script load:
- execute command "scoreboard objectives add &aPunktow dummy"
- execute command "scoreboard objectives setdisplay belowName &aPunktow"
- on script unload:
- execute command "scoreboard objectives remove &aPunktow"
- on join:
- if {pkt::%player%} is not set:
- set {pkt::%player%} to 1000
- if {zabicia.%player%} is not set:
- set {zabicia.%player%} to 0
- if {zginiecia.%player%} is not set:
- set {zginiecia.%player%} to 0
- if {nick::%player%} is not set:
- set {nick::%player%} to uncolored display name of player
- execute command "scoreboard players %player% set &aPunktow %{pkt::%player%}%"
- loop all players:
- set {_packet::*} to "PacketPlayOutPlayerInfo", "&7Top Rank", true and 1
- loop-player.sendPacket{{_packet::*}};
- set {_num} to size of {pkt::*}
- loop {_num} times:
- loop {pkt::*}:
- {_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 {pkt::*}
- loop {_num} times:
- set {_n} to "%loop-number%. %{n.%loop-number%}% %{v.%loop-number%}%"
- set {_packet::*} to "PacketPlayOutPlayerInfo", "%{_n}%", false and 0
- loop-player.sendPacket{{_packet::*}};
- set {punkty::%{_n.%loop-number%}%} to {_v.%loop-number%}
- {_num} is less than 10:
- set {_r} to {_num}
- loop 10 - {_num} times:
- add 1 to {_r}
- set {_packet::*} to "PacketPlayOutPlayerInfo", "&7&l%{_r}%.", true and 1
- loop-player.sendPacket{{_packet::*}};
- command /rs [<offline player=%player%>]:
- trigger:
- if arg 1 is set:
- if player has permission "pixelrank.rs.player":
- set {pkt::%arg 1%} to 1000
- execute command "scoreboard players set %arg 1% &aPunktow %{pkt::%arg 1%}%"
- set {zginiecia.%arg 1%} to 0
- set {zabicia.%arg 1%} to 0
- send "&2Pomyslnie zresetowales statystyki gracza: &6%arg 1%!"
- else:
- send "&4Blad: &cNie masz uprawnien !"
- stop
- else:
- set {pkt::%player%} to 1000
- execute command "scoreboard players set %player% &aPunktow %{pkt::%player%}%"
- set {zginiecia.%player%} to 0
- set {zabicia.%player%} to 0
- send "&2Pomyslnie zresetowales swoje statystyki !"
- on chat:
- broadcast "{@Formatowanie_chatu}"
- cancel event
- on death:
- if victim is player:
- if attacker is players:
- if tool of attacker is air:
- if {pkt::%victim%} is smaller than 999:
- strike lightning effect at the player
- add 1 to {kille.%attacker%}
- add 1 to {dedy.%victim%}
- add 5 to {pkt::%attacker%}
- set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz &6fapki &7(&a+58:&c-0&7)"
- execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
- execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
- else:
- strike lightning effect at the player
- add 1 to {kille.%attacker%}
- add 1 to {dedy.%victim%}
- set {_pktattacker} to {pkt::%victim%}*0.05
- add {_pktattacker} to {pkt::%attacker%}
- set {_pktvictim} to random integer between 30 and 50
- remove {_pktvictim} from {pkt::%victim%}
- set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
- execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
- execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
- if {pkt::%victim%} is 1000:
- strike lightning effect at the player
- add 1 to {kille.%attacker%}
- add 1 to {dedy.%victim%}
- set {_pktattacker} to random integer between 39 and 79
- add {_pktattacker} to {pkt::%attacker%}
- set {_pktvictim} to random integer between 10 and 24
- add {_pktvictim} to {pkt::%victim%}
- set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
- execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
- execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
- else:
- if {pkt::%victim%} is smaller than 999:
- strike lightning effect at the player
- add 1 to {kille.%attacker%}
- add 1 to {dedy.%victim%}
- add 5 to {pkt::%attacker%}
- set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+58:&c-0&7)"
- execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
- execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
- else:
- strike lightning effect at the player
- add 1 to {kille.%attacker%}
- add 1 to {dedy.%victim%}
- set {_pktattacker} to {pkt::%victim%}*0.05
- add {_pktattacker} to {pkt::%attacker%}
- set {_pktvictim} to random integer between 30 and 50
- remove {_pktvictim} from {pkt::%victim%}
- set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
- execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
- execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
- if {pkt::%victim%} is 1000:
- strike lightning effect at the player
- add 1 to {kille.%attacker%}
- add 1 to {dedy.%victim%}
- set {_pktattacker} to random integer between 39 and 79
- add {_pktattacker} to {pkt::%attacker%}
- set {_pktvictim} to random integer between 10 and 24
- add {_pktvictim} to {pkt::%victim%}
- set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
- execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
- execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
- else:
- if attacker is creeper or zombie or enderman or spider or ghast or skeleton or slime or witch or cave spider or wolf or zombie pigman or blaze or magma cube or silverfish or wither skeleton:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &czginal od moba :) &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if attacker is wither or ender dragon:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &czginal od &4BOSSA &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if damage has been caused by block explosion:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &cwybuchna :) &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if damage has been caused by fall:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &cpolamal sobie nogi :( &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if damage has been caused by fire or burn:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &cspalil sie &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if damage has been caused by lava:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &cwpadl do lavy :D &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if damage has been caused by drowning:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &czapomnial wyplynac :> &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- else:
- if damage has been caused by drowning:
- strike lightning effect at the player
- add 1 to {dedy.%victim%}
- add -30 to {pkt.%victim%}
- set death message to "&6%victim% &czapomnial wyplynac :> &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
- command /ranking [<offline player=%player%>]:
- trigger:
- if arg 1 is set:
- send "&7&l--------------------------------------------"
- send "&cGracz: &6%arg 1%"
- send "&cIlosc rankingu: &6%{pkt::%arg 1%}%"
- send "&cIlosc zabójstw: &6%{zabicia.%arg 1%}%"
- send "&cIlosc zgonów: &6%{zginiecia.%arg 1%}%"
- send "&7&l--------------------------------------------"
- else:
- send "&7&l--------------------------------------------"
- send "&cGracz: &6%player% &7&l "
- send "&cIlosc rankingu: &6%{pkt::%player%}% &7&l "
- send "&cIlosc zabójstw: &6%{zabicia.%player%}%&7&l "
- send "&cIlosc zgonów: &6%{zginiecia.%player%}%&7&l "
- send "&7&l--------------------------------------------"
- on damage:
- if victim is player:
- if attacker is player:
- if {walka.%victim%} is true:
- if {walka.%attacker%} is true:
- stop
- else:
- set {walka.%victim%} to true
- set {walka.%attacker%} to true
- send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the victim
- send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the attacker
- wait 9 second
- set {walka.%victim%} to false
- set {walka.%attacker%} to false
- send "&aMozesz juz spokojnie sie wylogowac &b:)" to the victim
- send "&aMozesz juz spokojnie sie wylogowac &b:)" to the attacker
- stop
- else:
- set {walka.%victim%} to true
- set {walka.%attacker%} to true
- send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the victim
- send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the attacker
- wait 5 second
- set {walka.%victim%} to false
- set {walka.%attacker%} to false
- send "&aMozesz juz spokojnie sie wylogowac &b:)" to the victim
- send "&aMozesz juz spokojnie sie wylogowac &b:)" to the attacker
- stop
- command /toprank [<integer=1>]:
- trigger:
- set {_strony} to rounded up (size of {pkt::*} / 5)
- arg is between 1 and {_strony}:
- send "&8&l====&6Ranking top rank&8&l===="
- loop {pkt::*}:
- set {_lista::%loop-index%} to loop-value
- set {_num} to size of {_lista::*}
- set {_max} to arg * 5
- set {_min} to {_max} - 4
- loop {_max} times:
- loop {_lista::*}:
- {_wartosc.%loop-number%} is not set:
- set {_wartosc.%loop-number%} to loop-value
- set {_nazwa.%loop-number%} to loop-index
- loop-value is more than {_wartosc.%loop-number%}:
- set {_wartosc.%loop-number%} to loop-value
- set {_nazwa.%loop-number%} to loop-index
- remove {_wartosc.%loop-number%} from {_lista::*}
- loop {_max} times:
- loop-number is between {_min} and {_max}
- loop-number <= {_num}:
- send "&8%loop-number%. &7%{nick::%{_nazwa.%loop-number%}%}% &2(%{_wartosc.%loop-number%}%)"
- {_max} is more than {_num}:
- set {_r} to {_num}
- loop {_max} - {_num} times:
- add 1 to {_r}
- send "&7&l%{_r}%."
- send "Strona: %arg% z %{_strony}%"
- stop
- {_strony} is 1:
- send "Wyniki mieszcza sie na 1 stronie."
- stop
- send "Wyniki mieszcza sie na %{_strony}% stronach."
- on quit:
- if {walka.%player%} is true:
- strike lightning effect at the player
- add 1 to {dedy.%player%}
- add -30 to {pkt::%player%}
- broadcast "&6%player% &clognol podczas walki &7[&c-30&7]"
- execute command "scoreboard players set %player% &aPunktow %{pkt::%player%}%"
- on command:
- if {walka.%player%} is true:
- cancel event
- else:
- stop
- every 5 minute:
- loop all players:
- set {_packet::*} to "PacketPlayOutPlayerInfo", "&7Top Rank", true and 1
- loop-player.sendPacket{{_packet::*}};
- set {_num} to size of {pkt::*}
- loop {_num} times:
- loop {pkt::*}:
- {_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 {pkt::*}
- loop {_num} times:
- set {_n} to "%loop-number%. %{n.%loop-number%}% %{v.%loop-number%}%"
- set {_packet::*} to "PacketPlayOutPlayerInfo", "%{_n}%", false and 0
- loop-player.sendPacket{{_packet::*}};
- set {punkty::%{_n.%loop-number%}%} to {_v.%loop-number%}
- {_num} is less than 10:
- set {_r} to {_num}
- loop 10 - {_num} times:
- add 1 to {_r}
- set {_packet::*} to "PacketPlayOutPlayerInfo", "&7&l%{_r}%.", true and 1
- loop-player.sendPacket{{_packet::*}};
- every 10 ticks:
- loop all players:
- set {_packet::*} to "PacketPlayOutPlayerInfo", "%loop-player%", false and 0
- loop-player.sendPacket{{_packet::*}};
Advertisement
Add Comment
Please, Sign In to add comment