Advertisement
Guest User

Tarcza fix

a guest
Apr 18th, 2021
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. command /tarcza2:
  2. trigger:
  3. give 1 of clay ball named "&bTarcza Obroncy" with lore "&5&lWytrzymalosc Przedmiotu: &2%100/100", "&dKliknij prawym aby zalozyc!" to player
  4.  
  5. on rightclick:
  6. name of player's tool is "&bTarcza Obroncy":
  7. set {_temp} to player's offhand tool
  8. set player's offhand tool to player's tool
  9. set player's tool to {_temp}
  10. send "&bZalozyles tarcze!" to player
  11.  
  12. on damage of player:
  13. attacker is set
  14. name of victim's offhand tool is "&bTarcza Obroncy":
  15. set {_damage} to damage * 0.85
  16. set damage to {_damage}
  17. set {_lore} to uncolored 1st line of victim's offhand tool's lore
  18. replace all "Wytrzymalosc Przedmiotu: " and "/100" with "" in {_lore}
  19. set {_lore} to {_lore} parsed as number
  20. reduce {_lore} by 1
  21. set 1st line of victim's offhand tool's lore to "&5&lWytrzymalosc Przedmiotu: &2%{_lore}%&2/100"
  22. if {_lore} is 0:
  23. set victim's offhand tool to air
  24. send "&4&l[!] &cTwoja tarcza ulegla zniszczeniu!" to victim
  25. play "ENTITY_ITEM_BREAK" to victim at volume 1
  26. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement