tsutitire2

Untitled

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