Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #======================================================================
- # __________________________________________________________
- # / / / // /
- # /_/___________________________________________________/_// /
- # / / _____ __ __ / /
- # / / / ____/ / / /_/ // / /
- # / / / /__ / /___ ___ __ ______ __/ /_ / /
- # / / /___ / / __/ / __/ / / / __ //_ __/ / /
- # / / ____/ / / // / / / / / / /_/ / / / / /
- # / / /_____/ /_/ /_/ /_/ /_/ / ____/ /_/ / /__
- # / / ========================== / / ========== / / / /
- # | | /_/ | | | |
- # /_/_________________________________________________/_/_/_/
- #制作者: tanoKun(tanotanosii2) V 1.12.2
- #======================================================================
- #変数
- #{tano-mm-map-new} 現在のMAP
- #{tano-mm-lobby} ロビー
- #{tano-mm-game} ゲームステータス
- #{tano-mm-spc} スタートするまでの人数
- #{tano-mm-maps::*} 全てのmap
- #{tano-mm-map-player-location-%loop-value%::*} playerがスポーンする座標
- #{tano-mm-map-gold-location-%loop-value%::*} goldがスポーンする座標
- #{tano-mm-map-tiem.%loop-value%} mapごとの時間
- #{tano-mm-time} 進む時間
- #{tano-mm-join::*} 参加者
- #{tano-mm-innocent::*} 市民
- #{tano-mm-murder::*} マーダー
- #{tano-mm-detective::*} 探偵
- #{tano-mm-death::*} 死亡者
- #{tano-mm-watching::*} 観戦者
- #{tano-mm-player::*} 全ての参加者(死んでいない人)
- #{tano-mm-autojoin.%player%} オートジョイン設定
- #{tano-mm-money.%player%} 所持金
- #{tano-mm-skills-murder-%player%::*} %player%の所持マーダースキル
- #{tano-mm-skills-innocent-%player%::*} %player%の所持イノセントスキル
- #======================================================================
- options:
- join: &a[&eJoin&a]
- firstjoin: &a[&cFirstJoin&a]
- quit: &a[&eQuit&a]
- murder: &c&l[Murder]&f
- #===================================スキルマーダー===================================
- #----------------心眼----------------
- skill-id.eye: eye
- skill-name.eye: &c心眼
- skill-lore.eye: "&fスキルアイテムをクリックで発動", "&f生き残っている人に&b10秒間発光&fを付与する"
- skill-price.eye: 2000
- skill-itemid.eye: ender eye
- command /mm:
- permission: taotanosii.murdermystery.mm
- trigger:
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mmGUI(player)
- command /setlobby:
- permission: tanotanosii.murdermystery.setlobby
- trigger:
- set {tano-mm-lobby} to location of player
- send "{@murder} &aLobbyを&b%{tano-mm-lobby}%&aに設定しました"
- on inventory click:
- if name of player's current inventory contains "&cMurderMystery":
- cancel event
- if name of player's current inventory is "&cMurderMystery":
- if name of clicked item is "&aスタート人数変更":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- spcGUI(player)
- stop
- if name of clicked item is "&aマップ編集":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mapCreateGUI(player)
- stop
- else if name of player's current inventory is "&cMurderMystery &7>> &aスタート人数変更":
- if name of clicked item is "&cBack":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mmGUI(player)
- stop
- set {_slot} to "%clicked slot%" parsed as number
- if ({_slot} <= 8) and ({_slot} >= 0):
- add {_slot} + 1 to {tano-mm-spc}
- send "&aスタート人数に&b%{_slot} + 1%&aを足しました &d(現在の設定: %{tano-mm-spc}%)"
- execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- spcGUI(player)
- stop
- if ({_slot} <= 17) and ({_slot} >= 9):
- remove {_slot} - 9 + 1 from {tano-mm-spc}
- send "&aスタート人数から&b%{_slot} - 9 + 1%&aを引きました &d(現在の設定: %{tano-mm-spc}%)"
- execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- spcGUI(player)
- stop
- else if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集":
- loop {tano-mm-maps::*}:
- if {tano-mm-edit.%player%} is "DeleteMap":
- if name of clicked item contains loop-value:
- remove loop-value from {tano-mm-maps::*}
- message "&a削除完了しました"
- delete {tano-mm-edit.%player%}
- delete {tano-mm-map-player-location-%loop-value%::*}
- delete {tano-mm-map-gold-location-%loop-value%::*}
- delete {tano-mm-map-tiem.%loop-value%}
- mapCreateGUI(player)
- stop
- if name of clicked item contains loop-value:
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mapMapGUI(player, loop-value)
- stop
- if name of clicked item is "&aCreateMap":
- set {tano-mm-edit.%player%} to "CreateMap"
- send "&7チャットから作成するマップ名を入力してください"
- send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
- teleport player to location of player
- stop
- if name of clicked item is "&cDeleteMap":
- send "&7削除したいマップをクリックしてください"
- send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
- set {tano-mm-edit.%player%} to "DeleteMap"
- stop
- loop {tano-mm-maps::*}:
- if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value%":
- if name of clicked item is "&aSpawn":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mapSpawnGUI(player, loop-value)
- stop
- else if name of clicked item is "&aGold":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mapGoldGUI(player, loop-value)
- stop
- else if name of clicked item is "&a時間設定":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- mapTimeGUI(player, loop-value)
- stop
- if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value% &7>> &aGold":
- if {tano-mm-edit.%player%} is "DeleteGold":
- loop {tano-mm-map-gold-location-%loop-value%::*}:
- if name of clicked item contains "%loop-value-2%":
- remove loop-value-2 from {tano-mm-map-gold-location-%loop-value-1%::*}
- message "&a削除完了しました"
- delete {tano-mm-edit.%player%}
- mapGoldGUI(player, loop-value-1)
- stop
- if name of clicked item is "&aCreateGold":
- set {tano-mm-edit.%player%} to "CreateGold"
- set {tano-mm-edit-creategold.%player%} to "%loop-value%"
- send "&7スポーン地点にしたい座標を壊してください(同じ座標にするとバグが起きる可能性があります)"
- send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
- teleport player to location of player
- stop
- if name of clicked item is "&cDeleteGold":
- send "削除したい座標(アイテム)をクリックしてください"
- send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
- set {tano-mm-edit.%player%} to "DeleteGold"
- stop
- if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value% &7>> &aSpawn":
- if {tano-mm-edit.%player%} is "DeleteSpawn":
- loop {tano-mm-map-player-location-%loop-value%::*}:
- if name of clicked item contains "%loop-value-2%":
- remove loop-value-2 from {tano-mm-map-player-location-%loop-value-1%::*}
- message "&a削除完了しました"
- delete {tano-mm-edit.%player%}
- mapSpawnGUI(player, loop-value-1)
- stop
- if name of clicked item is "&aCreateSpawn":
- set {tano-mm-edit.%player%} to "CreateSpawn"
- set {tano-mm-edit-createplayer.%player%} to "%loop-value%"
- send "&7スポーン地点にしたい座標を壊してください(同じ座標にするとバグが起きる可能性があります)"
- send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
- teleport player to location of player
- stop
- if name of clicked item is "&cDeleteSpawn":
- send "&7削除したい座標(アイテム)をクリックしてください"
- send "&7キャンセルする場合は&ccancel&7と入力することでキャンセルできます"
- set {tano-mm-edit.%player%} to "DeleteSpawn"
- stop
- if name of player's current inventory is "&cMurderMystery &7>> &aマップ編集 &7>> &a%loop-value% &7>> &a時間設定":
- set {_slot} to "%clicked slot%" parsed as number
- if ({_slot} <= 8) and ({_slot} >= 0):
- add ({_slot} + 1) * 10 to {tano-mm-map-tiem.%loop-value%}
- send "&a時間制限に&b%({_slot} + 1) * 10%&aを足しました &d(現在の設定: %{tano-mm-map-tiem.%loop-value%}%)"
- execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- mapTimeGUI(player, loop-value)
- stop
- if ({_slot} <= 17) and ({_slot} >= 9):
- remove ({_slot} - 8) * 10 from {tano-mm-map-tiem.%loop-value%}
- send "&a制限時間から&b%({_slot} - 8) * 10%&aを引きました &d(現在の設定: %{tano-mm-map-tiem.%loop-value%}%)"
- execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- mapTimeGUI(player, loop-value)
- stop
- function mmGUI(p: player):
- open chest with 1 row named "&cMurderMystery" to {_p}
- set slot 2 of {_p}'s current inventory to stone named "&aスタート人数変更" with lore "&fスタートするまでの人数を指定します"
- set slot 4 of {_p}'s current inventory to map named "&aマップ編集" with lore "&fマップの編集を行います"
- set slot 6 of {_p}'s current inventory to emerald named "&a報酬設定" with lore "&f報酬(クリア時)を変更します"
- function spcGUI(p: player):
- open chest with 3 row named "&cMurderMystery &7>> &aスタート人数変更" to {_p}
- set slot 18 of {_p}'s current inventory to stone named "&d現在の設定: %{tano-mm-spc}%"
- set slot 0 of {_p}'s current inventory to green wool named "&a+1"
- set slot 1 of {_p}'s current inventory to green wool named "&a+2"
- set slot 2 of {_p}'s current inventory to green wool named "&a+3"
- set slot 3 of {_p}'s current inventory to green wool named "&a+4"
- set slot 4 of {_p}'s current inventory to green wool named "&a+5"
- set slot 5 of {_p}'s current inventory to green wool named "&a+6"
- set slot 6 of {_p}'s current inventory to green wool named "&a+7"
- set slot 7 of {_p}'s current inventory to green wool named "&a+8"
- set slot 8 of {_p}'s current inventory to green wool named "&a+9"
- set slot 9 of {_p}'s current inventory to red wool named "&c-1"
- set slot 10 of {_p}'s current inventory to red wool named "&c-2"
- set slot 11 of {_p}'s current inventory to red wool named "&c-3"
- set slot 12 of {_p}'s current inventory to red wool named "&c-4"
- set slot 13 of {_p}'s current inventory to red wool named "&c-5"
- set slot 14 of {_p}'s current inventory to red wool named "&c-6"
- set slot 15 of {_p}'s current inventory to red wool named "&c-7"
- set slot 16 of {_p}'s current inventory to red wool named "&c-8"
- set slot 17 of {_p}'s current inventory to red wool named "&c-9"
- set slot 26 of {_p}'s current inventory to magma named "&cBack"
- function mapCreateGUI(p: player):
- open chest with 6 row named "&cMurderMystery &7>> &aマップ編集" to {_p}
- set slot 48 of {_p}'s current inventory to anvil named "&aCreateMap"
- set slot 50 of {_p}'s current inventory to barrier named "&cDeleteMap"
- loop {tano-mm-maps::*}:
- set slot loop-index parsed as number - 1 of {_p}'s current inventory to grass block named "&a%loop-value%"
- function mapMapGUI(p: player, map: text):
- open chest with 1 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}%" to {_p}
- set slot 2 of {_p}'s current inventory to slime block named "&aSpawn" with lore "&fPlayerのスポーン位置の設定をします"
- set slot 4 of {_p}'s current inventory to compass named "&a時間設定" with lore "&f時間制限を設定します"
- set slot 6 of {_p}'s current inventory to gold ingot named "&aGold" with lore "&fGoldのスポーン位置の設定をします"
- function mapGoldGUI(p: player, map: text):
- open chest with 6 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}% &7>> &aGold" to {_p}
- set slot 48 of {_p}'s current inventory to anvil named "&aCreateGold"
- set slot 50 of {_p}'s current inventory to barrier named "&cDeleteGold"
- loop {tano-mm-map-gold-location-%{_map}%::*}:
- set slot loop-index parsed as number - 1 of {_p}'s current inventory to gold ingot named "&a%loop-value%"
- function mapSpawnGUI(p: player, map: text):
- open chest with 6 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}% &7>> &aSpawn" to {_p}
- set slot 48 of {_p}'s current inventory to anvil named "&aCreateSpawn"
- set slot 50 of {_p}'s current inventory to barrier named "&cDeleteSpawn"
- loop {tano-mm-map-player-location-%{_map}%::*}:
- set slot loop-index parsed as number - 1 of {_p}'s current inventory to slime block named "&a%loop-value%"
- function mapTimeGUI(p: player, map: text):
- open chest with 3 row named "&cMurderMystery &7>> &aマップ編集 &7>> &a%{_map}% &7>> &a時間設定" to {_p}
- set slot 18 of {_p}'s current inventory to compass named "&d現在の設定: %{tano-mm-map-tiem.%{_map}%}%秒"
- set slot 0 of {_p}'s current inventory to green wool named "&a+10"
- set slot 1 of {_p}'s current inventory to green wool named "&a+20"
- set slot 2 of {_p}'s current inventory to green wool named "&a+30"
- set slot 3 of {_p}'s current inventory to green wool named "&a+40"
- set slot 4 of {_p}'s current inventory to green wool named "&a+50"
- set slot 5 of {_p}'s current inventory to green wool named "&a+60"
- set slot 6 of {_p}'s current inventory to green wool named "&a+70"
- set slot 7 of {_p}'s current inventory to green wool named "&a+80"
- set slot 8 of {_p}'s current inventory to green wool named "&a+90"
- set slot 9 of {_p}'s current inventory to red wool named "&c-10"
- set slot 10 of {_p}'s current inventory to red wool named "&c-20"
- set slot 11 of {_p}'s current inventory to red wool named "&c-30"
- set slot 12 of {_p}'s current inventory to red wool named "&c-40"
- set slot 13 of {_p}'s current inventory to red wool named "&c-50"
- set slot 14 of {_p}'s current inventory to red wool named "&c-60"
- set slot 15 of {_p}'s current inventory to red wool named "&c-70"
- set slot 16 of {_p}'s current inventory to red wool named "&c-80"
- set slot 17 of {_p}'s current inventory to red wool named "&c-90"
- on chat:
- if {tano-mm-edit.%player%} is set:
- if message contains "cancel":
- send "&a操作をキャンセルしました"
- delete {tano-mm-edit.%player%}
- cancel event
- stop
- if {tano-mm-edit.%player%} is "CreateMap":
- if {tano-mm-maps::*} contains message:
- message "{@murder} &c既にそのマップは作られています"
- else:
- add message to {tano-mm-maps::*}
- message "{@murder} &a%message%を作成しました"
- delete {tano-mm-edit.%player%}
- mapCreateGUI(player)
- cancel event
- stop
- if {tano-mm-player::*} contains player:
- execute console command "/execute @a ~ ~ ~ /playsound entity.item.pickup player @s ~ ~ ~ 1 0.6"
- message "&b[生存者]&a%player%>> &7%message%" to all players
- cancel event
- stop
- if {tano-mm-watching::*} contains player:
- execute console command "/execute @a ~ ~ ~ /playsound entity.item.pickup player @s ~ ~ ~ 1 0.6"
- cancel event
- message "&2[観戦]&a%player%>> &7%message%" to {tano-mm-watching::*}
- stop
- on break:
- if {tano-mm-edit.%player%} is "CreateGold":
- add location of event-block to {tano-mm-map-gold-location-%{tano-mm-edit-creategold.%player%}%::*}
- send "&aGoldのスポーン位置&b%location of event-block%&aを追加しました"
- mapGoldGUI(player, {tano-mm-edit-creategold.%player%})
- delete {tano-mm-edit.%player%}
- delete {tano-mm-edit-creategold.%player%}
- stop
- if {tano-mm-edit.%player%} is "CreateSpawn":
- add location of event-block to {tano-mm-map-player-location-%{tano-mm-edit-createplayer.%player%}%::*}
- send "&aplayerのスポーン位置&b%location of event-block%&aを追加しました"
- mapSpawnGUI(player, {tano-mm-edit-createplayer.%player%})
- delete {tano-mm-edit.%player%}
- delete {tano-mm-edit-createplayer.%player%}
- stop
- command /join:
- trigger:
- if {tano-mm-game} is true:
- send "{@murder} &c既にゲームが始まっています"
- stop
- if {tano-mm-join::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- if {tano-mm-innocent::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- if {tano-mm-murder::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- if {tano-mm-detective::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- send "{@murder} &aゲームに参加しました"
- command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
- if {tano-mm-join::*} contains player:
- stop
- else:
- add player to {tano-mm-join::*}
- command /rejoin:
- trigger:
- if {tano-mm-game} is true:
- send "{@murder} &c既にゲームが始まっています"
- stop
- if {tano-mm-join::*} contains player:
- remove player from {tano-mm-join::*}
- send "{@murder} &aゲームから退出しました"
- command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
- stop
- else:
- send "{@murder} &cあなたは参加していません"
- command /autojoin:
- trigger:
- if {tano-mm-autojoin.%player%} is not set:
- set {tano-mm-autojoin.%player%} to true
- send "{@murder} &aオートジョインを有効化しました"
- else if {tano-mm-autojoin.%player%} is true:
- delete {tano-mm-autojoin.%player%}
- send "{@murder} &aオートジョインを無効化しました"
- every seconds:
- if {tano-mm-game} is not set:
- loop {tano-mm-join::*}:
- add 1 to {_players}
- if {_players} >= {tano-mm-spc}:
- set {tano-mm-game} to "previous"
- send "{@murder} &a人数が揃ったのでゲームを30秒後に開始致します" to all players
- wait 10 seconds
- #Map選択
- set {tano-mm-map-new} to random text of {tano-mm-maps::*}
- send all players title "&aMapは&c%{tano-mm-map-new}%&aに選ばれました" for 5 seconds
- send "&aMapは&c%{tano-mm-map-new}%&aに選ばれました" to all players
- set {tano-mm-time} to {tano-mm-map-tiem.%{tano-mm-map-new}%}
- send "{@murder} &a20..." to all players
- wait 10 seconds
- send "{@murder} &a10..." to all players
- wait 5 seconds
- send "{@murder} &e5..." to all players
- execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- send all players title "&e5" for 1 seconds
- wait 1 seconds
- send "{@murder} &e4..." to all players
- execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- send all players title "&e4" for 1 seconds
- wait 1 seconds
- send "{@murder} &c3..." to all players
- execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- send all players title "&c3" for 1 seconds
- wait 1 seconds
- send "{@murder} &c2..." to all players
- execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- send all players title "&c2" for 1 seconds
- wait 1 seconds
- send "{@murder} &c1..." to all players
- execute console command "/execute @a ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- send all players title "&c1" for 1 seconds
- wait 1 seconds
- loop {tano-mm-join::*}:
- add 1 to {_players}
- if {_players} <= {tano-mm-spc}:
- delete {tano-mm-game}
- send "{@murder} &c人数が揃っていないのでゲームを中止します" to all players
- stop
- execute console command "/execute @a ~ ~ ~ /playsound entity.lightning.impact player @s ~ ~ ~ 10 1"
- send all players title "&cMurder Mystery" with subtitle "&aスタート!!" for 5 seconds
- start()
- on damage:
- if damage cause is fall:
- cancel event
- set {_type} to "%damage cause%"
- set {_type2} to "projectile"
- if {tano-mm-game} is "start":
- delete {_inn}
- delete {_de}
- if {_type} is {_type2}:
- if {tano-mm-detective::*} contains attacker:
- if {tano-mm-murder::*} contains victim:
- winInnocent("マーダーが殺された!", "%attacker%")
- else:
- add attacker to {tano-mm-watching::*}
- add attacker to {tano-mm-death::*}
- send attacker title "&c誤殺してしまった" for 3 seconds
- execute console command "/gamemode 3 %attacker%"
- remove attacker from {tano-mm-player::*}
- loop {tano-mm-detective::*}:
- add 1 to {_inn}
- loop {tano-mm-innocent::*}:
- add 1 to {_inn}
- loop {tano-mm-death::*}:
- add 1 to {_de}
- if {_inn} <= {_de}:
- winMurder("生存者が全滅してしまった")
- if damage cause is attack:
- cancel event
- if {tano-mm-detective::*} contains attacker:
- detective(attacker)
- stop
- send all players title "&c%attacker%&cが何者かによって殺された!" for 3 seconds
- if {tano-mm-innocent::*} contains attacker:
- if {tano-mm-murder::*} contains victim:
- winInnocent("マーダーが殺された!", "%attacker%")
- execute console command "/gamemode 3 %victim%"
- else:
- cancel event
- add attacker to {tano-mm-watching::*}
- add attacker to {tano-mm-death::*}
- send attacker title "&c誤殺してしまった" for 3 seconds
- execute console command "/gamemode 3 %attacker%"
- remove attacker from {tano-mm-player::*}
- loop {tano-mm-detective::*}:
- add 1 to {_inn}
- loop {tano-mm-innocent::*}:
- add 1 to {_inn}
- loop {tano-mm-death::*}:
- add 1 to {_de}
- if {_inn} <= {_de}:
- winMurder("生存者が全滅してしまった")
- if damage cause is attack:
- cancel event
- if {tano-mm-detective::*} contains attacker:
- detective(attacker)
- stop
- send all players title "&c%attacker%&cが何者かによって殺された!" for 3 seconds
- if damage cause is attack:
- cancel event
- if attacker's held item is iron sword:
- if {tano-mm-murder::*} contains attacker:
- add victim to {tano-mm-watching::*}
- add victim to {tano-mm-death::*}
- send victim title "&c%attacker%&cに殺された!" for 3 seconds
- execute console command "/gamemode 3 %victim%"
- remove victim from {tano-mm-player::*}
- loop {tano-mm-detective::*}:
- add 1 to {_inn}
- loop {tano-mm-innocent::*}:
- add 1 to {_inn}
- loop {tano-mm-death::*}:
- add 1 to {_de}
- if {_inn} <= {_de}:
- winMurder("生存者が全滅してしまった")
- if damage cause is attack:
- cancel event
- if {tano-mm-detective::*} contains victim:
- detective(victim)
- stop
- send all players title "&c%victim%&cが何者かによって殺された!" for 3 seconds
- if {_type} is {_type2}:
- if {tano-mm-murder::*} contains attacker:
- add victim to {tano-mm-watching::*}
- add victim to {tano-mm-death::*}
- send victim title "&c%attacker%&cに殺された!" for 3 seconds
- execute console command "/gamemode 3 %victim%"
- remove victim from {tano-mm-player::*}
- loop {tano-mm-detective::*}:
- add 1 to {_inn}
- loop {tano-mm-innocent::*}:
- add 1 to {_inn}
- loop {tano-mm-death::*}:
- add 1 to {_de}
- if {_inn} <= {_de}:
- winMurder("生存者が全滅してしまった")
- if damage cause is attack:
- cancel event
- if {tano-mm-detective::*} contains victim:
- detective(victim)
- stop
- send all players title "&c%victim%&cが何者かによって殺された!" for 3 seconds
- else:
- if damage cause is attack:
- cancel event
- on first join:
- set join message to "{@firstjoin} %player%が初めてJoinしました。 挨拶しましょう!"
- on join:
- if {tano-mm-money.%player%} is not set:
- set {tano-mm-money.%player%} to 0
- execute console command "/test4"
- execute console command "/clear %player%"
- execute console command "/gamemode 2 %player%"
- teleport player to {tano-mm-lobby}
- set join message to "{@join} %player%がJoinしました。"
- if {tano-mm-game} is "start":
- execute console command "/gamemode 3 %player%"
- if {tano-mm-watching::*} contains player:
- else:
- add player to {tano-mm-watching::*}
- loop {tano-mm-player::*}:
- teleport player to location of loop-value
- stop
- else:
- wait 2 tick
- if {tano-mm-autojoin.%player%} is true:
- add player to {tano-mm-join::*}
- send "{@murder} &aオートジョインしました" to player
- on quit:
- remove player from {tano-mm-join::*}
- remove player from {tano-mm-innocent::*}
- set quit message to "{@quit} %player%がQuitしました。"
- if {tano-mm-game} is "start":
- if {tano-mm-murder::*} contains player:
- winInnocent("&cマーダーが落ちてしまったため...", "いません")
- if {tano-mm-detective::*} contains player:
- remove player from {tano-mm-detective::*}
- detective(player)
- function winMurder(reason: text):
- loop {tano-mm-murder::*}:
- add 50 to {tano-mm-money.%loop-value%}
- replace all "&" with "§" in {_reason}
- send "{@murder} &f%{_reason}%" to all players
- send "&e--------------------------------------------------" to all players
- send "&6Win: &bマーダー" to all players
- send "&cマーダー: %{tano-mm-murder::*}%" to all players
- send "&a探偵: %{tano-mm-detective::*}%" to all players
- send "&e--------------------------------------------------" to all players
- execute console command "/execute @a ~ ~ ~ /playsound entity.wolf.howl player @s ~ ~ ~ 1 1"
- loop {tano-mm-pjoin::*}:
- command "/clear %loop-value%"
- send all players title "&c==[&e-|-&6Win &cMurder!!&e-|-&c]==" with subtitle "" for 5 seconds
- delete {tano-mm-innocent::*}
- delete {tano-mm-murder::*}
- delete {tano-mm-detective::*}
- delete {tano-mm-death::*}
- delete {tano-mm-watching::*}
- delete {tano-mm-player::*}
- delete {tano-mm-game}
- delete {tano-mm-time}
- delete {tano-mm-map-new}
- execute console command "/kill @e[type=item]"
- wait 2 seconds
- send "{@murder} &a10秒後にテレポートします" to all players
- wait 10 seconds
- loop {tano-mm-pjoin::*}:
- command "/gamemode 2 %loop-value%"
- teleport {tano-mm-pjoin::*} to {tano-mm-lobby}
- delete {tano-mm-pjoin::*}
- wait 2 tick
- delete {tano-mm-game}
- autojoin()
- function winInnocent(reason: text, attacker: text):
- loop {tano-mm-innocent::*}:
- add 50 to {tano-mm-money.%loop-value%}
- replace all "&" with "§" in {_reason}
- send "{@murder} &f%{_reason}%" to all players
- send "&e--------------------------------------------------" to all players
- send "&6Win: &bイノセント" to all players
- send "&cマーダー: %{tano-mm-murder::*}%" to all players
- send "&a探偵: %{tano-mm-detective::*}%" to all players
- send "&c倒した人: %{_attacker}%" to all players
- send "&e--------------------------------------------------" to all players
- execute console command "/execute @a ~ ~ ~ /playsound entity.wolf.howl player @s ~ ~ ~ 1 1"
- loop {tano-mm-pjoin::*}:
- command "/clear %loop-value%"
- execute console command "/kill @e[type=item]"
- send all players title "&c==[&e-|-&6Win &bInnocent!!&e-|-&c]==" with subtitle "" for 5 seconds
- delete {tano-mm-innocent::*}
- delete {tano-mm-murder::*}
- delete {tano-mm-player::*}
- delete {tano-mm-detective::*}
- delete {tano-mm-death::*}
- delete {tano-mm-watching::*}
- delete {tano-mm-game}
- delete {tano-mm-time}
- delete {tano-mm-map-new}
- wait 2 seconds
- send "{@murder} &a10秒後にテレポートします" to all players
- wait 10 seconds
- loop {tano-mm-pjoin::*}:
- command "/gamemode 2 %loop-value%"
- teleport {tano-mm-pjoin::*} to {tano-mm-lobby}
- delete {tano-mm-pjoin::*}
- wait 2 tick
- delete {tano-mm-game}
- autojoin()
- function detective(detective: player):
- send all players title "&c探偵が殺害されてしまった" with subtitle "" for 5 seconds
- drop a bow named "&b探偵の弓" at location of {_detective}
- drop a arrow at location of {_detective}
- function start():
- #{tano-mm-maps::*} 全てのmap
- #{tano-mm-map-player-location-%loop-value%::*} playerがスポーンする座標
- #{tano-mm-map-gold-location-%loop-value%::*} goldがスポーンする座標
- #{tano-mm-map-tiem.%loop-value%} mapごとの時間
- #{tano-mm-time} 進む時間
- #イノセント、マーダー、探偵を決める
- loop {tano-mm-join::*}:
- execute console command "/gamemode 2 %loop-value%"
- teleport loop-value to random location of {tano-mm-map-player-location-%{tano-mm-map-new}%::*}
- set {tano-mm-game} to "start"
- wait 1 seconds
- set {tano-mm-pjoin::*} to {tano-mm-join::*}
- set {tano-mm-player::*} to {tano-mm-join::*}
- set {_murder} to random player of {tano-mm-join::*}
- remove {_murder} from {tano-mm-join::*}
- set {_detective} to random player of {tano-mm-join::*}
- remove {_detective} from {tano-mm-join::*}
- add {_murder} to {tano-mm-murder::*}
- add {_detective} to {tano-mm-detective::*}
- set {tano-mm-innocent::*} to {tano-mm-join::*}
- send {tano-mm-innocent::*} title "&aあなたはイノセント(市民)です" for 5 seconds
- send "&aあなたはイノセント(市民)です" to {tano-mm-innocent::*}
- send {tano-mm-detective::*} title "&aあなたは探偵(市民)です" for 5 seconds
- send "&aあなたは探偵(市民)です" to {tano-mm-detective::*}
- send {tano-mm-murder::*} title "&cあなたはマーダー(殺人者)です" for 5 seconds
- send "&cあなたはマーダー(殺人者)です" to {tano-mm-murder::*}
- set {tano-mm-gold-time} to 5
- delete {tano-mm-join::*}
- loop {tano-mm-detective::*}:
- set slot 0 of loop-value to bow
- set slot 1 of loop-value to arrow
- wait 3 seconds
- send "{@murder} &aマーダーのアイテムは20秒後に配れます" to all players
- wait 20 seconds
- loop {tano-mm-murder::*}:
- set slot 0 of loop-value to iron sword
- set slot 8 of loop-value to bone
- set slot 7 of loop-value to bone
- set slot 4 of loop-value to bow
- stop
- function autojoin():
- loop all players:
- if {tano-mm-autojoin.%loop-player%} is true:
- if {tano-mm-join::*} contains loop-player:
- else:
- add loop-player to {tano-mm-join::*}
- send "{@murder} &aオートジョインしました" to loop-player
- every seconds:
- if {tano-mm-game} is "start":
- if {tano-mm-time} <= 0:
- winInnocent("時間が切れたため", "いません")
- else:
- remove 1 from {tano-mm-time}
- set action bar of all players to "&6残り時間 : &b%{tano-mm-time}% &6秒"
- every seconds:
- if {tano-mm-game} is "start":
- remove 1 from {tano-mm-gold-time}
- if {tano-mm-gold-time} <= 0:
- drop a gold ingot at {tano-mm-map-gold-location-%{tano-mm-map-new}%::*}
- set {tano-mm-gold-time} to 13
- on projectile hit:
- if projectile is arrow:
- if projectile is entity:
- delete event-entity
- command /test:
- permission: ada
- trigger:
- send "%{tano-mm-join::*}%"
- send "%{tano-mm-detective::*}%"
- send "%{tano-mm-innocent::*}%"
- send "%{tano-mm-murder::*}%"
- command /test2:
- permission: ada
- trigger:
- winInnocent("強制stop", "いない")
- command /test3:
- permission: start
- trigger:
- delete {tano-mm-join::*}
- command /test4:
- trigger:
- loop all players:
- if scoreboard team "nametag" in scoreboard scoreboard of loop-player is not set:
- register new scoreboard team "nametag" in scoreboard scoreboard of loop-player
- set {_team} to scoreboard team "nametag" in scoreboard scoreboard of loop-player
- set scoreboard team option NAME_TAG_VISIBILITY of team {_team} to NEVER
- loop all players:
- loop-player-2 is not loop-player-1
- scoreboard add entry "%loop-player-2%" to team {_team}
- scoreboard team "nametag" in scoreboard scoreboard of loop-player-2 is set
- scoreboard add entry "%loop-player-2%" to team scoreboard team "nametag" in scoreboard scoreboard of loop-player-2
- on drop:
- if {tano-mm-game} is "start":
- cancel event
- on pickup:
- if {tano-mm-game} is "start":
- if {tano-mm-murder::*} contains player:
- if event-item is bow:
- cancel event
- if event-item is arrow:
- cancel event
- every tick:
- if {tano-mm-game} is "start":
- loop all players:
- if {tano-mm-murder::*} contains loop-player:
- if loop-player has 15 gold ingot:
- give bone to loop-player
- remove 15 gold ingot from loop-player's inventory
- else:
- if loop-player has 8 gold ingot:
- if loop-player has 1 bow:
- give arrow to loop-player
- remove 8 gold ingot from loop-player's inventory
- stop
- else:
- give bow to loop-player
- give arrow to loop-player
- remove 8 gold ingot from loop-player's inventory
- stop
- on rightclick with iron sword:
- if player has 1 bone:
- remove 1 bone from player's inventory
- shoot an arrow from player at speed 3
- execute console command "/execute %player% ~ ~ ~ /playsound entity.arrow.shoot player %player% ~ ~ ~ 10 0.5"
- command /menu:
- aliases: /m
- trigger:
- if {tano-mm-player::*} contains player:
- send "{@murder} &cあなたは参加しているためMENUを開けません!"
- stop
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- menuMain(player)
- on inventory click:
- if name of player's current inventory contains "&c&lM&e&lE&a&lN&b&lU":
- cancel event
- if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU":
- if name of clicked item is "&dオートジョイン":
- execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- if {tano-mm-autojoin.%player%} is not set:
- set {tano-mm-autojoin.%player%} to true
- send "{@murder} &aオートジョインを有効化しました"
- menuMain(player)
- else if {tano-mm-autojoin.%player%} is true:
- delete {tano-mm-autojoin.%player%}
- send "{@murder} &aオートジョインを無効化しました"
- menuMain(player)
- if name of clicked item is "&aJoin":
- if {tano-mm-game} is true:
- send "{@murder} &c既にゲームが始まっています"
- stop
- if {tano-mm-join::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- if {tano-mm-innocent::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- if {tano-mm-murder::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- if {tano-mm-detective::*} contains player:
- send "{@murder} &cあなたは既に参加しています"
- stop
- send "{@murder} &aゲームに参加しました"
- command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
- if {tano-mm-join::*} contains player:
- stop
- else:
- add player to {tano-mm-join::*}
- if name of clicked item is "&creJoin":
- if {tano-mm-game} is true:
- send "{@murder} &c既にゲームが始まっています"
- stop
- if {tano-mm-join::*} contains player:
- remove player from {tano-mm-join::*}
- send "{@murder} &aゲームから退出しました"
- command "/execute %player% ~ ~ ~ /playsound entity.experience_orb.pickup player %player% ~ ~ ~ 10 1"
- stop
- else:
- send "{@murder} &cあなたは参加していません"
- if name of clicked item is "&6SHOP":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- menuSHOP(player)
- if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP":
- if name of clicked item is "&cスキル":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- menuSHOPSkill(player)
- if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill":
- if name of clicked item is "&cMurder":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- menuSHOPSkillMurder(player)
- if name of clicked item is "&bDetective":
- command "/execute %player% ~ ~ ~ /playsound block.note.pling player %player% ~ ~ ~ 10 1"
- menuSHOPSkillDetective(player)
- 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":
- if name of clicked item is "{@skill-name.eye}":
- if {tano-mm-money.%player%} < 2000:
- send "{@murder} &c所持金が足りません"
- stop
- if {tano-mm-skills-murder-%player%::*} contains {@skill-id.eye}:
- send "{@murder} &c既に所持しています"
- stop
- remove 2000 from {tano-mm-money.%player%}
- add {@skill-id.eye} to {tano-mm-skills-murder-%player%::*}
- execute console command "/execute %player% ~ ~ ~ /playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 1 0.1"
- send "{@murder} &c{@skill-id.eye}&aを購入しました!"
- 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":
- if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &c&lSkill":
- if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &c&lSkill &7>> &c&lMurder":
- if name of player's current inventory is "&c&lM&e&lE&a&lN&b&lU &7>> &c&lSkill &7>> &b&lDetective":
- function menuMain(p: player):
- open chest with 3 row named "&c&lM&e&lE&a&lN&b&lU" to {_p}
- set slot 1 of {_p}'s current inventory to gold ingot named "&6SHOP"
- if {tano-mm-autojoin.%{_p}%} is not set:
- set slot 4 of {_p}'s current inventory to redstone named "&dオートジョイン" with lore "&c✖ 無効中"
- if {tano-mm-autojoin.%{_p}%} is set:
- set slot 4 of {_p}'s current inventory to redstone named "&dオートジョイン" with lore "&a✔ 有効中"
- set slot 21 of {_p}'s current inventory to emerald named "&aJoin"
- set slot 23 of {_p}'s current inventory to barrier named "&creJoin"
- set slot 7 of {_p}'s current inventory to diamond sword named "&cスキル"
- function menuSHOP(p: player):
- open chest with 1 row named "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP" to {_p}
- set slot 4 of {_p}'s current inventory to diamond named "&cスキル"
- function menuSHOPSkill(p: player):
- open chest with 1 row named "&c&lM&e&lE&a&lN&b&lU &7>> &6&lSHOP &7>> &c&lSkill" to {_p}
- set slot 2 of {_p}'s current inventory to iron sword named "&cMurder"
- set slot 6 of {_p}'s current inventory to bow named "&bDetective"
- function menuSHOPSkillMurder(p: player):
- 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}
- 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}"
- set slot 43 of {_p}'s current inventory to red stained glass pane named " "
- set slot 44 of {_p}'s current inventory to red stained glass pane named " "
- set slot 52 of {_p}'s current inventory to red stained glass pane named " "
- set slot 53 of {_p}'s current inventory to emerald named "&6Money: %{tano-mm-money.%{_p}%}%"
- function menuSHOPSkillDetective(p: player):
- 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}
- set slot 43 of {_p}'s current inventory to blue stained glass pane named " "
- set slot 44 of {_p}'s current inventory to blue stained glass pane named " "
- set slot 52 of {_p}'s current inventory to blue stained glass pane named " "
- set slot 53 of {_p}'s current inventory to emerald named "&6Money: %{tano-mm-money.%{_p}%}%"
- function menuSkill(p: player):
- function menuSkillMurder(p: player):
- function menuSkillDetective(p: player):
- on command:
- if command is "tell":
- cancel event
- send "{@murder} &c不正防止のため使用できません"
- if command is "m":
- cancel event
- send "{@murder} &c不正防止のため使用できません"
- if command is "gtell":
- cancel event
- send "{@murder} &c不正防止のため使用できません"
- if command is "me":
- cancel event
- send "{@murder} &c不正防止のため使用できません"
Add Comment
Please, Sign In to add comment