diff --git a/plugins/scripts/scripts/skybattle.sk b/plugins/scripts/scripts/skybattle.sk index c536477..94a4ad9 100644 --- a/plugins/scripts/scripts/skybattle.sk +++ b/plugins/scripts/scripts/skybattle.sk @@ -451,27 +451,28 @@ function init_team_names(): loop 10 times: set {skybattle::team%loop-number%::name} to {_team%loop-number%} -function get_team(team: text): +function get_team(team: text) :: text: if {_team} is "IDList1": - return "Karmínová" - if {_team} is "IDList2": - return "Jantarová" - if {_team} is "IDList3": - return "Krémová" - if {_team} is "IDList4": - return "Limetková" - if {_team} is "IDList5": - return "Smaragdová" - if {_team} is "IDList6": - return "Azurová" - if {_team} is "IDList7": - return "Blankytná" - if {_team} is "IDList8": - return "Nebeská" - if {_team} is "IDList9": - return "Nachová" - if {_team} is "IDList10": - return "Švestková" + set {_tname} to "Karmínová" + else if {_team} is "IDList2": + set {_tname} to "Jantarová" + else if {_team} is "IDList3": + set {_tname} to "Krémová" + else if {_team} is "IDList4": + set {_tname} to "Limetková" + else if {_team} is "IDList5": + set {_tname} to "Smaragdová" + else if {_team} is "IDList6": + set {_tname} to "Azurová" + else if {_team} is "IDList7": + set {_tname} to "Blankytná" + else if {_team} is "IDList8": + set {_tname} to "Nebeská" + else if {_team} is "IDList9": + set {_tname} to "Nachová" + else if {_team} is "IDList10": + set {_tname} to "Švestková" + return {_tname} on block place of concrete: remove 1 of event-block from player's inventory @@ -491,7 +492,8 @@ on death of player: # victim, attacker 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::*} - broadcast "Zemřel celý tým %get_team(team of victim)%" + set {_vteam} to team of victim + broadcast "Zemřel celý tým %get_team({_vteam})%" on respawn: if {skybattle::deadplayers::*} contains player's uuid: