31 lines
1.7 KiB
Mcfunction
31 lines
1.7 KiB
Mcfunction
|
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
|
||
|
|
||
|
# loop
|
||
|
execute unless score $hc.tt_timer +hc.core matches 1.. run scoreboard players set $hc.tt_timer +hc.core 201
|
||
|
scoreboard players remove $hc.tt_timer +hc.core 1
|
||
|
|
||
|
# countdown
|
||
|
execute if score $hc.tt_timer +hc.core matches 200 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"Starting in 10 seconds...","color":"white"}]
|
||
|
execute if score $hc.tt_timer +hc.core matches 100 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"5","color":"white"}]
|
||
|
execute if score $hc.tt_timer +hc.core matches 80 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"4","color":"white"}]
|
||
|
execute if score $hc.tt_timer +hc.core matches 60 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"3","color":"white"}]
|
||
|
execute if score $hc.tt_timer +hc.core matches 40 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"2","color":"white"}]
|
||
|
execute if score $hc.tt_timer +hc.core matches 20 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"1","color":"white"}]
|
||
|
execute if score $hc.tt_timer +hc.core matches 0 run \
|
||
|
tellraw @a[] [{"text":"» ","color":"#e4f171"},{"text":"GO!","color":"white"}]
|
||
|
|
||
|
# start explosion timer
|
||
|
execute if score $hc.tt_timer +hc.core matches 0 store result storage hc.tnt tt_timer int 1 run random value 25..35
|
||
|
$execute if score $hc.tt_timer +hc.core matches 0 run schedule function herohost:tnt/explosion $(tt_timer)s
|
||
|
|
||
|
# tag random
|
||
|
execute if score $hc.tt_timer +hc.core matches 0 run tag @r[] add hc.get_tnt
|
||
|
|
||
|
# reset
|
||
|
execute if score $hc.tt_timer +hc.core matches ..0 run scoreboard players reset $hc.tt_timer
|