tsutitire2

Untitled

Jun 17th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.75 KB | None | 0 0
  1. Variables:
  2. {r.mem::*} = 0
  3. {b.mem::*} = 0
  4. {tfb.rsp::*} = 0
  5. {tfb.rp} = 0
  6. {tfb.bp} = 0
  7. {%player%.tfbj} = 0
  8. {tfb.st} = 0
  9. {tfb.timer} = 0
  10. {tfb.plx::*} = 0
  11. {tfb.ply::*} = 0
  12. {tfb.plz::*} = 0
  13. {map} = 0
  14. {map2} = 0
  15. command /tfbsp <int> [<int>] [<int>] [<int>]:
  16. permission: skript.admin
  17. trigger:
  18. if arg 1 is not 0:
  19. set {tfb.rsp::%arg 1%} to player's location
  20. command /tfbsp2 <int> [<int>] [<int>] [<int>]:
  21. permission: skript.admin
  22. trigger:
  23. set {tfb.plx::%arg 1%} to arg 2
  24. set {tfb.ply::%arg 1%} to arg 3
  25. set {tfb.plz::%arg 1%} to arg 4
  26.  
  27. command /tfb <text> [<player>] [<int>]:
  28. trigger:
  29. if arg 1 is "reset":
  30. set {tfbct} to 0
  31. loop size of {r.mem::*} times:
  32. set {%{r.mem::%{tfbct}%}%.tfbj} to 0
  33. set {tfbct} to {tfbct} + 1
  34. set {%{r.mem::%{tfbct}%}%.tfbj} to 0
  35. set {tfbct} to 0
  36. loop size of {b.mem::*} times:
  37. set {%{b.mem::%{tfbct}%}%.tfbj} to 0
  38. set {tfbct} to {tfbct} + 1
  39. set {%{b.mem::%{tfbct}%}%.tfbj} to 0
  40. delete {r.mem::*}
  41. delete {b.mem::*}
  42. add 0 to {r.mem::*}
  43. add 0 to {b.mem::*}
  44. set {tfb.bp} to 0
  45. set {tfb.rp} to 0
  46. set {%arg 2%.tfbj} to 0
  47. set {tfb.st} to 0
  48. set {tfb.timer} to 0
  49. if arg 1 is "begin":
  50. if {tfb.st} is not 0:
  51. message "既に始まっています!"
  52. if {tfb.st} is 0:
  53. set {tfb.st} to 1
  54. broadcast "&6&l占領チーム戦&b&lが始まります!&a&l/tfb joinしよう!"
  55. set {map} to 1
  56. if arg 3 is set:
  57. set {map} to arg 3
  58.  
  59. if arg 1 is "join":
  60. if {tfb.st} is 1:
  61. if arg 2 is not set:
  62. if size of {r.mem::*} is size of {b.mem::*}:
  63. if {%player%.tfbj} is not 0:
  64. message "You already joined"
  65. if {%player%.tfbj} is 0:
  66. add player to {r.mem::*}
  67. set {%player%.tfbj} to 1
  68. broadcast "%player% さんが赤チームに入りました!"
  69. if size of {r.mem::*} is more than size of {b.mem::*}:
  70. if {%player%.tfbj} is not 0:
  71. message "You already joined"
  72. if {%player%.tfbj} is 0:
  73. add player to {b.mem::*}
  74. set {%player%.tfbj} to 1
  75. broadcast "%player% さんが青チームに入りました!"
  76. if size of {r.mem::*} is less than size of {b.mem::*}:
  77. if {%player%.tfbj} is 0:
  78. add player to {r.mem::*}
  79. set {%player%.tfbj} to 1
  80. if {%player%.tfbj} is not 0:
  81. message "You already joined"
  82. if arg 2 is set:
  83. if size of {r.mem::*} is size of {b.mem::*}:
  84. if {%arg 2%.tfbj} is not 0:
  85. message "You already joined"
  86. if {%arg 2%.tfbj} is 0:
  87. add arg 2 to {r.mem::*}
  88. set {%arg 2%.tfbj} to 1
  89. broadcast "%arg 2% さんが赤チームに入りました!"
  90. if size of {r.mem::*} is more than size of {b.mem::*}:
  91. if {%arg 2%.tfbj} is not 0:
  92. message "You already joined"
  93. if {%arg 2%.tfbj} is 0:
  94. add arg 2 to {b.mem::*}
  95. set {%arg 2%.tfbj} to 1
  96. broadcast "%arg 2% さんが青チームに入りました!"
  97. if size of {r.mem::*} is less than size of {b.mem::*}:
  98. if {%arg 2%.tfbj} is 0:
  99. add arg 2 to {r.mem::*}
  100. set {%arg 2%.tfbj} to 1
  101. if {%arg 2%.tfbj} is not 0:
  102. message "You already joined"
  103. every seconds:
  104. if {tfb.st} is 1:
  105. set {tfb.timer} to {tfb.timer} + 1
  106. if {tfb.timer} is more than 120:
  107. broadcast "ゲームが始まりますよ!"
  108. loop all players:
  109. remove loop-player from {tblue::*}
  110. remove loop-player from {tred::*}
  111. set {tfbct} to 0
  112. broadcast "%size of {b.mem::*}%"
  113. set {tfbct} to 0
  114. loop size of {b.mem::*} times:
  115. set {map2} to {map} + 1
  116. teleport {b.mem::%{tfbct}%} to {tfb.rsp::%{map2}%}
  117. broadcast "%{map2}% %{tfb.rsp::%{map2}%}%"
  118. set {tfbct} to {tfbct} + 1
  119. teleport {b.mem::%{tfbct}%} to {tfb.rsp::%{map2}%}
  120. set {tfbct} to 0
  121. broadcast "%{map2}% %{tfb.rsp::%{map2}%}%"
  122. loop size of {r.mem::*} times:
  123. teleport {r.mem::%{tfbct}%} to {tfb.rsp::%{map}%}
  124. set {tfbct} to {tfbct} + 1
  125. teleport {r.mem::%{tfbct}%} to {tfb.rsp::%{map}%}
  126. set {tfb.st} to 2
  127. broadcast "メンバーは &c&l%{r.mem::*}% &b&l%{b.mem::*}%"
  128. set {tfb.timer} to 0
  129. if {tfb.st} is 2:
  130. set {tfb.timer} to {tfb.timer} + 1
  131. loop all players:
  132. if block below loop-player is lapis ore:
  133. if {r.mem::*} contains loop-player:
  134. set {tfb.rp} to {tfb.rp} + 1
  135. set {_tfb.wr} to 1
  136. execute console command "/setblock %{tfb.plx::%{map}%}% %{tfb.ply::%{map}%}% %{tfb.plz::%{map}%}% wool 14"
  137. if {b.mem::*} contains loop-player:
  138. set {tfb.bp} to {tfb.bp} + 1
  139. set {_tfb.wb} to 1
  140. execute console command "/setblock %{tfb.plx::%{map}%}% %{tfb.ply::%{map}%}% %{tfb.plz::%{map}%}% wool 3"
  141. if {_tfb.wr} is 0:
  142. if {_tfb.wb} is 0:
  143. execute console command "/setblock %{tfb.plx::%{map}%}% %{tfb.ply::%{map}%}% %{tfb.plz::%{map}%}% wool 0"
  144. set {tps} to {tfb.rp} + {tfb.bp}
  145. set {atps} to 100 / {tps}
  146. set {rps} to {tfb.bp} * {atps}
  147. set {bps} to {tfb.rp} * {atps}
  148. send action bar "&c&l%{tfb.rp}%■■■■■■■■■■&b&l%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  149. if {rps} is more than 0:
  150. if {rps} is less than 10:
  151. send action bar "&c&l%{tfb.rp}%■■■■■■■■■&b&l■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  152. if {rps} is more than 10:
  153. if {rps} is less than 20:
  154. send action bar "&c&l%{tfb.rp}%■■■■■■■■&b&l■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  155. if {rps} is more than 20:
  156. if {rps} is less than 30:
  157. send action bar "&c&l%{tfb.rp}%■■■■■■■&b&l■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  158. if {rps} is more than 30:
  159. if {rps} is less than 40:
  160. send action bar "&c&l%{tfb.rp}%■■■■■■&b&l■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  161. if {rps} is more than 40:
  162. if {rps} is less than 50:
  163. send action bar "&c&l%{tfb.rp}%■■■■■&b&l■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  164. if {rps} is more than 50:
  165. if {rps} is less than 60:
  166. send action bar "&c&l%{tfb.rp}%■■■■&b&l■■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  167. if {rps} is more than 60:
  168. if {rps} is less than 70:
  169. send action bar "&c&l%{tfb.rp}%■■■&b&l■■■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  170. if {rps} is more than 70:
  171. if {rps} is less than 80:
  172. send action bar "&c&l%{tfb.rp}%■■&b&l■■■■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  173. if {rps} is more than 80:
  174. if {rps} is less than 90:
  175. send action bar "&c&l%{tfb.rp}%■&b&l■■■■■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  176. if {rps} is more than 90:
  177. if {rps} is less than 100:
  178. send action bar "&c&l%{tfb.rp}%&b&l■■■■■■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  179. if {rps} is 100:
  180. send action bar "&c&l%{tfb.rp}%&b&l■■■■■■■■■■%{tfb.bp}% capstat: &c&l%{_tfb.wr}% &b&l%{_tfb.wb}%" to all players
  181.  
  182. if {tfb.timer} is 300:
  183. if {tfb.rp} is more than {tfb.bp}:
  184. broadcast "終了です! 結果は... &a&l青%{tfb.bp}% &c&l赤%{tfb.rp}% &aよって、赤の勝ちです! /sp で戻ってね!"
  185. if {tfb.rp} is less than {tfb.bp}:
  186. broadcast "終了です! 結果は... &a&l青%{tfb.bp}% &c&l赤%{tfb.rp}% &aよって、青の勝ちです! /sp で戻ってね!"
  187. if {tfb.rp} is {tfb.bp}:
  188. broadcast "終了です! 結果は... &a&l青%{tfb.bp}% &c&l赤%{tfb.rp}% &aよって、引き分けです! /sp で戻ってね!"
  189. set {tfbct} to 0
  190. loop size of {r.mem::*} times:
  191. set {%{r.mem::%{tfbct}%}%.tfbj} to 0
  192. set {tfbct} to {tfbct} + 1
  193. set {%{r.mem::%{tfbct}%}%.tfbj} to 0
  194. set {tfbct} to 0
  195. loop size of {b.mem::*} times:
  196. set {%{b.mem::%{tfbct}%}%.tfbj} to 0
  197. set {tfbct} to {tfbct} + 1
  198. set {%{b.mem::%{tfbct}%}%.tfbj} to 0
  199. delete {r.mem::*}
  200. delete {b.mem::*}
  201. set {tfb.bp} to 0
  202. set {tfb.rp} to 0
  203. set {tfb.st} to 0
  204. set {tfb.timer} to 0
  205.  
  206. On death:
  207. while victim is not alive:
  208. wait 1 seconds
  209. if {tfb.st} is 2:
  210. if {b.mem::*} contains victim:
  211. {map2} = {map} + 1
  212. teleport victim to {tfb.rsp::%{map2}%}
  213. if {r.mem::*} contains victim:
  214. teleport victim to {tfb.rsp::%{map}%}
  215. On damage:
  216. if {r.mem::*} contains victim:
  217. if {r.mem::*} contains attacker:
  218. cancel event
  219. if {b.mem::*} contains victim:
  220. if {b.mem::*} contains attacker:
  221. cancel event
  222. On death:
  223. if {b.mem::*} contains attacker:
  224. set {tfb.bp} to {tfb.bp} + 2
  225. if {r.mem::*} contains attacker:
  226. set {tfb.rp} to {tfb.rp} + 2
Add Comment
Please, Sign In to add comment