tsutitire2

Shooting Game

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