Guest User

Untitled

a guest
May 1st, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. command /stanwalki:
  2. aliases: sw
  3. trigger:
  4. if {stanwalki::%player%} is not set:
  5. send "&7Obecnie nie jestes podczas walki!"
  6. stop
  7. else:
  8. send "&7Aktualnie walczysz z &a%{stanwalki::%player%}%&7."
  9. send "&7Do konca walki pozostalo &c%{czaswalki::%player%}% &7sekund."
  10. stop
  11. on command:
  12. if {stanwalki::%player%} is set:
  13. if full command is not "stanwalki" or "sw":
  14. cancel event
  15. send "&cNie mozesz uzyc tej komendy podczas walki!"
  16. stop
  17. on damage of player:
  18. if attacker is a player:
  19. if {blokada::%attacker%::gracz} is victim:
  20. cancel event
  21. send "&7Mozesz walczyc z tym graczem za &c%{blokada::%attacker%::czas}% &7sekund." to attacker
  22. stop
  23. if {stanwalki::%victim%} is set:
  24. if {stanwalki::%victim%} is not attacker:
  25. cancel event
  26. send "&cTen gracz jest juz podczas walki!" to attacker
  27. stop
  28. if {stanwalki::%attacker%} is set:
  29. if {stanwalki::%attacker%} is not victim:
  30. cancel event
  31. send "&cJestes juz podczas walki!" to attacker
  32. stop
  33. if {stanwalki::%attacker%} is not set:
  34. set {stanwalki::%attacker%} to name of victim
  35. send "&7Rozpoczynasz walke z &a%victim%&7." to attacker
  36. if {stanwalki::%victim%} is not set:
  37. set {stanwalki::%victim%} to name of attacker
  38. send "&a%attacker% &7rozpoczyna z Toba walke." to victim
  39. set {czaswalki::%victim%} to 10
  40. set {czaswalki::%attacker%} to 10
  41.  
  42. on death of player:
  43. if attacker is a player:
  44. send "&a%{stanwalki::%victim%}% &7zabija Cie i przegrywasz walke!" to victim
  45. send "&7Zabijasz &a%victim% &7i wygrywasz walke!" to attacker
  46. clear {czaswalki::%victim%}
  47. clear {stanwalki::%victim%}
  48. clear {czaswalki::%attacker%}
  49. clear {stanwalki::%attacker%}
  50. stop
  51.  
  52. every 1 second:
  53. loop {czaswalki::*}:
  54. if {czaswalki::%loop-index%} is more than 0:
  55. remove 1 from {czaswalki::%loop-index%}
  56. else if {czaswalki::%loop-index%} is 0:
  57. send "&7Zakonczyles walke z &a%{stanwalki::%loop-index%}%&7." to loop-index parsed as player
  58. set {blokada::%loop-index%::gracz} to {stanwalki::%loop-index%}
  59. set {blokada::%loop-index%::czas} to 10
  60. clear {czaswalki::%loop-index%}
  61. clear {stanwalki::%loop-index%}
  62. loop 10 times:
  63. wait a second
  64. remove 1 from {blokada::%loop-index%::czas}
  65. clear {blokada::%loop-index%::gracz}
  66. clear {blokada::%loop-index%::czas}
  67.  
  68. on quit:
  69. if {stanwalki::%player%} is set:
  70. broadcast "&a%player% &7wylogowal sie podczas walki!"
  71. kill player
  72. clear {czaswalki::%{czaswalki::%player%}%}
  73. clear {stanwalki::%{stanwalki::%player%}%}
  74. clear {czaswalki::%player%}
  75. clear {stanwalki::%player%}
  76. stop
Advertisement
Add Comment
Please, Sign In to add comment