ShooterowyPL

Ochrona

Jan 7th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. options:
  2. tag: &7[&eOCHRONA&7] #Tag skryptu
  3. czas: 180 #Czas ochrony w minutach
  4. komenda: ochrona wylacz #komenda ktora wylacza ochrone
  5. on first join:
  6. wait a tick
  7. set {ochrona::%player%} to {@czas}
  8. set player's helmet to golden helmet named "&6OCHRONA"
  9. send "{@tag} &7Jestes chroniony przed innymi graczami przez &c{@czas} &aminut."
  10. send "{@tag} &7Jezeli chcesz usunac ochrone wczesniej uzyj komendy &e/{@komenda}"
  11. on damage:
  12. if {ochrona::%victim%} is set:
  13. cancel event
  14. if attacker is a player:
  15. send "{@tag} &7Ochrona tego gracza jest aktywna. Nie mozesz go zaatakowac." to attacker
  16. stop
  17. if {ochrona::%attacker%} is set:
  18. if victim is a player:
  19. cancel event
  20. send "{@tag} &7Twoja ochrona jest aktywna. Nie mozesz nikogo zaatakowac." to attacker
  21. send "{@tag} &7Jezeli chcesz usunac ochrone uzyj komendy &e/{@komenda}" to attacker
  22. stop
  23. on command:
  24. if full command is "{@komenda}":
  25. cancel event
  26. if {ochrona::%player%} is not set:
  27. send "{@tag} &cNie masz juz ochrony."
  28. stop
  29. clear {ochrona::%player%}
  30. set player's helmet to air
  31. send "{@tag} &7Twoja ochrona zostala wylaczona."
  32. play raw sound "random.pop" at player with pitch 10 volume 10
  33. launch flickering burst firework colored orange and blue fade green and red at player timed 0.5
  34. stop
  35. if full command is "dolacz" or "zaloz":
  36. if {ochrona::%player%} is set:
  37. cancel event
  38. send "{@tag} &7Ta komenda jest niedostepna, dopoki masz ochrone."
  39. send "{@tag} &7Jezeli chcesz usunac ochrone uzyj komendy &e/{@komenda}"
  40. stop
  41. every 1 minute:
  42. loop {ochrona::*}:
  43. if {ochrona::%loop-index%} is more than 0:
  44. remove 1 from {ochrona::%loop-index%}
  45. else if {ochrona::%loop-index%} is 0:
  46. clear {ochrona::%loop-index%}
  47. if loop-index parsed as player is online:
  48. send "{@tag} &7Twoja ochrona dobiegla konca." to loop-index parsed as player
  49. play raw sound "random.pop" at loop-index parsed as player with pitch 10 volume 10
  50. launch flickering burst firework colored orange and blue fade green and red at loop-index parsed as player timed 0.5
  51. set loop-index parsed as player's helmet to air
  52. command /ochrona [<text>]:
  53. trigger:
  54. arg is not set:
  55. if {ochrona::%player%} is not set:
  56. send "{@tag} &cNie masz juz ochrony."
  57. stop
  58. send "{@tag} &7Twoja ochrona konczy sie za &c%{ochrona::%player%}% &7minut."
  59. stop
  60. arg is "wlacz":
  61. if player doesn't have the permission "ochrona.wlacz":
  62. send "{@tag} &cNie masz uprawnien do tej komendy!"
  63. stop
  64. if {ochrona::%player%} is set:
  65. send "{@tag} &cMasz juz ochrone."
  66. stop
  67. set {ochrona::%player%} to {@czas}
  68. if player's helmet is any helmet:
  69. add player's helmet to player
  70. set player's helmet to golden helmet named "&6OCHRONA"
  71. send "{@tag} &7Jestes chroniony przed innymi graczami przez &c{@czas} &7minut."
  72. send "{@tag} &7Jezeli chcesz usunac ochrone wczesniej uzyj komendy &e/{@komenda}"
  73. stop
  74. on inventory click:
  75. if slot is 39:
  76. if {ochrona::%player%} is set:
  77. cancel event
  78. send "{@tag} &cNie mozesz zdjac tego helmu podczas trwania ochrony."
  79. send "{@tag} &7Jezeli chcesz usunac ochrone wczesniej uzyj komendy &e/{@komenda}"
  80. stop
Add Comment
Please, Sign In to add comment