Guest User

Untitled

a guest
Jun 27th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.11 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. teleport player to {_spawn}
  79. function "tdm.ekwipunek" {player and "red"};
  80. send "&eRunda rozpoczeta!"
  81. stop
  82. if (size of {_gracze.red::*}) >= (size of {_gracze.blue::*}):
  83. set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
  84. add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  85. send "&eDolaczyles do areny &6%arg 2%&e druzyny &3&lNiebieskich&e. &6%{_gracze}%&e/&610"
  86. while {_status} is "&4&l&nOtwarta":
  87. wait 1 seconds
  88. set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
  89. if {_online} is "true":
  90. set {_status} to yaml value "areny.%arg 2%.status" from "TDM/config.yml"
  91. else:
  92. function "tdm.ekwipunek" {player and "start"};
  93. stop
  94. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  95. if {_online} is "true":
  96. send "&eZa &6&l10 &esekund rozpocznie sie runda!"
  97. else:
  98. function "tdm.ekwipunek" {player and "start"};
  99. stop
  100. wait 5 seconds
  101. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  102. if {_online} is "true":
  103. send "&eZa &6&l5 &esekund rozpocznie sie runda!"
  104. else:
  105. function "tdm.ekwipunek" {player and "start"};
  106. stop
  107. wait 1 seconds
  108. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  109. if {_online} is "true":
  110. send "&eZa &6&l4 &esekundy rozpocznie sie runda!"
  111. else:
  112. function "tdm.ekwipunek" {player and "start"};
  113. stop
  114. wait 1 seconds
  115. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  116. if {_online} is "true":
  117. send "&eZa &6&l3 &esekundy rozpocznie sie runda!"
  118. else:
  119. function "tdm.ekwipunek" {player and "start"};
  120. stop
  121. wait 1 seconds
  122. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  123. if {_online} is "true":
  124. send "&eZa &6&l2 &esekundy rozpocznie sie runda!"
  125. else:
  126. function "tdm.ekwipunek" {player and "start"};
  127. stop
  128. wait 1 seconds
  129. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  130. if {_online} is "true":
  131. send "&eZa &6&l1 &esekunde rozpocznie sie runda!"
  132. else:
  133. function "tdm.ekwipunek" {player and "start"};
  134. stop
  135. wait 1 seconds
  136. set {_online} to yaml value "online" from "TDM/players/%player%/config.yml"
  137. if {_online} is "false":
  138. function "tdm.ekwipunek" {player and "start"};
  139. stop
  140. clear player's inventory
  141. set {_spawn.x} to yaml value "areny.%arg 2%.spawn.blue.x" from "TDM/config.yml"
  142. set {_spawn.y} to yaml value "areny.%arg 2%.spawn.blue.y" from "TDM/config.yml"
  143. set {_spawn.z} to yaml value "areny.%arg 2%.spawn.blue.z" from "TDM/config.yml"
  144. set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
  145. teleport player to {_spawn}
  146. function "tdm.ekwipunek" {player and "blue"};
  147. send "&eRunda rozpoczeta!"
  148. stop
  149. else if {_status} is "&4&l&nW trakcie":
  150. set yaml value "online" from "TDM/players/%player%/config.yml" to "true"
  151. set yaml value "arena" from "TDM/players/%player%/config.yml" to "%arg 2%"
  152. if (size of {_gracze.red::*}) <= (size of {_gracze.blue::*}):
  153. set yaml value "team" from "TDM/players/%player%/config.yml" to "red"
  154. add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  155. send "&eDolaczyles do areny &6%arg 2%&e druzyny &c&lCzerwononych&e."
  156. clear player's inventory
  157. set {_spawn.x} to yaml value "areny.%arg 2%.spawn.red.x" from "TDM/config.yml"
  158. set {_spawn.y} to yaml value "areny.%arg 2%.spawn.red.y" from "TDM/config.yml"
  159. set {_spawn.z} to yaml value "areny.%arg 2%.spawn.red.z" from "TDM/config.yml"
  160. set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
  161. teleport player to {_spawn}
  162. function "tdm.ekwipunek" {player and "red"};
  163. stop
  164. if (size of {_gracze.red::*}) >= (size of {_gracze.blue::*}):
  165. set yaml value "team" from "TDM/players/%player%/config.yml" to "blue"
  166. add "%player%" to yaml list "areny.%arg 2%.gracze.red" from "TDM/config.yml"
  167. send "&eDolaczyles do areny &6%arg 2%&e druzyny &3&lNiebieskich&e."
  168. clear player's inventory
  169. set {_spawn.x} to yaml value "areny.%arg 2%.spawn.blue.x" from "TDM/config.yml"
  170. set {_spawn.y} to yaml value "areny.%arg 2%.spawn.blue.y" from "TDM/config.yml"
  171. set {_spawn.z} to yaml value "areny.%arg 2%.spawn.blue.z" from "TDM/config.yml"
  172. set {_spawn} to location at ({_spawn.x} parsed as number, {_spawn.y} parsed as number, {_spawn.z} parsed as number)
  173. teleport player to {_spawn}
  174. function "tdm.ekwipunek" {player and "blue"};
  175. stop
  176. else:
  177. send "&eJestes podczas gry!"
  178. stop
  179. else:
  180. send "&eNie istnieje taka arena!"
  181. stop
Advertisement
Add Comment
Please, Sign In to add comment