send "§e----------- Vlajky -----------" to {gaming_players::*}
send " V této minihře máte za úkol jako první získat vlajku na středu, kterou §cvezmene pravým kliknutím §ra donést jí domů. Pozor, protivník vás může zabít na jednu ránu lukem! Po stranách jsou pak instakill potiony." to {gaming_players::*}
wait 15 seconds
set {stop_players} to "False"
reveal {gaming_players::*}
while {game_on} is "True":
if {game_status} is "init": # kód před prvním startem
# procesy před startem
clear {flag_won::*}
set {teamscore::1} to 0
set {teamscore::2} to 0
set {teamscore::3} to 0
set {teamscore::4} to 0
set {teamscore::5} to 0
set {teamscore::6} to 0
set {teamscore::7} to 0
set {teamscore::8} to 0
set {teamscore::9} to 0
set {teamscore::10} to 0
execute console command "/scoreboard players set MaxKolo XD 9"
clear {flag_won::*}
# procesy před startem
set {flags_kola} to 1
clear inventory of all players
wait 20 ticks
send title "§c§l1. KOLO" to all players
if {flags_kola} is 1:
execute console command "/scoreboard players set Kola XD 1"
spawngate(3)
spawnteam(1,1)
spawnteam(2,2)
spawnteam(3,3)
spawnteam(10,4)
spawnteam(4,5)
spawnteam(9,6)
spawnteam(5,7)
spawnteam(8,8)
spawnteam(6,9)
spawnteam(7,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
set {flags_timer} to {čas_kola}
wait 5 seconds
send title "§c§l%{flags_kola}%. KOLO" with subtitle "3" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "§c§l%{flags_kola}%. KOLO" with subtitle "2" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "§c§l%{flags_kola}%. KOLO" with subtitle "1" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "GO" with subtitle "" to all players
play sound "custom.cas2" at volume 50 to all players
spawngate(1)
if {game_status} is "next":
loop {flag_locations::*}:
loop all blocks in radius 35 around loop-value-1:
if loop-value-2 is banner:
set block at loop-value-2 to air
loop dropped items in radius 35 around loop-value-1:
kill loop-value-2
loop 10 times:
loop entries of team "IDList%loop-number%":
if {flag_won::*} contains loop-value-2:
set {teamscore::%loop-number-1%} to {teamscore::%loop-number-1%} + 1
clear inventory of all players
loop {potion_locations::*}:
loop all entities in radius 4 around loop-value-1:
kill loop-value-2
set {flags_kola} to {flags_kola} + 1
clear {flag_won::*}
spawngate(3)
if {flags_kola} is 2:
execute console command "/scoreboard players set Kola XD 2"
spawnteam(2,1)
spawnteam(3,2)
spawnteam(1,3)
spawnteam(7,4)
spawnteam(8,5)
spawnteam(6,6)
spawnteam(9,7)
spawnteam(5,8)
spawnteam(4,9)
spawnteam(10,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 3:
execute console command "/scoreboard players set Kola XD 3"
spawnteam(6,1)
spawnteam(9,2)
spawnteam(8,3)
spawnteam(7,4)
spawnteam(3,5)
spawnteam(1,6)
spawnteam(4,7)
spawnteam(2,8)
spawnteam(5,9)
spawnteam(10,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 4:
execute console command "/scoreboard players set Kola XD 4"
spawnteam(10,1)
spawnteam(6,2)
spawnteam(2,3)
spawnteam(5,4)
spawnteam(3,5)
spawnteam(4,6)
spawnteam(1,7)
spawnteam(8,8)
spawnteam(7,9)
spawnteam(9,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 5:
execute console command "/scoreboard players set Kola XD 5"
spawnteam(5,1)
spawnteam(3,2)
spawnteam(6,3)
spawnteam(2,4)
spawnteam(7,5)
spawnteam(10,6)
spawnteam(8,7)
spawnteam(9,8)
spawnteam(4,9)
spawnteam(1,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 6:
execute console command "/scoreboard players set Kola XD 6"
spawnteam(1,1)
spawnteam(9,2)
spawnteam(10,3)
spawnteam(8,4)
spawnteam(2,5)
spawnteam(7,6)
spawnteam(3,7)
spawnteam(6,8)
spawnteam(4,9)
spawnteam(5,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 7:
execute console command "/scoreboard players set Kola XD 7"
spawnteam(5,1)
spawnteam(1,2)
spawnteam(6,3)
spawnteam(4,4)
spawnteam(7,5)
spawnteam(3,6)
spawnteam(8,7)
spawnteam(2,8)
spawnteam(9,9)
spawnteam(10,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 8:
execute console command "/scoreboard players set Kola XD 8"
spawnteam(5,1)
spawnteam(6,2)
spawnteam(1,3)
spawnteam(10,4)
spawnteam(2,5)
spawnteam(9,6)
spawnteam(3,7)
spawnteam(8,8)
spawnteam(4,9)
spawnteam(7,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 9:
execute console command "/scoreboard players set Kola XD 9"
spawnteam(9,1)
spawnteam(3,2)
spawnteam(10,3)
spawnteam(2,4)
spawnteam(6,5)
spawnteam(1,6)
spawnteam(7,7)
spawnteam(5,8)
spawnteam(8,9)
spawnteam(4,10)
loop {flag_locations::*}:
set block at loop-value to white banner
loop {potion_locations::*}:
drop {dmgpotion} named "§4Insta-kill potion" at loop-value
set {game_status} to "playing"
if {flags_kola} is 10:
set {game_status} to "end"
else:
send title "§c§l%{flags_kola}%. KOLO" to all players
wait 5 second
send title "§c§l%{flags_kola}%. KOLO" with subtitle "3" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "§c§l%{flags_kola}%. KOLO" with subtitle "2" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "§c§l%{flags_kola}%. KOLO" with subtitle "1" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "GO" with subtitle "" to all players
play sound "custom.cas2" at volume 50 to all players
spawngate(1)
set {flags_timer} to {čas_kola} # NASTAVENÍ ČASU
if {game_status} is "playing": # kód kontroly konce kola
send action bar "§4§lČas: §7%{flags_timer}%" to all players
set {flags_timer} to {flags_timer} - 1
wait 1 second
if {flags_timer} is 0:
send title "§c§lDošel čas!" to all players
set {gaming_players::*}'s gamemode to spectator
set {game_status} to "next"
wait 5 seconds
if size of {flag_won::*} is 5:
set {game_status} to "next"
set {gaming_players::*}'s gamemode to spectator
wait 1 second
send title "§c§lKonec kola!" to all players
wait 5 seconds
if {game_status} is "end":
send "game end"
send title "&4Konec hry" to all players
# VYHODNOCENÍ BODŮ
loop 10 times:
execute console command "/scoreboard players set @a[scores={IDlist=%loop-number%}] Win %{teamscore::%loop-number%}%"
if loop-number is 10:
execute console command "/scoreboard players set @a[scores={IDlist=20}] Win %{teamscore::%loop-number%}%"
else:
execute console command "/scoreboard players set @a[scores={IDlist=1%loop-number%}] Win %{teamscore::%loop-number%}%"
set {game_on} to "False"
send "game stop"
wait 5 seconds
make console execute command "/function ctf:vlajky"