Facebook
From xN0MANDx, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 350
  1. #---------------------------------#
  2. # Autor - xN0MANDx                #
  3. # Skrypt - CraftStrike - CS       #
  4. # Wersja - 1.1.2                  #
  5. # Zakaz Kopiowania Skryptu Na     #
  6. # Inne Fora I Usuwanie Informacji #
  7. # O Autorze Oto Tego Skryptu      #
  8. #---------------------------------#
  9.  
  10. #---------#
  11. # [OPCJE] #
  12. #---------#
  13.            
  14. variables:
  15.     {EQ.%player%} = false
  16.     {RundaCS.%player%} = false
  17.     {Red.CS} = false
  18.     {Blue.CS} = false
  19.     {Lobby.CS} = false
  20.     {LobbyA.%player%} = false
  21.     {RedA.%player%} = false
  22.     {BlueA.%player%} = false
  23.     {LobbyL.CS} = 0
  24.     {RedL.CS} = 0
  25.     {BlueL.CS} = 0
  26.     {CSSpam.%player%} = false
  27.     {Czas.CS} = false
  28.     {Start.CS} = false
  29.            
  30. options:
  31.     Pasek: &9&m[----------------------------------------------------------]
  32.            
  33. #----------#
  34. # [SKRYPT] #
  35. #----------#
  36.  
  37. on skript start:
  38.     set {EQ.%all players%} to false
  39.     set {RundaCS.%all players%} to false
  40.     set {LobbyA.%all players%} to false
  41.     set {RedA.%all players%} to false
  42.     set {BlueA.%all players%} to false
  43.     set {LobbyL.CS} to 0
  44.     set {RedL.CS} to 0
  45.     set {BlueL.CS} to 0                    
  46.     set {CSSpam.%all players%} to false
  47.     set {Czas.CS} to false
  48.     send "[CraftStrike] Uruchomiono Skrypt" to console
  49.                
  50. command /CS [<text>] [<text>]:
  51.     trigger:
  52.         if arg 1 is not set:
  53.             send "{@Pasek}"
  54.             if player has permission "Admin.CS":
  55.                 send "&e&o/CS Ustaw Red &8- &f&oUstawia respawn druzyny czerwonych"
  56.                 send "&e&o/CS Ustaw Blue &8- &f&oUstawia respawn druzyny niebieskich"
  57.                 send "&e&o/CS Ustaw Lobby &8- &f&oUstawia poczekalnie gry CraftStrike"
  58.                 send "&e&o/CS Restart &8- &f&oRestartuje cale statystyki gry itp (Przydatne gdy sie buguje)"
  59.             send "&e&o/CS Dolacz &8- &f&oDolacza automatycznie do gry CraftStrike"
  60.             send "&e&o/CS Start &8- &f&oNatychmiastowy Start &7&o[Musi byc conajmniej 1 czerwony i 1 niebieski]"
  61.             send "&e&o/CS Wyjdz &8- &f&oWychodzi z gry CraftStrike"
  62.             send "&e&o/CS Lista &8- &f&oLista graczy"
  63.             send "&6&oAutor Skryptu &8- &a&oxN0MANDx"
  64.             send "&6&oWersja Skryptu &8- &a&o1.1.2"
  65.             send "{@Pasek}"
  66.         if arg 1 is "Lista":
  67.             send "{@Pasek}"
  68.             send "&a&o[&6&oCS&a&o] &b&oLista Graczy Czerwony: &6&o%{RedL.CS}%"
  69.             send "&a&o[&6&oCS&a&o] &b&oLista Graczy Niebieskich: &6&o%{BlueL.CS}%"
  70.             send "&a&o[&6&oCS&a&o] &b&oLista Graczy Oczekujacych: &6&o%{LobbyL.CS}%"
  71.             send "{@Pasek}"
  72.         if arg 1 is "Ustaw":
  73.             if player has permission "Admin.CS":
  74.                 if arg 2 is "Red":
  75.                     set {Red.Spawn} to location of player
  76.                     send "{@Pasek}"
  77.                     message "&9Spawn czerwonych ustawiony"
  78.                     set {Red.CS} to true
  79.                     send "{@Pasek}"
  80.                 if arg 2 is "Blue":
  81.                     set {Blue.Spawn} to location of player
  82.                     send "{@Pasek}"
  83.                     message "&9Spawn niebieskich ustawiony"
  84.                     set {Blue.CS} to true
  85.                     send "{@Pasek}"
  86.                 if arg 2 is "Lobby":
  87.                     set {Lobby.Spawn} to location of player
  88.                     send "{@Pasek}"
  89.                     message "&9SPoczekalnie ustawiono"
  90.                     set {Lobby.CS} to true
  91.                     send "{@Pasek}"
  92.             else:
  93.                 send "{@Pasek}"
  94.                 send "&a&l[&b&lCS&a&l] &c&lNIE POSIADASZ UPRAWNIENIA DO TEGO DZIALANIA!"
  95.                 send "{@Pasek}"
  96.         if arg 1 is "Start":
  97.             if player has permission "Plus.CS":
  98.                 if {RundaCS.%player%} is true:
  99.                     if {Czas.CS} is false:
  100.                         if {Start.CS} is false:
  101.                             if {BlueL.CS} is more than or equal to 1:
  102.                                 if {RedL.CS} is more than or equal to 1:
  103.                                     loop all players:
  104.                                         if {RundaCS.%loop-player%} is true:
  105.                                             set {Start.CS} to true
  106.                                             teleport the loop-player to {Lobby.Spawn}
  107.                                             set {Czas.CS} to false
  108.                                             send "&5&lWymuszono Start Areny!" to loop-player
  109.                                             send "&5&l20 SEKUND DO STARTU!" to loop-player
  110.                                             send "&5&lWYBIERZCIE DRUZYNY [CI CO NIE WYBRALI]!" to loop-player
  111.                                             send "{@Pasek}" to loop-player
  112.                                             wait 20 second
  113.                                             if {RedA.%loop-player%} is true:
  114.                                                 set {Czas.CS} to true
  115.                                                 set {Start.CS} to true
  116.                                                 teleport the loop-player to {Red.Spawn}
  117.                                                 equip loop-player with Leather Helmet
  118.                                                 dye loop-player's helmet (255, 1, 1)
  119.                                                 equip loop-player with Leather Chestplate
  120.                                                 dye loop-player's chestplate (255, 1, 1)
  121.                                                 equip loop-player with Leather Leggings
  122.                                                 dye loop-player's leggings (255, 1, 1)
  123.                                                 equip loop-player with Leather Boots
  124.                                                 dye loop-player's boots (255, 1, 1)
  125.                                                 send "&b&oCzas Zaczac Strzelanine [180 Sekund Do Konca Rundy]" to loop-player
  126.                                                 execute console command "give %loop-player% 417 1 name:&e&oKarabinek"
  127.                                                 execute console command "give %loop-player% 418 1 name:&e&oPistolet"
  128.                                             else:
  129.                                                 if {BlueA.%loop-player%} is true:
  130.                                                     teleport the loop-player to {Blue.Spawn}
  131.                                                     equip loop-player with Leather Helmet
  132.                                                     dye loop-player's helmet (1, 255, 255)
  133.                                                     equip loop-player with Leather Chestplate
  134.                                                     dye loop-player's chestplate (1, 255, 255)
  135.                                                     equip loop-player with Leather Leggings
  136.                                                     dye loop-player's leggings (1, 255, 255)
  137.                                                     equip loop-player with Leather Boots
  138.                                                     dye loop-player's boots (1, 255, 255)
  139.                                                     send "&b&oCzas Zaczac Strzelanine [180 Sekund Do Konca Rundy]" to loop-player
  140.                                                     execute console command "give %loop-player% 417 1 name:&e&oKarabinek"
  141.                                                     execute console command "give %loop-player% 418 1 name:&e&oPistolet"
  142.                                 else:
  143.                                     send "&4Nie mozesz grac bez przeciwnikow" to player
  144.                                     stop
  145.                             else:
  146.                                 send "&4Nie mozesz grac bez przeciwnikow" to player
  147.                                 stop
  148.                         else:
  149.                             send "&4Gra sie juz rozpoczela" to player
  150.                             stop
  151.                     else:
  152.                         send "&4Gra sie juz rozpoczela" to player
  153.                         stop
  154.                 else:
  155.                     send "&4Nie jestes uczestnikiem gry" to player
  156.                     stop
  157.             else:
  158.                 send "{@Pasek}"
  159.                 send "&a&l[&b&lCS&a&l] &c&lNIE POSIADASZ UPRAWNIENIA DO TEGO DZIALANIA!"
  160.                 send "{@Pasek}"
  161.                 stop
  162.         if arg 1 is "Restart":
  163.             if player has permission "Admin.CS":
  164.                 send "&c&oCraftStrike Zostal Zrestartowany Gracze Zostali Podporzadkowani!"
  165.                 loop all players:
  166.                     if {RundaCS.%loop-player%} is true:
  167.                         restore inventory of loop-player from {ekwipunek.%loop-players%}
  168.                         equip loop-player with {Helm.%loop-players%} parsed as item
  169.                         equip loop-player with {Zbroja.%loop-players%} parsed as item
  170.                         equip loop-player with {Spodnie.%loop-players%} parsed as item
  171.                         equip loop-player with {Buty.%loop-players%} parsed as item
  172.                         teleport the loop-player to {BackGame.%loop-player%}
  173.                         send "&4&oAdmin zrestartował CraftStrike zapraszamy ponownie" to loop-player
  174.                 set {EQ.%all players%} to false
  175.                 set {RundaCS.%all players%} to false
  176.                 set {LobbyA.%all players%} to false
  177.                 set {RedA.%all players%} to false
  178.                 set {BlueA.%all players%} to false
  179.                 set {LobbyL.CS} to 0
  180.                 set {RedL.CS} to 0
  181.                 set {BlueL.CS} to 0
  182.                 set {CSSpam.%all players%} to false
  183.                 set {Czas.CS} to false
  184.                 loop all players:
  185.                     set {EQ.%loop-player%} to false
  186.                     set {RundaCS.%loop-player%} to false
  187.                     set {LobbyA.%loop-player%} to false
  188.                     set {RedA.%loop-player%} to false
  189.                     set {BlueA.%loop-player%} to false
  190.                     set {CSSpam.%loop-players%} to false
  191.             else:
  192.                 send "{@Pasek}"
  193.                 send "&a&l[&b&lCS&a&l] &c&lNIE POSIADASZ UPRAWNIENIA DO TEGO DZIALANIA!"
  194.                 send "{@Pasek}"
  195.         if arg 1 is "Dolacz":
  196.             if {Red.CS} and {Blue.CS} and {Lobby.CS} is true:
  197.                 if {RundaCS.%player%} is false:
  198.                     heal player
  199.                     set {BackGame.%player%} to location of player
  200.                     set {ekwipunek.%player%} to serialized inventory of player
  201.                     teleport the player to {Lobby.Spawn}
  202.                     set {Helm.%player%} to "%helmet of the player%"
  203.                     set {Zbroja.%player%} to "%chestplate of the player%"
  204.                     set {Spodnie.%player%} to "%legging of the player%"
  205.                     set {Buty.%player%} to "%boots of the player%"
  206.                     set {EQ.%player%} to true
  207.                     set {RundaCS.%player%} to true
  208.                     add 1 to {LobbyL.CS}
  209.                     set {LobbyA.%player%} to true
  210.                     wait 0.1 second
  211.                     execute console command "clear %player%"
  212.                     loop all players:
  213.                         if {LobbyA.%loop-player%} is true:
  214.                             send "&b&oLista Graczy Oczekujacych: &6&o%{LobbyL.CS}%" to loop-player
  215.                 else:
  216.                     send "&a&l[&b&lCS&a&l] &c&lJESTES JUZ W GRZE"
  217.             else:
  218.                 send "&c&lADMIN NIE USTAWIL WSZYSTKICH STANOWISK GRY"
  219.         if arg 1 is "Wyjdz":
  220.             if {RundaCS.%player%} is true:
  221.                 execute console command "clear %player%"
  222.                 heal player
  223.                 teleport the player to {BackGame.%player%}
  224.                 restore inventory of player from {ekwipunek.%player%}
  225.                 equip player with {Helm.%player%} parsed as item
  226.                 equip player with {Zbroja.%player%} parsed as item
  227.                 equip player with {Spodnie.%player%} parsed as item
  228.                 equip player with {Buty.%player%} parsed as item
  229.                 set {EQ.%player%} to false
  230.                 set {RundaCS.%player%} to false
  231.                 set {CSSpam.%player%} to false
  232.                 if {LobbyA.%player%} is true:
  233.                     remove 1 from {LobbyL.CS}
  234.                     set {LobbyA.%player%} to false
  235.                 if {BlueA.%player%} is true:
  236.                     remove 1 from {BlueL.CS}
  237.                     set {BlueA.%player%} to false
  238.                 if {RedA.%player%} is true:
  239.                     remove 1 from {RedL.CS}
  240.                     set {RedA.%player%} to false
  241.             else:
  242.                 send "&a&l[&b&lCS&a&l] &c&lABY WYJSC Z GRY MUSISZ BYC W GRZE"
  243.            
  244. on login:
  245.     wait 5 second
  246.     if {EQ.%player%} is true:
  247.         restore inventory of player from {ekwipunek.%player%}
  248.         equip player with {Helm.%player%} parsed as item
  249.         equip player with {Zbroja.%player%} parsed as item
  250.         equip player with {Spodnie.%player%} parsed as item
  251.         equip player with {Buty.%player%} parsed as item
  252.         set {EQ.%player%} to false
  253.     if {RundaCS.%player%} is true:
  254.         set {RundaCS.%player%} to false
  255.         teleport the player to {BackGame.%player%}
  256.        
  257. on quit:
  258.     if {RundaCS.%player%} is true:
  259.         broadcast "&a&l[&b&lCS&a&l] %player% wyszedł z serwera w trakcie CraftStrike"
  260.         if {LobbyA.%player%} is true:
  261.             remove 1 from {LobbyL.CS}
  262.             set {LobbyA.%player%} to false
  263.         if {BlueA.%player%} is true:
  264.             remove 1 from {BlueL.CS}
  265.             set {BlueA.%player%} to false
  266.         if {RedA.%player%} is true:
  267.             remove 1 from {RedL.CS}
  268.             set {RedA.%player%} to false
  269.         set {CSSpam.%player%} to false
  270.            
  271. on rightclick on sign:
  272.     If line 1 is "&9[CS]":
  273.         If line 2 is "Blue":
  274.             if {RundaCS.%player%} is true:
  275.                 if {RedA.%player%} is true:
  276.                     if {Czas.CS} is false:
  277.                         set {CSSpam.%player%} to true
  278.                         remove 1 from {RedL.CS}
  279.                         set {RedA.%player%} to false
  280.                         send "&a&oZmieniles druzyne na niebieska" to player
  281.                         add 1 to {BlueL.CS}
  282.                         set {BlueA.%player%} to true
  283.                         loop all players:
  284.                             if {RundaCS.%loop-player%} is true:
  285.                                 send "&b&oLista Graczy Niebieskich: &6&o%{BlueL.CS}%" to loop-player
  286.                                 stop
  287.                     else:
  288.                         send "&7&oPoczekaj az skonczy sie runda i bedzie mozna wybierac druzyny"
  289.                 else:
  290.                     if {CSSpam.%player%} is false:
  291.                         if {Czas.CS} is false:
  292.                             remove 1 from {LobbyL.CS}
  293.                             set {LobbyA.%player%} to false
  294.                             add 1 to {BlueL.CS}
  295.                             set {BlueA.%player%} to true
  296.                             set {CSSpam.%player%} to true
  297.                             send "&a&oWybrales Druzyne &bNiebieska"
  298.                             loop all players:
  299.                                 if {RundaCS.%loop-player%} is true:
  300.                                     send "&b&oLista Graczy Niebieskich: &6&o%{BlueL.CS}%" to loop-player
  301.                                     stop
  302.                         else:
  303.                             send "&7&oPoczekaj az skonczy sie runda i bedzie mozna wybierac druzyny"
  304.         If line 2 is "Red":
  305.             if {RundaCS.%player%} is true:
  306.                 if {BlueA.%player%} is true:
  307.                     if {Czas.CS} is false:
  308.                         set {CSSpam.%player%} to true
  309.                         remove 1 from {BlueL.CS}
  310.                         set {BlueA.%player%} to false
  311.                         send "&a&oZmieniles druzyne na czerwona" to player
  312.                         add 1 to {RedL.CS}
  313.                         set {RedA.%player%} to true
  314.                         loop all players:
  315.                             if {RundaCS.%loop-player%} is true:
  316.                                 send "&b&oLista Graczy Czerwony: &6&o%{RedL.CS}%" to loop-player
  317.                                 stop
  318.                 else:
  319.                     if {CSSpam.%player%} is false:
  320.                         if {Czas.CS} is false:
  321.                             remove 1 from {LobbyL.CS}
  322.                             set {LobbyA.%player%} to false
  323.                             add 1 to {RedL.CS}
  324.                             set {RedA.%player%} to true
  325.                             set {CSSpam.%player%} to true
  326.                             send "&a&oWybrales Druzyne &cCzerwona"
  327.                             loop all players:
  328.                                 if {RundaCS.%loop-player%} is true:
  329.                                     send "&b&oLista Graczy Czerwony: &6&o%{RedL.CS}%" to loop-player
  330.                                     stop
  331.                         else:
  332.                             send "&7&oPoczekaj az skonczy sie runda i bedzie mozna wybierac druzyny"
  333.                            
  334. on death:
  335.     if {RundaCS.%victim%} is true:
  336.         clear drops
  337.         if {RedA.%victim%} is true:
  338.             add 1 to {LobbyL.CS}
  339.             set {LobbyA.%victim%} to true
  340.             remove 1 from {RedL.CS}
  341.             set {RedA.%victim%} to false
  342.             set {CSSpam.%victim%} to false
  343.             teleport the victim to {Lobby.Spawn}
  344.         if {BlueA.%victim%} is true:
  345.             add 1 to {LobbyL.CS}
  346.             set {LobbyA.%victim%} to true
  347.             remove 1 from {BlueL.CS}
  348.             set {BlueA.%victim%} to false
  349.             set {CSSpam.%victim%} to false
  350.             teleport the victim to {Lobby.Spawn}
  351.         loop all players:
  352.             if {RundaCS.%loop-player%} is true:
  353.                 send "&2%player% &4zostal zastrzelony" to loop-player
  354.                 send "&b&oLista Graczy Czerwony: &6&o%{RedL.CS}%" to loop-player
  355.                 send "&b&oLista Graczy Niebieskich: &6&o%{BlueL.CS}%" to loop-player
  356.                 send "&b&oLista Graczy Oczekujacych: &6&o%{LobbyL.CS}%" to loop-player
  357.            
  358. on respawn:
  359.     if {RundaCS.%player%} is true:
  360.         teleport the player to {Lobby.Spawn}
  361.            
  362. on death:
  363.     if {RundaCS.%victim%} is true:
  364.         wait 1 second
  365.         if {BlueL.CS} is equal to 0:
  366.             broadcast "&6&l[CS] &a&oDruzyna czerwona pokonala niebieskich"
  367.             loop all players:
  368.                 if {RedA.%loop-player%} is true:
  369.                     teleport the loop-player to {Lobby.Spawn}  
  370.                     execute console command "clear %loop-player%"
  371.                     stop
  372.         if {RedL.CS} is equal to 0:
  373.             broadcast "&6&l[CS] &a&oDruzyna niebieska pokonala czerwonych"
  374.             loop all players:
  375.                 if {BlueA.%loop-player%} is true:
  376.                     teleport the loop-player to {Lobby.Spawn}  
  377.                     execute console command "clear %loop-player%"
  378.                     stop
  379.                        
  380. on damage:
  381.     if {RundaCS.%attacker%} is true:
  382.         cancel event
  383.  
  384. # Powyzsze 3 linijki po to aby gracze sie nie masturbowali :D
  385.            
  386. #---------#
  387. # [RUNDA] #
  388. #---------#
  389.                            
  390. every 180 second:
  391.     loop all players:
  392.         if {RundaCS.%loop-player%} is true:
  393.             teleport the loop-player to {Lobby.Spawn}
  394.             set {Czas.CS} to false
  395.             send "{@Pasek}" to loop-player
  396.             send "&5&lSKONCZYLA SIE RUNDA!" to loop-player
  397.             send "&5&l20 SEKUND DO STARTU NOWEJ!" to loop-player
  398.             send "&5&lWYBIERZCIE DRUZYNY!" to loop-player
  399.             send "{@Pasek}" to loop-player
  400.     wait 20 second
  401.     if {BlueL.CS} is more than or equal to 1:
  402.         if {RedL.CS} is more than or equal to 1:
  403.             loop all players:
  404.                 if {RundaCS.%loop-player%} is true:
  405.                     if {RedA.%loop-player%} is true:
  406.                         set {Czas.CS} to true
  407.                         teleport the loop-player to {Red.Spawn}
  408.                         equip loop-player with Leather Helmet
  409.                         dye loop-player's helmet (255, 1, 1)
  410.                         equip loop-player with Leather Chestplate
  411.                         dye loop-player's chestplate (255, 1, 1)
  412.                         equip loop-player with Leather Leggings
  413.                         dye loop-player's leggings (255, 1, 1)
  414.                         equip loop-player with Leather Boots
  415.                         dye loop-player's boots (255, 1, 1)
  416.                         send "&b&oCzas Zaczac Strzelanine [180 Sekund Do Konca Rundy]" to loop-player
  417.                         execute console command "give %loop-player% 417 1 name:&e&oKarabinek"
  418.                         execute console command "give %loop-player% 418 1 name:&e&oPistolet"
  419.                     if {BlueA.%loop-player%} is true:
  420.                         teleport the loop-player to {Blue.Spawn}
  421.                         equip loop-player with Leather Helmet
  422.                         dye loop-player's helmet (1, 255, 255)
  423.                         equip loop-player with Leather Chestplate
  424.                         dye loop-player's chestplate (1, 255, 255)
  425.                         equip loop-player with Leather Leggings
  426.                         dye loop-player's leggings (1, 255, 255)
  427.                         equip loop-player with Leather Boots
  428.                         dye loop-player's boots (1, 255, 255)
  429.                         send "&b&oCzas Zaczac Strzelanine [180 Sekund Do Konca Rundy]" to loop-player
  430.                         execute console command "give %loop-player% 417 1 name:&e&oKarabinek"
  431.                         execute console command "give %loop-player% 418 1 name:&e&oPistolet"
  432.         else:
  433.             loop all players:
  434.                 if {RundaCS.%loop-player%} is true:
  435.                     send "&aBrak Graczy Czerwonych Ponowna Proba Startu Gry Za 180 Sekund" to loop-player
  436.                     stop
  437.     else:
  438.         loop all players:
  439.             if {RundaCS.%loop-player%} is true:
  440.                 send "&aBrak Graczy Niebieskich Ponowna Proba Startu Gry Za 180 Sekund" to loop-player
  441.                 stop
  442.        
  443.        
  444.    
  445. #----------#
  446. # [BRONIE] #
  447. #----------#
  448.  
  449. on rightclick:
  450.     if name of player's tool is "&e&oKarabinek":
  451.         if difference between {Karabinek::%player%::lastuse} and now is smaller than 0.4 seconds:
  452.             stop
  453.         set {Karabinek::%player%::lastuse} to now
  454.         if {BlueA.%player%} is true:
  455.             if {BlueA.%targeted player%} is false:
  456.                 damage targeted player by 0.5 hearts
  457.         if {RedA.%player%} is true:
  458.             if {RedA.%targeted player%} is false:
  459.                 damage targeted player by 0.5 hearts
  460.         play raw sound "mob.zombie.woodbreak" at player with pitch 2 volume 3
  461.         spawn 20 of particle flame:0.00000000000001 offset by 0.4, -0.5, 0.4 at block above player
  462.         stop
  463.     if name of player's tool is "&e&oPistolet":
  464.         if difference between {Pistolet::%player%::lastuse} and now is smaller than 0.8 seconds:
  465.             stop
  466.         set {Pistolet::%player%::lastuse} to now
  467.         if {BlueA.%player%} is true:
  468.             if {BlueA.%targeted player%} is false:
  469.                 damage targeted player by 1 hearts
  470.         if {RedA.%player%} is true:
  471.             if {RedA.%targeted player%} is false:
  472.                 damage targeted player by 1 hearts
  473.         play raw sound "mob.zombie.woodbreak" at player with pitch 1 volume 3
  474.         spawn 20 of particle flame:0.00000000000001 offset by 0.4, -0.5, 0.4 at block above player
  475.         stop