tsutitire2

Untitled

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