이전퀴즈 데이터팩
This commit is contained in:
7
music_quiz/data/func/function/comp_num.mcfunction
Normal file
7
music_quiz/data/func/function/comp_num.mcfunction
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
scoreboard objectives add func.temp dummy
|
||||||
|
|
||||||
|
$execute store result score n1 func.temp run data get storage func:temp $(n1)
|
||||||
|
$execute store result score n2 func.temp run data get storage func:temp $(n2)
|
||||||
|
|
||||||
|
execute if score n1 func.temp = n2 func.temp run return 1
|
||||||
|
return 0
|
||||||
15
music_quiz/data/func/function/half.mcfunction
Normal file
15
music_quiz/data/func/function/half.mcfunction
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
scoreboard players set two func.temp 2
|
||||||
|
|
||||||
|
$data modify storage func:temp half.result set from storage func:temp $(list)
|
||||||
|
|
||||||
|
execute store result score length func.temp run data get storage func:temp half.result
|
||||||
|
|
||||||
|
scoreboard players operation half func.temp = length func.temp
|
||||||
|
scoreboard players operation half func.temp /= two func.temp
|
||||||
|
|
||||||
|
scoreboard players operation odd func.temp = length func.temp
|
||||||
|
scoreboard players operation odd func.temp %= two func.temp
|
||||||
|
|
||||||
|
scoreboard players operation half func.temp += odd func.temp
|
||||||
|
|
||||||
|
function func:half/f1
|
||||||
1
music_quiz/data/func/function/half/f1.mcfunction
Normal file
1
music_quiz/data/func/function/half/f1.mcfunction
Normal file
@@ -0,0 +1 @@
|
|||||||
|
execute if score half func.temp < length func.temp run function func:half/f2
|
||||||
5
music_quiz/data/func/function/half/f2.mcfunction
Normal file
5
music_quiz/data/func/function/half/f2.mcfunction
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
data remove storage func:temp half.result[-1]
|
||||||
|
|
||||||
|
scoreboard players remove length func.temp 1
|
||||||
|
|
||||||
|
function func:half/f1
|
||||||
18
music_quiz/data/func/function/hint.mcfunction
Normal file
18
music_quiz/data/func/function/hint.mcfunction
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
$function func:length {text:"$(text)"}
|
||||||
|
# return length
|
||||||
|
function func:num_list with storage func:temp
|
||||||
|
# return num_list
|
||||||
|
function func:shuffle {list:"num_list"}
|
||||||
|
# return shuffle.result
|
||||||
|
function func:half {list:"shuffle.result"}
|
||||||
|
# return half.result
|
||||||
|
|
||||||
|
$function func:length {text:"$(text)"}
|
||||||
|
# return length
|
||||||
|
function func:text_list with storage func:temp
|
||||||
|
# return text_list
|
||||||
|
|
||||||
|
function func:join {list:"text_list"}
|
||||||
|
# return join.text
|
||||||
|
|
||||||
|
# tellraw @a {"storage":"func:temp","nbt":"join.text"}
|
||||||
2
music_quiz/data/func/function/is_index.mcfunction
Normal file
2
music_quiz/data/func/function/is_index.mcfunction
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
$execute if data storage func:temp {$(l1):{$(l2):[$(index)]}} run return 1
|
||||||
|
return 0
|
||||||
2
music_quiz/data/func/function/is_space.mcfunction
Normal file
2
music_quiz/data/func/function/is_space.mcfunction
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
$execute if data storage func:temp {space:{text:"$(space)"}} run return 1
|
||||||
|
return 0
|
||||||
4
music_quiz/data/func/function/join.mcfunction
Normal file
4
music_quiz/data/func/function/join.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
data modify storage func:temp join.text set value ""
|
||||||
|
$data modify storage func:temp join.list set from storage func:temp $(list)
|
||||||
|
|
||||||
|
function func:join/f1
|
||||||
8
music_quiz/data/func/function/join/f1.mcfunction
Normal file
8
music_quiz/data/func/function/join/f1.mcfunction
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
execute store result score length func.temp run data get storage func:temp join.list
|
||||||
|
|
||||||
|
execute if score length func.temp matches 0 run return 1
|
||||||
|
|
||||||
|
data modify storage func:temp join.now set from storage func:temp join.text
|
||||||
|
data modify storage func:temp join.next set from storage func:temp join.list[0]
|
||||||
|
|
||||||
|
function func:join/f2 with storage func:temp join
|
||||||
5
music_quiz/data/func/function/join/f2.mcfunction
Normal file
5
music_quiz/data/func/function/join/f2.mcfunction
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
$data modify storage func:temp join.text set value "$(now)$(next)"
|
||||||
|
|
||||||
|
data remove storage func:temp join.list[0]
|
||||||
|
|
||||||
|
function func:join/f1
|
||||||
5
music_quiz/data/func/function/length.mcfunction
Normal file
5
music_quiz/data/func/function/length.mcfunction
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
$data modify storage func:temp text set value "$(text)"
|
||||||
|
|
||||||
|
execute store result storage func:temp length int 1 run data get storage func:temp text
|
||||||
|
|
||||||
|
return run data get storage func:temp length
|
||||||
13
music_quiz/data/func/function/num_list.mcfunction
Normal file
13
music_quiz/data/func/function/num_list.mcfunction
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
data modify storage func:temp space.space set value " "
|
||||||
|
data modify storage func:temp zero set value 0
|
||||||
|
$data modify storage func:temp length set value $(length)
|
||||||
|
|
||||||
|
execute store result score result func.temp run function func:comp_num {n1:"zero",n2:"length"}
|
||||||
|
execute if score result func.temp matches 1 run tellraw @s {"text":"length는 1이상 이어야 합니다.","color":"red"}
|
||||||
|
execute if score result func.temp matches 1 run return 0
|
||||||
|
|
||||||
|
data modify storage func:temp num_list set value []
|
||||||
|
data modify storage func:temp index set value 0
|
||||||
|
data modify storage func:temp index_next set value 1
|
||||||
|
|
||||||
|
function func:num_list/f1 with storage func:temp
|
||||||
12
music_quiz/data/func/function/num_list/f1.mcfunction
Normal file
12
music_quiz/data/func/function/num_list/f1.mcfunction
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
$data modify storage func:temp space.text set string storage func:temp text $(index) $(index_next)
|
||||||
|
execute store result score result func.temp run function func:is_space with storage func:temp space
|
||||||
|
|
||||||
|
$execute if score result func.temp matches 0 run data modify storage func:temp num_list append value $(index)
|
||||||
|
|
||||||
|
function func:plus {name:"index",plus:1}
|
||||||
|
function func:plus {name:"index_next",plus:1}
|
||||||
|
|
||||||
|
execute store result score result func.temp run function func:comp_num {n1:"index",n2:"length"}
|
||||||
|
execute if score result func.temp matches 1 run return 1
|
||||||
|
|
||||||
|
function func:num_list/f1 with storage func:temp
|
||||||
7
music_quiz/data/func/function/plus.mcfunction
Normal file
7
music_quiz/data/func/function/plus.mcfunction
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
scoreboard objectives add func.temp dummy
|
||||||
|
|
||||||
|
$execute store result score temp func.temp run data get storage func:temp $(name)
|
||||||
|
|
||||||
|
$scoreboard players add temp func.temp $(plus)
|
||||||
|
|
||||||
|
$execute store result storage func:temp $(name) int 1 run scoreboard players get temp func.temp
|
||||||
9
music_quiz/data/func/function/shuffle.mcfunction
Normal file
9
music_quiz/data/func/function/shuffle.mcfunction
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
scoreboard objectives add func.temp dummy
|
||||||
|
|
||||||
|
data modify storage func:temp shuffle.result set value []
|
||||||
|
|
||||||
|
$data modify storage func:temp shuffle.list set from storage func:temp $(list)
|
||||||
|
|
||||||
|
execute store result score length func.temp run data get storage func:temp shuffle.list
|
||||||
|
|
||||||
|
function func:shuffle/f1
|
||||||
11
music_quiz/data/func/function/shuffle/f1.mcfunction
Normal file
11
music_quiz/data/func/function/shuffle/f1.mcfunction
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
execute store result score length func.temp run data get storage func:temp shuffle.list
|
||||||
|
|
||||||
|
execute if score length func.temp matches 0 run return 1
|
||||||
|
|
||||||
|
execute store result score random func.temp run random value 0..2147483646
|
||||||
|
scoreboard players operation random func.temp %= length func.temp
|
||||||
|
|
||||||
|
execute run function func:shuffle/f2 with storage func:temp {index:0}
|
||||||
|
|
||||||
|
execute store result storage func:temp shuffle.index int 1 run scoreboard players get random func.temp
|
||||||
|
function func:shuffle/f2 with storage func:temp shuffle
|
||||||
4
music_quiz/data/func/function/shuffle/f2.mcfunction
Normal file
4
music_quiz/data/func/function/shuffle/f2.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
$data modify storage func:temp shuffle.result append from storage func:temp shuffle.list[$(index)]
|
||||||
|
$data remove storage func:temp shuffle.list[$(index)]
|
||||||
|
|
||||||
|
function func:shuffle/f1
|
||||||
13
music_quiz/data/func/function/text_list.mcfunction
Normal file
13
music_quiz/data/func/function/text_list.mcfunction
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
data modify storage func:temp space.space set value " "
|
||||||
|
data modify storage func:temp zero set value 0
|
||||||
|
$data modify storage func:temp length set value $(length)
|
||||||
|
|
||||||
|
execute store result score result func.temp run function func:comp_num {n1:"zero",n2:"length"}
|
||||||
|
execute if score result func.temp matches 1 run tellraw @s {"text":"length는 1이상 이어야 합니다.","color":"red"}
|
||||||
|
execute if score result func.temp matches 1 run return 0
|
||||||
|
|
||||||
|
data modify storage func:temp text_list set value []
|
||||||
|
data modify storage func:temp index set value 0
|
||||||
|
data modify storage func:temp index_next set value 1
|
||||||
|
|
||||||
|
function func:text_list/f1 with storage func:temp
|
||||||
16
music_quiz/data/func/function/text_list/f1.mcfunction
Normal file
16
music_quiz/data/func/function/text_list/f1.mcfunction
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
$data modify storage func:temp space.text set string storage func:temp text $(index) $(index_next)
|
||||||
|
execute store result score result func.temp run function func:is_space with storage func:temp space
|
||||||
|
|
||||||
|
$execute store result score result2 func.temp run function func:is_index {l1:"half",l2:"result",index:$(index)}
|
||||||
|
|
||||||
|
execute if score result2 func.temp matches 0 if score result func.temp matches 0 run data modify storage func:temp text_list append value "■"
|
||||||
|
execute if score result2 func.temp matches 0 if score result func.temp matches 1 run data modify storage func:temp text_list append from storage func:temp space.text
|
||||||
|
execute if score result2 func.temp matches 1 run data modify storage func:temp text_list append from storage func:temp space.text
|
||||||
|
|
||||||
|
function func:plus {name:"index",plus:1}
|
||||||
|
function func:plus {name:"index_next",plus:1}
|
||||||
|
|
||||||
|
execute store result score result func.temp run function func:comp_num {n1:"index",n2:"length"}
|
||||||
|
execute if score result func.temp matches 1 run return 1
|
||||||
|
|
||||||
|
function func:text_list/f1 with storage func:temp
|
||||||
5
music_quiz/data/minecraft/tags/function/load.json
Normal file
5
music_quiz/data/minecraft/tags/function/load.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"mq:load"
|
||||||
|
]
|
||||||
|
}
|
||||||
5
music_quiz/data/minecraft/tags/function/tick.json
Normal file
5
music_quiz/data/minecraft/tags/function/tick.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"mq:tick"
|
||||||
|
]
|
||||||
|
}
|
||||||
23
music_quiz/data/mq/advancement/player/login.json
Normal file
23
music_quiz/data/mq/advancement/player/login.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"criteria": {
|
||||||
|
"placed_something": {
|
||||||
|
"trigger": "minecraft:impossible",
|
||||||
|
"conditions": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rewards": {
|
||||||
|
"function": "mq:players/login"
|
||||||
|
},
|
||||||
|
"parent": "minecraft:story/root",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"id": "minecraft:stone"
|
||||||
|
},
|
||||||
|
"title": "로그인 감지",
|
||||||
|
"description": "서버 접속을 감지",
|
||||||
|
"hidden": false,
|
||||||
|
"announce_to_chat": true,
|
||||||
|
"show_toast": true,
|
||||||
|
"frame": "task"
|
||||||
|
}
|
||||||
|
}
|
||||||
46
music_quiz/data/mq/dialog/page1.json
Normal file
46
music_quiz/data/mq/dialog/page1.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:confirmation",
|
||||||
|
"title": {
|
||||||
|
"text": "음악퀴즈",
|
||||||
|
"bold": true
|
||||||
|
},
|
||||||
|
"body": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:plain_message",
|
||||||
|
"contents": {
|
||||||
|
"text": "음악퀴즈 설명",
|
||||||
|
"bold": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:plain_message",
|
||||||
|
"contents": {
|
||||||
|
"text": "\n1. 정답입력시에 채팅으로 입력해주시면 됩니다.\n[ 띄어쓰기, 영어 대소문자, 특수문자 ]\n상관없이 입력하셔도 인식 됩니다.\n\n2. 모든 소리는 날씨 소리로 조절할수 있습니다.\n\n3. 게임시작후 버튼들은 과반수(절반이상)가 눌러야 작동합니다.\n\n4. 힌트는 특수문자 제외 정답의 절반이 가려져서 나옵니다.\n힌트는 여러번 받을수 있고,\n받을때마다 가려지는 부분이 달라집니다."
|
||||||
|
},
|
||||||
|
"width": 300
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputs": [],
|
||||||
|
"can_close_with_escape": true,
|
||||||
|
"pause": false,
|
||||||
|
"after_action": "close",
|
||||||
|
"yes": {
|
||||||
|
"label": {
|
||||||
|
"text": "취소",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "minecraft:run_command",
|
||||||
|
"command": "trigger cancel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"no": {
|
||||||
|
"label": {
|
||||||
|
"text": "다음 페이지 ->"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "minecraft:show_dialog",
|
||||||
|
"dialog": "mq:page2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
45
music_quiz/data/mq/dialog/page2.json
Normal file
45
music_quiz/data/mq/dialog/page2.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:confirmation",
|
||||||
|
"title": {
|
||||||
|
"text": "음악퀴즈",
|
||||||
|
"bold": true
|
||||||
|
},
|
||||||
|
"body": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:plain_message",
|
||||||
|
"contents": {
|
||||||
|
"text": "음악퀴즈 설명",
|
||||||
|
"bold": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:plain_message",
|
||||||
|
"contents": {
|
||||||
|
"text": "\n5. 다시듣기는 노래가 끝까지 다 재생되었거나,\n다시 처음부분부터 들어보고싶을때\n누르면 좋습니다.\n\n6. 뒤에있는 \"소리 테스트\" 버튼으로\n미리 소리크기를 들어보고 조절할수있습니다."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputs": [],
|
||||||
|
"can_close_with_escape": true,
|
||||||
|
"pause": false,
|
||||||
|
"after_action": "close",
|
||||||
|
"yes": {
|
||||||
|
"label": {
|
||||||
|
"text": "<- 이전 페이지",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "minecraft:show_dialog",
|
||||||
|
"dialog": "mq:page1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"no": {
|
||||||
|
"label": {
|
||||||
|
"text": "다음 페이지 ->"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "minecraft:show_dialog",
|
||||||
|
"dialog": "mq:page3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
46
music_quiz/data/mq/dialog/page3.json
Normal file
46
music_quiz/data/mq/dialog/page3.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:confirmation",
|
||||||
|
"title": {
|
||||||
|
"text": "음악퀴즈",
|
||||||
|
"bold": true
|
||||||
|
},
|
||||||
|
"body": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:plain_message",
|
||||||
|
"contents": {
|
||||||
|
"text": "음악퀴즈 설명",
|
||||||
|
"bold": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:plain_message",
|
||||||
|
"contents": {
|
||||||
|
"text": "\n재미있게 즐겨주세요."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputs": [],
|
||||||
|
"can_close_with_escape": true,
|
||||||
|
"pause": false,
|
||||||
|
"after_action": "close",
|
||||||
|
"yes": {
|
||||||
|
"label": {
|
||||||
|
"text": "<- 이전 페이지",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "minecraft:show_dialog",
|
||||||
|
"dialog": "mq:page2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"no": {
|
||||||
|
"label": {
|
||||||
|
"text": "준비완료",
|
||||||
|
"bold": true
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "minecraft:run_command",
|
||||||
|
"command": "trigger ready"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
3
music_quiz/data/mq/function/check/server.mcfunction
Normal file
3
music_quiz/data/mq/function/check/server.mcfunction
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
title @a times 0t 20t 0t
|
||||||
|
title @a subtitle {"text":"이 맵은 버킷 서버에서 열어야 합니다."}
|
||||||
|
title @a title {"text":"오류 발생!","color":"red"}
|
||||||
14
music_quiz/data/mq/function/commands/hint.mcfunction
Normal file
14
music_quiz/data/mq/function/commands/hint.mcfunction
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
scoreboard players reset @a hint
|
||||||
|
|
||||||
|
execute if score init main matches 0 run return run function mq:tellraw {"text":"아직 퀴즈가 시작되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 1..4 run return run function mq:tellraw {"text":"아직 힌트를 받을 수 없습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 6.. run return run function mq:tellraw {"text":"아직 다음노래가 재생되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 종료되었습니다.","color":"red",msg:'""'}
|
||||||
|
|
||||||
|
execute if score init main matches 5 run data modify storage mq:main hint.text set from storage mq:main answer.title
|
||||||
|
execute if score init main matches 5 run data modify storage mq:main hint.hint set value ""
|
||||||
|
execute if score init main matches 5 run function func:hint with storage mq:main hint
|
||||||
|
execute if score init main matches 5 run data modify storage mq:main hint.hint set from storage func:temp join.text
|
||||||
|
execute if score init main matches 5 run function mq:tellraw {"text":"","color":"black",msg:'""'}
|
||||||
|
execute if score init main matches 5 run function mq:tellraw {"text":"","color":"black",msg:[{"text":"힌트: ","color":"aqua","bold":true},{"storage":"mq:main","nbt":"hint.hint","color": "yellow","bold": true}]}
|
||||||
|
execute if score init main matches 5 run function mq:tellraw {"text":"","color":"black",msg:'""'}
|
||||||
9
music_quiz/data/mq/function/commands/replay.mcfunction
Normal file
9
music_quiz/data/mq/function/commands/replay.mcfunction
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
scoreboard players reset @a replay
|
||||||
|
|
||||||
|
execute if score init main matches 0 run return run function mq:tellraw {"text":"아직 퀴즈가 시작되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 1..4 run return run function mq:tellraw {"text":"아직 노래가 재생되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 6.. run return run function mq:tellraw {"text":"아직 다음노래가 재생되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 종료되었습니다.","color":"red",msg:'""'}
|
||||||
|
|
||||||
|
execute if score init main matches 5 run stopsound @a weather
|
||||||
|
execute if score init main matches 5 run function mq:quiz/macro/command_block with storage mq:main command_block
|
||||||
9
music_quiz/data/mq/function/commands/skip.mcfunction
Normal file
9
music_quiz/data/mq/function/commands/skip.mcfunction
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
scoreboard players reset @a skip
|
||||||
|
|
||||||
|
execute if score init main matches 0 run return run function mq:tellraw {"text":"아직 퀴즈가 시작되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 1..4 run return run function mq:tellraw {"text":"아직 스킵 할수없습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 6.. run return run function mq:tellraw {"text":"아직 다음노래가 재생되지 않았습니다.","color":"red",msg:'""'}
|
||||||
|
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 종료되었습니다.","color":"red",msg:'""'}
|
||||||
|
|
||||||
|
execute if score init main matches 5 run scoreboard players set skip buttons -2
|
||||||
|
execute if score init main matches 5 run function mq:quiz/correct
|
||||||
12
music_quiz/data/mq/function/commands/start.mcfunction
Normal file
12
music_quiz/data/mq/function/commands/start.mcfunction
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 완전히 종료된후 시작해주세요.","color":"red","msg":""}
|
||||||
|
|
||||||
|
setblock ~ ~ ~ minecraft:air
|
||||||
|
|
||||||
|
stopsound @a weather
|
||||||
|
|
||||||
|
$scoreboard players set max_index main $(max_index)
|
||||||
|
scoreboard players set init main 1
|
||||||
|
|
||||||
|
# say 게임시작
|
||||||
|
|
||||||
|
dialog show @a mq:page1
|
||||||
65
music_quiz/data/mq/function/commands/stop.mcfunction
Normal file
65
music_quiz/data/mq/function/commands/stop.mcfunction
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
scoreboard players set timer status 0
|
||||||
|
scoreboard players set skript status 0
|
||||||
|
scoreboard players set yp status 0
|
||||||
|
scoreboard players set ts status 0
|
||||||
|
|
||||||
|
scoreboard players set index main 0
|
||||||
|
$scoreboard players set max_index main $(max_index)
|
||||||
|
scoreboard players set score main 0
|
||||||
|
scoreboard players set init main 0
|
||||||
|
scoreboard players set timer main 0
|
||||||
|
|
||||||
|
scoreboard players set start buttons -1
|
||||||
|
scoreboard players set stop buttons -1
|
||||||
|
scoreboard players set skip buttons -1
|
||||||
|
scoreboard players set hint buttons -1
|
||||||
|
scoreboard players set replay buttons -1
|
||||||
|
scoreboard players set test buttons -1
|
||||||
|
|
||||||
|
scoreboard players reset @a answer
|
||||||
|
|
||||||
|
# 트리거 시작
|
||||||
|
scoreboard objectives remove ready
|
||||||
|
scoreboard objectives add ready trigger
|
||||||
|
|
||||||
|
scoreboard objectives remove cancel
|
||||||
|
scoreboard objectives add cancel trigger
|
||||||
|
|
||||||
|
scoreboard objectives remove stop
|
||||||
|
scoreboard objectives add stop trigger
|
||||||
|
|
||||||
|
scoreboard objectives remove skip
|
||||||
|
scoreboard objectives add skip trigger
|
||||||
|
|
||||||
|
scoreboard objectives remove hint
|
||||||
|
scoreboard objectives add hint trigger
|
||||||
|
|
||||||
|
scoreboard objectives remove replay
|
||||||
|
scoreboard objectives add replay trigger
|
||||||
|
# 트리거 끝
|
||||||
|
|
||||||
|
scoreboard objectives setdisplay sidebar
|
||||||
|
scoreboard objectives remove score
|
||||||
|
scoreboard objectives add score dummy {"text":"점수","bold":true}
|
||||||
|
scoreboard objectives setdisplay sidebar score
|
||||||
|
|
||||||
|
data modify storage mq:main command_block.index set value 1
|
||||||
|
|
||||||
|
dialog clear @a
|
||||||
|
|
||||||
|
bossbar set mq:process name [{"text":"진행도: ","color": "yellow","bold": true},{"score":{"name":"index","objective": "main"},"color": "yellow","bold": true},{"text":"/","color": "yellow","bold": true},{"score":{"name":"max_index","objective": "main"},"color": "yellow","bold": true}]
|
||||||
|
$bossbar set mq:process max $(max_index)
|
||||||
|
bossbar set mq:process value 0
|
||||||
|
bossbar set mq:process color pink
|
||||||
|
bossbar set mq:process visible false
|
||||||
|
bossbar set mq:process style notched_10
|
||||||
|
bossbar set mq:process players @a
|
||||||
|
|
||||||
|
data modify storage mq:main command_block.name set value "음악퀴즈"
|
||||||
|
function mq:quiz/macro/summon with storage mq:main command_block
|
||||||
|
|
||||||
|
stopsound @a weather
|
||||||
|
|
||||||
|
function mq:images/image_delete with storage mq:main command_block
|
||||||
|
|
||||||
|
# say "stop 실행"
|
||||||
5
music_quiz/data/mq/function/commands/test.mcfunction
Normal file
5
music_quiz/data/mq/function/commands/test.mcfunction
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
stopsound @a block minecraft:block.stone_button.click_on
|
||||||
|
function mq:tellraw {"text":"띵!!!","color":"white","msg":'""'}
|
||||||
|
execute as @a at @s run playsound minecraft:block.note_block.bell weather @s ~ ~ ~ 1 0.9
|
||||||
|
execute as @a at @s run playsound minecraft:block.note_block.bell weather @s ~ ~ ~ 1 0.9
|
||||||
|
execute as @a at @s run playsound minecraft:block.note_block.bell weather @s ~ ~ ~ 1 0.9
|
||||||
3
music_quiz/data/mq/function/images/image.mcfunction
Normal file
3
music_quiz/data/mq/function/images/image.mcfunction
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
$data modify storage mq:main command_block.image set value "ts placeloc song$(index).jpg world SOUTH $(x1) $(y1) $(z1) $(x2) $(y2) $(z2) 1 솔리드스킵"
|
||||||
|
|
||||||
|
function mq:images/image_set with storage mq:main command_block
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# r = EAST | NORTH | SOUTH | WEST
|
||||||
|
|
||||||
|
# 파이브가이즈 간판
|
||||||
|
data modify storage mq:main command_block.image set value "ts placeloc fiveguys1.png world EAST 90 72 -168 90 73 -170 1 솔리드스킵"
|
||||||
|
|
||||||
|
function mq:images/image_set with storage mq:main command_block
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
$data modify block $(x) $(y) $(z) Command set value "ts removeall"
|
||||||
|
|
||||||
|
$data modify block $(x) $(y) $(z) auto set value 1b
|
||||||
|
$data modify block $(x) $(y) $(z) auto set value 0b
|
||||||
4
music_quiz/data/mq/function/images/image_set.mcfunction
Normal file
4
music_quiz/data/mq/function/images/image_set.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
$data modify block $(x) $(y) $(z) Command set value "$(image)"
|
||||||
|
|
||||||
|
$data modify block $(x) $(y) $(z) auto set value 1b
|
||||||
|
$data modify block $(x) $(y) $(z) auto set value 0b
|
||||||
64
music_quiz/data/mq/function/load.mcfunction
Normal file
64
music_quiz/data/mq/function/load.mcfunction
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# say "서버 리로드 성공"
|
||||||
|
function mq:tellraw {"text":"서버 리로드 성공!","color":"white","msg":'""'}
|
||||||
|
|
||||||
|
data merge storage mq:main { \
|
||||||
|
title: "음악퀴즈이름", \
|
||||||
|
max_index: 50, \
|
||||||
|
answer: { author: "", title: "", alias: [] }, \
|
||||||
|
command_block: { \
|
||||||
|
name: "", \
|
||||||
|
image: "", \
|
||||||
|
alias: [], \
|
||||||
|
index: 1, \
|
||||||
|
volume: 30, \
|
||||||
|
x: 144, \
|
||||||
|
y: 59, \
|
||||||
|
z: -219, \
|
||||||
|
r: "SOUTH", \
|
||||||
|
x1: 131, \
|
||||||
|
y1: 77, \
|
||||||
|
z1: -262, \
|
||||||
|
x2: 157, \
|
||||||
|
y2: 91, \
|
||||||
|
z2: -262 \
|
||||||
|
}, \
|
||||||
|
spawn: { \
|
||||||
|
x: 144, \
|
||||||
|
y: 61, \
|
||||||
|
z: -219, \
|
||||||
|
r: 180, \
|
||||||
|
f: 0 \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
data merge storage func:temp {}
|
||||||
|
|
||||||
|
scoreboard objectives remove func.temp
|
||||||
|
scoreboard objectives remove status
|
||||||
|
scoreboard objectives remove main
|
||||||
|
scoreboard objectives remove map
|
||||||
|
scoreboard objectives remove buttons
|
||||||
|
scoreboard objectives remove answer
|
||||||
|
scoreboard objectives remove leave_game
|
||||||
|
|
||||||
|
scoreboard objectives add func.temp dummy
|
||||||
|
scoreboard objectives add status dummy
|
||||||
|
scoreboard objectives add main dummy
|
||||||
|
scoreboard objectives add map dummy
|
||||||
|
scoreboard objectives add buttons dummy
|
||||||
|
scoreboard objectives add answer dummy
|
||||||
|
scoreboard objectives add leave_game custom:leave_game
|
||||||
|
|
||||||
|
scoreboard players set timer status 0
|
||||||
|
scoreboard players set skript status 0
|
||||||
|
scoreboard players set yp status 0
|
||||||
|
scoreboard players set ts status 0
|
||||||
|
|
||||||
|
scoreboard players set two func.temp 2
|
||||||
|
scoreboard players set tree map -1
|
||||||
|
fill 94 78 -279 194 78 -279 minecraft:red_wool
|
||||||
|
scoreboard players set lamp1 map -1
|
||||||
|
|
||||||
|
bossbar add mq:process [{"text":"진행도: ","color": "yellow","bold": true},{"text":"0","color": "yellow","bold": true},{"text":"/","color": "yellow","bold": true},{"text":"0","color": "yellow","bold": true}]
|
||||||
|
|
||||||
|
function mq:commands/stop with storage mq:main
|
||||||
|
function mq:players/login with storage mq:main spawn
|
||||||
12
music_quiz/data/mq/function/players/login.mcfunction
Normal file
12
music_quiz/data/mq/function/players/login.mcfunction
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
tag @s add player
|
||||||
|
scoreboard players reset @s leave_game
|
||||||
|
|
||||||
|
# say "서버접속 확인"
|
||||||
|
|
||||||
|
title @s times 10t 80t 10t
|
||||||
|
title @s subtitle ""
|
||||||
|
title @s title ""
|
||||||
|
|
||||||
|
$setworldspawn $(x) $(y) $(z) $(r) $(f)
|
||||||
|
$tp @s $(x) $(y) $(z) $(r) $(f)
|
||||||
|
gamemode adventure @s
|
||||||
32
music_quiz/data/mq/function/quiz/correct.mcfunction
Normal file
32
music_quiz/data/mq/function/quiz/correct.mcfunction
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
scoreboard players set init main 6
|
||||||
|
|
||||||
|
scoreboard players set @s answer 2
|
||||||
|
|
||||||
|
function mq:tellraw {"text":"","color":"black","msg":""}
|
||||||
|
function mq:tellraw {"text":"","color":"black",msg:[{"text":"정답: ","color": "aqua"},{"storage":"mq:main","nbt":"answer.title","color": "yellow","bold": true}]}
|
||||||
|
function mq:tellraw {"text":"","color":"black",msg:[{"text":"가수: ","color":"aqua"},{"storage":"mq:main","nbt":"answer.author","color": "yellow","bold": true}]}
|
||||||
|
execute if score skip buttons matches -2 run function mq:tellraw {"text":"","color":"black",msg:[{"text":"정답자: ","color": "aqua"},{"text":"스킵","color": "yellow","bold": true}]}
|
||||||
|
execute unless score skip buttons matches -2 run function mq:tellraw {"text":"","color":"black",msg:[{"text":"정답자: ","color": "aqua"},{"selector":"@s","color": "yellow","bold": true}]}
|
||||||
|
function mq:tellraw {"text":"","color":"black",msg:[{"text": "( 15초뒤 다음문제로 넘어갑니다. )","color": "gray"}]}
|
||||||
|
function mq:tellraw {"text":"","color":"black","msg":""}
|
||||||
|
|
||||||
|
title @a subtitle [{"text":"정답: ","color": "aqua"},{"storage":"mq:main","nbt":"answer.title","color": "yellow","bold": true}]
|
||||||
|
title @a title {"text":""}
|
||||||
|
|
||||||
|
scoreboard players set @a ready 0
|
||||||
|
scoreboard players set @a stop 0
|
||||||
|
scoreboard players set @a skip 0
|
||||||
|
scoreboard players set @a hint 0
|
||||||
|
scoreboard players set @a replay 0
|
||||||
|
|
||||||
|
execute if score skip buttons matches -2 run scoreboard players add 스킵 score 1
|
||||||
|
execute unless score skip buttons matches -2 run scoreboard players add @s score 1
|
||||||
|
|
||||||
|
scoreboard players set stop buttons -3
|
||||||
|
scoreboard players set skip buttons -3
|
||||||
|
scoreboard players set hint buttons -3
|
||||||
|
scoreboard players set replay buttons -3
|
||||||
|
|
||||||
|
scoreboard players set timer main 1
|
||||||
|
|
||||||
|
function mq:images/image with storage mq:main command_block
|
||||||
7
music_quiz/data/mq/function/quiz/end.mcfunction
Normal file
7
music_quiz/data/mq/function/quiz/end.mcfunction
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
scoreboard players set init main 10
|
||||||
|
|
||||||
|
# stopsound @a weather
|
||||||
|
|
||||||
|
# say "엔딩"
|
||||||
|
|
||||||
|
scoreboard players set timer main 1
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$data modify block $(x) $(y) $(z) Command set value "yp playall song$(index) $(volume)"
|
||||||
|
|
||||||
|
function mq:quiz/play with storage mq:main command_block
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
$execute if score index main matches $(index) run data modify storage mq:main answer.author set value "$(author)"
|
||||||
|
$execute if score index main matches $(index) run data modify storage mq:main command_block.name set value "$(title)"
|
||||||
|
$execute if score index main matches $(index) run data modify storage mq:main command_block.alias set value $(alias)
|
||||||
|
|
||||||
|
data modify storage mq:main answer.title set from storage mq:main command_block.name
|
||||||
|
data modify storage mq:main answer.alias set from storage mq:main command_block.alias
|
||||||
8
music_quiz/data/mq/function/quiz/macro/summon.mcfunction
Normal file
8
music_quiz/data/mq/function/quiz/macro/summon.mcfunction
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
$execute unless data storage mq:main {command_block:{name:"음악퀴즈"}} run summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"정답입력시작"}
|
||||||
|
$summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"$(name)"}
|
||||||
|
|
||||||
|
execute store result score length func.temp run data get storage mq:main command_block.alias
|
||||||
|
execute if score length func.temp matches 1.. run data modify storage mq:main command_block.name set from storage mq:main command_block.alias[0]
|
||||||
|
execute if score length func.temp matches 1.. run data remove storage mq:main command_block.alias[0]
|
||||||
|
execute if score length func.temp matches 1.. run function mq:quiz/macro/summon2 with storage mq:main command_block
|
||||||
|
$execute unless data storage mq:main {command_block:{name:"음악퀴즈"}} run summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"정답입력종료"}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
$summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"$(name)"}
|
||||||
|
|
||||||
|
execute store result score length func.temp run data get storage mq:main command_block.alias
|
||||||
|
execute if score length func.temp matches 1.. run data modify storage mq:main command_block.name set from storage mq:main command_block.alias[0]
|
||||||
|
execute if score length func.temp matches 1.. run data remove storage mq:main command_block.alias[0]
|
||||||
|
execute if score length func.temp matches 1.. run function mq:quiz/macro/summon2 with storage mq:main command_block
|
||||||
6
music_quiz/data/mq/function/quiz/play.mcfunction
Normal file
6
music_quiz/data/mq/function/quiz/play.mcfunction
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
scoreboard players set init main 4
|
||||||
|
|
||||||
|
$data modify block $(x) $(y) $(z) auto set value 1b
|
||||||
|
$data modify block $(x) $(y) $(z) auto set value 0b
|
||||||
|
|
||||||
|
function mq:quiz/setanswer
|
||||||
14
music_quiz/data/mq/function/quiz/select.mcfunction
Normal file
14
music_quiz/data/mq/function/quiz/select.mcfunction
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
scoreboard players add init main 3
|
||||||
|
scoreboard players set timer main 0
|
||||||
|
|
||||||
|
execute if score index main >= max_index main run return run function mq:quiz/end with storage mq:main
|
||||||
|
|
||||||
|
scoreboard players add index main 1
|
||||||
|
execute store result storage mq:main command_block.index int 1 run scoreboard players get index main
|
||||||
|
|
||||||
|
# 보스바
|
||||||
|
bossbar set mq:process name [{"text":"진행도: ","color": "yellow","bold": true},{"score":{"name":"index","objective": "main"},"color": "yellow","bold": true},{"text":"/","color": "yellow","bold": true},{"score":{"name":"max_index","objective": "main"},"color": "yellow","bold": true}]
|
||||||
|
bossbar set mq:process players @a
|
||||||
|
execute store result bossbar mq:process value run scoreboard players get index main
|
||||||
|
|
||||||
|
function mq:quiz/macro/command_block with storage mq:main command_block
|
||||||
309
music_quiz/data/mq/function/quiz/setanswer.mcfunction
Normal file
309
music_quiz/data/mq/function/quiz/setanswer.mcfunction
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 1, \
|
||||||
|
title: "Lose My Mind", \
|
||||||
|
author: "Don Toliver", \
|
||||||
|
alias: ["루즈 마이 마인드","루스 마이 마인드", "ㅣㅐㄴㄷ ㅡㅛ ㅡㅑㅜㅇ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 2, \
|
||||||
|
title: "The Chase", \
|
||||||
|
author: "Hearts2Hearts", \
|
||||||
|
alias: ["더 체이즈", "더 체이스", "솓 촘ㄴㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 3, \
|
||||||
|
title: "HOT SAUCE", \
|
||||||
|
author: "BABYMONSTER", \
|
||||||
|
alias: ["핫 소스", "ㅙㅅ ㄴ면ㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 4, \
|
||||||
|
title: "Golden", \
|
||||||
|
author: "HUNTR/X", \
|
||||||
|
alias: ["골든"," 해ㅣㅇ두"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 5, \
|
||||||
|
title: "돌림판", \
|
||||||
|
author: "머쉬베놈", \
|
||||||
|
alias: ["Spin the wheel"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 6, \
|
||||||
|
title: "OVERDRIVE", \
|
||||||
|
author: "TWS", \
|
||||||
|
alias: ["오버드라이브", "ㅐㅍㄷㄱㅇ걒ㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 7, \
|
||||||
|
title: "눈물참기", \
|
||||||
|
author: "QWER", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 8, \
|
||||||
|
title: "깨어", \
|
||||||
|
author: "tripleS", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 9, \
|
||||||
|
title: "like JENNIE", \
|
||||||
|
author: "제니", \
|
||||||
|
alias: ["라이크 제니", "라익 제니", "라잌 제니", "ㅣㅑㅏㄷ ㅓ두ㅜㅑㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 10, \
|
||||||
|
title: "Rich Man", \
|
||||||
|
author: "aespa", \
|
||||||
|
alias: ["리치 맨", "갸초 ㅡ무"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 11, \
|
||||||
|
title: "I DO ME", \
|
||||||
|
author: "KiiiKiii", \
|
||||||
|
alias: ["아이 두 미", "아 두 미", "ㅑ 애 ㅡㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 12, \
|
||||||
|
title: "SIGN", \
|
||||||
|
author: "izna", \
|
||||||
|
alias: ["사인", "냐후"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 13, \
|
||||||
|
title: "WICKED", \
|
||||||
|
author: "ALLDAY PROJECT", \
|
||||||
|
alias: ["위키드", "쟈찯ㅇ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 14, \
|
||||||
|
title: "Good Thing", \
|
||||||
|
author: "i-dle", \
|
||||||
|
alias: ["굿 띵", "굳 띵", "해ㅐㅇ 소ㅑㅜㅎ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 15, \
|
||||||
|
title: "0+0", \
|
||||||
|
author: "한로로", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 16, \
|
||||||
|
title: "HANDS UP", \
|
||||||
|
author: "MEOVV", \
|
||||||
|
alias: ["핸즈 업", "핸스 업", "ㅗ뭉ㄴ ㅕㅔ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 17, \
|
||||||
|
title: "Blue Valentine", \
|
||||||
|
author: "NMIXX", \
|
||||||
|
alias: ["블루 발렌타인", "ㅠㅣㅕㄷ ㅍ미두샤ㅜㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 18, \
|
||||||
|
title: "Flower", \
|
||||||
|
author: "오반", \
|
||||||
|
alias: ["플라워", "리ㅐㅈㄷㄱ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 19, \
|
||||||
|
title: "Soda Pop", \
|
||||||
|
author: "Saja Boys", \
|
||||||
|
alias: ["소다 팝", "냉ㅁ ㅔㅐㅔ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 20, \
|
||||||
|
title: "REBEL HEART", \
|
||||||
|
author: "IVE", \
|
||||||
|
alias: ["레블 하트", "ㄱ듀디 ㅗㄷㅁㄳ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 21, \
|
||||||
|
title: "GO!", \
|
||||||
|
author: "CORTIS", \
|
||||||
|
alias: ["고", "고!", "GO", "해", "해!"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 22, \
|
||||||
|
title: "BEEP", \
|
||||||
|
author: "izna", \
|
||||||
|
alias: ["빕", "삡", "ㅠㄷ데"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 23, \
|
||||||
|
title: "Pookie", \
|
||||||
|
author: "FIFTY FIFTY", \
|
||||||
|
alias: ["푸키", "ㅔㅐㅐㅏㅑㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 24, \
|
||||||
|
title: "DAISIES", \
|
||||||
|
author: "Justin Bieber", \
|
||||||
|
alias: ["데이지즈", "데이지스", "ㅇ먀냗ㄴ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 25, \
|
||||||
|
title: "빌려온 고양이", \
|
||||||
|
author: "ILLIT", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 26, \
|
||||||
|
title: "TOO BAD", \
|
||||||
|
author: "OfficialGDRAGON", \
|
||||||
|
alias: ["투 배드", "투 밷", "새ㅐ ㅠㅁㅇ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 27, \
|
||||||
|
title: "시작의 아이", \
|
||||||
|
author: "마크툽", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 28, \
|
||||||
|
title: "STYLE", \
|
||||||
|
author: "Hearts2Hearts", \
|
||||||
|
alias: ["스타일", "ㄴ쇼ㅣㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 29, \
|
||||||
|
title: "Good Goodbye", \
|
||||||
|
author: "화사", \
|
||||||
|
alias: ["굿 굿바이", "굳 굳바이", "해ㅐㅇ 해ㅐ유ㅛㄷ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 30, \
|
||||||
|
title: "너에게 닿기를", \
|
||||||
|
author: "10CM", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 31, \
|
||||||
|
title: "IRIS OUT", \
|
||||||
|
author: "Kenshi Yonezu", \
|
||||||
|
alias: ["아이리스 아웃", "이리스 아웃", "ㅑ갼 ㅐㅕㅅ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 32, \
|
||||||
|
title: "Sugar On My Tongue", \
|
||||||
|
author: "Tyler, The Creator", \
|
||||||
|
alias: ["슈가 온 마이 텅", "슈가 온 마 텅", "녛ㅁㄱ ㅐㅜ ㅡㅛ 새ㅜ혇"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 33, \
|
||||||
|
title: "Hollywood Action", \
|
||||||
|
author: "BOYNEXTDOOR", \
|
||||||
|
alias: ["할리우드 액션", "ㅙㅣㅣㅛ재ㅐㅇ ㅁㅊ샤ㅐㅜ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 34, \
|
||||||
|
title: "SPAGHETTI", \
|
||||||
|
author: "LE SSERAFIM", \
|
||||||
|
alias: ["스파게티", "넴혿ㅅ시"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 35, \
|
||||||
|
title: "Gabriela", \
|
||||||
|
author: "KATSEYE", \
|
||||||
|
alias: ["가브리엘라", "ㅎ뮤갸딤"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 36, \
|
||||||
|
title: "LIKE YOU BETTER", \
|
||||||
|
author: "프로미스나인", \
|
||||||
|
alias: ["라이크 유 베터", "라이크 유 베럴", "라잌 유 베터", "라잌 유 베럴", "ㅣㅑㅏㄷ ㅛㅐㅕ ㅠㄷㅅㅅㄷㄱ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 37, \
|
||||||
|
title: "뛰어", \
|
||||||
|
author: "BLACKPINK", \
|
||||||
|
alias: ["jump"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 38, \
|
||||||
|
title: "CHANEL", \
|
||||||
|
author: "Tyla", \
|
||||||
|
alias: ["샤넬", "초무디"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 39, \
|
||||||
|
title: "오늘만 I LOVE YOU", \
|
||||||
|
author: "BOYNEXTDOOR", \
|
||||||
|
alias: ["오늘만 아이 러브 유", "오늘만 ㅑ ㅣㅐㅍㄷ ㅛㅐㅕ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 40, \
|
||||||
|
title: "earthquake", \
|
||||||
|
author: "지수", \
|
||||||
|
alias: ["어스퀘이크", "얼스퀘이크", "ㄷㅁㄱ소벼맏","보만다 지진"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 41, \
|
||||||
|
title: "윽!", \
|
||||||
|
author: "염따", \
|
||||||
|
alias: ["윽"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 42, \
|
||||||
|
title: "Abracadabra", \
|
||||||
|
author: "Lady Gaga", \
|
||||||
|
alias: ["아브라카다브라", "뮥ㅁㅊㅁㅇ뮥ㅁ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 43, \
|
||||||
|
title: "멸종위기사랑", \
|
||||||
|
author: "이찬혁", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 44, \
|
||||||
|
title: "Dirty Work", \
|
||||||
|
author: "aespa", \
|
||||||
|
alias: ["더티 워크", "덜티 워크", "더티 월크", "덜티 월크", "약쇼 재가"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 45, \
|
||||||
|
title: "HOT", \
|
||||||
|
author: "LE SSERAFIM", \
|
||||||
|
alias: ["핫", "ㅙㅅ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 46, \
|
||||||
|
title: "FAMOUS", \
|
||||||
|
author: "ALLDAY PROJECT", \
|
||||||
|
alias: ["페이머스", "ㄹ므ㅐㅕㄴ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 47, \
|
||||||
|
title: "XOXZ", \
|
||||||
|
author: "IVE", \
|
||||||
|
alias: ["엑스 오 엑스 지", "엑스 오 엑스 제트", "탵ㅋ"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 48, \
|
||||||
|
title: "여름이었다", \
|
||||||
|
author: "H1-KEY", \
|
||||||
|
alias: [] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 49, \
|
||||||
|
title: "LOV3", \
|
||||||
|
author: "식케이", \
|
||||||
|
alias: ["럽3", "ㅣㅐㅍ3"] \
|
||||||
|
}
|
||||||
|
function mq:quiz/macro/setanswer { \
|
||||||
|
index: 50, \
|
||||||
|
title: "Drive", \
|
||||||
|
author: "Ed Sheeran", \
|
||||||
|
alias: ["드라이브", "ㅇ걒ㄷ"] \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
scoreboard players set stop buttons -1
|
||||||
|
scoreboard players set skip buttons -1
|
||||||
|
scoreboard players set hint buttons -1
|
||||||
|
scoreboard players set replay buttons -1
|
||||||
|
|
||||||
|
scoreboard players set init main 5
|
||||||
|
function mq:quiz/macro/summon with storage mq:main command_block
|
||||||
8
music_quiz/data/mq/function/quiz/start.mcfunction
Normal file
8
music_quiz/data/mq/function/quiz/start.mcfunction
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
scoreboard players set init main 2
|
||||||
|
|
||||||
|
# say 퀴즈 시작!
|
||||||
|
|
||||||
|
scoreboard players set index main 0
|
||||||
|
bossbar set mq:process visible true
|
||||||
|
|
||||||
|
scoreboard players set timer main 1
|
||||||
29
music_quiz/data/mq/function/repeat/buttons/btn.mcfunction
Normal file
29
music_quiz/data/mq/function/repeat/buttons/btn.mcfunction
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
$execute if score $(n) buttons matches ..-2 run setblock $(x) $(y) $(z) minecraft:air
|
||||||
|
$execute if score $(n) buttons matches ..-2 run data modify entity @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] response set value 0b
|
||||||
|
$execute if score $(n) buttons matches ..-2 run return 0
|
||||||
|
$execute unless score $(n) buttons matches -1.. run scoreboard players set $(n) buttons -1
|
||||||
|
$execute if score $(n) buttons matches -1 run setblock $(x) $(y) $(z) minecraft:stone_button[face=wall,facing=$(f),powered=false]
|
||||||
|
$execute if score $(n) buttons matches -1 positioned $(x) $(y) $(z) run setblock ~ ~-3 ~ minecraft:redstone_block
|
||||||
|
$execute if score $(n) buttons matches -1 positioned $(x) $(y) $(z) run setblock ~ ~-3 ~ minecraft:red_wool
|
||||||
|
$execute if score $(n) buttons matches -1 run scoreboard players set $(n) buttons 0
|
||||||
|
|
||||||
|
$execute if block $(x) $(y) $(z) minecraft:stone_button[face=wall,facing=$(f),powered=true] \
|
||||||
|
if score $(n) buttons matches 0 \
|
||||||
|
run scoreboard players set $(n) buttons 1
|
||||||
|
|
||||||
|
$execute if score $(n) buttons matches 1 unless entity @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] positioned $(x) $(y) $(z) run $(c)
|
||||||
|
|
||||||
|
$execute if score $(n) buttons matches 1 \
|
||||||
|
run scoreboard players set $(n) buttons 2
|
||||||
|
|
||||||
|
$execute if block $(x) $(y) $(z) minecraft:stone_button[face=wall,facing=$(f),powered=false] \
|
||||||
|
if score $(n) buttons matches 1.. \
|
||||||
|
run scoreboard players set $(n) buttons 0
|
||||||
|
|
||||||
|
# $execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) run say "$(n) 눌러짐"
|
||||||
|
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) run playsound minecraft:block.stone_button.click_on block @s ~ ~ ~ 1 1
|
||||||
|
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) if score init main matches 0 run $(c)
|
||||||
|
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) unless score init main matches 0 run trigger $(n)
|
||||||
|
|
||||||
|
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n)] at @s run data remove entity @s attack
|
||||||
|
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n)] at @s run data remove entity @s interaction
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
function mq:repeat/buttons/btn { \
|
||||||
|
n: "start", \
|
||||||
|
x: 140, \
|
||||||
|
y: 62, \
|
||||||
|
z: -225, \
|
||||||
|
f: "south", \
|
||||||
|
c: "function mq:commands/start with storage mq:main" \
|
||||||
|
}
|
||||||
|
function mq:repeat/buttons/btn { \
|
||||||
|
n: "stop", \
|
||||||
|
x: 142, \
|
||||||
|
y: 62, \
|
||||||
|
z: -225, \
|
||||||
|
f: "south", \
|
||||||
|
c: "function mq:commands/stop with storage mq:main" \
|
||||||
|
}
|
||||||
|
function mq:repeat/buttons/btn { \
|
||||||
|
n: "skip", \
|
||||||
|
x: 144, \
|
||||||
|
y: 62, \
|
||||||
|
z: -225, \
|
||||||
|
f: "south", \
|
||||||
|
c: "function mq:commands/skip" \
|
||||||
|
}
|
||||||
|
function mq:repeat/buttons/btn { \
|
||||||
|
n: "hint", \
|
||||||
|
x: 146, \
|
||||||
|
y: 62, \
|
||||||
|
z: -225, \
|
||||||
|
f: "south", \
|
||||||
|
c: "function mq:commands/hint" \
|
||||||
|
}
|
||||||
|
function mq:repeat/buttons/btn { \
|
||||||
|
n: "replay", \
|
||||||
|
x: 148, \
|
||||||
|
y: 62, \
|
||||||
|
z: -225, \
|
||||||
|
f: "south", \
|
||||||
|
c: "function mq:commands/replay" \
|
||||||
|
}
|
||||||
|
function mq:repeat/buttons/btn { \
|
||||||
|
n: "test", \
|
||||||
|
x: 144, \
|
||||||
|
y: 62, \
|
||||||
|
z: -213, \
|
||||||
|
f: "north", \
|
||||||
|
c: "function mq:commands/test" \
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
execute as @a[scores={answer=1}] run function mq:quiz/correct with storage mq:main answer
|
||||||
|
execute as @a[scores={answer=2}] run scoreboard players reset @a answer
|
||||||
12
music_quiz/data/mq/function/repeat/check_server.mcfunction
Normal file
12
music_quiz/data/mq/function/repeat/check_server.mcfunction
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
execute if score timer status matches 20.. \
|
||||||
|
if score skript status matches 0 \
|
||||||
|
if score yp status matches 0 \
|
||||||
|
if score ts status matches 0 \
|
||||||
|
run return run function mq:check/server
|
||||||
|
|
||||||
|
execute if score timer status matches 0.. run scoreboard players add timer status 1
|
||||||
|
execute if score timer status matches 1..10 run scoreboard players set skript status 0
|
||||||
|
execute if score timer status matches 1..10 run scoreboard players set yp status 0
|
||||||
|
execute if score timer status matches 1..10 run scoreboard players set ts status 0
|
||||||
|
|
||||||
|
execute if score timer status matches 21.. run scoreboard players set timer status -1
|
||||||
22
music_quiz/data/mq/function/repeat/map/lamp1.mcfunction
Normal file
22
music_quiz/data/mq/function/repeat/map/lamp1.mcfunction
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
execute unless score lamp1 map matches 0.. run scoreboard players set lamp1 map 1
|
||||||
|
execute unless score lamp1.on map matches 0.. run scoreboard players set lamp1.on map 94
|
||||||
|
execute unless score lamp1.off map matches 0.. run scoreboard players set lamp1.off map 85
|
||||||
|
execute unless score lamp1.on2 map matches 0.. run scoreboard players set lamp1.on2 map 44
|
||||||
|
execute unless score lamp1.off2 map matches 0.. run scoreboard players set lamp1.off2 map 35
|
||||||
|
|
||||||
|
execute if score lamp1 map matches 1.. run scoreboard players add lamp1 map 1
|
||||||
|
|
||||||
|
execute if score lamp1 map matches 3 if score lamp1.on map matches 195.. run scoreboard players set lamp1.on map 94
|
||||||
|
execute if score lamp1 map matches 3 if score lamp1.off map matches 195.. run scoreboard players set lamp1.off map 94
|
||||||
|
execute if score lamp1 map matches 3 if score lamp1.on2 map matches 195.. run scoreboard players set lamp1.on2 map 94
|
||||||
|
execute if score lamp1 map matches 3 if score lamp1.off2 map matches 195.. run scoreboard players set lamp1.off2 map 94
|
||||||
|
execute if score lamp1 map matches 3 run execute store result storage mq:main map.lamp1.on int 1 run scoreboard players get lamp1.on map
|
||||||
|
execute if score lamp1 map matches 3 run execute store result storage mq:main map.lamp1.off int 1 run scoreboard players get lamp1.off map
|
||||||
|
execute if score lamp1 map matches 3 run execute store result storage mq:main map.lamp1.on2 int 1 run scoreboard players get lamp1.on2 map
|
||||||
|
execute if score lamp1 map matches 3 run execute store result storage mq:main map.lamp1.off2 int 1 run scoreboard players get lamp1.off2 map
|
||||||
|
execute if score lamp1 map matches 3 run function mq:repeat/map/macro/lamp1 with storage mq:main map.lamp1
|
||||||
|
execute if score lamp1 map matches 3 run scoreboard players add lamp1.on map 1
|
||||||
|
execute if score lamp1 map matches 3 run scoreboard players add lamp1.off map 1
|
||||||
|
execute if score lamp1 map matches 3 run scoreboard players add lamp1.on2 map 1
|
||||||
|
execute if score lamp1 map matches 3 run scoreboard players add lamp1.off2 map 1
|
||||||
|
execute if score lamp1 map matches 3.. run scoreboard players set lamp1 map 1
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
$execute if score lamp1.on map matches 94..194 positioned $(on) 78 -279 if block ~ ~ ~1 minecraft:redstone_lamp run setblock ~ ~ ~ minecraft:redstone_block
|
||||||
|
$execute if score lamp1.off map matches 94..194 positioned $(off) 78 -279 if block ~ ~ ~1 minecraft:redstone_lamp run setblock ~ ~ ~ minecraft:red_wool
|
||||||
|
$execute if score lamp1.on2 map matches 94..194 positioned $(on2) 78 -279 if block ~ ~ ~1 minecraft:redstone_lamp run setblock ~ ~ ~ minecraft:redstone_block
|
||||||
|
$execute if score lamp1.off2 map matches 94..194 positioned $(off2) 78 -279 if block ~ ~ ~1 minecraft:redstone_lamp run setblock ~ ~ ~ minecraft:red_wool
|
||||||
60
music_quiz/data/mq/function/repeat/map/tree.mcfunction
Normal file
60
music_quiz/data/mq/function/repeat/map/tree.mcfunction
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
execute unless score tree map matches 0.. run scoreboard players set tree map 1
|
||||||
|
|
||||||
|
execute if score tree map matches 1.. run scoreboard players add tree map 1
|
||||||
|
|
||||||
|
# 1층 시작
|
||||||
|
execute if score tree map matches 6 run setblock 142 66 -186 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 6 run setblock 147 66 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 6 run setblock 142 66 -196 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 6 run setblock 137 66 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
|
||||||
|
# 1층 끝
|
||||||
|
execute if score tree map matches 16 run setblock 142 66 -186 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 16 run setblock 147 66 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 16 run setblock 142 66 -196 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 16 run setblock 137 66 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
|
||||||
|
# 2층 시작
|
||||||
|
execute if score tree map matches 16 run setblock 142 70 -195 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 16 run setblock 138 70 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 16 run setblock 142 70 -187 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 16 run setblock 146 70 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
|
||||||
|
# 2층 끝
|
||||||
|
execute if score tree map matches 26 run setblock 142 70 -195 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 26 run setblock 138 70 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 26 run setblock 142 70 -187 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 26 run setblock 146 70 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
|
||||||
|
# 3층 시작
|
||||||
|
execute if score tree map matches 26 run setblock 142 74 -194 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 26 run setblock 139 74 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 26 run setblock 142 74 -188 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 26 run setblock 145 74 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
|
||||||
|
# 3층 끝
|
||||||
|
execute if score tree map matches 36 run setblock 142 74 -194 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 36 run setblock 139 74 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 36 run setblock 142 74 -188 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 36 run setblock 145 74 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
|
||||||
|
# 4층 시작
|
||||||
|
execute if score tree map matches 36 run setblock 142 78 -193 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 36 run setblock 140 78 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 36 run setblock 142 78 -189 minecraft:redstone_lamp[lit=true]
|
||||||
|
execute if score tree map matches 36 run setblock 144 78 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
|
||||||
|
# 4층 끝
|
||||||
|
execute if score tree map matches 46 run setblock 142 78 -193 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 46 run setblock 140 78 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 46 run setblock 142 78 -189 minecraft:redstone_lamp[lit=false]
|
||||||
|
execute if score tree map matches 46 run setblock 144 78 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
|
||||||
|
# TOP 시작
|
||||||
|
execute if score tree map matches 46 run setblock 142 81 -191 minecraft:redstone_lamp[lit=true]
|
||||||
|
|
||||||
|
# TOP 끝
|
||||||
|
execute if score tree map matches 56 run setblock 142 81 -191 minecraft:redstone_lamp[lit=false]
|
||||||
|
|
||||||
|
|
||||||
|
execute if score tree map matches 61.. run scoreboard players set tree map 1
|
||||||
2
music_quiz/data/mq/function/repeat/players.mcfunction
Normal file
2
music_quiz/data/mq/function/repeat/players.mcfunction
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
execute as @a[tag=!player] run function mq:players/login with storage mq:main spawn
|
||||||
|
execute as @a if score @s leave_game matches 1.. run function mq:players/login with storage mq:main spawn
|
||||||
49
music_quiz/data/mq/function/repeat/timer.mcfunction
Normal file
49
music_quiz/data/mq/function/repeat/timer.mcfunction
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
execute if score timer main matches 1.. run scoreboard players add timer main 1
|
||||||
|
|
||||||
|
execute unless score init main matches 2 \
|
||||||
|
unless score init main matches 6 \
|
||||||
|
unless score init main matches 10 \
|
||||||
|
run scoreboard players set timer main 0
|
||||||
|
|
||||||
|
# start title timer
|
||||||
|
execute if score init main matches 2 if score timer main matches 20 run title @a title {"text":"3"}
|
||||||
|
execute if score init main matches 2 if score timer main matches 20 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 2 if score timer main matches 20 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 2 if score timer main matches 20 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
|
||||||
|
execute if score init main matches 2 if score timer main matches 40 run title @a title {"text":"2"}
|
||||||
|
execute if score init main matches 2 if score timer main matches 40 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 2 if score timer main matches 40 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 2 if score timer main matches 40 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
|
||||||
|
execute if score init main matches 2 if score timer main matches 60 run title @a title {"text":"1"}
|
||||||
|
execute if score init main matches 2 if score timer main matches 60 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 2 if score timer main matches 60 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 2 if score timer main matches 60 as @a at @s run playsound minecraft:block.note_block.iron_xylophone weather @s ~ ~ ~ 1 1
|
||||||
|
|
||||||
|
execute if score init main matches 2 if score timer main matches 100 run title @a title {"text":""}
|
||||||
|
execute if score init main matches 2 if score timer main matches 100.. run function mq:quiz/select with storage mq:main
|
||||||
|
|
||||||
|
# next song timer
|
||||||
|
execute if score init main matches 6 if score timer main matches 300 run title @a title {"text":""}
|
||||||
|
execute if score init main matches 6 if score timer main matches 290 run function mq:images/image_delete with storage mq:main command_block
|
||||||
|
execute if score init main matches 6 if score timer main matches 300.. run function mq:quiz/select with storage mq:main
|
||||||
|
|
||||||
|
# endding timer
|
||||||
|
execute if score init main matches 10 if score timer main matches 60 run function mq:tellraw {"text":"퀴즈가 종료되었습니다.","color":"white","msg":""}
|
||||||
|
execute if score init main matches 10 if score timer main matches 60 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 10 if score timer main matches 60 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 10 if score timer main matches 60 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
|
||||||
|
execute if score init main matches 10 if score timer main matches 180 run function mq:tellraw {"text":"퀴즈를 다시 시작하시려면 종료를 눌러주세요.","color":"white","msg":""}
|
||||||
|
execute if score init main matches 10 if score timer main matches 120 as @a at @s run scoreboard players set stop buttons -1
|
||||||
|
execute if score init main matches 10 if score timer main matches 120 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 10 if score timer main matches 120 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 10 if score timer main matches 120 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
|
||||||
|
execute if score init main matches 10 if score timer main matches 120 run function mq:tellraw {"text":"플레이 해주셔서 감사합니다.","color":"white","msg":""}
|
||||||
|
execute if score init main matches 10 if score timer main matches 180 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 10 if score timer main matches 180 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
execute if score init main matches 10 if score timer main matches 180 as @a at @s run playsound minecraft:ui.button.click weather @s ~ ~ ~ 1 1
|
||||||
|
|
||||||
|
execute if score init main matches 10 if score timer main matches 200.. run scoreboard players set init main 11
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
execute if score init main matches 0..1 run scoreboard players enable @a ready
|
||||||
|
execute if score init main matches 0..1 as @a if score @s ready matches 1 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true},{"text":" : ","color":"gray"},{"text":"준비완료","color":"white"}]}
|
||||||
|
execute if score init main matches 0..1 as @a if score @s ready matches 1 run scoreboard players set @s ready 2
|
||||||
|
execute if score init main matches 0..1 as @a if score @s ready matches 3 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true},{"text":" : ","color":"gray"},{"text":"이미 준비완료 상태입니다.","color": "red"}]}
|
||||||
|
execute if score init main matches 0..1 as @a if score @s ready matches 3 run scoreboard players set @s ready 2
|
||||||
|
|
||||||
|
|
||||||
|
execute if score init main matches 0..1 run scoreboard players enable @a cancel
|
||||||
|
execute if score init main matches 0..1 as @a if score @s cancel matches 1 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true},{"text":" : ","color":"gray"},{"text":"취소를 선택하셨습니다.","color": "red"}]}
|
||||||
|
execute if score init main matches 0..1 as @a if score @s cancel matches 1 run function mq:commands/stop with storage mq:main
|
||||||
|
|
||||||
|
|
||||||
|
execute if score init main matches 0..1 store result score max_player ready if entity @a
|
||||||
|
execute if score init main matches 0..1 store result score ready_player ready if entity @a[scores={ready=2..}]
|
||||||
|
execute if score init main matches 0..1 \
|
||||||
|
unless score max_player ready matches 0 \
|
||||||
|
if score max_player ready = ready_player ready \
|
||||||
|
run function mq:quiz/start with storage mq:main
|
||||||
|
|
||||||
|
|
||||||
|
function mq:repeat/triggers/trigger { \
|
||||||
|
n:"stop", \
|
||||||
|
n2:"중지", \
|
||||||
|
c:"function mq:commands/stop with storage mq:main" \
|
||||||
|
}
|
||||||
|
function mq:repeat/triggers/trigger { \
|
||||||
|
n:"skip", \
|
||||||
|
n2:"스킵", \
|
||||||
|
c:"function mq:commands/skip" \
|
||||||
|
}
|
||||||
|
function mq:repeat/triggers/trigger { \
|
||||||
|
n:"hint", \
|
||||||
|
n2:"힌트", \
|
||||||
|
c:"function mq:commands/hint" \
|
||||||
|
}
|
||||||
|
function mq:repeat/triggers/trigger { \
|
||||||
|
n:"replay", \
|
||||||
|
n2:"다시재생", \
|
||||||
|
c:"function mq:commands/replay" \
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
$scoreboard players enable @a $(n)
|
||||||
|
|
||||||
|
$execute unless score init main matches 5 as @a if score @s $(n) matches 1.. run scoreboard players reset @s $(n)
|
||||||
|
execute unless score init main matches 5 run return 0
|
||||||
|
|
||||||
|
$execute store result score real_max_player $(n) if entity @a
|
||||||
|
|
||||||
|
$execute store result score rest_player $(n) if entity @a
|
||||||
|
$execute unless score rest_player $(n) matches 0 run scoreboard players operation rest_player $(n) %= two func.temp
|
||||||
|
$execute store result score max_player $(n) if entity @a
|
||||||
|
$execute unless score real_max_player $(n) matches 0 run scoreboard players operation max_player $(n) /= two func.temp
|
||||||
|
$execute unless score real_max_player $(n) matches 0 run scoreboard players operation max_player $(n) += rest_player $(n)
|
||||||
|
$execute store result score $(n)_player $(n) if entity @a[scores={$(n)=2..}]
|
||||||
|
$execute store result score $(n)_player_add $(n) if entity @a[scores={$(n)=2..}]
|
||||||
|
$execute run scoreboard players add $(n)_player_add $(n) 1
|
||||||
|
|
||||||
|
$execute as @a if score @s $(n) matches 1 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true}," : ",{"text":"$(n2) 투표 완료","color": "white"}, \
|
||||||
|
{"text":" (","color":"gray"},{"score":{"name":"$(n)_player_add","objective": "$(n)"},"color":"gray"},{"text":"/","color":"gray"},{"score":{"name":"max_player","objective": "$(n)"},"color":"gray"},{"text":")","color":"gray"}]}
|
||||||
|
$execute as @a if score @s $(n) matches 1 run scoreboard players set @s $(n) 2
|
||||||
|
$execute as @a if score @s $(n) matches 3 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true}," : ",{"text":"이미 $(n2)투표를 하셨습니다.","color": "red"}]}
|
||||||
|
$execute as @a if score @s $(n) matches 3 run scoreboard players set @s $(n) 2
|
||||||
|
|
||||||
|
$execute store result score rest_player $(n) if entity @a
|
||||||
|
$execute unless score rest_player $(n) matches 0 run scoreboard players operation rest_player $(n) %= two func.temp
|
||||||
|
$execute store result score max_player $(n) if entity @a
|
||||||
|
$execute unless score real_max_player $(n) matches 0 run scoreboard players operation max_player $(n) /= two func.temp
|
||||||
|
$execute unless score real_max_player $(n) matches 0 run scoreboard players operation max_player $(n) += rest_player $(n)
|
||||||
|
$execute store result score $(n)_player $(n) if entity @a[scores={$(n)=2..}]
|
||||||
|
|
||||||
|
$execute unless score real_max_player $(n) matches 0 \
|
||||||
|
if score max_player $(n) = $(n)_player $(n) \
|
||||||
|
run $(c)
|
||||||
1
music_quiz/data/mq/function/tellraw.mcfunction
Normal file
1
music_quiz/data/mq/function/tellraw.mcfunction
Normal file
@@ -0,0 +1 @@
|
|||||||
|
$tellraw @a ["",{"text":"[ ","bold":true,"color":"gray"},{"text":"음악퀴즈","bold":true,"color":"dark_green"},{"text":" ]","bold":true,"color":"gray"},{"text":" "},{"text":"$(text)","color":"$(color)"},$(msg)]
|
||||||
9
music_quiz/data/mq/function/tick.mcfunction
Normal file
9
music_quiz/data/mq/function/tick.mcfunction
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function mq:repeat/players
|
||||||
|
function mq:repeat/check_answer
|
||||||
|
function mq:repeat/timer
|
||||||
|
function mq:repeat/buttons/handler
|
||||||
|
function mq:repeat/triggers/handler
|
||||||
|
function mq:repeat/check_server
|
||||||
|
|
||||||
|
function mq:repeat/map/tree
|
||||||
|
function mq:repeat/map/lamp1
|
||||||
9
music_quiz/data/mq/수정.txt
Normal file
9
music_quiz/data/mq/수정.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
- function/
|
||||||
|
- load.mcfunction
|
||||||
|
- buttons/
|
||||||
|
- handler.mcfunction
|
||||||
|
- quiz/
|
||||||
|
- setanswer.mcfunction
|
||||||
|
|
||||||
|
|
||||||
|
# 이미지 명령어 추가
|
||||||
6
music_quiz/pack.mcmeta
Normal file
6
music_quiz/pack.mcmeta
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 69,
|
||||||
|
"description": "음악퀴즈용 데이터팩입니다."
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user