Compare commits

...

2 Commits

Author SHA1 Message Date
Anorak_1 918e565193 Deleted junk generated by NextCloud 2022-11-10 19:20:10 +01:00
Anorak_1 05db19814b Added a lot of new stuff, some variables,
statistics and stuff like that
Started work on the main loop

Next TODO:
Spawning teams loop
Inventory setup
2022-11-10 19:18:44 +01:00
1 changed files with 124 additions and 10 deletions

View File

@ -9,6 +9,9 @@
# skybattle::deadplayers::* - stores all dead players in current round [list of players]
# skybattle::introlocation - stores intro location [coords] ! must have barrier to stand on !
# skybattle::lobbylocation - stores location of lobby [coords]
# skybattle::timer - stores timer [int]
# skybattle::teams_alive::* - stores list of teams that are alive
# skybattle::teams_alive_num - stores number of teams that are alive
# skybattle::current_arena - stores current round/arena [1-3]
@ -21,18 +24,19 @@
# ---------------- Variables specific for each team ----------------
# skybattle::team[1-10]:: - folders for all variables specific to each team (list of players, etc.)
# skybattle::team[1-10]::players - stores every player from team [list of players] - probably implemented on minigame startup
#! skybattle::team[1-10]::alive_players - list of players alive
#! skybattle::team[1-10]::alive_number - number of players alive in team [int]
#! skybattle::team[1-10]::kills - number of kills of the whole team [int]
# skybattle::IDList[1-10]:: - folders for all variables specific to each team (list of players, etc.)
# skybattle::IDList[1-10]::players - stores every player from team [list of players] - probably implemented on minigame startup
# skybattle::IDList[1-10]::alive_players - list of players alive
#! skybattle::IDList[1-10]::alive_number - number of players alive in team [int]
#! skybattle::IDList[1-10]::kills - number of kills of the whole team [int]
# ---------------- Variables specific for each player ----------------
# skybattle::players::[player_uuid]:: - folder for all variables specific to players (kills, deaths, etc.)
#! 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]::kills_names - names of players killed
# skybattle::players::[player_uuid]::team - team that the player belongs to
# 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]::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
@ -47,11 +51,14 @@ command /minigame_skybattle_start:
permission: skript.op
trigger:
#execute console command "/gamerule doImmediateRespawn true"
set {skybattle::time} to 120
clear {skybattle::gaming_players::*}
loop 10 times:
loop entries of team "IDList%loop-number%":
add loop-value2 to {skybattle::gaming_players::*}
add loop-value2 to {skybattle::team%%loop-number::players::*}
add loop-value2 to {skybattle::IDList%loop-number%::players::*}
set {skybattle::players::%loop-value2's uuid%::team} to "IDList%loop-number2%"
broadcast "Načítám minihru Oblačný Souboj"
send title "§2Oblačný Souboj" to all players
set {skybattle::game_status} to "init"
@ -78,7 +85,73 @@ command /minigame_skybattle_start:
resetplayers()
resetteams()
set {skybattle::current_arena} to 1
set {skybattle::current_arena} to 0
clear inventory of {skybattle::gaming_players::*}
set {skybattle::game_status} to "next"
if {skybattle::game_status} is "next":
loop 10 times:
clear {skybattle::IDList%loop-number%::alive_players::*}
set {skybattle::IDList%loop-number%::alive_number} to 4
loop entries of team "IDList%loop-number%":
add loop-value2 to {skybattle::IDList%loop-number%::alive_players::*}
set {skybattle::current_arena} to {skybattle::current_arena} + 1
set {skybattle::teams_alive_num} to 10
reset_teams_alive()
if {skybattle::current_arena} is 1:
set {skybattle::stop_players} to "True"
if {skybattle::current_arena} is 2:
set {skybattle::stop_players} to "True"
if {skybattle::current_arena} is 3:
set {skybattle::stop_players} to "True"
if {skybattle::current_arena} is 4:
else: # starting loop - stuff like countdowns etc...
send title "§c§l%{skybattle::current_arena}%. KOLO" to all players
wait 5 seconds
send title "§c§l%{skybattle::current_arena}%. KOLO" with subtitle "3" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "§c§l%{skybattle::current_arena}%. KOLO" with subtitle "2" to all players
play sound "custom.cas" at volume 50 to all players
wait 1 second
send title "§c§l%{skybattle::current_arena}%. 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
set {skybattle::stop_players} to "False"
set {skybattle::timer} to {skybattle::time}
if {skybattle::game_status} is "playing":
send action bar "§4§lČas: §7%{skybattle::timer}%" to all players
set {skybattle::timer} to {skybattle::timer} -1
wait 1 second
if {skybattle::timer} is 0:
send title "§c§lDošel čas!" to all players
set {skybattle::gaming_players::*}'s gamemode to spectator
set {skybattle::game_status} to "next"
wait 5 seconds
if {skybattle::teams_alive_num} is 1:
send title "Vyhrál team %{skybattle::teams_alive::*}%" to all players
if {skybattle::teams_alive_num} is 0:
send title "Tak prej nevyhrál nikdo lul :D" to all players
if {skybattle::game_status} is "end":
@ -185,10 +258,51 @@ function resetteams():
function resetplayers():
clear {skybattle::players::*}
function reset_teams_alive():
clear {skybattle::teams_alive::*}
set {_team1} to "Karmínová"
set {_team2} to "Jantarová"
set {_team3} to "Krémová"
set {_team4} to "Limetková"
set {_team5} to "Smaragdová"
set {_team6} to "Azurová"
set {_team7} to "Blankytná"
set {_team8} to "Nebeská"
set {_team9} to "Nachová"
set {_team10} to "Švestková"
loop 10 times:
add {_team%loop-number%} to {skybattle::teams_alive::*}
function init_team_names():
set {_team1} to "Karmínová"
set {_team2} to "Jantarová"
set {_team3} to "Krémová"
set {_team4} to "Limetková"
set {_team5} to "Smaragdová"
set {_team6} to "Azurová"
set {_team7} to "Blankytná"
set {_team8} to "Nebeská"
set {_team9} to "Nachová"
set {_team10} to "Švestková"
loop 10 times:
set {skybattle::team%loop-number%::name} to {_team%loop-number%}
on death of player: # victim, attacker
add victim's uuid to {skybattle::deadplayers::*}
launch ball large coloured yellow fading to light green and black at victim's location with duration 0
remove victim from {skybattle::%team of victim%::alive_players}
set {skybattle::%team of victim%::alive_number} to {skybattle::%team of victim%::alive_number} - 1
set {skybattle::%team of attacker%::kills} to {skybattle::%team of attacker%::kills} + 1
set {skybattle::%attacker's uuid%::kills} to {skybattle::%attacker's uuid%::kills} + 1
add victim to {skybattle::%attacker's uuid%::kills_names}
set {skybattle::%victim's uuid%::deaths'} to {skybattle::%victim's uuid%::deaths'} + 1
if {skybattle::%team of victim%::alive_number} is 0:
set {skybattle::teams_alive_num} to {skybattle::teams_alive_num} - 1
remove team of victim from {skybattle::teams_alive::*}
on respawn:
if {skybattle::deadplayers::*} contains player's uuid: