Skip to content

Commit

Permalink
fix: join (#64, team, game spect)
Browse files Browse the repository at this point in the history
  • Loading branch information
Theaustudio committed Dec 18, 2022
1 parent fa95772 commit 6abf1a5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function scaffolding_rush:game/summon_markers

function scaffolding_rush:broadcast/10s

teleport @e[type=marker,name="ScR_LavaLevel",limit=1] 1000 270 1000
teleport @e[type=marker,name="ScR_LavaLevel",limit=1] 1000 2 1000

kill @e[tag=lobbyText]
kill @e[type=falling_block]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
execute as @s[tag=InGame] at @s run function scaffolding_rush:lobby/tp_to_lobby

#gamemode survival
gamemode survival
execute if score RandomTeam options matches 1 if entity @s[team=] run team join random
execute if score TeamNumber options matches 2 run team join random @s[team=yellow]
execute if score TeamNumber options matches 2..3 run team join random @s[team=green]

execute as @s run function scaffolding_rush:lobby/give_items
function scaffolding_rush:lobby/base_egg/give
execute if score TeamEgg options matches 1 run function scaffolding_rush:lobby/base_egg/give

execute if score Admin options matches 1 as @a[tag=admin] run function scaffolding_rush:options/activate_all
execute if score Admin options matches 0 as @a run function scaffolding_rush:options/activate_all
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scoreboard players set @s language 0

tellraw @s ["",{"text":"\n"},{"text":" Welcome on ","color":"gold"},{"text":"Scaffolding Rush","bold":true,"color":"gold"},{"text":"\u2122!","color":"gold"},{"text":"\n"},{"text":" a game by ","color":"gray"},{"text":"Gunivers","color":"gold","clickEvent":{"action":"open_url","value":"https://gunivers.net/"}},{"text":"\n\n"},{"text":" ","color":"light_purple"},{"text":"[Link to the map]","color":"light_purple","clickEvent":{"action":"open_url","value":"https://gunivers.net/scaffolding-rush/"}},{"text":" "},{"text":"[Discord]","color":"blue","clickEvent":{"action":"open_url","value":"https://discord.gg/E8qq6tN"}},{"text":"\n\n"},{"text":"choose your language: ","color":"gray"},{"text":"[English]","color":"green","clickEvent":{"action":"run_command","value":"/trigger opt_language set 1"}},{"text":" ","color":"green"},{"text":"[Français]","color":"green","clickEvent":{"action":"run_command","value":"/trigger opt_language set 2"}},{"text":"\n "}]
tellraw @s ["",{"text":"\n"},{"text":" Welcome on ","color":"gold"},{"text":"Scaffolding Rush","bold":true,"color":"gold"},{"text":"\u2122!","color":"gold"},{"text":"\n"},{"text":" a game by ","color":"gray"},{"text":"Gunivers","color":"gold","clickEvent":{"action":"open_url","value":"https://gunivers.net/"}},{"text":"\n\n"},{"text":" ","color":"light_purple"},{"text":"[Link to the map]","color":"light_purple","clickEvent":{"action":"open_url","value":"https://gunivers.net/scaffolding-rush/"}},{"text":" "},{"text":"[Discord]","color":"blue","clickEvent":{"action":"open_url","value":"https://discord.gg/E8qq6tN"}},{"text":"\n\n"},{"text":"choose your language: ","color":"gray"},{"text":"[English]","color":"green","clickEvent":{"action":"run_command","value":"/trigger opt_language set 1"}},{"text":" ","color":"green"},{"text":"[Français]","color":"green","clickEvent":{"action":"run_command","value":"/trigger opt_language set 2"}},{"text":"\n "}]

scoreboard players operation @a gameId = GameId global
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ execute at @e[tag=baseTeam,name="Green",limit=1] run spawnpoint @a[team=green] ~
execute at @e[tag=baseTeam,name="Red",limit=1] run spawnpoint @a[team=red] ~ 4 ~
execute at @e[tag=baseTeam,name="Yellow",limit=1] run spawnpoint @a[team=yellow] ~ 4 ~

execute as @a[team=] at @s run function scaffolding_rush:game/tp_to_game
execute as @a[team=,tag=!InGame] at @s run function scaffolding_rush:game/tp_to_game

execute as @e[type=villager,tag=LobbyBase] run function scaffolding_rush:clean_kill
execute as @a run function scaffolding_rush:lobby/base_egg/clear_egg
Expand Down

0 comments on commit 6abf1a5

Please sign in to comment.