miyasoku

【銃撃戦鯖】tanoKun Murder Mystery

Jun 24th, 2020
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.90 KB | None | 0 0
  1. #======================================================================
  2. # __________________________________________________________
  3. # / / / // /
  4. # /_/___________________________________________________/_// /
  5. # / / _____ __ __ / /
  6. # / / / ____/ / / /_/ // / /
  7. # / / / /__ / /___ ___ __ ______ __/ /_ / /
  8. # / / /___ / / __/ / __/ / / / __ //_ __/ / /
  9. # / / ____/ / / // / / / / / / /_/ / / / / /
  10. # / / /_____/ /_/ /_/ /_/ /_/ / ____/ /_/ / /__
  11. # / / ========================== / / ========== / / / /
  12. # | | /_/ | | | |
  13. # /_/_________________________________________________/_/_/_/
  14. #制作者: tanoKun(tanotanosii2) V 1.12.2
  15. #======================================================================
  16. #変数
  17. #{tano-mm-map-new} 現在のMAP
  18. #{tano-mm-lobby} ロビー
  19. #{tano-mm-game} ゲームステータス
  20. #{tano-mm-spc} スタートするまでの人数
  21. #{tano-mm-maps::*} 全てのmap
  22. #{tano-mm-map-player-location-%loop-value%::*} playerがスポーンする座標
  23. #{tano-mm-map-gold-location-%loop-value%::*} goldがスポーンする座標
  24. #{tano-mm-map-tiem.%loop-value%} mapごとの時間
  25. #{tano-mm-time} 進む時間
  26. #{tano-mm-join::*} 参加者
  27. #{tano-mm-innocent::*} 市民
  28. #{tano-mm-murder::*} マーダー
  29. #{tano-mm-detective::*} 探偵
  30. #{tano-mm-death::*} 死亡者
  31. #{tano-mm-watching::*} 観戦者
  32. #{tano-mm-player::*} 全ての参加者(死んでいない人)
  33. #{tano-mm-autojoin.%player%} オートジョイン設定
  34. #{tano-mm-money.%player%} 所持金
  35. #{tano-mm-skills-murder-%player%::*} %player%の所持マーダースキル
  36. #{tano-mm-skills-innocent-%player%::*} %player%の所持イノセントスキル
  37. #======================================================================
  38. options:
  39. join: &a[&eJoin&a]
  40. firstjoin: &a[&cFirstJoin&a]
  41. quit: &a[&eQuit&a]
  42. murder: &c&l[Murder]&f
  43. #===================================スキルマーダー===================================
  44. #----------------心眼----------------
  45. skill-id.eye: eye
  46. skill-name.eye: &c心眼
  47. skill-lore.eye: "&fスキルアイテムをクリックで発動", "&f生き残っている人に&b10秒間発光&fを付与する"
  48. skill-price.eye: 2000
  49. skill-itemid.eye: ender eye
  50. command /mm:
  51. permission: taotanosii.murdermystery.mm
  52. trigger:
  53. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  54. mmGUI(player)
  55. command /setlobby:
  56. permission: tanotanosii.murdermystery.setlobby
  57. trigger:
  58. set {tano-mm-lobby} to location of player
  59. send "{@murder} &aLobbyを&b%{tano-mm-lobby}%&aに設定しました"
  60. on inventory click:
  61. if name of player's current inventory contains "&cMurderMystery":
  62. cancel event
  63. if name of player's current inventory is "&cMurderMystery":
  64. if name of clicked item is "&aスタート人数変更":
  65. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  66. spcGUI(player)
  67. stop
  68. if name of clicked item is "&aマップ編集":
  69. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  70. mapCreateGUI(player)
  71. stop
  72. else if name of player's current inventory is "&cMurderMystery &7>> &aスタート人数変更":
  73. if name of clicked item is "&cBack":
  74. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  75. mmGUI(player)
  76. stop
  77. set {_slot} to "%clicked slot%" parsed as number
  78. if ({_slot} <= 8) and ({_slot} >= 0):
  79. add {_slot} + 1 to {tano-mm-spc}
  80. send "&aスタート人数に&b%{_slot} + 1%&aを足しました &d(現在の設定: %{tano-mm-spc}%)"
  81. execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  82. spcGUI(player)
  83. stop
  84. if ({_slot} <= 17) and ({_slot} >= 9):
  85. remove {_slot} - 9 + 1 from {tano-mm-spc}
  86. send "&aスタート人数から&b%{_slot} - 9 + 1%&aを引きました &d(現在の設定: %{tano-mm-spc}%)"
  87. execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  88. spcGUI(player)
  89. stop
  90. else if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集":
  91. loop {tano-mm-maps::*}:
  92. if {tano-mm-edit.%player%} is "DeleteMap":
  93. if name of clicked item contains loop-value:
  94. remove loop-value from {tano-mm-maps::*}
  95. message "&a削除完了しました"
  96. delete {tano-mm-edit.%player%}
  97. delete {tano-mm-map-player-location-%loop-value%::*}
  98. delete {tano-mm-map-gold-location-%loop-value%::*}
  99. delete {tano-mm-map-tiem.%loop-value%}
  100. mapCreateGUI(player)
  101. stop
  102. if name of clicked item contains loop-value:
  103. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  104. mapMapGUI(player, loop-value)
  105. stop
  106. if name of clicked item is "&aCreateMap":
  107. set {tano-mm-edit.%player%} to "CreateMap"
  108. send "&7チャットから作成するマップ名を入力してください"
  109. send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
  110. teleport player to location of player
  111. stop
  112. if name of clicked item is "&cDeleteMap":
  113. send "&7削除したいマップをクリックしてください"
  114. send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
  115. set {tano-mm-edit.%player%} to "DeleteMap"
  116. stop
  117. loop {tano-mm-maps::*}:
  118. if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value%":
  119. if name of clicked item is "&aSpawn":
  120. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  121. mapSpawnGUI(player, loop-value)
  122. stop
  123. else if name of clicked item is "&aGold":
  124. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  125. mapGoldGUI(player, loop-value)
  126. stop
  127. else if name of clicked item is "&a時間設定":
  128. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  129. mapTimeGUI(player, loop-value)
  130. stop
  131. if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value% &7>> &aGold":
  132. if {tano-mm-edit.%player%} is "DeleteGold":
  133. loop {tano-mm-map-gold-location-%loop-value%::*}:
  134. if name of clicked item contains "%loop-value-2%":
  135. remove loop-value-2 from {tano-mm-map-gold-location-%loop-value-1%::*}
  136. message "&a削除完了しました"
  137. delete {tano-mm-edit.%player%}
  138. mapGoldGUI(player, loop-value-1)
  139. stop
  140. if name of clicked item is "&aCreateGold":
  141. set {tano-mm-edit.%player%} to "CreateGold"
  142. set {tano-mm-edit-creategold.%player%} to "%loop-value%"
  143. send "&7スポーン地点にしたい座標を壊してください(同じ座標にするとバグが起きる可能性があります)"
  144. send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
  145. teleport player to location of player
  146. stop
  147. if name of clicked item is "&cDeleteGold":
  148. send "削除したい座標(アイテム)をクリックしてください"
  149. send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
  150. set {tano-mm-edit.%player%} to "DeleteGold"
  151. stop
  152. if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value% &7>> &aSpawn":
  153. if {tano-mm-edit.%player%} is "DeleteSpawn":
  154. loop {tano-mm-map-player-location-%loop-value%::*}:
  155. if name of clicked item contains "%loop-value-2%":
  156. remove loop-value-2 from {tano-mm-map-player-location-%loop-value-1%::*}
  157. message "&a削除完了しました"
  158. delete {tano-mm-edit.%player%}
  159. mapSpawnGUI(player, loop-value-1)
  160. stop
  161. if name of clicked item is "&aCreateSpawn":
  162. set {tano-mm-edit.%player%} to "CreateSpawn"
  163. set {tano-mm-edit-createplayer.%player%} to "%loop-value%"
  164. send "&7スポーン地点にしたい座標を壊してください(同じ座標にするとバグが起きる可能性があります)"
  165. send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
  166. teleport player to location of player
  167. stop
  168. if name of clicked item is "&cDeleteSpawn":
  169. send "&7削除したい座標(アイテム)をクリックしてください"
  170. send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
  171. set {tano-mm-edit.%player%} to "DeleteSpawn"
  172. stop
  173. if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value% &7>> &a時間設定":
  174. set {_slot} to "%clicked slot%" parsed as number
  175. if ({_slot} <= 8) and ({_slot} >= 0):
  176. add ({_slot} + 1) * 10 to {tano-mm-map-tiem.%loop-value%}
  177. send "&a時間制限に&b%({_slot} + 1) * 10%&aを足しました &d(現在の設定: %{tano-mm-map-tiem.%loop-value%}%)"
  178. execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  179. mapTimeGUI(player, loop-value)
  180. stop
  181. if ({_slot} <= 17) and ({_slot} >= 9):
  182. remove ({_slot} - 8) * 10 from {tano-mm-map-tiem.%loop-value%}
  183. send "&a制限時間から&b%({_slot} - 8) * 10%&aを引きました &d(現在の設定: %{tano-mm-map-tiem.%loop-value%}%)"
  184. execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  185. mapTimeGUI(player, loop-value)
  186. stop
  187. function mmGUI(p: player):
  188. open chest with 1 row named "&cMurderMystery" to {_p}
  189. set slot 2 of {_p}'s current inventory to stone named "&aスタート人数変更" with lore "&fスタートするまでの人数を指定します"
  190. set slot 4 of {_p}'s current inventory to map named "&aマップ編集" with lore "&fマップの編集を行います"
  191. set slot 6 of {_p}'s current inventory to emerald named "&a報酬設定" with lore "&f報酬(クリア時)を変更します"
  192. function spcGUI(p: player):
  193. open chest with 3 row named "&cMurderMystery &7>> &aスタート人数変更" to {_p}
  194. set slot 18 of {_p}'s current inventory to stone named "&d現在の設定: %{tano-mm-spc}%"
  195. set slot 0 of {_p}'s current inventory to green wool named "&a+1"
  196. set slot 1 of {_p}'s current inventory to green wool named "&a+2"
  197. set slot 2 of {_p}'s current inventory to green wool named "&a+3"
  198. set slot 3 of {_p}'s current inventory to green wool named "&a+4"
  199. set slot 4 of {_p}'s current inventory to green wool named "&a+5"
  200. set slot 5 of {_p}'s current inventory to green wool named "&a+6"
  201. set slot 6 of {_p}'s current inventory to green wool named "&a+7"
  202. set slot 7 of {_p}'s current inventory to green wool named "&a+8"
  203. set slot 8 of {_p}'s current inventory to green wool named "&a+9"
  204. set slot 9 of {_p}'s current inventory to red wool named "&c-1"
  205. set slot 10 of {_p}'s current inventory to red wool named "&c-2"
  206. set slot 11 of {_p}'s current inventory to red wool named "&c-3"
  207. set slot 12 of {_p}'s current inventory to red wool named "&c-4"
  208. set slot 13 of {_p}'s current inventory to red wool named "&c-5"
  209. set slot 14 of {_p}'s current inventory to red wool named "&c-6"
  210. set slot 15 of {_p}'s current inventory to red wool named "&c-7"
  211. set slot 16 of {_p}'s current inventory to red wool named "&c-8"
  212. set slot 17 of {_p}'s current inventory to red wool named "&c-9"
  213. set slot 26 of {_p}'s current inventory to magma named "&cBack"
  214. function mapCreateGUI(p: player):
  215. open chest with 6 row named "&cMurderMystery &7>> &aマップ編集" to {_p}
  216. set slot 48 of {_p}'s current inventory to anvil named "&aCreateMap"
  217. set slot 50 of {_p}'s current inventory to barrier named "&cDeleteMap"
  218. loop {tano-mm-maps::*}:
  219. set slot loop-index parsed as number - 1 of {_p}'s current inventory to grass block named "&a%loop-value%"
  220. function mapMapGUI(p: player, map: text):
  221. open chest with 1 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}%" to {_p}
  222. set slot 2 of {_p}'s current inventory to slime block named "&aSpawn" with lore "&fPlayerのスポーン位置の設定をします"
  223. set slot 4 of {_p}'s current inventory to compass named "&a時間設定" with lore "&f時間制限を設定します"
  224. set slot 6 of {_p}'s current inventory to gold ingot named "&aGold" with lore "&fGoldのスポーン位置の設定をします"
  225. function mapGoldGUI(p: player, map: text):
  226. open chest with 6 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}% &7>> &aGold" to {_p}
  227. set slot 48 of {_p}'s current inventory to anvil named "&aCreateGold"
  228. set slot 50 of {_p}'s current inventory to barrier named "&cDeleteGold"
  229. loop {tano-mm-map-gold-location-%{_map}%::*}:
  230. set slot loop-index parsed as number - 1 of {_p}'s current inventory to gold ingot named "&a%loop-value%"
  231. function mapSpawnGUI(p: player, map: text):
  232. open chest with 6 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}% &7>> &aSpawn" to {_p}
  233. set slot 48 of {_p}'s current inventory to anvil named "&aCreateSpawn"
  234. set slot 50 of {_p}'s current inventory to barrier named "&cDeleteSpawn"
  235. loop {tano-mm-map-player-location-%{_map}%::*}:
  236. set slot loop-index parsed as number - 1 of {_p}'s current inventory to slime block named "&a%loop-value%"
  237. function mapTimeGUI(p: player, map: text):
  238. open chest with 3 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}% &7>> &a時間設定" to {_p}
  239. set slot 18 of {_p}'s current inventory to compass named "&d現在の設定: %{tano-mm-map-tiem.%{_map}%}%秒"
  240. set slot 0 of {_p}'s current inventory to green wool named "&a+10"
  241. set slot 1 of {_p}'s current inventory to green wool named "&a+20"
  242. set slot 2 of {_p}'s current inventory to green wool named "&a+30"
  243. set slot 3 of {_p}'s current inventory to green wool named "&a+40"
  244. set slot 4 of {_p}'s current inventory to green wool named "&a+50"
  245. set slot 5 of {_p}'s current inventory to green wool named "&a+60"
  246. set slot 6 of {_p}'s current inventory to green wool named "&a+70"
  247. set slot 7 of {_p}'s current inventory to green wool named "&a+80"
  248. set slot 8 of {_p}'s current inventory to green wool named "&a+90"
  249. set slot 9 of {_p}'s current inventory to red wool named "&c-10"
  250. set slot 10 of {_p}'s current inventory to red wool named "&c-20"
  251. set slot 11 of {_p}'s current inventory to red wool named "&c-30"
  252. set slot 12 of {_p}'s current inventory to red wool named "&c-40"
  253. set slot 13 of {_p}'s current inventory to red wool named "&c-50"
  254. set slot 14 of {_p}'s current inventory to red wool named "&c-60"
  255. set slot 15 of {_p}'s current inventory to red wool named "&c-70"
  256. set slot 16 of {_p}'s current inventory to red wool named "&c-80"
  257. set slot 17 of {_p}'s current inventory to red wool named "&c-90"
  258. on chat:
  259. if {tano-mm-edit.%player%} is set:
  260. if message contains "cancel":
  261. send "&a操作をキャンセルしました"
  262. delete {tano-mm-edit.%player%}
  263. cancel event
  264. stop
  265. if {tano-mm-edit.%player%} is "CreateMap":
  266. if {tano-mm-maps::*} contains message:
  267. message "{@murder} &c既にそのマップは作られています"
  268. else:
  269. add message to {tano-mm-maps::*}
  270. message "{@murder} &a%message%を作成しました"
  271. delete {tano-mm-edit.%player%}
  272. mapCreateGUI(player)
  273. cancel event
  274. stop
  275. if {tano-mm-player::*} contains player:
  276. execute console command "/execute @a ~ ~ ~ /playsound entity.item.pickup player @s ~ ~ ~ 1 0.6"
  277. message "&b[生存者]&a%player%>> &7%message%" to all players
  278. cancel event
  279. stop
  280. if {tano-mm-watching::*} contains player:
  281. execute console command "/execute @a ~ ~ ~ /playsound entity.item.pickup player @s ~ ~ ~ 1 0.6"
  282. cancel event
  283. message "&2[観戦]&a%player%>> &7%message%" to {tano-mm-watching::*}
  284. stop
  285. on break:
  286. if {tano-mm-edit.%player%} is "CreateGold":
  287. add location of event-block to {tano-mm-map-gold-location-%{tano-mm-edit-creategold.%player%}%::*}
  288. send "&aGoldのスポーン位置&b%location of event-block%&aを追加しました"
  289. mapGoldGUI(player, {tano-mm-edit-creategold.%player%})
  290. delete {tano-mm-edit.%player%}
  291. delete {tano-mm-edit-creategold.%player%}
  292. stop
  293. if {tano-mm-edit.%player%} is "CreateSpawn":
  294. add location of event-block to {tano-mm-map-player-location-%{tano-mm-edit-createplayer.%player%}%::*}
  295. send "&aplayerのスポーン位置&b%location of event-block%&aを追加しました"
  296. mapSpawnGUI(player, {tano-mm-edit-createplayer.%player%})
  297. delete {tano-mm-edit.%player%}
  298. delete {tano-mm-edit-createplayer.%player%}
  299. stop
  300. command /join:
  301. trigger:
  302. if {tano-mm-game} is true:
  303. send "{@murder} &c既にゲームが始まっています"
  304. stop
  305. if {tano-mm-join::*} contains player:
  306. send "{@murder} &cあなたは既に参加しています"
  307. stop
  308. if {tano-mm-innocent::*} contains player:
  309. send "{@murder} &cあなたは既に参加しています"
  310. stop
  311. if {tano-mm-murder::*} contains player:
  312. send "{@murder} &cあなたは既に参加しています"
  313. stop
  314. if {tano-mm-detective::*} contains player:
  315. send "{@murder} &cあなたは既に参加しています"
  316. stop
  317. send "{@murder} &aゲームに参加しました"
  318. command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
  319. if {tano-mm-join::*} contains player:
  320. stop
  321. else:
  322. add player to {tano-mm-join::*}
  323. command /rejoin:
  324. trigger:
  325. if {tano-mm-game} is true:
  326. send "{@murder} &c既にゲームが始まっています"
  327. stop
  328. if {tano-mm-join::*} contains player:
  329. remove player from {tano-mm-join::*}
  330. send "{@murder} &aゲームから退出しました"
  331. command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
  332. stop
  333. else:
  334. send "{@murder} &cあなたは参加していません"
  335. command /autojoin:
  336. trigger:
  337. if {tano-mm-autojoin.%player%} is not set:
  338. set {tano-mm-autojoin.%player%} to true
  339. send "{@murder} &aオートジョインを有効化しました"
  340. else if {tano-mm-autojoin.%player%} is true:
  341. delete {tano-mm-autojoin.%player%}
  342. send "{@murder} &aオートジョインを無効化しました"
  343. every seconds:
  344. if {tano-mm-game} is not set:
  345. loop {tano-mm-join::*}:
  346. add 1 to {_players}
  347. if {_players} >= {tano-mm-spc}:
  348. set {tano-mm-game} to "previous"
  349. send "{@murder} &a人数が揃ったのでゲームを30秒後に開始致します" to all players
  350. wait 10 seconds
  351. #Map選択
  352. set {tano-mm-map-new} to random text of {tano-mm-maps::*}
  353. send all players title "&aMapは&c%{tano-mm-map-new}%&aに選ばれました" for 5 seconds
  354. send "&aMapは&c%{tano-mm-map-new}%&aに選ばれました" to all players
  355. set {tano-mm-time} to {tano-mm-map-tiem.%{tano-mm-map-new}%}
  356. send "{@murder} &a20..." to all players
  357. wait 10 seconds
  358. send "{@murder} &a10..." to all players
  359. wait 5 seconds
  360. send "{@murder} &e5..." to all players
  361. execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  362. send all players title "&e5" for 1 seconds
  363. wait 1 seconds
  364. send "{@murder} &e4..." to all players
  365. execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  366. send all players title "&e4" for 1 seconds
  367. wait 1 seconds
  368. send "{@murder} &c3..." to all players
  369. execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  370. send all players title "&c3" for 1 seconds
  371. wait 1 seconds
  372. send "{@murder} &c2..." to all players
  373. execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  374. send all players title "&c2" for 1 seconds
  375. wait 1 seconds
  376. send "{@murder} &c1..." to all players
  377. execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  378. send all players title "&c1" for 1 seconds
  379. wait 1 seconds
  380. loop {tano-mm-join::*}:
  381. add 1 to {_players}
  382. if {_players} <= {tano-mm-spc}:
  383. delete {tano-mm-game}
  384. send "{@murder} &c人数が揃っていないのでゲームを中止します" to all players
  385. stop
  386. execute console command "/execute @a ~ ~ ~ /playsound entity.lightning.impact player @s ~ ~ ~ 10 1"
  387. send all players title "&cMurder Mystery" with subtitle "&aスタート!!" for 5 seconds
  388. start()
  389. on damage:
  390. if damage cause is fall:
  391. cancel event
  392. set {_type} to "%damage cause%"
  393. set {_type2} to "projectile"
  394. if {tano-mm-game} is "start":
  395. delete {_inn}
  396. delete {_de}
  397. if {_type} is {_type2}:
  398. if {tano-mm-detective::*} contains attacker:
  399. if {tano-mm-murder::*} contains victim:
  400. winInnocent("マーダーが殺された!", "%attacker%")
  401. else:
  402. add attacker to {tano-mm-watching::*}
  403. add attacker to {tano-mm-death::*}
  404. send attacker title "&c誤殺してしまった" for 3 seconds
  405. execute console command "/gamemode 3 %attacker%"
  406. remove attacker from {tano-mm-player::*}
  407. loop {tano-mm-detective::*}:
  408. add 1 to {_inn}
  409. loop {tano-mm-innocent::*}:
  410. add 1 to {_inn}
  411. loop {tano-mm-death::*}:
  412. add 1 to {_de}
  413. if {_inn} <= {_de}:
  414. winMurder("生存者が全滅してしまった")
  415. if damage cause is attack:
  416. cancel event
  417. if {tano-mm-detective::*} contains attacker:
  418. detective(attacker)
  419. stop
  420. send all players title "&c%attacker%&cが何者かによって殺された!" for 3 seconds
  421. if {tano-mm-innocent::*} contains attacker:
  422. if {tano-mm-murder::*} contains victim:
  423. winInnocent("マーダーが殺された!", "%attacker%")
  424. execute console command "/gamemode 3 %victim%"
  425. else:
  426. cancel event
  427. add attacker to {tano-mm-watching::*}
  428. add attacker to {tano-mm-death::*}
  429. send attacker title "&c誤殺してしまった" for 3 seconds
  430. execute console command "/gamemode 3 %attacker%"
  431. remove attacker from {tano-mm-player::*}
  432. loop {tano-mm-detective::*}:
  433. add 1 to {_inn}
  434. loop {tano-mm-innocent::*}:
  435. add 1 to {_inn}
  436. loop {tano-mm-death::*}:
  437. add 1 to {_de}
  438. if {_inn} <= {_de}:
  439. winMurder("生存者が全滅してしまった")
  440. if damage cause is attack:
  441. cancel event
  442. if {tano-mm-detective::*} contains attacker:
  443. detective(attacker)
  444. stop
  445. send all players title "&c%attacker%&cが何者かによって殺された!" for 3 seconds
  446. if damage cause is attack:
  447. cancel event
  448. if attacker's held item is iron sword:
  449. if {tano-mm-murder::*} contains attacker:
  450. add victim to {tano-mm-watching::*}
  451. add victim to {tano-mm-death::*}
  452. send victim title "&c%attacker%&cに殺された!" for 3 seconds
  453. execute console command "/gamemode 3 %victim%"
  454. remove victim from {tano-mm-player::*}
  455. loop {tano-mm-detective::*}:
  456. add 1 to {_inn}
  457. loop {tano-mm-innocent::*}:
  458. add 1 to {_inn}
  459. loop {tano-mm-death::*}:
  460. add 1 to {_de}
  461. if {_inn} <= {_de}:
  462. winMurder("生存者が全滅してしまった")
  463. if damage cause is attack:
  464. cancel event
  465. if {tano-mm-detective::*} contains victim:
  466. detective(victim)
  467. stop
  468. send all players title "&c%victim%&cが何者かによって殺された!" for 3 seconds
  469. if {_type} is {_type2}:
  470. if {tano-mm-murder::*} contains attacker:
  471. add victim to {tano-mm-watching::*}
  472. add victim to {tano-mm-death::*}
  473. send victim title "&c%attacker%&cに殺された!" for 3 seconds
  474. execute console command "/gamemode 3 %victim%"
  475. remove victim from {tano-mm-player::*}
  476. loop {tano-mm-detective::*}:
  477. add 1 to {_inn}
  478. loop {tano-mm-innocent::*}:
  479. add 1 to {_inn}
  480. loop {tano-mm-death::*}:
  481. add 1 to {_de}
  482. if {_inn} <= {_de}:
  483. winMurder("生存者が全滅してしまった")
  484. if damage cause is attack:
  485. cancel event
  486. if {tano-mm-detective::*} contains victim:
  487. detective(victim)
  488. stop
  489. send all players title "&c%victim%&cが何者かによって殺された!" for 3 seconds
  490. else:
  491. if damage cause is attack:
  492. cancel event
  493. on first join:
  494. set join message to "{@firstjoin} %player%が初めてJoinしました。 挨拶しましょう!"
  495. on join:
  496. if {tano-mm-money.%player%} is not set:
  497. set {tano-mm-money.%player%} to 0
  498. execute console command "/test4"
  499. execute console command "/clear %player%"
  500. execute console command "/gamemode 2 %player%"
  501. teleport player to {tano-mm-lobby}
  502. set join message to "{@join} %player%がJoinしました。"
  503. if {tano-mm-game} is "start":
  504. execute console command "/gamemode 3 %player%"
  505. if {tano-mm-watching::*} contains player:
  506. else:
  507. add player to {tano-mm-watching::*}
  508. loop {tano-mm-player::*}:
  509. teleport player to location of loop-value
  510. stop
  511. else:
  512. wait 2 tick
  513. if {tano-mm-autojoin.%player%} is true:
  514. add player to {tano-mm-join::*}
  515. send "{@murder} &aオートジョインしました" to player
  516. on quit:
  517. remove player from {tano-mm-join::*}
  518. remove player from {tano-mm-innocent::*}
  519. set quit message to "{@quit} %player%がQuitしました。"
  520. if {tano-mm-game} is "start":
  521. if {tano-mm-murder::*} contains player:
  522. winInnocent("&cマーダーが落ちてしまったため...", "いません")
  523. if {tano-mm-detective::*} contains player:
  524. remove player from {tano-mm-detective::*}
  525. detective(player)
  526. function winMurder(reason: text):
  527. loop {tano-mm-murder::*}:
  528. add 50 to {tano-mm-money.%loop-value%}
  529. replace all "&" with "§" in {_reason}
  530. send "{@murder} &f%{_reason}%" to all players
  531. send "&e--------------------------------------------------" to all players
  532. send "&6Win: &bマーダー" to all players
  533. send "&cマーダー: %{tano-mm-murder::*}%" to all players
  534. send "&a探偵: %{tano-mm-detective::*}%" to all players
  535. send "&e--------------------------------------------------" to all players
  536. execute console command "/execute @a ~ ~ ~ /playsound entity.wolf.howl player @s ~ ~ ~ 1 1"
  537. loop {tano-mm-pjoin::*}:
  538. command "/clear %loop-value%"
  539. send all players title "&c==[&e-|-&6Win &cMurder!!&e-|-&c]==" with subtitle "" for 5 seconds
  540. delete {tano-mm-innocent::*}
  541. delete {tano-mm-murder::*}
  542. delete {tano-mm-detective::*}
  543. delete {tano-mm-death::*}
  544. delete {tano-mm-watching::*}
  545. delete {tano-mm-player::*}
  546. delete {tano-mm-game}
  547. delete {tano-mm-time}
  548. delete {tano-mm-map-new}
  549. execute console command "/kill @e[type=item]"
  550. wait 2 seconds
  551. send "{@murder} &a10秒後にテレポートします" to all players
  552. wait 10 seconds
  553. loop {tano-mm-pjoin::*}:
  554. command "/gamemode 2 %loop-value%"
  555. teleport {tano-mm-pjoin::*} to {tano-mm-lobby}
  556. delete {tano-mm-pjoin::*}
  557. wait 2 tick
  558. delete {tano-mm-game}
  559. autojoin()
  560. function winInnocent(reason: text, attacker: text):
  561. loop {tano-mm-innocent::*}:
  562. add 50 to {tano-mm-money.%loop-value%}
  563. replace all "&" with "§" in {_reason}
  564. send "{@murder} &f%{_reason}%" to all players
  565. send "&e--------------------------------------------------" to all players
  566. send "&6Win: &bイノセント" to all players
  567. send "&cマーダー: %{tano-mm-murder::*}%" to all players
  568. send "&a探偵: %{tano-mm-detective::*}%" to all players
  569. send "&c倒した人: %{_attacker}%" to all players
  570. send "&e--------------------------------------------------" to all players
  571. execute console command "/execute @a ~ ~ ~ /playsound entity.wolf.howl player @s ~ ~ ~ 1 1"
  572. loop {tano-mm-pjoin::*}:
  573. command "/clear %loop-value%"
  574. execute console command "/kill @e[type=item]"
  575. send all players title "&c==[&e-|-&6Win &bInnocent!!&e-|-&c]==" with subtitle "" for 5 seconds
  576. delete {tano-mm-innocent::*}
  577. delete {tano-mm-murder::*}
  578. delete {tano-mm-player::*}
  579. delete {tano-mm-detective::*}
  580. delete {tano-mm-death::*}
  581. delete {tano-mm-watching::*}
  582. delete {tano-mm-game}
  583. delete {tano-mm-time}
  584. delete {tano-mm-map-new}
  585. wait 2 seconds
  586. send "{@murder} &a10秒後にテレポートします" to all players
  587. wait 10 seconds
  588. loop {tano-mm-pjoin::*}:
  589. command "/gamemode 2 %loop-value%"
  590. teleport {tano-mm-pjoin::*} to {tano-mm-lobby}
  591. delete {tano-mm-pjoin::*}
  592. wait 2 tick
  593. delete {tano-mm-game}
  594. autojoin()
  595. function detective(detective: player):
  596. send all players title "&c探偵が殺害されてしまった" with subtitle "" for 5 seconds
  597. drop a bow named "&b探偵の弓" at location of {_detective}
  598. drop a arrow at location of {_detective}
  599. function start():
  600. #{tano-mm-maps::*} 全てのmap
  601. #{tano-mm-map-player-location-%loop-value%::*} playerがスポーンする座標
  602. #{tano-mm-map-gold-location-%loop-value%::*} goldがスポーンする座標
  603. #{tano-mm-map-tiem.%loop-value%} mapごとの時間
  604. #{tano-mm-time} 進む時間
  605. #イノセント、マーダー、探偵を決める
  606. loop {tano-mm-join::*}:
  607. execute console command "/gamemode 2 %loop-value%"
  608. teleport loop-value to random location of {tano-mm-map-player-location-%{tano-mm-map-new}%::*}
  609. set {tano-mm-game} to "start"
  610. wait 1 seconds
  611. set {tano-mm-pjoin::*} to {tano-mm-join::*}
  612. set {tano-mm-player::*} to {tano-mm-join::*}
  613. set {_murder} to random player of {tano-mm-join::*}
  614. remove {_murder} from {tano-mm-join::*}
  615. set {_detective} to random player of {tano-mm-join::*}
  616. remove {_detective} from {tano-mm-join::*}
  617. add {_murder} to {tano-mm-murder::*}
  618. add {_detective} to {tano-mm-detective::*}
  619. set {tano-mm-innocent::*} to {tano-mm-join::*}
  620. send {tano-mm-innocent::*} title "&aあなたはイノセント(市民)です" for 5 seconds
  621. send "&aあなたはイノセント(市民)です" to {tano-mm-innocent::*}
  622. send {tano-mm-detective::*} title "&aあなたは探偵(市民)です" for 5 seconds
  623. send "&aあなたは探偵(市民)です" to {tano-mm-detective::*}
  624. send {tano-mm-murder::*} title "&cあなたはマーダー(殺人者)です" for 5 seconds
  625. send "&cあなたはマーダー(殺人者)です" to {tano-mm-murder::*}
  626. set {tano-mm-gold-time} to 5
  627. delete {tano-mm-join::*}
  628. loop {tano-mm-detective::*}:
  629. set slot 0 of loop-value to bow
  630. set slot 1 of loop-value to arrow
  631. wait 3 seconds
  632. send "{@murder} &aマーダーのアイテムは20秒後に配れます" to all players
  633. wait 20 seconds
  634. loop {tano-mm-murder::*}:
  635. set slot 0 of loop-value to iron sword
  636. set slot 8 of loop-value to bone
  637. set slot 7 of loop-value to bone
  638. set slot 4 of loop-value to bow
  639. stop
  640. function autojoin():
  641. loop all players:
  642. if {tano-mm-autojoin.%loop-player%} is true:
  643. if {tano-mm-join::*} contains loop-player:
  644. else:
  645. add loop-player to {tano-mm-join::*}
  646. send "{@murder} &aオートジョインしました" to loop-player
  647. every seconds:
  648. if {tano-mm-game} is "start":
  649. if {tano-mm-time} <= 0:
  650. winInnocent("時間が切れたため", "いません")
  651. else:
  652. remove 1 from {tano-mm-time}
  653. set action bar of all players to "&6残り時間 : &b%{tano-mm-time}% &6秒"
  654. every seconds:
  655. if {tano-mm-game} is "start":
  656. remove 1 from {tano-mm-gold-time}
  657. if {tano-mm-gold-time} <= 0:
  658. drop a gold ingot at {tano-mm-map-gold-location-%{tano-mm-map-new}%::*}
  659. set {tano-mm-gold-time} to 13
  660. on projectile hit:
  661. if projectile is arrow:
  662. if projectile is entity:
  663. delete event-entity
  664. command /test:
  665. permission: ada
  666. trigger:
  667. send "%{tano-mm-join::*}%"
  668. send "%{tano-mm-detective::*}%"
  669. send "%{tano-mm-innocent::*}%"
  670. send "%{tano-mm-murder::*}%"
  671. command /test2:
  672. permission: ada
  673. trigger:
  674. winInnocent("強制stop", "いない")
  675. command /test3:
  676. permission: start
  677. trigger:
  678. delete {tano-mm-join::*}
  679. command /test4:
  680. trigger:
  681. loop all players:
  682. if scoreboard team "nametag" in scoreboard scoreboard of loop-player is not set:
  683. register new scoreboard team "nametag" in scoreboard scoreboard of loop-player
  684. set {_team} to scoreboard team "nametag" in scoreboard scoreboard of loop-player
  685. set scoreboard team option NAME_TAG_VISIBILITY of team {_team} to NEVER
  686. loop all players:
  687. loop-player-2 is not loop-player-1
  688. scoreboard add entry "%loop-player-2%" to team {_team}
  689. scoreboard team "nametag" in scoreboard scoreboard of loop-player-2 is set
  690. scoreboard add entry "%loop-player-2%" to team scoreboard team "nametag" in scoreboard scoreboard of loop-player-2
  691. on drop:
  692. if {tano-mm-game} is "start":
  693. cancel event
  694. on pickup:
  695. if {tano-mm-game} is "start":
  696. if {tano-mm-murder::*} contains player:
  697. if event-item is bow:
  698. cancel event
  699. if event-item is arrow:
  700. cancel event
  701. every tick:
  702. if {tano-mm-game} is "start":
  703. loop all players:
  704. if {tano-mm-murder::*} contains loop-player:
  705. if loop-player has 15 gold ingot:
  706. give bone to loop-player
  707. remove 15 gold ingot from loop-player's inventory
  708. else:
  709. if loop-player has 8 gold ingot:
  710. if loop-player has 1 bow:
  711. give arrow to loop-player
  712. remove 8 gold ingot from loop-player's inventory
  713. stop
  714. else:
  715. give bow to loop-player
  716. give arrow to loop-player
  717. remove 8 gold ingot from loop-player's inventory
  718. stop
  719. on rightclick with iron sword:
  720. if player has 1 bone:
  721. remove 1 bone from player's inventory
  722. shoot an arrow from player at speed 3
  723. execute console command "/execute %player% ~ ~ ~ /playsound entity.arrow.shoot player %player% ~ ~ ~ 10 0.5"
  724. command /menu:
  725. aliases: /m
  726. trigger:
  727. if {tano-mm-player::*} contains player:
  728. send "{@murder} &cあなたは参加しているためMENUを開けません!"
  729. stop
  730. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  731. menuMain(player)
  732. on inventory click:
  733. if name of player's current inventory contains "&c&lM&e&lE&a&lN&b&lU":
  734. cancel event
  735. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU":
  736. if name of clicked item is "&dオートジョイン":
  737. execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  738. if {tano-mm-autojoin.%player%} is not set:
  739. set {tano-mm-autojoin.%player%} to true
  740. send "{@murder} &aオートジョインを有効化しました"
  741. menuMain(player)
  742. else if {tano-mm-autojoin.%player%} is true:
  743. delete {tano-mm-autojoin.%player%}
  744. send "{@murder} &aオートジョインを無効化しました"
  745. menuMain(player)
  746. if name of clicked item is "&aJoin":
  747. if {tano-mm-game} is true:
  748. send "{@murder} &c既にゲームが始まっています"
  749. stop
  750. if {tano-mm-join::*} contains player:
  751. send "{@murder} &cあなたは既に参加しています"
  752. stop
  753. if {tano-mm-innocent::*} contains player:
  754. send "{@murder} &cあなたは既に参加しています"
  755. stop
  756. if {tano-mm-murder::*} contains player:
  757. send "{@murder} &cあなたは既に参加しています"
  758. stop
  759. if {tano-mm-detective::*} contains player:
  760. send "{@murder} &cあなたは既に参加しています"
  761. stop
  762. send "{@murder} &aゲームに参加しました"
  763. command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
  764. if {tano-mm-join::*} contains player:
  765. stop
  766. else:
  767. add player to {tano-mm-join::*}
  768. if name of clicked item is "&creJoin":
  769. if {tano-mm-game} is true:
  770. send "{@murder} &c既にゲームが始まっています"
  771. stop
  772. if {tano-mm-join::*} contains player:
  773. remove player from {tano-mm-join::*}
  774. send "{@murder} &aゲームから退出しました"
  775. command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
  776. stop
  777. else:
  778. send "{@murder} &cあなたは参加していません"
  779. if name of clicked item is "&6SHOP":
  780. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  781. menuSHOP(player)
  782. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP":
  783. if name of clicked item is "&cスキル":
  784. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  785. menuSHOPSkill(player)
  786. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill":
  787. if name of clicked item is "&cMurder":
  788. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  789. menuSHOPSkillMurder(player)
  790. if name of clicked item is "&bDetective":
  791. command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
  792. menuSHOPSkillDetective(player)
  793. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill &7>> &c&lMurder":
  794. if name of clicked item is "{@skill-name.eye}":
  795. if {tano-mm-money.%player%} < 2000:
  796. send "{@murder} &c所持金が足りません"
  797. stop
  798. if {tano-mm-skills-murder-%player%::*} contains {@skill-id.eye}:
  799. send "{@murder} &c既に所持しています"
  800. stop
  801. remove 2000 from {tano-mm-money.%player%}
  802. add {@skill-id.eye} to {tano-mm-skills-murder-%player%::*}
  803. execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
  804. send "{@murder} &c{@skill-id.eye}&aを購入しました!"
  805. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill &7>> &b&lDetective":
  806. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &c&lSkill":
  807. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &c&lSkill &7>> &c&lMurder":
  808. if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &c&lSkill &7>> &b&lDetective":
  809. function menuMain(p: player):
  810. open chest with 3 row named "&c&lM&e&lE&a&lN&b&lU" to {_p}
  811. set slot 1 of {_p}'s current inventory to gold ingot named "&6SHOP"
  812. if {tano-mm-autojoin.%{_p}%} is not set:
  813. set slot 4 of {_p}'s current inventory to redstone named "&dオートジョイン" with lore "&c✖ 無効中"
  814. if {tano-mm-autojoin.%{_p}%} is set:
  815. set slot 4 of {_p}'s current inventory to redstone named "&dオートジョイン" with lore "&a✔ 有効中"
  816. set slot 21 of {_p}'s current inventory to emerald named "&aJoin"
  817. set slot 23 of {_p}'s current inventory to barrier named "&creJoin"
  818. set slot 7 of {_p}'s current inventory to diamond sword named "&cスキル"
  819. function menuSHOP(p: player):
  820. open chest with 1 row named "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP" to {_p}
  821. set slot 4 of {_p}'s current inventory to diamond named "&cスキル"
  822. function menuSHOPSkill(p: player):
  823. open chest with 1 row named "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill" to {_p}
  824. set slot 2 of {_p}'s current inventory to iron sword named "&cMurder"
  825. set slot 6 of {_p}'s current inventory to bow named "&bDetective"
  826. function menuSHOPSkillMurder(p: player):
  827. open chest with 6 row named "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill &7>> &c&lMurder" to {_p}
  828. set slot 0 of {_p}'s current inventory to {@skill-itemid.eye} named "{@skill-name.eye}" with lore {@skill-lore.eye} and "&6値段: {@skill-price.eye}"
  829. set slot 43 of {_p}'s current inventory to red stained glass pane named " "
  830. set slot 44 of {_p}'s current inventory to red stained glass pane named " "
  831. set slot 52 of {_p}'s current inventory to red stained glass pane named " "
  832. set slot 53 of {_p}'s current inventory to emerald named "&6Money: %{tano-mm-money.%{_p}%}%"
  833. function menuSHOPSkillDetective(p: player):
  834. open chest with 6 row named "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill &7>> &b&lDetective" to {_p}
  835. set slot 43 of {_p}'s current inventory to blue stained glass pane named " "
  836. set slot 44 of {_p}'s current inventory to blue stained glass pane named " "
  837. set slot 52 of {_p}'s current inventory to blue stained glass pane named " "
  838. set slot 53 of {_p}'s current inventory to emerald named "&6Money: %{tano-mm-money.%{_p}%}%"
  839. function menuSkill(p: player):
  840. function menuSkillMurder(p: player):
  841. function menuSkillDetective(p: player):
  842. on command:
  843. if command is "tell":
  844. cancel event
  845. send "{@murder} &c不正防止のため使用できません"
  846. if command is "m":
  847. cancel event
  848. send "{@murder} &c不正防止のため使用できません"
  849. if command is "gtell":
  850. cancel event
  851. send "{@murder} &c不正防止のため使用できません"
  852. if command is "me":
  853. cancel event
  854. send "{@murder} &c不正防止のため使用できません"
Add Comment
Please, Sign In to add comment