이전퀴즈 데이터팩
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user