tsutitire2

Untitled

May 25th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.94 KB | None | 0 0
  1. Variables:
  2. {G.1} = 0
  3. {G.2} = 0
  4. {G.3} = 0
  5. {P.1} = 0
  6. {P.2} = 0
  7. {P.3} = 0
  8. {SW.pcount} = 0
  9. {SW.begin} = 0
  10. {%player%.CWCT} = 0
  11. {%player%.CWKT} = 0
  12. {%player%.CWKT2} = 0
  13. {%player%.CWISA} = 0
  14. {%player%.CWAD} = 0
  15. {SW.GD} = 0
  16. {SW.PD} = 0
  17. {SW.GSP} = 0
  18. {SW.PSP} = 0
  19. command /sw <text> [<int>]:
  20. trigger:
  21. if arg 1 is "begin":
  22. if {SW.begin} is not 0:
  23. message "&a[The Ship War Game]&r 既に始まっています!"
  24. if {SW.begin} is 0:
  25. broadcast "&a[The Ship War Game]&r 戦艦ゲームが始まります!"
  26. broadcast "&a[The Ship War Game]&r 参加するには: /sw join と打って下さい"
  27. set {SW.begin} to 1
  28. if arg 1 is "kit":
  29. if {SW.begin} is 2:
  30. if player is {G.1} or {G.2} or {G.3} or {P.1} or {P.2} or {P.3}:
  31. execute console command "/clear %player% stick"
  32. execute console command "/clear %player% iron_block"
  33. if arg 2 is not set:
  34. message "&a[The Ship War Game]&r &c番号を指定してください!"
  35. if arg 2 is 1:
  36. execute console command "/effect %player% health_boost 10000 44"
  37. execute console command "/effect %player% instant_health 10 100"
  38. set {%player%.CWKT} to 1
  39. if player is {G.1} or {P.1}:
  40. execute console command "/give %player% stick"
  41. if player is {G.2} or {G.3} or {P.2} or {P.3}:
  42. execute console command "/shot give %player% ts-502"
  43. execute console command "/shot give %player% ts-503"
  44. broadcast "&a[The Ship War Game]&r %player% さんが バランスキットを選択しました!"
  45. if arg 2 is 2:
  46. execute console command "/effect %player% health_boost 10000 34"
  47. execute console command "/effect %player% instant_health 10 100"
  48. set {%player%.CWKT} to 2
  49. if player is {G.1} or {P.1}:
  50. execute console command "/give %player% stick"
  51. if player is {G.2} or {G.3} or {P.2} or {P.3}:
  52. execute console command "/shot give %player% ts-500"
  53. execute console command "/shot give %player% ts-503"
  54. broadcast "&a[The Ship War Game]&r %player% さんが アタックキットを選択しました!"
  55. if arg 2 is 3:
  56. execute console command "/effect %player% health_boost 10000 49"
  57. execute console command "/effect %player% instant_health 10 100"
  58. set {%player%.CWKT} to 3
  59. if player is {G.1} or {P.1}:
  60. execute console command "/give %player% stick"
  61. if player is {G.2} or {G.3} or {P.2} or {P.3}:
  62. execute console command "/shot give %player% ts-501"
  63. execute console command "/shot give %player% ts-503"
  64. broadcast "&a[The Ship War Game]&r %player% さんが ヘルスキットを選択しました!"
  65. if arg 2 is not 1 or 2 or 3:
  66. message "&a[The Ship War Game]&r &c番号が違います!"
  67.  
  68. if arg 1 is "join":
  69. if {SW.begin} is 1:
  70. if {%player%.CWAD} is 0:
  71. set {SW.pcount} to {SW.pcount} + 1
  72. if {SW.pcount} is 1:
  73. set {G.1} to player
  74. broadcast "&a[The Ship War Game]&r &a緑の戦艦の操縦/機関手は %player% さんになりました! [1/6]"
  75. set {%player%.CWAD} to 1
  76. if {SW.pcount} is 2:
  77. set {G.2} to player
  78. broadcast "&a[The Ship War Game]&r &a緑の戦艦の砲手は %player% さんになりました! [2/6]"
  79. set {%player%.CWAD} to 1
  80. if {SW.pcount} is 3:
  81. set {G.3} to player
  82. broadcast "&a[The Ship War Game]&r &a緑の戦艦の砲手は %player% さんになりました! [3/6]"
  83. set {%player%.CWAD} to 1
  84. if {SW.pcount} is 4:
  85. set {P.1} to player
  86. broadcast "&a[The Ship War Game]&r &d紫の戦艦の操縦/機関手は %player% さんになりました! [4/6]"
  87. set {%player%.CWAD} to 1
  88. if {SW.pcount} is 5:
  89. set {P.2} to player
  90. broadcast "&a[The Ship War Game]&r &d紫の戦艦の砲手は %player% さんになりました! [5/6]"
  91. set {%player%.CWAD} to 1
  92. if {SW.pcount} is 6:
  93. set {P.3} to player
  94. set {SW.begin} to 2
  95. set {%player%.CWAD} to 1
  96. broadcast "&a[The Ship War Game]&r &d紫の戦艦の砲手は %player% さんになりました! [6/6]"
  97. broadcast "&a[The Ship War Game]&r &e各自キットを選択してください!/sw kit 数字 で選択できます;"
  98. broadcast "&a[The Ship War Game]&r [1]: バランスキット 体力:100♡(共通) 武装:操縦手[速度/回復] 砲手[主砲/副砲]"
  99. broadcast "&a[The Ship War Game]&r [2]: アタックキット 体力:70♡(共通) 武装:操縦手[速度/回復Ⅱ] 砲手[速射砲/副砲]"
  100. broadcast "&a[The Ship War Game]&r [3]: ヘルスキット 体力:120♡(共通) 武装:操縦手[速度Ⅱ/回復] 砲手[魚雷/副砲]"
  101. broadcast "&a[The Ship War Game]&r &dP: %{G.1}% %{G.2}% %{G.3}% &eY: %{Y.1}% %{Y.2}% %{Y.3}%"
  102. while {SW.pcount} is not 12:
  103. wait 1 seconds
  104. loop all players:
  105. send title "戦闘が始まります!" to loop-player
  106. set {G.1}'s walk speed to 0.1
  107. set {P.1}'s walk speed to 0.1
  108. teleport {G.1} to {SW.GSP}
  109. teleport {P.1} to {SW.PSP}
  110. on any movement:
  111. if player is {G.2} or {G.3} or {P.2} or {P.3}:
  112. cancel event
  113. set player's walk speed to 0
  114. every ticks:
  115. if {SW.pcount} is 3:
  116. if {%{G.2}%.CWISA} is 0:
  117. execute console command "/execute %{G.1}% ~ ~ ~ tp %{G.2}% ~ ~ ~1"
  118. if {%{G.3}%.CWISA} is 0:
  119. execute console command "/execute %{G.1}% ~ ~ ~ tp %{G.3}% ~ ~ ~-1"
  120. if {%{P.2}%.CWISA} is 0:
  121. execute console command "/execute %{P.1}% ~ ~ ~ tp %{P.2}% ~ ~ ~1"
  122. if {%{P.3}%.CWISA} is 0:
  123. execute console command "/execute %{P.1}% ~ ~ ~ tp %{P.3}% ~ ~ ~-1"
  124. On right click with stick:
  125. if {SW.pcount} is 3:
  126. if {%player%.CWCT} is less than 0:
  127. if {%player%.CWKT} is 1 or 3:
  128. execute console command "/execute %player% ~ ~ ~ effect @a[r=2] instant_health 1 2"
  129. set {%player%.CWKT} to 30
  130. if {%player%.CWKT} is 2:
  131. execute console command "/execute %player% ~ ~ ~ effect @a[r=2] instant_health 1 3"
  132. set {%player%.CWKT} to 30
  133. On left click with stick:
  134. if {SW.pcount} is 3:
  135. if {%player%.CWCT} is less than 0:
  136. if {%player%.CWKT} is 1:
  137. execute console command "/execute %player% ~ ~ ~ effect @a[r=2] speed 4 4"
  138. set {%player%.CWKT2} to 30
  139. if {%player%.CWKT} is 2:
  140. execute console command "/execute %player% ~ ~ ~ effect @a[r=2] speed 4 7"
  141. set {%player%.CWKT2} to 30
  142. if {%player%.CWKT} is 3:
  143. execute console command "/execute %player% ~ ~ ~ effect @a[r=2] speed 4 4"
  144. set {%player%.CWKT2} to 30
  145. every seconds:
  146. if {SW.pcount} is 3:
  147. loop all players:
  148. set {%loop-player%.CWCT} to {%loop-player%.CWCT} - 1
  149. set {%loop-player%.CWKT2} to {%loop-player%.CWKT2} - 1
  150. if {SW.PD} is 3:
  151. broadcast "&a[The Ship War Game]&r 緑艦の勝利です!おめでとうございます!"
  152. broadcast "&a[The Ship War Game]&r &dP: %{G.1}% %{G.2}% %{G.3}% &eY: %{Y.1}% %{Y.2}% %{Y.3}%"
  153. set {%{G.1}%.CWCT} to 0
  154. set {%{G.2}%.CWCT} to 0
  155. set {%{G.3}%.CWCT} to 0
  156. set {%{P.1}%.CWCT} to 0
  157. set {%{P.2}%.CWCT} to 0
  158. set {%{P.3}%.CWCT} to 0
  159. set {%{G.1}%.CWKT} to 0
  160. set {%{G.2}%.CWKT} to 0
  161. set {%{G.3}%.CWKT} to 0
  162. set {%{P.1}%.CWKT} to 0
  163. set {%{P.2}%.CWKT} to 0
  164. set {%{P.3}%.CWKT} to 0
  165. set {%{G.1}%.CWKT2} to 0
  166. set {%{G.2}%.CWKT2} to 0
  167. set {%{G.3}%.CWKT2} to 0
  168. set {%{P.1}%.CWKT2} to 0
  169. set {%{P.2}%.CWKT2} to 0
  170. set {%{P.3}%.CWKT2} to 0
  171. set {%{G.1}%.CWISA} to 0
  172. set {%{G.2}%.CWISA} to 0
  173. set {%{G.3}%.CWISA} to 0
  174. set {%{P.1}%.CWISA} to 0
  175. set {%{P.2}%.CWISA} to 0
  176. set {%{P.3}%.CWISA} to 0
  177. set {%{G.1}%.CWAD} to 0
  178. set {%{G.2}%.CWAD} to 0
  179. set {%{G.3}%.CWAD} to 0
  180. set {%{P.1}%.CWAD} to 0
  181. set {%{P.2}%.CWAD} to 0
  182. set {%{P.3}%.CWAD} to 0
  183. set {G.1} to 0
  184. set {G.2} to 0
  185. set {G.3} to 0
  186. set {P.1} to 0
  187. set {P.2} to 0
  188. set {P.3} to 0
  189. set {SW.pcount} to 0
  190. set {SW.begin} to 0
  191. set {SW.GD} to 0
  192. set {SW.PD} to 0
  193. if {SW.GD} is 3:
  194. broadcast "&a[The Ship War Game]&r 紫艦の勝利です!おめでとうございます!"
  195. broadcast "&a[The Ship War Game]&r &dP: %{G.1}% %{G.2}% %{G.3}% &eY: %{Y.1}% %{Y.2}% %{Y.3}%"
  196. set {%{G.1}%.CWCT} to 0
  197. set {%{G.2}%.CWCT} to 0
  198. set {%{G.3}%.CWCT} to 0
  199. set {%{P.1}%.CWCT} to 0
  200. set {%{P.2}%.CWCT} to 0
  201. set {%{P.3}%.CWCT} to 0
  202. set {%{G.1}%.CWKT} to 0
  203. set {%{G.2}%.CWKT} to 0
  204. set {%{G.3}%.CWKT} to 0
  205. set {%{P.1}%.CWKT} to 0
  206. set {%{P.2}%.CWKT} to 0
  207. set {%{P.3}%.CWKT} to 0
  208. set {%{G.1}%.CWKT2} to 0
  209. set {%{G.2}%.CWKT2} to 0
  210. set {%{G.3}%.CWKT2} to 0
  211. set {%{P.1}%.CWKT2} to 0
  212. set {%{P.2}%.CWKT2} to 0
  213. set {%{P.3}%.CWKT2} to 0
  214. set {%{G.1}%.CWISA} to 0
  215. set {%{G.2}%.CWISA} to 0
  216. set {%{G.3}%.CWISA} to 0
  217. set {%{P.1}%.CWISA} to 0
  218. set {%{P.2}%.CWISA} to 0
  219. set {%{P.3}%.CWISA} to 0
  220. set {%{G.1}%.CWAD} to 0
  221. set {%{G.2}%.CWAD} to 0
  222. set {%{G.3}%.CWAD} to 0
  223. set {%{P.1}%.CWAD} to 0
  224. set {%{P.2}%.CWAD} to 0
  225. set {%{P.3}%.CWAD} to 0
  226. set {G.1} to 0
  227. set {G.2} to 0
  228. set {G.3} to 0
  229. set {P.1} to 0
  230. set {P.2} to 0
  231. set {P.3} to 0
  232. set {SW.pcount} to 0
  233. set {SW.begin} to 0
  234. set {SW.GD} to 0
  235. set {SW.PD} to 0
  236.  
  237. On damage:
  238. if attacker is {G.1} or {G.2} or {G.3}:
  239. if victim is {G.1} or {G.2} or {G.3}:
  240. cancel event
  241. if attacker is {P.1} or {P.2} or {P.3}:
  242. if victim is {P.1} or {P.2} or {P.3}:
  243. cancel event
  244. On death:
  245. if {SW.pcount} is 3:
  246. if victim is {G.1} or {G.2} or {G.3} or {P.1} or {P.2} or {P.3}:
  247. set {%player%.CWISA} to 1
  248. if victim is {G.1} or {G.2} or {G.3}:
  249. set {SW.GD} to {SW.GD} + 1
  250. if victim is {P.1} or {P.2} or {P.3}:
  251. set {SW.PD} to {SW.PD} + 1
  252. command /setswsp <int>:
  253. trigger:
  254. if arg 1 is 1:
  255. set {SW.GSP} to player's location
  256. if arg 1 is 2:
  257. set {SW.PSP} to player's location
  258. permission: skript.admin
  259. command /resetws [<player>]:
  260. trigger:
  261. set {%{G.1}%.CWCT} to 0
  262. set {%{G.2}%.CWCT} to 0
  263. set {%{G.3}%.CWCT} to 0
  264. set {%{P.1}%.CWCT} to 0
  265. set {%{P.2}%.CWCT} to 0
  266. set {%{P.3}%.CWCT} to 0
  267. set {%{G.1}%.CWKT} to 0
  268. set {%{G.2}%.CWKT} to 0
  269. set {%{G.3}%.CWKT} to 0
  270. set {%{P.1}%.CWKT} to 0
  271. set {%{P.2}%.CWKT} to 0
  272. set {%{P.3}%.CWKT} to 0
  273. set {%{G.1}%.CWKT2} to 0
  274. set {%{G.2}%.CWKT2} to 0
  275. set {%{G.3}%.CWKT2} to 0
  276. set {%{P.1}%.CWKT2} to 0
  277. set {%{P.2}%.CWKT2} to 0
  278. set {%{P.3}%.CWKT2} to 0
  279. set {%{G.1}%.CWISA} to 0
  280. set {%{G.2}%.CWISA} to 0
  281. set {%{G.3}%.CWISA} to 0
  282. set {%{P.1}%.CWISA} to 0
  283. set {%{P.2}%.CWISA} to 0
  284. set {%{P.3}%.CWISA} to 0
  285. set {%{G.1}%.CWAD} to 0
  286. set {%{G.2}%.CWAD} to 0
  287. set {%{G.3}%.CWAD} to 0
  288. set {%{P.1}%.CWAD} to 0
  289. set {%{P.2}%.CWAD} to 0
  290. set {%{P.3}%.CWAD} to 0
  291. set {%arg 1%.CWCT} to 0
  292. set {%arg 1%.CWKT} to 0
  293. set {%arg 1%.CWKT2} to 0
  294. set {%arg 1%.CWISA} to 0
  295. set {%arg 1%.CWAD} to 0
  296. set {G.1} to 0
  297. set {G.2} to 0
  298. set {G.3} to 0
  299. set {P.1} to 0
  300. set {P.2} to 0
  301. set {P.3} to 0
  302. set {SW.pcount} to 0
  303. set {SW.begin} to 0
  304. set {SW.GD} to 0
  305. set {SW.PD} to 0
Add Comment
Please, Sign In to add comment