Guest User

Untitled

a guest
Jun 27th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.44 KB | None | 0 0
  1. if arg 1 is "join":
  2. if arg 2 is set:
  3. set {_create} to yaml value "areny.%arg 2%.create" from "TDM/config.yml"
  4. if {_create} is "true":
  5. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  6. if {_online} is "false":
  7. set {_gracze.red::*} to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  8. set {_gracze.blue::*} to yaml list "areny.%arg 2%.gracze.blue" from "TDM/config.yml"
  9. set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
  10. if {_status} is "&4&l&nOtwarta":
  11. set yaml value "online" from "TDM/players/%player%/config.yml" to "true"
  12. set yaml value "arena" from "TDM/players/%player%/config.yml" to "%arg 2%"
  13. set {_gracze.red::*} to yaml list "areny.%{_arena}%.gracze.red" from "TDM/config.yml"
  14. set {_gracze.blue::*} to yaml list "areny.%{_arena}%.gracze.blue" from "TDM/config.yml"
  15. set {_gracze} to (size of {_gracze.red::*})+(size of {_gracze.blue::*})+1
  16. if (size of {_gracze.red::*}) <= (size of {_gracze.blue::*}):
  17. set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
  18. add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  19. send "&eDolaczyles do areny &6%arg 2%&e druzyny &c&lCzerwononych&e. &6%{_gracze}%&e/&62"
  20. while {_status} is "&4&l&nOtwarta":
  21. wait 1 seconds
  22. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  23. if {_online} is "true":
  24. set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
  25. else:
  26. function "tdm.ekwipunek" {player and "start"};
  27. stop
  28. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  29. if {_online} is "true":
  30. send "&eZa &6&l10 &esekund rozpocznie sie runda!"
  31. else:
  32. function "tdm.ekwipunek" {player and "start"};
  33. stop
  34. wait 5 seconds
  35. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  36. if {_online} is "true":
  37. send "&eZa &6&l5 &esekund rozpocznie sie runda!"
  38. else:
  39. function "tdm.ekwipunek" {player and "start"};
  40. stop
  41. wait 1 seconds
  42. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  43. if {_online} is "true":
  44. send "&eZa &6&l4 &esekundy rozpocznie sie runda!"
  45. else:
  46. function "tdm.ekwipunek" {player and "start"};
  47. stop
  48. wait 1 seconds
  49. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  50. if {_online} is "true":
  51. send "&eZa &6&l3 &esekundy rozpocznie sie runda!"
  52. else:
  53. stop
  54. wait 1 seconds
  55. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  56. if {_online} is "true":
  57. send "&eZa &6&l2 &esekundy rozpocznie sie runda!"
  58. else:
  59. function "tdm.ekwipunek" {player and "start"};
  60. stop
  61. wait 1 seconds
  62. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  63. if {_online} is "true":
  64. send "&eZa &6&l1 &esekunde rozpocznie sie runda!"
  65. else:
  66. function "tdm.ekwipunek" {player and "start"};
  67. stop
  68. wait 1 seconds
  69. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  70. if {_online} is "false":
  71. function "tdm.ekwipunek" {player and "start"};
  72. stop
  73. clear player's inventory
  74. set {_spawn.x} to yaml value "areny.%arg 2%.spawn.red.x" from "TDM/config.yml"
  75. set {_spawn.y} to yaml value "areny.%arg 2%.spawn.red.y" from "TDM/config.yml"
  76. set {_spawn.z} to yaml value "areny.%arg 2%.spawn.red.z" from "TDM/config.yml"
  77. set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
  78. set {_gracze.red::*} to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  79. loop {_gracze.red::*} parsed as player:
  80. teleport loop-player to {_spawn}
  81. function "tdm.ekwipunek" {player and "red"};
  82. send "&eRunda rozpoczeta!"
  83. stop
  84. if (size of {_gracze.red::*}) >= (size of {_gracze.blue::*}):
  85. set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
  86. add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  87. send "&eDolaczyles do areny &6%arg 2%&e druzyny &3&lNiebieskich&e. &6%{_gracze}%&e/&610"
  88. while {_status} is "&4&l&nOtwarta":
  89. wait 1 seconds
  90. set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
  91. if {_online} is "true":
  92. set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
  93. else:
  94. function "tdm.ekwipunek" {player and "start"};
  95. stop
  96. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  97. if {_online} is "true":
  98. send "&eZa &6&l10 &esekund rozpocznie sie runda!"
  99. else:
  100. function "tdm.ekwipunek" {player and "start"};
  101. stop
  102. wait 5 seconds
  103. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  104. if {_online} is "true":
  105. send "&eZa &6&l5 &esekund rozpocznie sie runda!"
  106. else:
  107. function "tdm.ekwipunek" {player and "start"};
  108. stop
  109. wait 1 seconds
  110. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  111. if {_online} is "true":
  112. send "&eZa &6&l4 &esekundy rozpocznie sie runda!"
  113. else:
  114. function "tdm.ekwipunek" {player and "start"};
  115. stop
  116. wait 1 seconds
  117. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  118. if {_online} is "true":
  119. send "&eZa &6&l3 &esekundy rozpocznie sie runda!"
  120. else:
  121. function "tdm.ekwipunek" {player and "start"};
  122. stop
  123. wait 1 seconds
  124. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  125. if {_online} is "true":
  126. send "&eZa &6&l2 &esekundy rozpocznie sie runda!"
  127. else:
  128. function "tdm.ekwipunek" {player and "start"};
  129. stop
  130. wait 1 seconds
  131. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  132. if {_online} is "true":
  133. send "&eZa &6&l1 &esekunde rozpocznie sie runda!"
  134. else:
  135. function "tdm.ekwipunek" {player and "start"};
  136. stop
  137. wait 1 seconds
  138. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  139. if {_online} is "false":
  140. function "tdm.ekwipunek" {player and "start"};
  141. stop
  142. clear player's inventory
  143. set {_spawn.x} to yaml value "areny.%arg 2%.spawn.blue.x" from "TDM/config.yml"
  144. set {_spawn.y} to yaml value "areny.%arg 2%.spawn.blue.y" from "TDM/config.yml"
  145. set {_spawn.z} to yaml value "areny.%arg 2%.spawn.blue.z" from "TDM/config.yml"
  146. set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
  147. set {_gracze.blue::*} to yaml list "areny.%{_arena}%.gracze.blue" from "TDM/config.yml"
  148. loop {_gracze.blue::*} parsed as player:
  149. teleport loop-player to {_spawn}
  150. function "tdm.ekwipunek" {player and "blue"};
  151. send "&eRunda rozpoczeta!"
  152. stop
Advertisement
Add Comment
Please, Sign In to add comment