Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /tarcza2:
- trigger:
- give 1 of clay ball named "&bTarcza Obroncy" with lore "&5&lWytrzymalosc Przedmiotu: &2%100/100", "&dKliknij prawym aby zalozyc!" to player
- on rightclick:
- name of player's tool is "&bTarcza Obroncy":
- set {_temp} to player's offhand tool
- set player's offhand tool to player's tool
- set player's tool to {_temp}
- send "&bZalozyles tarcze!" to player
- on damage of player:
- attacker is set
- name of victim's offhand tool is "&bTarcza Obroncy":
- set {_damage} to damage * 0.85
- set damage to {_damage}
- set {_lore} to uncolored 1st line of victim's offhand tool's lore
- replace all "Wytrzymalosc Przedmiotu: " and "/100" with "" in {_lore}
- set {_lore} to {_lore} parsed as number
- reduce {_lore} by 1
- set 1st line of victim's offhand tool's lore to "&5&lWytrzymalosc Przedmiotu: &2%{_lore}%&2/100"
- if {_lore} is 0:
- set victim's offhand tool to air
- send "&4&l[!] &cTwoja tarcza ulegla zniszczeniu!" to victim
- play "ENTITY_ITEM_BREAK" to victim at volume 1
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement