Advertisement
xNawi

Duel (hiplay.pl)

Mar 17th, 2016
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. # Author: Nawo
  2. # Contact: romug1337@gmail.com
  3.  
  4. options:
  5. world name: Standard
  6. countdown: 3
  7.  
  8. variables:
  9. {duel::status::%player%} = "before"
  10. {duel::player::%player%::kill} = 0
  11. {duel::player::%player%::death} = 0
  12.  
  13. on damage of player:
  14. if attacker is a player:
  15. if attacker is in world "{@world name}":
  16. if {duel::status::%attacker%} is "before":
  17. cancel event
  18. if {duel::status::%victim%} is "before":
  19. if {duel::opponent::%victim%} is "%attacker%":
  20. set {duel::status::%attacker%} to "countdown"
  21. set {duel::status::%victim%} to "countdown"
  22. set {duel::opponent::%victim%} to "%attacker%"
  23. set {_sec%attacker%} to {@countdown}
  24. hide all players from attacker
  25. hide all players from victim
  26. reveal victim to attacker
  27. reveal attacker to victim
  28. loop {@countdown} times:
  29. if {duel::status::%attacker%} is "countdown":
  30. send "&a&lPrzygotuj sie! Walka z &6&l%victim% &a&lZacznie sie za &6&l%{_sec%attacker%}% &a&lsek!" to attacker
  31. send "&a&lPrzygotuj sie! Walka z &6&l%attacker% &a&lZacznie sie za &6&l%{_sec%attacker%}% &a&lsek!" to victim
  32. play raw sound "note.pling" at attacker with pitch 1 volume 5
  33. play raw sound "note.pling" at victim with pitch 1 volume 5
  34. wait 1 seconds
  35. remove 1 from {_sec%attacker%}
  36. else:
  37. exit loop
  38. if {duel::status::%attacker%} is "countdown":
  39. play raw sound "note.pling" at attacker with pitch 2 volume 5
  40. play raw sound "note.pling" at victim with pitch 2 volume 5
  41. set {duel::status::%attacker%} to "during"
  42. set {duel::status::%victim%} to "during"
  43. else if {duel::opponent::%victim%} is not "%attacker%":
  44. if {duel::opponent::%attacker%} is not "%victim%":
  45. send "&2Zaproszenie do walki zostalo wyslane do gracza &6&l%victim%" to attacker
  46. send "&2Zostales zaproszony do walki przez gracza &6&l%attacker%" to victim
  47. set {duel::opponent::%attacker%} to "%victim%"
  48. else if {duel::opponent::%attacker%} is "%victim%":
  49. send "&2Ten gracz otrzymal juz zaproszenie do walki!" to attacker
  50. else if {duel::status::%victim%} is "during" or "countdown":
  51. send "&2Ten gracz jest juz podczas walki!"
  52. if {duel::status::%attacker%} is "countdown":
  53. cancel event
  54. if {duel::status::%attacker%} is "during":
  55. if victim is not "%{duel::opponent::%attacker%}%":
  56. cancel event
  57. hide victim from attacker
  58. on death of player:
  59. if attacker is a player:
  60. if attacker is in world "{@world name}":
  61. launch flickering trailing ball firework colored white at attacker timed 2
  62. clear drops
  63. set {duel::status::%attacker%} to "before"
  64. set {duel::status::%victim%} to "before"
  65. set {duel::opponent::%victim%} to "none"
  66. set {duel::opponent::%attacker%} to "none"
  67. add 1 to {duel::player::%attacker%::kill}
  68. add 1 to {duel::player::%victim%::death}
  69. reveal all players to attacker
  70. reveal all players to victim
  71. send "&6&l%attacker% &c&lzabil &6&l%victim% &7&l(%attacker's health%&4&l❤&7&l)" to all players in world "{@world name}"
  72. heal attacker
  73. on quit:
  74. reveal all players to {duel::status::%{duel::opponent::%player%}%}
  75. set {duel::status::%player%} to "before"
  76. set {duel::status::%{duel::opponent::%player%}%} to "before"
  77. set {duel::opponent::%{duel::opponent::%player%}%} to "none"
  78. set {duel::opponent::%player%} to "none"
  79. every 1 seconds:
  80. loop all players:
  81. if loop-player is in world "{@world name}":
  82. display board named " &2STATYSTYKI" to loop-player
  83. make score "&eZabojstwa:" in board of loop-player to {duel::player::%loop-player%::kill}
  84. make score "&eZgony:" in board of loop-player to {duel::player::%loop-player%::death}
  85. move display of loop-player to sidebar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement