lNockl

ae122

Aug 5th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Config
  2. on load:
  3.     if folder "plugins/TeamSkyWars" doesn't exists:
  4.         create folder "plugins/TeamSkyWars"
  5.     if file "plugins/TeamSkyWars/messages.yml" doesn't exists:
  6.         create file "plugins/TeamSkyWars/messages.yml"
  7.         set "Game.Join" to "&eVoce entrou no Jogo" in yaml file "plugins/TeamSkyWars/messages.yml"
  8.         set "Game.JoinTeam" to "&eVoce entrou no time" in yaml file "plugins/TeamSkyWars/messages.yml"
  9.     else:
  10.         set {Game.Join} to single value "Game.Join" get of "plugins/TeamSkyWars/messages.yml"
  11.         set {Game.JoinTeam} to single value "Game.JoinTeam" get of "plugins/TeamSkyWars/messages.yml"
  12.  
  13. #times
  14. command /team [<text>]:
  15.     trigger:
  16.         if arg 1 is not set:
  17.             send "&6Times: &9Azul, &cVermelho, &eAmarelo, &aVerde"
  18.         if arg 1 is "azul":
  19.             set {team.%player%} to 1
  20.             send "%coloured {Game.JoinTeam}% &9Azul"
  21.         if arg 1 is "vermelho":
  22.             set {team.%player%} to 2
  23.             send "%coloured {Game.JoinTeam}% &cVermelho"
  24.         if arg 1 is "verde":
  25.             set {team.%player%} to 3
  26.             send "%coloured {Game.JoinTeam}% &aVerde"
  27.         if arg 1 is "amarelo":
  28.             set {team.%player%} to 4
  29.             send "%coloured {Game.JoinTeam}% &6Amarelo"
  30.  
  31. on damage:
  32.     if {team.%attacker%} is 1:
  33.         if {team.%victim%} is 1:
  34.             cancel event
  35.     if {team.%attacker%} is 2:
  36.         if {team.%victim%} is 2:
  37.             cancel event
  38.     if {team.%attacker%} is 3:
  39.         if {team.%victim%} is 3:
  40.             cancel event
  41.     if {team.%attacker%} is 4:
  42.         if {team.%victim%} is 4:
  43.             cancel event
  44.            
  45. #setup
  46. command /tsw [<text>] [<text>]:
  47.     permission: tsw.admin
  48.     permission message: &cVoce nao tem permissao para isso
  49.     trigger:
  50.         if arg 1 is not set:
  51.             send "&6/tsw setspawn [Time] :: Times: &fblue, red, yellow, green"
  52.             send "&6/tsw setlobby :: Set o Lobby"
  53.             send "&6/tsw forcestart :: Inicie uma partida"
  54.             send "&6/tsw join :: entre no jogo"
  55.            
  56.         if arg 1 is "setspawn":
  57.             if arg 2 is "blue":
  58.                 set {blue.spawn} to location of player
  59.                 send "&eSpawn &9Azul &eSetado"
  60.             if arg 2 is "red":
  61.                 set {red.spawn} to location of player
  62.                 send "&eSpawn &cVermelho &eSetado"
  63.             if arg 2 is "yellow":
  64.                 set {yellow.spawn} to location of player
  65.                 send "&eSpawn &6Amarelo &eSetado"
  66.             if arg 2 is "green":
  67.                 set {green.spawn} to location of player
  68.                 send "&eSpawn &aVerde &eSetado"
  69.                
  70.         if arg 1 is "setlobby":
  71.             set {lobby.loc} to location of player
  72.             send "&eLobby setado com sucesso"
  73.            
  74.         if arg 1 is "forcestart":
  75.             make player execute command "/start"
  76.            
  77.         if arg 1 is "join":
  78.             set {lobby.arena01} to true
  79.             teleport player to {lobby.loc}
  80.             loop all players in world "Arena01":
  81.                 send "&6%player% entrou no jogo &7(%{world.arena01}%/12)" to loop-player
  82.            
  83.            
  84.            
  85. #commando-start    
  86. command /start:
  87.     permission: teamskywars.admin
  88.     permission message: &cSem permissao para isso
  89.     trigger:
  90.         loop all players:
  91.             make loop-player execute command "/startp1"
  92.  
  93. command /startp1:
  94.     trigger:
  95.         set {_session} to new edit session in player's world with limit -1
  96.         set {_var.%player%} to 10
  97.         loop 10 times:
  98.             wipe player's sidebar
  99.             send "&eSkyWars iniciando em %{_var.%player%}%" to player
  100.             set name of sidebar of player to "&e&lTeamSkyWars"
  101.             set score "&b" in sidebar of player to 9
  102.             set score "&fPlayer:" in sidebar of player to 8
  103.             set score "&a%player%" in sidebar of player to 7
  104.             set score "&3" in sidebar of player to 6
  105.             set score "&fMapa:" in sidebar of player to 5
  106.             set score "&aArena01" in sidebar of player to 4
  107.             set score "&2" in sidebar of player to 3
  108.             set score "&fIniciando em &a%{_var.%player%}%" in sidebar of player to 2
  109.             set score "&n" in sidebar of player to 1
  110.             set score "&enockplugins.net" in sidebar of player to 0
  111.             remove 1 from {_var.%player%}
  112.             wait 1 second
  113.         if {team.%player%} is 1:
  114.             teleport player to {blue.spawn}
  115.             paste schem "plugins/TeamSkyWars/Cages/cage-blue" at {blue.spawn} using {_session} ignoring air
  116.         if {team.%player%} is 2:
  117.             teleport player to {red.spawn}
  118.             paste schem "plugins/TeamSkyWars/Cages/cage-red" at {red.spawn} using {_session} ignoring air
  119.         if {team.%player%} is 3:
  120.             teleport player to {green.spawn}
  121.             paste schem "plugins/TeamSkyWars/Cages/cage-green" at {green.spawn} using {_session} ignoring air
  122.         if {team.%player%} is 4:
  123.             teleport player to {yellow.spawn}
  124.             paste schem "plugins/TeamSkyWars/Cages/cage-yellow" at {yellow.spawn} using {_session} ignoring air
  125.            
  126.         wipe player's sidebar
  127.         set name of sidebar of player to "&e&lTeamSkyWars"
  128.         set score "&b" in sidebar of player to 9
  129.         set score "&fPlayer:" in sidebar of player to 8
  130.         set score "&a%player%" in sidebar of player to 7
  131.         set score "&3" in sidebar of player to 6
  132.         set score "&fMapa:" in sidebar of player to 5
  133.         set score "&aArena01" in sidebar of player to 4
  134.         set score "&2" in sidebar of player to 3
  135.         set score "&cLiberando Cage &a15" in sidebar of player to 2
  136.         set score "&n" in sidebar of player to 1
  137.         set score "&enockplugins.net" in sidebar of player to 0
  138.         wait 5 seconds
  139.         wipe player's sidebar
  140.         set name of sidebar of player to "&e&lTeamSkyWars"
  141.         set score "&b" in sidebar of player to 9
  142.         set score "&fPlayer:" in sidebar of player to 8
  143.         set score "&a%player%" in sidebar of player to 7
  144.         set score "&3" in sidebar of player to 6
  145.         set score "&fMapa:" in sidebar of player to 5
  146.         set score "&aArena01" in sidebar of player to 4
  147.         set score "&2" in sidebar of player to 3
  148.         set score "&cLiberando Cage &a10" in sidebar of player to 2
  149.         set score "&n" in sidebar of player to 1
  150.         set score "&enockplugins.net" in sidebar of player to 0
  151.         wait 5 seconds
  152.         set {_t.cage.%player%} to 5
  153.         loop 5 times:
  154.             send player title "&c%{_t.cage.%player%}%" with subtitle "&ePrepare-Se para a Luta" for 1 second
  155.             play "CLICK" to player
  156.             wipe player's sidebar
  157.             set name of sidebar of player to "&e&lTeamSkyWars"
  158.             set score "&b" in sidebar of player to 9
  159.             set score "&fPlayer:" in sidebar of player to 8
  160.             set score "&a%player%" in sidebar of player to 7
  161.             set score "&3" in sidebar of player to 6
  162.             set score "&fMapa:" in sidebar of player to 5
  163.             set score "&aArena01" in sidebar of player to 4
  164.             set score "&2" in sidebar of player to 3
  165.             set score "&cLiberando Cage &a%{_t.cage.%player%}%" in sidebar of player to 2
  166.             set score "&n" in sidebar of player to 1
  167.             set score "&enockplugins.net" in sidebar of player to 0            
  168.             remove 1 from {_t.cage.%player%}
  169.             wait 1 second
  170.         undo changes of {_session}
  171.         wipe player's sidebar
  172.         loop blocks in radius 5 of player:
  173.             set loop-block to air
  174.         set {lobby.arena01} to false
  175.         set {ingame.arena01} to true
  176.    
  177. #build-off
  178. on break:
  179.     if {lobby.arena01} is true:
  180.         cancel event
  181. on place:
  182.     if {lobby.arena01} is true:
  183.         cancel event
  184.        
  185. every 1 tick:
  186.     set {world.arena01} to number of players in world "Arena01"
  187.     set line 3 of block at {sign.position} to "%{world.arena01}%/12"
  188.     if {ingame.arena01} is true:
  189.         set {state.arena01} to "&cEm Jogo"
  190.     else:
  191.         set {state.arena01} to "&aEsperando"
  192.     set line 4 of block at {sign.position} to "%{state.arena01}%"
  193.        
  194. on rightclick on sign:
  195.     if line 1 of clicked block is "&e&lSkyWars":       
  196.         if line 2 of clicked block is "&9Arena01":
  197.             if line 4 of clicked block is "&aEsperando":
  198.                 make player execute command "tsw join"
  199.             else:
  200.                 send "&cja esta em Jogo"
  201.            
  202.    
  203. on rightclick on sign:
  204.     if player is holding stick named "&a&lSign Selector &7(Right Click)":
  205.         set {sign.position} to location of target block
  206.         send "&eSign setado para %{sign.position}%"
  207.         set line 1 of target block to "&e&lSkyWars"
  208.         set line 2 of target block to "&9Arena01"
  209.        
  210. command /sign:
  211.     trigger:
  212.         set slot 0 of player to stick named "&a&lSign Selector &7(Right Click)"
  213.        
  214.        
  215.        
  216. command /fix:
  217.     trigger:
  218.         set {lobby.arena01} to false
  219.         set {ingame.arena01} to false
Advertisement
Add Comment
Please, Sign In to add comment