Guest User

Untitled

a guest
Feb 1st, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.99 KB | None | 0 0
  1. command /team [<text>] [<player>]:
  2.     trigger:
  3.         if arg 1 is "Blue":
  4.             set {Equipe::%arg-player%} to "Blue"
  5.             set arg-player tab name to "&9%arg-player%"
  6.            
  7.             #FLECHE
  8.             add 1 to {Fleche.Blue.NB}
  9.             set {Fleche.Blue.%{Fleche.Blue.NB}%} to arg-player
  10.            
  11.             send "&9%arg-player%&f est désormais dans l'équipe &9Bleue"
  12.            
  13. command /reset:
  14.     trigger:
  15.         clear {Equipe::*}
  16.         set {Fleche.Blue.NB} to 0
  17.         clear {Fleche.Blue.1}
  18.         clear {Fleche.Blue.2}
  19.         clear {Fleche.Blue.3}
  20.         clear {Fleche.Blue.4}
  21.         send "&2&lOK ! :)"
  22.        
  23. command /info:
  24.     trigger:
  25.         send "%{Fleche.Blue.NB}%"
  26.         send "%{Fleche.Blue.1}%"
  27.         send "%{Fleche.Blue.2}%"
  28.            
  29.            
  30. every 1 seconds:
  31.     make all players execute command "/timermaj"
  32.    
  33. command /timermaj:
  34.     trigger:
  35.         display board named "" to player
  36.         set name of sidebar of player to "   &3Jeu &bI   "
  37.         set score " " in sidebar of player to 5
  38.        
  39.                                     #---------------------------------------------------------------------------#
  40.                                     #                           EQUIPE BLEUE JOUEUR1                            #
  41.                                     #---------------------------------------------------------------------------#
  42.        
  43.         set {_coordx1P1} to x-position of player
  44.         set {_coordx2P1} to x-position of {Fleche.Blue.1}
  45.         set {_distxP1} to {_coordx2P1}-{_coordx1P1}
  46.         set {_coordz1P1} to z-position of player
  47.         set {_coordz2P1} to z-position of {Fleche.Blue.1}
  48.         set {_distzP1} to {_coordz2P1}-{_coordz1P1}
  49.         set {_distxzP1} to sqrt of ({_distxP1}^2+{_distzP1}^2)
  50.         set {_cosangleP1} to {_distxP1} / {_distxzP1}
  51.         set {_sinangleP1} to {_distzP1} / {_distxzP1}
  52.        
  53.         if distance between player and {Fleche.Blue.1} is less than or equal to 50:
  54.             set {Fleche.Color.%player%} to "&b&l"
  55.         if distance between player and {Fleche.Blue.1} is more than or equal to 100:
  56.             set {Fleche.Color.%player%} to "&9&l"
  57.         if distance between player and {Fleche.Blue.1} is more than or equal to 200:
  58.             set {Fleche.Color.%player%} to "&c&l"
  59.         if distance between player and {Fleche.Blue.1} is more than or equal to 350:
  60.             set {Fleche.Color.%player%} to "&4&l"
  61.        
  62.        
  63.         if {Equipe::%player%} is "Blue":
  64.             if {Fleche.Blue.1} is not player:
  65.                 if {_cosangleP1} is between -1 and -0.7:
  66.                     if player's horizontal facing is north:
  67.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  68.                     if player's horizontal facing is south:
  69.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  70.                     if player's horizontal facing is east:
  71.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  72.                     if player's horizontal facing is west:
  73.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  74.                 else if {_cosangleP1} is between 0.7 and 1:
  75.                     if player's horizontal facing is north:
  76.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  77.                     if player's horizontal facing is south:
  78.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  79.                     if player's horizontal facing is east:
  80.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  81.                     if player's horizontal facing is west:
  82.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  83.                 else if {_sinangleP1} is between 0.7 and 1:
  84.                     if player's horizontal facing is north:
  85.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  86.                     if player's horizontal facing is south:
  87.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  88.                     if player's horizontal facing is east:
  89.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  90.                     if player's horizontal facing is west:
  91.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  92.                 else:
  93.                     if player's horizontal facing is north:
  94.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  95.                     if player's horizontal facing is south:
  96.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  97.                     if player's horizontal facing is east:
  98.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  99.                     if player's horizontal facing is west:
  100.                         set score "&7&l%{Fleche.Blue.1}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  101.                        
  102.                        
  103.        
  104.                                     #---------------------------------------------------------------------------#
  105.                                     #                           EQUIPE BLEUE JOUEUR2                            #
  106.                                     #---------------------------------------------------------------------------#
  107.        
  108.         set {_coordx1P2} to x-position of player
  109.         set {_coordx2P2} to x-position of {Fleche.Blue.2}
  110.         set {_distxP2} to {_coordx2P2}-{_coordx1P2}
  111.         set {_coordz1P2} to z-position of player
  112.         set {_coordz2P2} to z-position of {Fleche.Blue.2}
  113.         set {_distzP2} to {_coordz2P2}-{_coordz1P2}
  114.         set {_distxzP2} to sqrt of ({_distxP2}^2+{_distzP2}^2)
  115.         set {_cosangleP2} to {_distxP2} / {_distxzP2}
  116.         set {_sinangleP2} to {_distzP2} / {_distxzP2}
  117.        
  118.         if distance between player and {Fleche.Blue.2} is less than or equal to 50:
  119.             set {Fleche.Color.%player%} to "&b&l"
  120.         if distance between player and {Fleche.Blue.2} is more than or equal to 100:
  121.             set {Fleche.Color.%player%} to "&9&l"
  122.         if distance between player and {Fleche.Blue.2} is more than or equal to 200:
  123.             set {Fleche.Color.%player%} to "&c&l"
  124.         if distance between player and {Fleche.Blue.2} is more than or equal to 350:
  125.             set {Fleche.Color.%player%} to "&4&l"
  126.        
  127.        
  128.         if {Equipe::%player%} is "Blue":
  129.             if {Fleche.Blue.2} is not player:
  130.                 if {_cosangleP2} is between -1 and -0.7:
  131.                     if player's horizontal facing is north:
  132.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  133.                     if player's horizontal facing is south:
  134.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  135.                     if player's horizontal facing is east:
  136.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  137.                     if player's horizontal facing is west:
  138.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  139.                 else if {_cosangleP2} is between 0.7 and 1:
  140.                     if player's horizontal facing is north:
  141.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  142.                     if player's horizontal facing is south:
  143.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  144.                     if player's horizontal facing is east:
  145.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  146.                     if player's horizontal facing is west:
  147.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  148.                 else if {_sinangleP2} is between 0.7 and 1:
  149.                     if player's horizontal facing is north:
  150.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  151.                     if player's horizontal facing is south:
  152.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  153.                     if player's horizontal facing is east:
  154.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
  155.                     if player's horizontal facing is west:
  156.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  157.                 else:
  158.                     if player's horizontal facing is north:
  159.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%^" in sidebar of player to 5
  160.                     if player's horizontal facing is south:
  161.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%v" in sidebar of player to 5
  162.                     if player's horizontal facing is east:
  163.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%<" in sidebar of player to 5
  164.                     if player's horizontal facing is west:
  165.                         set score "&7&l%{Fleche.Blue.2}% %{Fleche.Color.%player%}%>" in sidebar of player to 5
Add Comment
Please, Sign In to add comment