Compare commits

...

2 Commits

Author SHA1 Message Date
Anorak_1 af008dbe0f Ok... this is the last one 2022-11-09 18:56:05 +01:00
Anorak_1 cc04677307 Last commit of the day 2022-11-09 18:42:46 +01:00
1 changed files with 27 additions and 8 deletions

View File

@ -32,6 +32,11 @@
#! skybattle::players::[player_uuid]::kills_number - number of kills of a player [int] #! skybattle::players::[player_uuid]::kills_number - number of kills of a player [int]
#! skybattle::players::[player_uuid]::deaths - number of deaths of a player #! skybattle::players::[player_uuid]::deaths - number of deaths of a player
#! skybattle::players::[player_uuid]::kills_names - names of players killed #! skybattle::players::[player_uuid]::kills_names - names of players killed
#! skybattle::players::[player_uuid]::survived_count - place at which you survived
#! skybattle::players::[player_uuid]::survived_multiplier - inverted count = 40th place -> multiplier 1x
# 40 za kill
# 10 za přežití
command /minigame_skybattle_start: command /minigame_skybattle_start:
@ -40,38 +45,51 @@ command /minigame_skybattle_start:
executable by: the console and players executable by: the console and players
permission: skript.op permission: skript.op
trigger: trigger:
execute console command "/gamerule keepInventory true" #execute console command "/gamerule doImmediateRespawn true"
clear {skybattle::gaming_players::*} clear {skybattle::gaming_players::*}
loop 10 times: loop 10 times:
loop entries of team "IDList%loop-number%": loop entries of team "IDList%loop-number%":
add loop-value2 to {skybattle::gaming_players::*} add loop-value2 to {skybattle::gaming_players::*}
add loop-value2 to {skybattle::team%%loop-number::players::*} add loop-value2 to {skybattle::team%%loop-number::players::*}
broadcast "Načítám minihru Sky Battle" broadcast "Načítám minihru Oblačný Souboj"
send title "§2Sky Battle" to all players send title "§2Oblačný Souboj" to all players
set {skybattle::game_status} to "init" set {skybattle::game_status} to "init"
set {skybattle::game_on} to "True" set {skybattle::game_on} to "True"
wait 2 seconds wait 2 seconds
send subtitle "Teleportuji" to all players send subtitle "Teleportuji" to all players
wait 1 second wait 1 second
set {skybattle::intro} to "True" set {skybattle::intro} to "True"
set gamemode of {skybattle::gaming_players::*} to adventure set gamemode of {skybattle::gaming_players::*} to survival
teleport {skybattle::gaming_players::*} to {skybattle::introlocation} teleport {skybattle::gaming_players::*} to {skybattle::introlocation}
set {skybattle::stop_players} to "True" set {skybattle::stop_players} to "True"
hide {skybattle::gaming_players::*} hide {skybattle::gaming_players::*}
wait 1 second wait 1 second
send "§e----------- Sky Battle -----------" to {gaming_players::*} send "§e----------- Oblačný Souboj -----------" to {gaming_players::*}
send " V této minihře máte za úkol §cpřežít§r a zabít co nejvíce svých §cprotivníků." to {gaming_players::*} send "V této minihře máte za úkol §cpřežít§r a zabít co nejvíce svých §cprotivníků. Můžete zničit a využít celý svět:D Třeba §7Iron Blocky §rjsou docela užitečné." to {gaming_players::*}
wait 10 seconds wait 10 seconds
reveal {skybattle::gaming_players::*} reveal {skybattle::gaming_players::*}
set {skybattle::stop_players} to "False" set {skybattle::stop_players} to "False"
while {skybattle::game_on} is "True": while {skybattle::game_on} is "True":
if {skybattle::game_status} is "init": if {skybattle::game_status} is "init":
execute console command "/scoreboard players set MaxKolo XD 9" execute console command "/scoreboard players set MaxKolo XD 3"
resetplayers() resetplayers()
resetteams() resetteams()
set {skybattle::current_arena} to 1
if {skybattle::game_status} is "end":
make console execute command "/function sky:battle"
command /skybattle_setborder <number>: command /skybattle_setborder <number>:
description: Set center of border for map x description: Set center of border for map x
usage: /skybattle_setborder <id of border/arena> usage: /skybattle_setborder <id of border/arena>
@ -155,7 +173,7 @@ command /skybattle_listspawners <number>:
function spawnteam(team: integer, spawner: integer): function spawnteam(team: integer, spawner: integer):
loop entries of team "IDList%{_team}%": loop entries of team "IDList%{_team}%":
teleport loop-value to location at {skybattle::arena%{skybattle::current_arena}%::spawn_location::%{_spawner}%} teleport loop-value to location at {skybattle::arena%{skybattle::current_arena}%::spawn_location::%{_spawner}%}
set loop-value's gamemode to adventure set loop-value's gamemode to survival
# !!! POPULATE INVENTORY !!! # !!! POPULATE INVENTORY !!!
@ -179,6 +197,7 @@ on respawn:
wait 20 ticks wait 20 ticks
set player's gamemode to adventure set player's gamemode to adventure
set player's gamemode to spectator set player's gamemode to spectator
execute console command "/scoreboard players add @a[gamemode=survival] Survivalgames 1"
on player move: on player move:
if {skybattle::stop_players} is "True": if {skybattle::stop_players} is "True":