Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- tag: &7[&eOCHRONA&7] #Tag skryptu
- czas: 180 #Czas ochrony w minutach
- komenda: ochrona wylacz #komenda ktora wylacza ochrone
- on first join:
- wait a tick
- set {ochrona::%player%} to {@czas}
- set player's helmet to golden helmet named "&6OCHRONA"
- send "{@tag} &7Jestes chroniony przed innymi graczami przez &c{@czas} &aminut."
- send "{@tag} &7Jezeli chcesz usunac ochrone wczesniej uzyj komendy &e/{@komenda}"
- on damage:
- if {ochrona::%victim%} is set:
- cancel event
- if attacker is a player:
- send "{@tag} &7Ochrona tego gracza jest aktywna. Nie mozesz go zaatakowac." to attacker
- stop
- if {ochrona::%attacker%} is set:
- if victim is a player:
- cancel event
- send "{@tag} &7Twoja ochrona jest aktywna. Nie mozesz nikogo zaatakowac." to attacker
- send "{@tag} &7Jezeli chcesz usunac ochrone uzyj komendy &e/{@komenda}" to attacker
- stop
- on command:
- if full command is "{@komenda}":
- cancel event
- if {ochrona::%player%} is not set:
- send "{@tag} &cNie masz juz ochrony."
- stop
- clear {ochrona::%player%}
- set player's helmet to air
- send "{@tag} &7Twoja ochrona zostala wylaczona."
- play raw sound "random.pop" at player with pitch 10 volume 10
- launch flickering burst firework colored orange and blue fade green and red at player timed 0.5
- stop
- if full command is "dolacz" or "zaloz":
- if {ochrona::%player%} is set:
- cancel event
- send "{@tag} &7Ta komenda jest niedostepna, dopoki masz ochrone."
- send "{@tag} &7Jezeli chcesz usunac ochrone uzyj komendy &e/{@komenda}"
- stop
- every 1 minute:
- loop {ochrona::*}:
- if {ochrona::%loop-index%} is more than 0:
- remove 1 from {ochrona::%loop-index%}
- else if {ochrona::%loop-index%} is 0:
- clear {ochrona::%loop-index%}
- if loop-index parsed as player is online:
- send "{@tag} &7Twoja ochrona dobiegla konca." to loop-index parsed as player
- play raw sound "random.pop" at loop-index parsed as player with pitch 10 volume 10
- launch flickering burst firework colored orange and blue fade green and red at loop-index parsed as player timed 0.5
- set loop-index parsed as player's helmet to air
- command /ochrona [<text>]:
- trigger:
- arg is not set:
- if {ochrona::%player%} is not set:
- send "{@tag} &cNie masz juz ochrony."
- stop
- send "{@tag} &7Twoja ochrona konczy sie za &c%{ochrona::%player%}% &7minut."
- stop
- arg is "wlacz":
- if player doesn't have the permission "ochrona.wlacz":
- send "{@tag} &cNie masz uprawnien do tej komendy!"
- stop
- if {ochrona::%player%} is set:
- send "{@tag} &cMasz juz ochrone."
- stop
- set {ochrona::%player%} to {@czas}
- if player's helmet is any helmet:
- add player's helmet to player
- set player's helmet to golden helmet named "&6OCHRONA"
- send "{@tag} &7Jestes chroniony przed innymi graczami przez &c{@czas} &7minut."
- send "{@tag} &7Jezeli chcesz usunac ochrone wczesniej uzyj komendy &e/{@komenda}"
- stop
- on inventory click:
- if slot is 39:
- if {ochrona::%player%} is set:
- cancel event
- send "{@tag} &cNie mozesz zdjac tego helmu podczas trwania ochrony."
- send "{@tag} &7Jezeli chcesz usunac ochrone wczesniej uzyj komendy &e/{@komenda}"
- stop
Add Comment
Please, Sign In to add comment