options:
Prefix: &3&lCOUNT &8&l»
Permission: crown.count
NoPermissions: &cYou are not allowed to use this command.
ABBeginsIn: &a&lCROWNWARS &abegins in
ABPaused: &a&lCROWNWARS &ais currently &ePAUSED
ABStartsNow: &a&lCROWNWARS STARTED!
FinishCommand: /gamestart
Timer: 90
command /count [<text>]:
executable by: console and players
permission: {@Permission}
permission message: {@Prefix} {@NoPermissions}
trigger:
if arg 1 is not set:
set {_timespan} to "%{crown_count::timer}% seconds" parsed as timespan
send "&8&l&m-----------&8&l| &3&lCOUNT &8&l|&m-----------"
if {crown_count::status} is not set:
send "%nl%&8&l» &7The timer is currently &cSTOPPED&7."
if {crown_count::status} is 0:
send "%nl%&8&l» &7The timer is currently &ePAUSED&7 at &e%{_timespan}%&7."
if {crown_count::status} is 1:
send "%nl%&8&l» &7The timer is currently &aRUNNING&7."
send "%nl%&8&l» &b/count &astart &7- Starts the timer."
send "&8&l» &b/count &epause &7- Pauses the timer."
send "&8&l» &b/count &aresume &7- Resumes the timer."
send "&8&l» &b/count &cstop &7- Stops the timer."
send "&8&l&m-----------------------------"
if arg 1 is "start":
if {crown_count::status} is set:
if {crown_count::status} is 0:
send "{@Prefix} &7There's a &ePAUSED &7timer, stop it with &b/count &cstop&7."
if {crown_count::status} is 1:
send "{@Prefix} &7There's a &aRUNNING &7timer, stop it with &b/count &cstop&7."
else:
set {crown_count::status} to 1
set {crown_count::timer} to {@Timer}
set {_timespan} to "%{crown_count::timer}% seconds" parsed as timespan
send "{@Prefix} &aYou have started a timer successfully for &l%{_timespan}% &a✔"
if arg 1 is "pause":
if {crown_count::status} is set:
if {crown_count::status} is 0:
send "{@Prefix} &aThere's already a timer &ePAUSED&7, resume it with &b/count &aresume&7."
if {crown_count::status} is 1:
set {crown_count::status} to 0
send "{@Prefix} &aYou have paused the timer successfully &a✔"
else:
send "{@Prefix} &7There's no timer running, start one with &b/count &astart&7."
if arg 1 is "resume":
if {crown_count::status} is set:
if {crown_count::status} is 0:
set {crown_count::status} to 1
send "{@Prefix} &aYou have resumed the timer successfully &a✔"
if {crown_count::status} is 1:
send "{@Prefix} &aThere's already a timer &aRUNNING&7, pause it with &b/count &apause&7."
else:
send "{@Prefix} &7There's no timer running, start one with &b/count &astart&7."
if arg 1 is "stop":
if {crown_count::status} is set:
delete {crown_count::status}
send "{@Prefix} &aYou have stopped the timer successfully &a✔"
else:
send "{@Prefix} &7There's no timer running, start one with &b/count &astart&7."
every second:
set {_timespan} to "%{crown_count::timer}% seconds" parsed as timespan
if {crown_count::status} is 0:
loop all players:
send action bar "{@ABPaused}" to loop-player
if {crown_count::status} is 1:
if {crown_count::timer} is 0:
delete {crown_count::status}
make console execute command "{@FinishCommand}"
loop all players:
send action bar "{@ABStartsNow}" to loop-player
else:
remove 1 from {crown_count::timer}
loop all players:
send action bar "{@ABBeginsIn} &a%{_timespan}%..." to loop-player