- Script Version: 2.2-dev36
- Script Author: Njol
- Minecraft Version: 1.8.8
- Full Code: https://pastebin.com/UtFpp5TH
I am making a skywars minigame using skript and I'm now working on the timer. The first stage of the timer works normal but when the timer hits 0:00 and goes onto 1:59 the timer just freezes. the code I am talking about:
if {sw.arena.%{_value}%.seconds} <= 1:
if {sw.arena.%{_value}%.minutes} != 0:
wait 1 second
set {0.%{_value}%} to ""
set {sw.arena.%{_value}%.seconds} to 60
subtract 1 from {sw.arena.%{_value}%.minutes}
else:
wait 1 second
subtract 1 from {sw.arena.%{_value}%.event.num}
if {sw.arena.%{_value}%.event.num} = 3:
set {0.%{_value}%} to ""
set {sw.arena.%{_value}%.minutes} to 1
set {sw.arena.%{_value}%.seconds} to 59
loop blocks in radius 100 around {sw.arena.%{_value}%.center.loc}:
if loop-block is a chest:
clear loop-block's inventory
loop (random integer between 10 and 20) times:
set {_random} to random element out of {normalislandchests::*}
set {_slot} to a random integer between 0 and 26
add {_random} to slot {_slot} of loop-block's inventory
wait 1 tick
if loop-block is a trapped chest:
clear loop-block's inventory
loop (random integer between 5 and 12) times:
set {_random} to random element out of {normalmidchests::*}
set {_slot} to a random integer between 0 and 26
add {_random} to slot {_slot} of loop-block's inventory
wait 1 tick
send {sw.arena.%{_value}%.players.alive::*} title "{@refill}" for 1 seconds
play sound "block.chest.open" with volume 5 at player for {sw.arena.%{_value}%.players.alive::*}
wait 60 seconds
send {sw.arena.%{_value}%.players.alive::*} title "{@5minremaining}" for 1 second
Last edited: