Advertisement
buss2

b1vs1

Oct 7th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. #1vs1
  2.  
  3. command /1vs1 [<text>] [<text>] [<text>]:
  4. aliases:
  5. trigger:
  6. if player has permission "1vs1.admin":
  7. if arg 1 is "create":
  8. if arg 2 is set:
  9. if {b1vs1::map::%arg 2%} is not set:
  10. set {b1vs1::map::%arg 2%} to arg 2
  11. send "{@tag}&2Utwozyles pomyslnie mape:&3 %arg 2%!"
  12. else:
  13. send "{@tag}&cMapa o nazwie:&2 %arg 2% &cJuz istnieje!"
  14. else:
  15. send "{@tag}&cPodaj nazwe mapy!"
  16. if arg 1 is "setlobby":
  17. set {_x} to location of player
  18. clear {b1vs1::lobby::global}
  19. set {b1vs1::lobby::global} to {_x}
  20. send "{@tag}&2Ustawiles lobby"
  21. if arg 1 is "spawnmap":
  22. if arg 2 is set:
  23. if arg 3 is "blue" or "red":
  24. if {b1vs1::map::%arg 2%} is set:
  25. set {_x} to arg 3
  26. set {_y} to location of player
  27. if {_x} is "blue":
  28. set {b1vs1::spawnPoint::{_x}::%arg 2%} to {_y}
  29. send "{@tag}&2Utwozyles spawn &d{_x} na mapie &d%arg 2%!"
  30. if {_x} is "red"
  31. set {b1vs1::spawnPoint::{_x}::%arg 2%} to {_y}
  32. send "{@tag}&2Utwozyles spawn &d{_x} na mapie &d%arg 2%!"
  33. else:
  34. send "{@tag}&cMozesz ustawić tylko spawn &1BLUE &ci &4RED!"
  35. else:
  36. send "{@tag}&cNie mapy o nazwie &4%arg 2%"
  37. else:
  38. send "{@tag}&cMozesz ustawić tylko spawn &1BLUE &ci &4RED!"
  39. else:
  40. send "{@tag}&cPodaj nazwe mapy!"
  41. if arg 1 is "sprawdz":
  42. if arg 2 is player:
  43. send "{@tag}&bStatystyki gracza: &2%arg 2%"
  44. send " &2Wygrane&7: &e{b1vs1::win::%arg 2%}"
  45. send " &2Przegrane&7: &e{b1vs1::lose::%arg 2%}"
  46. send " &2Zabojstwa&7: &e{b1vs1::kill::%arg 2%}"
  47. send " &2Smierci&7: &e{b1vs1::death::%arg 2%}"
  48.  
  49. if player has permission "b1vs1.gracz":
  50. if arg 1 is "dolacz":
  51. if arg 2 is set:
  52. if {b1vs1::map::%arg 2%} is set:
  53. if {b1vs1::waitingMap::%arg 2%} is "brak":
  54. set {_x} to random integer between 1 and 2
  55. if {_x} is "1":
  56. teleport player to {b1vs1::spawnPoint::%arg 2%::blue}
  57. set {b1vs1::oczekuje::%player%} to true
  58. set {b1vs1::waitingMap::%arg 2%} to "1"
  59. set {b1vs1::zostalo::%arg 2%} to "red"
  60. add %player% {b1vs1::walka::%arg 2%}
  61. clear player inventory
  62. loop 36 times:
  63. set {_x} to 1*0.1
  64. give player 1 emerald named "&4CZEKAJ" with lore "&0{_x}"
  65. if {_x} is "2":
  66. teleport player to {b1vs1::spawnPoint::%arg 2%::red}
  67. set {b1vs1::oczekuje::%player%} to true
  68. set {b1vs1::waitingMap::%arg 2%} to "1"
  69. set {b1vs1::zostalo::%arg 2%::blue} to "red"
  70. add %player% {b1vs1::walka::%arg 2%}
  71. clear player inventory
  72. loop 36 times:
  73. set {_x} to 1*0.1
  74. give player 1 emerald named "&4CZEKAJ" with lore "&0{_x}"
  75. if {b1vs1::waitingMap::%arg 2%} is "1"
  76. if {b1vs1::zostalo::%arg 2%} is "red":
  77. teleport player to {b1vs1::spawnPoint::%arg 2%::red}
  78. set {b1vs1::oczekuje::%player%} to true
  79. set {b1vs1::waitingMap::%arg 2%} to "full"
  80. set {b1vs1::zostalo::%arg 2%} to "nic"
  81. add %player% {b1vs1::walka::%arg 2%}
  82. loop {b1vs1::walka::%arg 2%}:
  83. set {_x} to {b1vs1::walka::%arg 2%}:
  84. relpace all "and" with "i" in {_x}
  85. send "{@tag}&2Walka pomiedzy &4{_x} zaraz sie rozpocznie" to loop-index
  86. send "{@tag}Macie 30 sekund na wybranie 2 klas, po czym rozpocznie sie losowanie" to loop-index
  87. open chest with 4 rows named "&21vs1" to loop-index
  88. wait 1 tick
  89. format slot 13 of loop-index with 1 of diamond sword named "&2Wojownik" to close then run "napewnowoj"
  90. format slot 14 of loop-index with 1 of bow named "&2Lucznik" to close then run "napewnolucznik"
  91. format slot 15 of loop-index with 1 of diamond chestplate named "&2Czolg" to close then run "napewnotank"
  92. set {b1vs1::mapWaitForPick::%arg 2%} to 30
  93. loop {b1vs1::mapWaitForPick::%arg 2%} time:
  94. remove 1 from {b1vs1::mapWaitingForPick::%arg 2%}
  95. wait 1 second
  96. if {b1vs1::mapWaitForPick::%arg 2%} is 0
  97. loop {b1vs1::walka::%arg 2%}:
  98. set {b1vs1::mapWalk::loop-index} to true
  99.  
  100.  
  101.  
  102. on death of player:
  103. if attacker is a player:
  104. add 1 to {b1vs1::kill::%attacker%}
  105. add 1 to {b1vs1::death::%victim%}
  106. if {b1vs1::mapWalk::%attacker%} is true:
  107. if {b1vs1::winMap::%attacker%} is "0":
  108. add 1 to {b1vs1::winMap::%attacker%}
  109. send "{@tag}&2Wygrales runde z %victim%!" to attacker
  110. send "{@tag}&cPrzegrales runde z %attacker%" to victim
  111. if {b1vs1::winMap::%attacker%} is "1":
  112. add 1 to {b1vs1::winMap::%atatcker%}
  113. send "{@tag}&2Wygrales runde z %victim%!" to attacker
  114. send "{@tag}&cPrzegrales runde z %attacker%" to victim
  115. if {b1vs1::winMap::%atatcker%} is "2":
  116. add 1 to {b1vs1::win::%attacker%}
  117. add 1 to {b1vs1::lose::%victim%}
  118. send "{@tag}&2Wyrales mape z %victim%" to attacker
  119. send "{@tag}&cPrzegrales mape z %attacker%" to victim
  120.  
  121. on sign change:
  122. if player has permission "1vs1.admin":
  123. if line 1 is "1vs1""
  124. if line 2 is "dolacz":
  125. if line 3 is set:
  126. if {b1vs1::map::%line 3%} is set:
  127. set line 1 to "{@line1}"
  128. set line 2 to "&2Dolacz"
  129. set line 3 to "&6%{b1vs1::map::%line 3%}%"
  130. if line 2 is "opusc":
  131. set line 1 to "{@line1}"
  132. set line 2 to "&2Opusc"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement