Initial import
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# Tandai player yang sedang berada di arena Protect Villagers.
|
||||
# Ini lebih aman untuk custom dimension, karena pengecekan area dilakukan dari posisi player sendiri.
|
||||
tag @a remove pv_wave_viewer
|
||||
execute as @a at @s if predicate protect_villagers:allowed_dimension if entity @s[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] run tag @s add pv_wave_viewer
|
||||
|
||||
# Update target player bossbar hanya untuk player di arena.
|
||||
bossbar set protect_villagers:wave players @a[tag=pv_wave_viewer]
|
||||
|
||||
# Countdown persiapan 9 detik sebelum monster mulai spawn sekitar 19:20.
|
||||
execute if score #time daytime matches 13153..13333 if score #countdown pv_wave_countdown matches 0 if score #wave pv_wave_lock matches 0 run function protect_villagers:wave/countdown/start
|
||||
execute if score #countdown pv_wave_countdown matches 1.. run function protect_villagers:wave/countdown/tick
|
||||
|
||||
# Trigger title wave. Jika server /reload atau player masuk saat wave sudah berjalan, sistem tetap recover.
|
||||
execute if score #time daytime matches 14000..17500 unless score #wave pv_wave_lock matches 1 run function protect_villagers:wave/start/wave_1
|
||||
execute if score #time daytime matches 18000..21667 unless score #wave pv_wave_lock matches 2 run function protect_villagers:wave/start/wave_2
|
||||
execute if score #time daytime matches 22000..22833 unless score #wave pv_wave_lock matches 3 run function protect_villagers:wave/start/wave_3
|
||||
execute if score #time daytime matches 23000..23917 unless score #wave pv_wave_lock matches 4 run function protect_villagers:wave/start/wave_4
|
||||
|
||||
# Progress bossbar aktif sesuai rentang wave.
|
||||
execute if score #time daytime matches 14000..17500 run function protect_villagers:wave/progress/wave_1
|
||||
execute if score #time daytime matches 18000..21667 run function protect_villagers:wave/progress/wave_2
|
||||
execute if score #time daytime matches 22000..22833 run function protect_villagers:wave/progress/wave_3
|
||||
execute if score #time daytime matches 23000..23917 run function protect_villagers:wave/progress/wave_4
|
||||
|
||||
# Sembunyikan bossbar ketika sedang jeda antar wave.
|
||||
execute if score #time daytime matches 17501..17999 run bossbar set protect_villagers:wave visible false
|
||||
execute if score #time daytime matches 21668..21999 run bossbar set protect_villagers:wave visible false
|
||||
execute if score #time daytime matches 22834..22999 run bossbar set protect_villagers:wave visible false
|
||||
execute if score #time daytime matches 23918..23999 run bossbar set protect_villagers:wave visible false
|
||||
execute if score #time daytime matches 0..13999 run bossbar set protect_villagers:wave visible false
|
||||
|
||||
# Reset harian sebelum malam berikutnya.
|
||||
execute if score #time daytime matches 12000..13000 if score #wave pv_wave_lock matches 4 run scoreboard players set #wave pv_wave_lock 0
|
||||
Reference in New Issue
Block a user