Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Config
- on load:
- if folder "plugins/TeamSkyWars" doesn't exists:
- create folder "plugins/TeamSkyWars"
- if file "plugins/TeamSkyWars/messages.yml" doesn't exists:
- create file "plugins/TeamSkyWars/messages.yml"
- set "Game.Join" to "&eVoce entrou no Jogo" in yaml file "plugins/TeamSkyWars/messages.yml"
- set "Game.JoinTeam" to "&eVoce entrou no time" in yaml file "plugins/TeamSkyWars/messages.yml"
- else:
- set {Game.Join} to single value "Game.Join" get of "plugins/TeamSkyWars/messages.yml"
- set {Game.JoinTeam} to single value "Game.JoinTeam" get of "plugins/TeamSkyWars/messages.yml"
- #times
- command /team [<text>]:
- trigger:
- if arg 1 is not set:
- send "&6Times: &9Azul, &cVermelho, &eAmarelo, &aVerde"
- if arg 1 is "azul":
- set {team.%player%} to 1
- send "%coloured {Game.JoinTeam}% &9Azul"
- if arg 1 is "vermelho":
- set {team.%player%} to 2
- send "%coloured {Game.JoinTeam}% &cVermelho"
- if arg 1 is "verde":
- set {team.%player%} to 3
- send "%coloured {Game.JoinTeam}% &aVerde"
- if arg 1 is "amarelo":
- set {team.%player%} to 4
- send "%coloured {Game.JoinTeam}% &6Amarelo"
- on damage:
- if {team.%attacker%} is 1:
- if {team.%victim%} is 1:
- cancel event
- if {team.%attacker%} is 2:
- if {team.%victim%} is 2:
- cancel event
- if {team.%attacker%} is 3:
- if {team.%victim%} is 3:
- cancel event
- if {team.%attacker%} is 4:
- if {team.%victim%} is 4:
- cancel event
- #setup
- command /tsw [<text>] [<text>]:
- permission: tsw.admin
- permission message: &cVoce nao tem permissao para isso
- trigger:
- if arg 1 is not set:
- send "&6/tsw setspawn [Time] :: Times: &fblue, red, yellow, green"
- send "&6/tsw setlobby :: Set o Lobby"
- send "&6/tsw forcestart :: Inicie uma partida"
- send "&6/tsw join :: entre no jogo"
- if arg 1 is "setspawn":
- if arg 2 is "blue":
- set {blue.spawn} to location of player
- send "&eSpawn &9Azul &eSetado"
- if arg 2 is "red":
- set {red.spawn} to location of player
- send "&eSpawn &cVermelho &eSetado"
- if arg 2 is "yellow":
- set {yellow.spawn} to location of player
- send "&eSpawn &6Amarelo &eSetado"
- if arg 2 is "green":
- set {green.spawn} to location of player
- send "&eSpawn &aVerde &eSetado"
- if arg 1 is "setlobby":
- set {lobby.loc} to location of player
- send "&eLobby setado com sucesso"
- if arg 1 is "forcestart":
- make player execute command "/start"
- if arg 1 is "join":
- set {lobby.arena01} to true
- teleport player to {lobby.loc}
- loop all players in world "Arena01":
- send "&6%player% entrou no jogo &7(%{world.arena01}%/12)" to loop-player
- #commando-start
- command /start:
- permission: teamskywars.admin
- permission message: &cSem permissao para isso
- trigger:
- loop all players:
- make loop-player execute command "/startp1"
- command /startp1:
- trigger:
- set {_session} to new edit session in player's world with limit -1
- set {_var.%player%} to 10
- loop 10 times:
- wipe player's sidebar
- send "&eSkyWars iniciando em %{_var.%player%}%" to player
- set name of sidebar of player to "&e&lTeamSkyWars"
- set score "&b" in sidebar of player to 9
- set score "&fPlayer:" in sidebar of player to 8
- set score "&a%player%" in sidebar of player to 7
- set score "&3" in sidebar of player to 6
- set score "&fMapa:" in sidebar of player to 5
- set score "&aArena01" in sidebar of player to 4
- set score "&2" in sidebar of player to 3
- set score "&fIniciando em &a%{_var.%player%}%" in sidebar of player to 2
- set score "&n" in sidebar of player to 1
- set score "&enockplugins.net" in sidebar of player to 0
- remove 1 from {_var.%player%}
- wait 1 second
- if {team.%player%} is 1:
- teleport player to {blue.spawn}
- paste schem "plugins/TeamSkyWars/Cages/cage-blue" at {blue.spawn} using {_session} ignoring air
- if {team.%player%} is 2:
- teleport player to {red.spawn}
- paste schem "plugins/TeamSkyWars/Cages/cage-red" at {red.spawn} using {_session} ignoring air
- if {team.%player%} is 3:
- teleport player to {green.spawn}
- paste schem "plugins/TeamSkyWars/Cages/cage-green" at {green.spawn} using {_session} ignoring air
- if {team.%player%} is 4:
- teleport player to {yellow.spawn}
- paste schem "plugins/TeamSkyWars/Cages/cage-yellow" at {yellow.spawn} using {_session} ignoring air
- wipe player's sidebar
- set name of sidebar of player to "&e&lTeamSkyWars"
- set score "&b" in sidebar of player to 9
- set score "&fPlayer:" in sidebar of player to 8
- set score "&a%player%" in sidebar of player to 7
- set score "&3" in sidebar of player to 6
- set score "&fMapa:" in sidebar of player to 5
- set score "&aArena01" in sidebar of player to 4
- set score "&2" in sidebar of player to 3
- set score "&cLiberando Cage &a15" in sidebar of player to 2
- set score "&n" in sidebar of player to 1
- set score "&enockplugins.net" in sidebar of player to 0
- wait 5 seconds
- wipe player's sidebar
- set name of sidebar of player to "&e&lTeamSkyWars"
- set score "&b" in sidebar of player to 9
- set score "&fPlayer:" in sidebar of player to 8
- set score "&a%player%" in sidebar of player to 7
- set score "&3" in sidebar of player to 6
- set score "&fMapa:" in sidebar of player to 5
- set score "&aArena01" in sidebar of player to 4
- set score "&2" in sidebar of player to 3
- set score "&cLiberando Cage &a10" in sidebar of player to 2
- set score "&n" in sidebar of player to 1
- set score "&enockplugins.net" in sidebar of player to 0
- wait 5 seconds
- set {_t.cage.%player%} to 5
- loop 5 times:
- send player title "&c%{_t.cage.%player%}%" with subtitle "&ePrepare-Se para a Luta" for 1 second
- play "CLICK" to player
- wipe player's sidebar
- set name of sidebar of player to "&e&lTeamSkyWars"
- set score "&b" in sidebar of player to 9
- set score "&fPlayer:" in sidebar of player to 8
- set score "&a%player%" in sidebar of player to 7
- set score "&3" in sidebar of player to 6
- set score "&fMapa:" in sidebar of player to 5
- set score "&aArena01" in sidebar of player to 4
- set score "&2" in sidebar of player to 3
- set score "&cLiberando Cage &a%{_t.cage.%player%}%" in sidebar of player to 2
- set score "&n" in sidebar of player to 1
- set score "&enockplugins.net" in sidebar of player to 0
- remove 1 from {_t.cage.%player%}
- wait 1 second
- undo changes of {_session}
- wipe player's sidebar
- loop blocks in radius 5 of player:
- set loop-block to air
- set {lobby.arena01} to false
- set {ingame.arena01} to true
- #build-off
- on break:
- if {lobby.arena01} is true:
- cancel event
- on place:
- if {lobby.arena01} is true:
- cancel event
- every 1 tick:
- set {world.arena01} to number of players in world "Arena01"
- set line 3 of block at {sign.position} to "%{world.arena01}%/12"
- if {ingame.arena01} is true:
- set {state.arena01} to "&cEm Jogo"
- else:
- set {state.arena01} to "&aEsperando"
- set line 4 of block at {sign.position} to "%{state.arena01}%"
- on rightclick on sign:
- if line 1 of clicked block is "&e&lSkyWars":
- if line 2 of clicked block is "&9Arena01":
- if line 4 of clicked block is "&aEsperando":
- make player execute command "tsw join"
- else:
- send "&cja esta em Jogo"
- on rightclick on sign:
- if player is holding stick named "&a&lSign Selector &7(Right Click)":
- set {sign.position} to location of target block
- send "&eSign setado para %{sign.position}%"
- set line 1 of target block to "&e&lSkyWars"
- set line 2 of target block to "&9Arena01"
- command /sign:
- trigger:
- set slot 0 of player to stick named "&a&lSign Selector &7(Right Click)"
- command /fix:
- trigger:
- set {lobby.arena01} to false
- set {ingame.arena01} to false
Advertisement
Add Comment
Please, Sign In to add comment