Advertisement
BERKYT

Tau Mission

Oct 22nd, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 53.06 KB | None | 0 0
  1. import("ScarUtil.scar")
  2. import("WXPScarUtil.scar")
  3.  
  4. function OnGameSetup()
  5.    
  6.     Setup_Player(2, "BERKYT", "tau_race", 1)
  7.     Setup_Player(3, "Drone Tau", "npc_race", 0)
  8.    
  9.     g_Player2 = World_GetPlayerAt(2)
  10.    
  11.     Misc_PlayerTeamColor(g_Player2, "default_2")
  12.    
  13.     g_playerID = 0
  14.     timerWaveKroot = 0
  15.     timerFireWarrior = 0
  16.     timerTank = 0
  17.     timerSuperKroot = 0
  18.     timerSuperTank = 0
  19.     timerReinforcement = 0
  20.     timerResearch = 0
  21.     timerBase = 0
  22.     timerOneMin = 0
  23.     timerWinOrLose = 0
  24.     timerCrysis = 0
  25.     timerGlobal = 0
  26.     timerReinforcementTau = 0
  27.     timerAttackReinforcement = 0
  28.     timerWavesWarriorCount = 0
  29.     timerBaseKroot = 0
  30.     timerFifteenMin = 0
  31.     timerBaseTank = 0
  32.     timerTwelveMin = 0
  33.     timerBaseSuperKroot = 0
  34.     timerTwentyMin = 0
  35.     timerShift = 0
  36.     timer30Min = 0
  37.     g_SluggaLodout = 999
  38.     checkDarkScreen = 1
  39.     checkDarkScreen1 = 1
  40.    
  41.     checkSeePlayerArray = {1,1,1,1,1,1,1,1,1,1,1,1,1}
  42.    
  43.     checkWinOrLose = false
  44.     Fow_OFF = false -- For off or on fow -- ONLY FOR TEST'S BATTTLES----------------------------------------------------------------------------------------------------------------------------------------------------------------
  45.    
  46.     g_ObjectiveIssued = nil
  47.     g_ObjectiveEvent = nil
  48.    
  49.     sg_Bulders1 = "sg_BulderTau1"
  50.     sg_Bulders2 = "sg_BulderTau2"
  51.    
  52. end
  53.  
  54. function OnInit()
  55.  
  56.     EGroup_Destroy("eg_DeleteSPNpc")
  57.  
  58.     --Camera_FocusOnTargetMarker("mkr_Player_HQ", 0)
  59.    
  60.     Cmd_MoveToMarker(sg_Bulders1, "mkr_DebugArmy1")
  61.     Cmd_MoveToMarker(sg_Bulders2, "mkr_DebugArmy1")
  62.    
  63.     Fade_Start(2, true)
  64.    
  65.    
  66.     Util_StartNIS( EVENTS.NIS_Opening )
  67.    
  68.     --local eg = "eg_All_Sp"
  69.     --Entity_ForceAddOn(eg, "addon_tau_list_post_2)
  70.     --local eg_LPTau = "eg_LP_Tau1"
  71.  
  72.     --Objective_Exists
  73.     --Objective_ShowScreen ()
  74.        
  75.     --Player_GrantResearch ( World_GetPlayerAt(2)  "BERKYT",  String  researchName)
  76.     --Player_GrantResearch ( World_GetPlayerAt(2),  String  researchName)
  77.     --Player_SetMaxPopulationRes( World_GetPlayerAt(0),  100)
  78.    
  79.     SpawnEthereal()
  80.     --Pick()
  81.     Rule_SetupMusicPlaylist()
  82.     LpTauAddon()
  83.    
  84.     Cpu_Enable(g_Player2, false)
  85.    
  86.     Rule_Add(Rule_CheckTrigger1)
  87.     Rule_Add(Rule_CheckTrigger2)
  88.     Rule_Add(Rule_CheckTrigger3)
  89.     Rule_Add(Rule_CheckTrigger4)
  90.     Rule_Add(Rule_CheckTrigger5)
  91.     Rule_Add(Rule_CheckTrigger6)
  92.     Rule_Add(Rule_CheckTrigger7)
  93.     Rule_Add(Rule_CheckTrigger8)
  94.     Rule_Add(WinOrLose)
  95.     Rule_Add(AttackBaseTau)
  96.     Rule_Add(Rule_CheckSeePlayer1)
  97.     Rule_Add(Rule_CheckSeePlayer2)
  98.     Rule_Add(Rule_CheckSeePlayer3)
  99.     Rule_Add(Rule_CheckSeePlayer4)
  100.     Rule_Add(Rule_CheckSeePlayer5)
  101.     Rule_Add(Rule_CheckSeePlayer6)
  102.     Rule_Add(SpawnCrisis)
  103.     Rule_Add(AboutFortress)
  104.     --TEST--------------------
  105.    
  106.     --SGroup_DestroyAllSquads("sg_AllSquads") -- ONLY FOR TEST'S BATTTLES----------------------------------------------------------------------------------------------------------------------------------------------------------------
  107.     --Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_T4554TAU4", "space_marine_squad_assault", "mkr_MainHero1", 9, 9) -- ONLY FOR TEST'S BATTTLES----------------------------------------------------------------------------------------------------------------------------------------------------------------
  108.     --Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(1), "sg_T4554TAU41", "space_marine_squad_assault", "mkr_MainHero2", 9, 9) -- ONLY FOR TEST'S BATTTLES----------------------------------------------------------------------------------------------------------------------------------------------------------------
  109.     --Rule_AddOneShot(DebugArmy, 5) -- ONLY FOR TEST'S BATTTLES----------------------------------------------------------------------------------------------------------------------------------------------------------------
  110.    
  111.     --Rule_AddOneShot( TEST1, 10)
  112.     --Rule_AddOneShot( TEST2, 10)
  113.     --Rule_AddOneShot( TEST3, 10)
  114.     --Rule_AddOneShot( TEST4, 10)
  115.     --Rule_AddOneShot( TEST5, 10)
  116.     --Rule_AddOneShot( TEST6, 10)
  117.    
  118.     --TEST--------------------
  119.     Rule_AddOneShot(MainObjective, 40)
  120.     Rule_AddOneShot( Waves, 60 * 5)
  121.     Rule_AddOneShot( StartGame, 45)
  122.     Rule_AddOneShot( Testers, 7)
  123.     Rule_AddOneShot( EnjoyTheGame, 21)
  124.  
  125.     --Rule_AddOneShot(Rule_FrealLeap, 1)
  126.    
  127.     Rule_AddIntervalEx( WebMoney, 60, 3)
  128.    
  129.     Rule_AddInterval(Timer, 1)
  130.     Rule_AddInterval(Reinforcement, 1)
  131.     Rule_AddInterval(TauResearch, 1)
  132.     Rule_AddInterval(BarracudaWaves, 14 * 60)
  133.     Rule_AddInterval(WebMoneyInterval, 15 * 60)
  134.    
  135.  
  136.    
  137.     --g_SkullProbeSgName = "sg_SkullProbeR3r89efidbrgfed"
  138.     --g_EvaSquadSgName = "sg_EvaR3efpdcnbgyuik"
  139.     --g_FinalOrksSgName = "sg_ZelenieParniRrgefdipkrmnedgh"
  140.    
  141.     --FOW_RevealAll()
  142.    
  143.    
  144. end
  145.  
  146. Scar_AddInit(OnInit)
  147.  
  148. -- Base functions
  149.  
  150. function Testers()
  151.  
  152.     Util_MissionTitle("Testers: Hensuto and Demer Nkardaz")
  153.    
  154.     if(Fow_OFF) then
  155.    
  156.         FOW_RevealAll()
  157.    
  158.     end
  159.  
  160. end
  161.  
  162. function EnjoyTheGame()
  163.  
  164.     Util_MissionTitle("Enjoy the game! :)")
  165.  
  166. end
  167.  
  168. function WebMoney()
  169.  
  170.     Util_MissionTitle("WebMoney: RUB: R515364081475; USD: Z262863085617 (Check ReadMe-file)")
  171.  
  172. end
  173.  
  174. function WebMoneyInterval()
  175.  
  176.     Util_MissionTitle("WebMoney: RUB: R515364081475; USD: Z262863085617 (Check ReadMe-file)")
  177.  
  178. end
  179.  
  180. function StartGame()
  181.  
  182.     Util_StartNIS( EVENTS.NIS_StartGame )
  183.    
  184.     --FOW_RevealAll()
  185.    
  186.     --Rule_AddOneShot(Dialog, 5)
  187.    
  188.     Util_StartNIS( EVENTS.NIS_DialogShasAunroyr )
  189.    
  190.     --Util_StartNIS( EVENTS.NIS_Kroot )
  191.     --Util_StartNIS( EVENTS.NIS_SuperKroot )
  192.     --Util_StartNIS( EVENTS.NIS_FireWarrior )
  193.     --Util_StartNIS( EVENTS.NIS_Tank )
  194.     --Util_StartNIS( EVENTS.NIS_SuperTank )
  195.     --Util_StartNIS( EVENTS.NIS_Reinforcement )
  196.  
  197. end
  198.  
  199. function Dialog()
  200.  
  201.     Util_StartNIS( EVENTS.NIS_DialogShas )
  202.    
  203. end
  204.  
  205. function TEST1()
  206.     Util_StartNIS( EVENTS.NIS_Kroot )
  207. end
  208. function TEST2()
  209.     Util_StartNIS( EVENTS.NIS_SuperKroot )
  210. end
  211. function TEST3()
  212.     Util_StartNIS( EVENTS.NIS_FireWarrior )
  213. end
  214. function TEST4()
  215.     Util_StartNIS( EVENTS.NIS_Tank )
  216. end
  217. function TEST5()
  218.     Util_StartNIS( EVENTS.NIS_SuperTank )
  219. end
  220. function TEST6()
  221.     Util_StartNIS( EVENTS.NIS_Reinforcement )
  222. end
  223.  
  224. function Waves()
  225.  
  226.     timerShift = 0
  227.     Rule_AddInterval(Check_Sp1, 1)
  228.     Rule_AddInterval(Check_Sp2, 1)
  229.     Rule_AddInterval(Check_Sp3, 1)
  230.     Rule_AddInterval(Check_Sp4, 1)
  231.     Rule_AddInterval(Check_Sp5, 1)
  232.     Rule_AddInterval(BaseWaveTau, 90)
  233.  
  234. end
  235.  
  236. function MainObjective()
  237.  
  238.     Ping_Marker("mkr_PingMainObjective", false, attack)
  239.     local obj_table = {title_id = 10077899, short_desc_id = 10077900, help_tip_id = 10077901}
  240.     Objective_Add(obj_table, true)
  241.    
  242.     Ping_Marker("mkr_DebugArmy1", false, attack)
  243.     local obj_table1 = {title_id = 10077902, short_desc_id = 10077903, help_tip_id = 10077904}
  244.     Objective_Add(obj_table1, true)
  245.  
  246. end
  247.  
  248. function SpawnEthereal()
  249.  
  250.     local index = World_GetRand(1, 8)
  251.    
  252.     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_sdflkwepor3uo", "tau_ethereal_squad", "mkr_Win"..index, 1, 1)
  253.     --Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_sdflkwepor3uo", "tau_ethereal_squad", "mkr_MainHero1", 1, 1)
  254.     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "usdfoiuwhef", "tau_honor_guard_fire_warrior_squad_advance_sp", "mkr_Win"..index, 2, 9)
  255.     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "usdfoiuwhef", "tau_pathfinder_squad", "mkr_Win"..index, 2, 9)
  256.     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "usdfoiuwhef", "tau_hammerhead_gunship_squad", "mkr_Win"..index, 2, 1)
  257.     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "usdfoiuwhef", "tau_krootox_squad", "mkr_Win"..index, 2, 1)
  258.    
  259.     Cmd_SetStance("sg_sdflkwepor3uo", STANCE_StandGround)
  260.     Cpu_LockSGroupAcrossPlayers("sg_sdflkwepor3uo")
  261.  
  262. end
  263.  
  264. function TauResearch()
  265.  
  266.     if(timerResearch == 5)then
  267.    
  268.         Player_GrantResearch ( World_GetPlayerAt(2),  "tau_feral_leap_research")
  269.         print("tau_feral_leap_research")
  270.        
  271.     elseif(timerResearch == 60 * 12 + 30) then
  272.    
  273.         Player_GrantResearch ( World_GetPlayerAt(2),  "tau_wargear_upgrade_05_advanced_sensor_array_research")
  274.         print("tau_advanced_pulse_rifle_research")
  275.    
  276.     elseif(timerResearch == 60 * 16) then
  277.    
  278.         Player_GrantResearch ( World_GetPlayerAt(2),  "tau_improved_metallurgy")
  279.         print("tau_improved_metallurgy_research")
  280.         Player_GrantResearch ( World_GetPlayerAt(2),  "tau_targeting_optics")
  281.         print("tau_targeting_optics_research")
  282.    
  283.     end
  284.  
  285. end
  286.  
  287. function LpTauAddon()
  288.  
  289.     local CountArrayLp = {"eg_LP_Tau1","eg_LP_Tau2","eg_LP_Tau3","eg_LP_Tau4","eg_LP_Tau5","eg_LP_Tau6","eg_LP_Tau7","eg_LP_Tau8","eg_LP_Tau9","eg_LP_Tau10","eg_LP_Tau11",
  290.     "eg_LP_Tau12","eg_LP_Tau13","eg_LP_Tau14","eg_LP_Tau15","eg_LP_Tau16","eg_LP_Tau17","eg_LP_Tau18","eg_LP_Tau19"}
  291.  
  292.     for i = 1, table.getn(CountArrayLp) do
  293.  
  294.         if(i == 19) then
  295.        
  296.             --eg_LP_Tau19
  297.             EGroup_ForceAddOn("eg_LP_Tau19", "addon_tau_list_post_1")
  298.        
  299.         else
  300.        
  301.             EGroup_ForceAddOn("eg_LP_Tau"..i, "addon_tau_list_post_2")
  302.        
  303.         end
  304.        
  305.     end
  306.    
  307. --  EGroup_ForceAddOn("eg_LP_Tau19", "addon_tau_list_post_1")
  308.  
  309. end
  310.  
  311. function CheckEndGame()
  312.  
  313.     if (SGroup_Count("sg_sdflkwepor3uo") == 0) then
  314.    
  315.         Util_StartNIS( EVENTS.NIS_Win )
  316.    
  317.         --local title_id_1 = 10077899
  318.         --Objective_SetState ( title_id_1,  OS_Complete)
  319.        
  320.         if(checkDarkScreen1 == 1) then
  321.        
  322.             checkDarkScreen1 = 0
  323.        
  324.             Fade_Start(2, false)
  325.        
  326.         end
  327.  
  328.         checkWinOrLose = true
  329.        
  330.     end
  331.    
  332.     if (SGroup_Count(sg_Bulders1) == 0 and SGroup_Count(sg_Bulders2) == 0) then
  333.        
  334.         if(checkDarkScreen == 1) then
  335.        
  336.             checkDarkScreen = 0
  337.        
  338.             Fade_Start(2, false)
  339.        
  340.         end
  341.  
  342.         checkWinOrLose = true
  343.        
  344.     end
  345.  
  346. end
  347.  
  348. function WinOrLose()
  349.  
  350.     if(timerWinOrLose == 3) then
  351.    
  352.         World_SetGameOver()
  353.    
  354.     end
  355.  
  356. end
  357.  
  358. function DebugArmy()
  359.  
  360.     for i = 1, 7 do
  361.    
  362.         --Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_o934b65hoi5hnyb6"..i, "space_marine_squad_assault", "mkr_DebugArmy"..i, 9, 9)
  363.    
  364.         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_o934b65hoi5hnyb6"..i, "guard_squad_baneblade", "mkr_DebugArmy"..i, 5, 1)
  365.         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_o934b65hoi5hnyb6"..i, "eldar_squad_fire_prism", "mkr_DebugArmy"..i, 5, 1)
  366.         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_o934b65hoi5hnyb6"..i, "ork_squad_slugga", "mkr_DebugArmy"..i, 6, 99)
  367.    
  368.     end
  369.    
  370. end
  371.  
  372. function AttackBaseTau()
  373.  
  374.  --Player 1
  375.  
  376.     if(timerCrysis == 60) then
  377.        
  378.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture1", World_GetPlayerAt(0), false)) then
  379.  
  380.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234234")
  381.        
  382.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234234") then
  383.  
  384.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234234", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  385.                 Cmd_Capture("sg_TunnelSaboteurs_TAU234234", "eg_Sp_Capture1")  
  386.                    
  387.             end
  388.  
  389.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23424444434")
  390.        
  391.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23424444434") then
  392.  
  393.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23424444434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  394.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU23424444434", "mkr_AttackSp1")     
  395.                    
  396.             end
  397.            
  398.         end
  399.        
  400.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture2", World_GetPlayerAt(0), false)) then
  401.  
  402.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23427734")
  403.        
  404.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23427734") then
  405.  
  406.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23427734", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  407.                 Cmd_Capture("sg_TunnelSaboteurs_TAU23427734", "eg_Sp_Capture2")
  408.                    
  409.             end
  410.  
  411.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2342444114434")
  412.        
  413.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2342444114434") then
  414.  
  415.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342444114434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  416.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU2342444114434", "mkr_AttackSp2")       
  417.                    
  418.             end
  419.            
  420.         end
  421.        
  422.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture3", World_GetPlayerAt(0), false)) then
  423.  
  424.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23423qw4")
  425.        
  426.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23423qw4") then
  427.  
  428.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23423qw4", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  429.                 Cmd_Capture("sg_TunnelSaboteurs_TAU23423qw4", "eg_Sp_Capture3")
  430.                    
  431.             end
  432.  
  433.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234244f44434")
  434.        
  435.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234244f44434") then
  436.  
  437.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234244f44434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  438.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU234244f44434", "mkr_AttackSp3")    
  439.                    
  440.             end
  441.            
  442.         end
  443.  
  444.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture4", World_GetPlayerAt(0), false)) then
  445.  
  446.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234qwwqqw234")
  447.        
  448.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234qwwqqw234") then
  449.  
  450.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234qwwqqw234", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  451.                 Cmd_Capture("sg_TunnelSaboteurs_TAU234qwwqqw234", "eg_Sp_Capture4")
  452.                    
  453.             end
  454.  
  455.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234df24444434")
  456.        
  457.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234df24444434") then
  458.  
  459.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234df24444434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  460.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU234df24444434", "mkr_AttackSp4")       
  461.                    
  462.             end
  463.            
  464.         end
  465.        
  466.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture5", World_GetPlayerAt(0), false)) then
  467.  
  468.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2311121212az4234")
  469.        
  470.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2311121212az4234") then
  471.  
  472.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2311121212az4234", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  473.                 Cmd_Capture("sg_TunnelSaboteurs_TAU2311121212az4234", "eg_Sp_Capture5")
  474.                    
  475.             end
  476.  
  477.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23424444werwdf434")
  478.        
  479.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23424444werwdf434") then
  480.  
  481.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23424444werwdf434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  482.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU23424444werwdf434", "mkr_AttackSp5")       
  483.                    
  484.             end
  485.                    
  486.         end
  487.        
  488.         -- Player 2
  489.  
  490.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture1", World_GetPlayerAt(1), false)) then
  491.  
  492.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234234")
  493.        
  494.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234234") then
  495.  
  496.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234234", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  497.                 Cmd_Capture("sg_TunnelSaboteurs_TAU234234", "eg_Sp_Capture1")  
  498.                    
  499.             end
  500.  
  501.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23424444434")
  502.        
  503.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23424444434") then
  504.  
  505.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23424444434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  506.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU23424444434", "mkr_AttackSp1")     
  507.                    
  508.             end
  509.            
  510.         end
  511.        
  512.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture2", World_GetPlayerAt(1), false)) then
  513.  
  514.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23427734")
  515.        
  516.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23427734") then
  517.  
  518.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23427734", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  519.                 Cmd_Capture("sg_TunnelSaboteurs_TAU23427734", "eg_Sp_Capture2")
  520.                    
  521.             end
  522.  
  523.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2342444114434")
  524.        
  525.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2342444114434") then
  526.  
  527.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342444114434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  528.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU2342444114434", "mkr_AttackSp2")       
  529.                    
  530.             end
  531.            
  532.         end
  533.        
  534.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture3", World_GetPlayerAt(1), false)) then
  535.  
  536.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23423qw4")
  537.        
  538.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23423qw4") then
  539.  
  540.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23423qw4", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  541.                 Cmd_Capture("sg_TunnelSaboteurs_TAU23423qw4", "eg_Sp_Capture3")
  542.                    
  543.             end
  544.  
  545.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234244f44434")
  546.        
  547.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234244f44434") then
  548.  
  549.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234244f44434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  550.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU234244f44434", "mkr_AttackSp3")    
  551.                    
  552.             end
  553.            
  554.         end
  555.  
  556.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture4", World_GetPlayerAt(1), false)) then
  557.  
  558.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234qwwqqw234")
  559.        
  560.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234qwwqqw234") then
  561.  
  562.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234qwwqqw234", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  563.                 Cmd_Capture("sg_TunnelSaboteurs_TAU234qwwqqw234", "eg_Sp_Capture4")
  564.                    
  565.             end
  566.  
  567.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU234df24444434")
  568.        
  569.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU234df24444434") then
  570.  
  571.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU234df24444434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  572.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU234df24444434", "mkr_AttackSp4")       
  573.                    
  574.             end
  575.            
  576.         end
  577.        
  578.         if(EGroup_IsCapturedByPlayer("eg_Sp_Capture5", World_GetPlayerAt(1), false)) then
  579.  
  580.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2311121212az4234")
  581.        
  582.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2311121212az4234") then
  583.  
  584.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2311121212az4234", "tau_pathfinder_squad", "mkr_AttackBaseTau", 2, 3)
  585.                 Cmd_Capture("sg_TunnelSaboteurs_TAU2311121212az4234", "eg_Sp_Capture5")
  586.                    
  587.             end
  588.  
  589.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU23424444werwdf434")
  590.        
  591.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU23424444werwdf434") then
  592.  
  593.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU23424444werwdf434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 2, 3)
  594.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU23424444werwdf434", "mkr_AttackSp5")       
  595.                    
  596.             end
  597.                    
  598.         end
  599.    
  600.     end
  601.  
  602. end
  603.  
  604. function BaseWaveTau()
  605.  
  606.     --if(timerReinforcementTau > 90) then
  607.    
  608.         --timerReinforcementTau = 0
  609.        
  610.         SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434")
  611.        
  612.         if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434") then
  613.        
  614.             print("function BaseWaveTau -> if1")
  615.             -- ??????? ?? ??????? x ?? y
  616.             -- math.fmod(x, y)- eta huinya tut ne rabotaet!
  617.                
  618.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_fire_warrior_squad", "mkr_AttackBaseTau", 2, 3)
  619.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", 1, 1)
  620.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_kroot_carnivore_squad", "mkr_AttackBaseTau", 1, 5)
  621.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_pathfinder_squad", "mkr_AttackBaseTau", 1, 2)
  622.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_vespid_auxiliary_squad", "mkr_AttackBaseTau", 1, 9)
  623.            
  624.             print("math.mod(timerBase, 10) ", math.mod(timerBase, 10))
  625.            
  626.             if(timerFireWarrior > 60) then
  627.            
  628.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_stealth_team_squad", "mkr_AttackBaseTau", 1, 3)
  629.            
  630.             end
  631.            
  632.             if(math.mod(timerBase, 10) == 0 and timerBase > 1) then
  633.            
  634.                 print(math.mod(timerBase, 10))
  635.                 print("function BaseWaveTau -> if2")
  636.                        
  637.                 local countWarrior = 0
  638.                
  639.                 for i = 1, timerBase / 10 do
  640.                    
  641.                     countWarrior = i
  642.                    
  643.                 end
  644.                
  645.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_fire_warrior_squad", "mkr_AttackBaseTau", countWarrior + 1, 6)
  646.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_stealth_team_squad", "mkr_AttackBaseTau", countWarrior + 1, 3)
  647.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_crisis_suit_squad", "mkr_AttackBaseTau", countWarrior + 1, 1)
  648.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_kroot_carnivore_squad", "mkr_AttackBaseTau", countWarrior + 1, 9)
  649.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_pathfinder_squad", "mkr_AttackBaseTau", countWarrior + 1, 9)
  650.                
  651.                 if(math.mod(countWarrior, 2) == 0) then
  652.                
  653.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "tau_skyray_squad", "mkr_AttackBaseTau", countWarrior / 2 + 1, 9)               
  654.                
  655.                 end
  656.  
  657.                
  658.             end
  659.                
  660.             Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434", "mkr_Player_HQ")     
  661.            
  662.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "pweurpowieurpowier2", "tau_stealth_team_squad", "mkr_AttackBaseTau", 2, 3)
  663.            
  664.             Cmd_AttackSGroup("pweurpowieurpowier2", sg_Bulders1)
  665.            
  666.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "pweurpowieurpowier21", "tau_stealth_team_squad", "mkr_AttackBaseTau", 2, 3)
  667.            
  668.             Cmd_AttackSGroup("pweurpowieurpowier21", sg_Bulders2)
  669.            
  670.                 --sg_Bulders1 = "sg_BulderTau1"
  671.                 --sg_Bulders2 = "sg_BulderTau2"
  672.        
  673.             for i = 1, 2 do
  674.            
  675.                 SGroup_AddLeaders ( "sg_TunnelSaboteurs_TAU2342wdfgdfh444werwdf434")
  676.                 SGroup_AddLeaders ( "pweurpowieurpowier2")
  677.                 SGroup_AddLeaders ( "pweurpowieurpowier21")
  678.                
  679.             end
  680.            
  681.             if(checkSeePlayerArray[7] == 1) then
  682.            
  683.                 checkSeePlayerArray[7] = 0
  684.            
  685.                 Util_StartNIS( EVENTS.NIS_ReinforcementTau )
  686.        
  687.             elseif(checkSeePlayerArray[7] == 0) then
  688.            
  689.                 local rand = World_GetRand(1,5)
  690.                
  691.                 if(rand == 1) then
  692.                
  693.                     Util_StartNIS( EVENTS.NIS_ReinforcementTau )
  694.                
  695.                 end
  696.            
  697.             end
  698.            
  699.            
  700.         end
  701.    
  702.     --end
  703.    
  704. end
  705.  
  706. function Timer()
  707.  
  708.     CheckEndGame()
  709.  
  710.     timerShift = timerShift + 1
  711.  
  712.     timerAttackReinforcement = timerAttackReinforcement + 1
  713.  
  714.     timerReinforcementTau = timerReinforcementTau + 1
  715.  
  716.     timerGlobal = timerGlobal + 1
  717.    
  718.     --print("timerBase: ", timerBase)
  719.  
  720.     timerResearch = timerResearch + 1
  721.     timerOneMin = timerOneMin + 1
  722.    
  723.     if(timerOneMin == 60 * 10) then
  724.        
  725.         timerBase = timerBase + 10
  726.        
  727.         timerOneMin = 0
  728.    
  729.     end
  730.    
  731.     timerFifteenMin = timerFifteenMin + 1
  732.    
  733.     if(timerFifteenMin == 60 * 15) then
  734.    
  735.         timerBaseKroot = timerBaseKroot + 15
  736.        
  737.         timerFifteenMin = 0
  738.    
  739.     end
  740.    
  741.     timerTwelveMin = timerTwelveMin + 1
  742.    
  743.     if(timerTwelveMin == 60 * 12) then
  744.    
  745.         timerBaseTank = timerBaseTank + 12
  746.        
  747.         timerTwelveMin = 0
  748.    
  749.     end
  750.    
  751.     timerTwentyMin = timerTwentyMin + 1
  752.    
  753.     if(timerTwentyMin == 60 * 20) then
  754.    
  755.         timerBaseSuperKroot = timerBaseSuperKroot + 20
  756.        
  757.         timerTwentyMin = 0
  758.    
  759.     end
  760.  
  761.     if (timerTank == 241) then
  762.        
  763.         timerTank = 0
  764.    
  765.     end
  766.    
  767.     timerTank = timerTank + 1
  768.  
  769.     if (timerFireWarrior == 301) then
  770.        
  771.         timerFireWarrior = 0
  772.    
  773.     end
  774.    
  775.     timerFireWarrior = timerFireWarrior + 1
  776.    
  777.     if (timerWaveKroot == 301) then
  778.        
  779.         timerWaveKroot = 0
  780.    
  781.     end
  782.    
  783.     timerWaveKroot = timerWaveKroot + 1
  784.    
  785.     if (timerSuperKroot == 701) then
  786.  
  787.         timerSuperKroot = 0
  788.    
  789.     end
  790.    
  791.     timerSuperKroot = timerSuperKroot + 1  
  792.    
  793.    
  794.     if (timerSuperTank == 701) then
  795.  
  796.         timerSuperTank = 0
  797.    
  798.     end
  799.    
  800.     timerSuperTank = timerSuperTank + 1
  801.    
  802.    
  803.     if (timerReinforcement == 301) then
  804.  
  805.         timerReinforcement = 0
  806.    
  807.     end
  808.    
  809.     timerReinforcement = timerReinforcement + 1
  810.    
  811.     if(checkWinOrLose == true) then
  812.    
  813.         timerWinOrLose = timerWinOrLose + 1
  814.    
  815.     end
  816.    
  817.     if(timerCrysis == 61) then
  818.    
  819.         timerCrysis = 0
  820.    
  821.     end
  822.    
  823.     timerCrysis = timerCrysis + 1
  824.    
  825.     if(timer30Min == 40 * 60) then
  826.    
  827.         timer30Min = 0
  828.    
  829.     end
  830.    
  831.     timer30Min = timer30Min + 1
  832.    
  833. end
  834.  
  835. --function Pick()
  836.  
  837.     --for i = 1, 5 do
  838.    
  839.         --Ping_Marker("mkr_SpawnTauWave"..i, false, attack)
  840.    
  841.     --end
  842.  
  843. --end
  844.  
  845.  
  846. function Rule_SetupMusicPlaylist()
  847.  
  848.     Util_MissionTitle("By: BERKYT")
  849.  
  850.     t_music = {"MU_IG_STR_Tau", "MU_IG_RAC_Tau", "MU_IG_STR_Tau_perc", "MU_IG_STR_Tau_perc_str", "MU_IG_STR_Tau_perc_brass"}
  851.     Playlist_Manager( PC_Music, t_music, true, true , {20, 40})
  852.     t_ambient_sound = {"ambient_space"}
  853.     Playlist_Manager( PC_Ambient, t_ambient_sound, true, true , {2, 4})
  854.    
  855. end
  856.  
  857. function playerHasAnySquadAtMarker(playerId, mkr)
  858.  
  859.     local sgName = "sg_phasam_17684187"
  860.  
  861.     SGroup_CreateIfNotFound(sgName)
  862.     SGroup_Clear(sgName)
  863.     Player_GetAllSquadsNearMarker(playerId, sgName, mkr)
  864.  
  865.     if (SGroup_Count(sgName) > 0) then
  866.         return true
  867.     end
  868.  
  869.     return false
  870.  
  871. end
  872.  
  873. -- Game logic
  874.  
  875. --function Rule_FrealLeap()
  876.  
  877.     --Player_GrantResearch(World_GetPlayerAt(2),  "tau_feral_leap_research")
  878.  
  879. --end
  880.  
  881. function BarracudaWaves()
  882.  
  883.     SGroup_CreateIfNotFound("sg_tau_barracuda_squad")
  884.    
  885.     if SGroup_IsEmpty("sg_tau_barracuda_squad") then
  886.    
  887.         Util_CreateSquadsAtMarker(World_GetPlayerAt(2),"sg_tau_barracuda_squad","tau_barracuda_squad","mkr_AttackBaseTau",2,1)
  888.        
  889.         local rand = World_GetRand(1,3)
  890.        
  891.         if(checkSeePlayerArray[13] == 1) then
  892.            
  893.             Util_StartNIS( EVENTS.NIS_BarracudaWaves )
  894.            
  895.             print("IF1 -BarracudaWaves-")
  896.        
  897.             checkSeePlayerArray[13] = 0
  898.        
  899.         elseif(rand == 1) then
  900.        
  901.             Util_StartNIS( EVENTS.NIS_BarracudaWaves )
  902.        
  903.         end
  904.        
  905.         Cmd_AttackMoveMarker("sg_tau_barracuda_squad", "mkr_Player_HQ")
  906.    
  907.     end
  908.  
  909.    
  910. end
  911.  
  912. function AboutFortress()
  913.  
  914.     if(check2323 == nil) then
  915.    
  916.         if(playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_AboutFortress") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_AboutFortress")) then
  917.        
  918.             Util_StartNIS( EVENTS.NIS_AboutFortress )
  919.            
  920.             check2323 = true
  921.        
  922.         end
  923.    
  924.     end
  925.  
  926. end
  927.  
  928. -- Kroots
  929. function Rule_CheckSeePlayer1()
  930.  
  931.     if (g_orksFromTrigger0Created115 == nil) then
  932.    
  933.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckSeePlayer1") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckSeePlayer1")) then
  934.        
  935.             Util_StartNIS( EVENTS.NIS_Kroot )
  936.            
  937.             Ping_Marker("mkr_SpawnTauWave1", false, attack)
  938.            
  939.             g_orksFromTrigger0Created115 = true
  940.            
  941.             --?????? obj_table:
  942.             local obj_table = {title_id = 10077884, short_desc_id = 10077885, help_tip_id = 10077886}
  943.             --???????? ????? ????, ????????? ??????? ?????.
  944.             Objective_Add(obj_table, false)
  945.  
  946.             --?????????? ???? OS_Complete ??? OS_Failed
  947.            
  948.         end
  949.  
  950.     end  
  951.    
  952.     if((EGroup_IsCapturedByPlayer("eg_Sp_Capture1", World_GetPlayerAt(0), false) or EGroup_IsCapturedByPlayer("eg_Sp_Capture1", World_GetPlayerAt(1), false)) and checkSeePlayerArray[1] == 1) then
  953.  
  954.         checkSeePlayerArray[1] = 0
  955.        
  956.         local title_id_1 = 10077884
  957.         Objective_SetState ( title_id_1,  OS_Complete)
  958.            
  959.     end
  960.  
  961. end
  962. --Fire Warrior
  963. function Rule_CheckSeePlayer2()
  964.  
  965.     if (g_orksFromTrigger0Created1151 == nil) then
  966.    
  967.    
  968.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckSeePlayer2") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckSeePlayer2")) then
  969.        
  970.             Util_StartNIS( EVENTS.NIS_FireWarrior )
  971.            
  972.             --Util_StartNIS( EVENTS.NIS_Sector3 )
  973.        
  974.             Ping_Marker("mkr_SpawnTauWave2", false, attack)
  975.            
  976.             g_orksFromTrigger0Created1151 = true
  977.            
  978.             --?????? obj_table:
  979.             local obj_table = {title_id = 10077887, short_desc_id = 10077888, help_tip_id = 10077889}
  980.             --???????? ????? ????, ????????? ??????? ?????.
  981.             Objective_Add(obj_table, false)
  982.  
  983.             --?????????? ???? OS_Complete ??? OS_Failed
  984.            
  985.         end
  986.  
  987.     end  
  988.    
  989.     if((EGroup_IsCapturedByPlayer("eg_Sp_Capture2", World_GetPlayerAt(0), false) or EGroup_IsCapturedByPlayer("eg_Sp_Capture2", World_GetPlayerAt(1), false)) and checkSeePlayerArray[2] == 1) then
  990.  
  991.         checkSeePlayerArray[2] = 0
  992.        
  993.         local title_id_1 = 10077887
  994.         Objective_SetState ( title_id_1,  OS_Complete)
  995.            
  996.     end
  997.  
  998. end
  999. --Tanks
  1000. function Rule_CheckSeePlayer3()
  1001.  
  1002.     if (g_orksFromTrigger0Created1152 == nil) then
  1003.    
  1004.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckSeePlayer3") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckSeePlayer3")) then
  1005.            
  1006.             Util_StartNIS( EVENTS.NIS_Tank )
  1007.            
  1008.             Ping_Marker("mkr_SpawnTauWave3", false, attack)
  1009.            
  1010.             g_orksFromTrigger0Created1152 = true
  1011.            
  1012.             --?????? obj_table:
  1013.             local obj_table = {title_id = 10077890, short_desc_id = 10077891, help_tip_id = 10077892}
  1014.             --???????? ????? ????, ????????? ??????? ?????.
  1015.             Objective_Add(obj_table, false)
  1016.  
  1017.             --?????????? ???? OS_Complete ??? OS_Failed
  1018.            
  1019.         end
  1020.  
  1021.     end  
  1022.    
  1023.     if((EGroup_IsCapturedByPlayer("eg_Sp_Capture3", World_GetPlayerAt(0), false) or EGroup_IsCapturedByPlayer("eg_Sp_Capture3", World_GetPlayerAt(1), false)) and checkSeePlayerArray[3] == 1) then
  1024.  
  1025.         checkSeePlayerArray[3] = 0
  1026.        
  1027.         local title_id_1 = 10077890
  1028.         Objective_SetState ( title_id_1,  OS_Complete)
  1029.            
  1030.     end
  1031.  
  1032. end
  1033. --Krootox
  1034. function Rule_CheckSeePlayer4()
  1035.  
  1036.     if (g_orksFromTrigger0Created1153 == nil) then
  1037.    
  1038.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckSeePlayer4") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckSeePlayer4")) then
  1039.            
  1040.             Util_StartNIS( EVENTS.NIS_SuperKroot )
  1041.            
  1042.             Ping_Marker("mkr_SpawnTauWave4", false, attack)
  1043.            
  1044.             g_orksFromTrigger0Created1153 = true
  1045.            
  1046.             --?????? obj_table:
  1047.             local obj_table = {title_id = 10077893, short_desc_id = 10077894, help_tip_id = 10077895}
  1048.             --???????? ????? ????, ????????? ??????? ?????.
  1049.             Objective_Add(obj_table, false)
  1050.  
  1051.             --?????????? ???? OS_Complete ??? OS_Failed
  1052.            
  1053.         end
  1054.  
  1055.     end  
  1056.    
  1057.     if((EGroup_IsCapturedByPlayer("eg_Sp_Capture4", World_GetPlayerAt(0), false) or EGroup_IsCapturedByPlayer("eg_Sp_Capture4", World_GetPlayerAt(1), false)) and checkSeePlayerArray[4] == 1) then
  1058.  
  1059.         checkSeePlayerArray[4] = 0
  1060.        
  1061.         local title_id_1 = 10077893
  1062.         Objective_SetState ( title_id_1,  OS_Complete)
  1063.            
  1064.     end
  1065.  
  1066. end
  1067. --Riba Molot
  1068. function Rule_CheckSeePlayer5()
  1069.  
  1070.     if (g_orksFromTrigger0Created1154 == nil) then
  1071.    
  1072.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckSeePlayer5") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckSeePlayer5")) then
  1073.            
  1074.             Util_StartNIS( EVENTS.NIS_SuperTank )
  1075.            
  1076.             Ping_Marker("mkr_SpawnTauWave5", false, attack)
  1077.            
  1078.             g_orksFromTrigger0Created1154 = true
  1079.            
  1080.             --?????? obj_table:
  1081.             local obj_table = {title_id = 10077881, short_desc_id = 10077882, help_tip_id = 10077883}
  1082.             --???????? ????? ????, ????????? ??????? ?????.
  1083.             Objective_Add(obj_table, false)
  1084.  
  1085.             --?????????? ???? OS_Complete ??? OS_Failed
  1086.            
  1087.         end
  1088.  
  1089.     end  
  1090.    
  1091.     if((EGroup_IsCapturedByPlayer("eg_Sp_Capture5", World_GetPlayerAt(0), false) or EGroup_IsCapturedByPlayer("eg_Sp_Capture5", World_GetPlayerAt(1), false)) and checkSeePlayerArray[5] == 1) then
  1092.  
  1093.         checkSeePlayerArray[5] = 0
  1094.        
  1095.         local title_id_1 = 10077881
  1096.         Objective_SetState ( title_id_1,  OS_Complete)
  1097.            
  1098.     end
  1099.  
  1100. end
  1101. --Reinforcement
  1102. function Rule_CheckSeePlayer6()
  1103.  
  1104.     if (g_orksFromTrigger0Created1154756 == nil) then
  1105.    
  1106.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckSeePlayerReinforcementBase") or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckSeePlayerReinforcementBase")) then
  1107.            
  1108.             Util_StartNIS( EVENTS.NIS_Reinforcement )
  1109.            
  1110.             Ping_Marker("mkr_AttackAndDestroy", false, attack)
  1111.            
  1112.             g_orksFromTrigger0Created1154756 = true
  1113.            
  1114.             --?????? obj_table:
  1115.             local obj_table = {title_id = 10077896, short_desc_id = 10077897, help_tip_id = 10077898}
  1116.             --???????? ????? ????, ????????? ??????? ?????.
  1117.             Objective_Add(obj_table, false)
  1118.  
  1119.             --?????????? ???? OS_Complete ??? OS_Failed
  1120.            
  1121.         end
  1122.  
  1123.     end  
  1124.    
  1125.     if((EGroup_IsCapturedByPlayer("eg_Sp_Reinforcement", World_GetPlayerAt(0), false) or EGroup_IsCapturedByPlayer("eg_Sp_Reinforcement", World_GetPlayerAt(1), false)) and checkSeePlayerArray[6] == 1) then
  1126.  
  1127.         checkSeePlayerArray[6] = 0
  1128.        
  1129.         local title_id_1 = 10077896
  1130.         Objective_SetState ( title_id_1,  OS_Complete)
  1131.            
  1132.     end
  1133.  
  1134. end
  1135.  
  1136. function Rule_CheckTrigger1()
  1137.  
  1138.     if (g_orksFromTrigger0Created == nil) then
  1139.    
  1140.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells1")) then
  1141.        
  1142.             Util_StartNIS( EVENTS.NIS_Sector3 )
  1143.            
  1144.             g_orksFromTrigger0Created = true
  1145.             CreateAndMoveTau1(World_GetPlayerAt(2))
  1146.            
  1147.         end
  1148.  
  1149.     end  
  1150.    
  1151.     if (g_orksFromTrigger0Created == nil) then
  1152.    
  1153.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells1")) then
  1154.            
  1155.             g_orksFromTrigger0Created = true
  1156.             CreateAndMoveTau1(World_GetPlayerAt(2))
  1157.            
  1158.         end
  1159.  
  1160.     end
  1161.  
  1162. end
  1163.  
  1164. function CreateAndMoveTau1(playerId)
  1165.  
  1166.     local markerToJump = "mkr_JumpToStells1"
  1167.     local markerFromSpawn = "mkr_StellsFrom1"
  1168.  
  1169.     local sg = "sg_spOrksTriger1"
  1170.     local bp = "tau_stealth_team_squad"
  1171.     local mkr = ""
  1172.     local num = 1
  1173.  
  1174.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1175.    
  1176.     local rand = World_GetRand(1,5)
  1177.    
  1178.     if(rand == 1) then
  1179.    
  1180.         Util_CreateSquadsAtMarkerEx(playerId, sg,"tau_crisis_suit_squad" , markerFromSpawn, num, 1)
  1181.    
  1182.     end
  1183.  
  1184.     Cmd_JumpToMarker(sg, markerToJump)
  1185.  
  1186. end
  1187.  
  1188. function Rule_CheckTrigger2()
  1189.  
  1190.     if (g_orksFromTrigger0Created1 == nil) then
  1191.    
  1192.    
  1193.    
  1194.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells2")) then
  1195.            
  1196.             g_orksFromTrigger0Created1 = true
  1197.             CreateAndMoveTau2(World_GetPlayerAt(2))
  1198.            
  1199.         end
  1200.  
  1201.     end
  1202.  
  1203.     if (g_orksFromTrigger0Created1 == nil) then
  1204.    
  1205.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells2")) then
  1206.            
  1207.             g_orksFromTrigger0Created1 = true
  1208.             CreateAndMoveTau2(World_GetPlayerAt(2))
  1209.            
  1210.         end
  1211.  
  1212.     end
  1213.  
  1214. end
  1215.  
  1216. function CreateAndMoveTau2(playerId)
  1217.  
  1218.     local markerToJump = "mkr_JumpToStells2"
  1219.     local markerFromSpawn = "mkr_StellsFrom2"
  1220.  
  1221.     local sg = "sg_spOrksTriger2"
  1222.     local bp = "tau_stealth_team_squad"
  1223.     local mkr = ""
  1224.     local num = 1
  1225.  
  1226.  
  1227.  
  1228.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1229.    
  1230.     local rand = World_GetRand(1,5)
  1231.    
  1232.     if(rand == 1) then
  1233.    
  1234.         Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_crisis_suit_squad", markerFromSpawn, num, 1)
  1235.    
  1236.     end
  1237.  
  1238.  
  1239.     Cmd_JumpToMarker(sg, markerToJump)
  1240.  
  1241. end
  1242.  
  1243. function Rule_CheckTrigger3()
  1244.  
  1245.     if (g_orksFromTrigger0Created2 == nil) then
  1246.    
  1247.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells3")) then
  1248.            
  1249.             g_orksFromTrigger0Created2 = true
  1250.             CreateAndMoveTau3(World_GetPlayerAt(2))
  1251.            
  1252.         end
  1253.  
  1254.     end
  1255.  
  1256.     if (g_orksFromTrigger0Created2 == nil) then
  1257.    
  1258.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells3")) then
  1259.            
  1260.             g_orksFromTrigger0Created2 = true
  1261.             CreateAndMoveTau3(World_GetPlayerAt(2))
  1262.            
  1263.         end
  1264.  
  1265.     end
  1266.  
  1267. end
  1268.  
  1269. function CreateAndMoveTau3(playerId)
  1270.  
  1271.     local markerToJump = "mkr_JumpToStells3"
  1272.     local markerFromSpawn = "mkr_StellsFrom3"
  1273.  
  1274.     local sg = "sg_spOrksTriger3"
  1275.     local bp = "tau_stealth_team_squad"
  1276.     local mkr = ""
  1277.     local num = 1
  1278.  
  1279.  
  1280.  
  1281.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1282.    
  1283.     local rand = World_GetRand(1,5)
  1284.    
  1285.     if(rand == 1) then
  1286.    
  1287.         Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_crisis_suit_squad", markerFromSpawn, num, 1)
  1288.    
  1289.     end
  1290.  
  1291.  
  1292.     Cmd_JumpToMarker(sg, markerToJump)
  1293.  
  1294. end
  1295.  
  1296. function Rule_CheckTrigger4()
  1297.  
  1298.     if (g_orksFromTrigger0Created3 == nil) then
  1299.    
  1300.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells4")) then
  1301.            
  1302.             g_orksFromTrigger0Created3 = true
  1303.             CreateAndMoveTau4(World_GetPlayerAt(2))
  1304.            
  1305.         end
  1306.  
  1307.     end
  1308.  
  1309.     if (g_orksFromTrigger0Created3 == nil) then
  1310.    
  1311.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells4")) then
  1312.            
  1313.             g_orksFromTrigger0Created3 = true
  1314.             CreateAndMoveTau4(World_GetPlayerAt(2))
  1315.            
  1316.         end
  1317.  
  1318.     end
  1319.  
  1320. end
  1321.  
  1322. function CreateAndMoveTau4(playerId)
  1323.  
  1324.     local markerToJump = "mkr_JumpToStells4"
  1325.     local markerFromSpawn = "mkr_StellsFrom4"
  1326.  
  1327.     local sg = "sg_spOrksTriger4"
  1328.     local bp = "tau_stealth_team_squad"
  1329.     local mkr = ""
  1330.     local num = 1
  1331.  
  1332.  
  1333.  
  1334.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1335.    
  1336.     local rand = World_GetRand(1,5)
  1337.    
  1338.     if(rand == 1) then
  1339.    
  1340.         Util_CreateSquadsAtMarkerEx(playerId, sg,"tau_crisis_suit_squad" , markerFromSpawn, num, 1)
  1341.    
  1342.     end
  1343.  
  1344.  
  1345.     Cmd_JumpToMarker(sg, markerToJump)
  1346.  
  1347. end
  1348.  
  1349. function Rule_CheckTrigger5()
  1350.  
  1351.     if (g_orksFromTrigger0Created4 == nil) then
  1352.    
  1353.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells5")) then
  1354.            
  1355.             g_orksFromTrigger0Created4 = true
  1356.             CreateAndMoveTau5(World_GetPlayerAt(2))
  1357.            
  1358.         end
  1359.  
  1360.     end
  1361.  
  1362.     if (g_orksFromTrigger0Created4 == nil) then
  1363.    
  1364.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells5")) then
  1365.            
  1366.             g_orksFromTrigger0Created4 = true
  1367.             CreateAndMoveTau5(World_GetPlayerAt(2))
  1368.            
  1369.         end
  1370.  
  1371.     end
  1372.  
  1373. end
  1374.  
  1375. function CreateAndMoveTau5(playerId)
  1376.  
  1377.     local markerToJump = "mkr_JumpToStells5"
  1378.     local markerFromSpawn = "mkr_StellsFrom5"
  1379.  
  1380.     local sg = "sg_spOrksTriger5"
  1381.     local bp = "tau_stealth_team_squad"
  1382.     local mkr = ""
  1383.     local num = 1
  1384.  
  1385.  
  1386.  
  1387.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1388.    
  1389.     local rand = World_GetRand(1,5)
  1390.    
  1391.     if(rand == 1) then
  1392.    
  1393.         Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_crisis_suit_squad", markerFromSpawn, num, 1)
  1394.    
  1395.     end
  1396.  
  1397.  
  1398.     Cmd_JumpToMarker(sg, markerToJump)
  1399.  
  1400. end
  1401.  
  1402. function Rule_CheckTrigger6()
  1403.  
  1404.     if (g_orksFromTrigger0Created5 == nil) then
  1405.    
  1406.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells6")) then
  1407.            
  1408.             g_orksFromTrigger0Created5 = true
  1409.             CreateAndMoveTau6(World_GetPlayerAt(2))
  1410.            
  1411.         end
  1412.  
  1413.     end
  1414.    
  1415.     if (g_orksFromTrigger0Created5 == nil) then
  1416.    
  1417.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells6")) then
  1418.            
  1419.             g_orksFromTrigger0Created5 = true
  1420.             CreateAndMoveTau6(World_GetPlayerAt(2))
  1421.            
  1422.         end
  1423.  
  1424.     end
  1425.  
  1426. end
  1427.  
  1428. function CreateAndMoveTau6(playerId)
  1429.  
  1430.     local markerToJump = "mkr_JumpToStells6"
  1431.     local markerFromSpawn = "mkr_StellsFrom6"
  1432.  
  1433.     local sg = "sg_spOrksTriger6"
  1434.     local bp = "tau_stealth_team_squad"
  1435.     local mkr = ""
  1436.     local num = 3
  1437.  
  1438.  
  1439.  
  1440.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1441.    
  1442.     local rand = World_GetRand(1,5)
  1443.    
  1444.     if(rand == 1) then
  1445.    
  1446.         Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_crisis_suit_squad", markerFromSpawn, num, 1)
  1447.    
  1448.     end
  1449.  
  1450.  
  1451.     Cmd_JumpToMarker(sg, markerToJump)
  1452.  
  1453. end
  1454.  
  1455. function Rule_CheckTrigger7()
  1456.  
  1457.     if (g_orksFromTrigger0Created6 == nil) then
  1458.    
  1459.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_Surprise")) then
  1460.            
  1461.             g_orksFromTrigger0Created6 = true
  1462.             CreateAndMoveTau7(World_GetPlayerAt(2))
  1463.            
  1464.         end
  1465.  
  1466.     end
  1467.    
  1468.     if (g_orksFromTrigger0Created6 == nil) then
  1469.    
  1470.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_Surprise")) then
  1471.            
  1472.             g_orksFromTrigger0Created6 = true
  1473.             CreateAndMoveTau7(World_GetPlayerAt(2))
  1474.            
  1475.         end
  1476.  
  1477.     end
  1478.  
  1479. end
  1480.  
  1481. function CreateAndMoveTau7(playerId)
  1482.  
  1483.     local markerToJump = "mkr_Player_HQ"
  1484.     local markerFromSpawn = "mkr_SurpriseWave"
  1485.  
  1486.     local sg = "sg_spOrksTriger7"
  1487.     local bp = "tau_krootox_squad"
  1488.     local mkr = ""
  1489.     local num = 3
  1490.  
  1491.  
  1492.  
  1493.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1494.     Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_hammerhead_gunship_squad", markerFromSpawn, num, g_SluggaLodout)
  1495.     Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_pathfinder_squad", markerFromSpawn, num, g_SluggaLodout)
  1496.    
  1497.     local rand = World_GetRand(1,5)
  1498.    
  1499.     if(rand == 1) then
  1500.    
  1501.         Util_CreateSquadsAtMarkerEx(playerId, sg,"tau_crisis_suit_squad" , markerFromSpawn, num, 1)
  1502.    
  1503.     end
  1504.  
  1505.  
  1506.     Cmd_AttackMoveMarker(sg, markerToJump)
  1507.  
  1508. end
  1509.  
  1510. function SpawnCrisis()
  1511.  
  1512.     if (g_orksFromTrigger0Created112 == nil) then
  1513.    
  1514.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_CheckCrysis"))then --or playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_CheckCrysis" ) then
  1515.        
  1516.             g_orksFromTrigger0Created112 = true
  1517.  
  1518.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "123123123", "tau_crisis_suit_squad", "mkr_Crysis1", 1, 1)
  1519.             Cmd_JumpToMarker("123123123", "mkr_ToCrysis1")
  1520.            
  1521.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "1231231231", "tau_crisis_suit_squad", "mkr_Crysis2", 1, 1)
  1522.             Cmd_JumpToMarker("1231231231", "mkr_ToCrysis2")
  1523.            
  1524.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "123123123121", "tau_crisis_suit_squad", "mkr_Crysis3", 1, 1)
  1525.             Cmd_JumpToMarker("123123123121", "mkr_ToCrysis3")
  1526.    
  1527.         end
  1528.    
  1529.     end
  1530.  
  1531. end
  1532.  
  1533. function Rule_CheckTrigger8()
  1534.  
  1535.     if (g_orksFromTrigger0Created7 == nil) then
  1536.    
  1537.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(0), "mkr_JumpToStells7")) then
  1538.            
  1539.             g_orksFromTrigger0Created7 = true
  1540.             CreateAndMoveTau8(World_GetPlayerAt(2))
  1541.            
  1542.         end
  1543.  
  1544.     end
  1545.  
  1546.     if (g_orksFromTrigger0Created7 == nil) then
  1547.    
  1548.         if (playerHasAnySquadAtMarker(World_GetPlayerAt(1), "mkr_JumpToStells7")) then
  1549.            
  1550.             g_orksFromTrigger0Created7 = true
  1551.             CreateAndMoveTau8(World_GetPlayerAt(2))
  1552.            
  1553.         end
  1554.  
  1555.     end
  1556.  
  1557. end
  1558.  
  1559. function CreateAndMoveTau8(playerId)
  1560.  
  1561.     local markerToJump = "mkr_JumpToStells7"
  1562.     local markerFromSpawn = "mkr_StellsFrom7"
  1563.  
  1564.     local sg = "sg_spOrksTriger8"
  1565.     local bp = "tau_stealth_team_squad"
  1566.     local mkr = ""
  1567.     local num = 2
  1568.  
  1569.  
  1570.  
  1571.     Util_CreateSquadsAtMarkerEx(playerId, sg, bp, markerFromSpawn, num, g_SluggaLodout)
  1572.    
  1573.     local rand = World_GetRand(1,15)
  1574.    
  1575.     if(rand == 1) then
  1576.    
  1577.         Util_CreateSquadsAtMarkerEx(playerId, sg, "tau_crisis_suit_squad", markerFromSpawn, num, 1)
  1578.    
  1579.     end
  1580.  
  1581.  
  1582.     Cmd_JumpToMarker(sg, markerToJump)
  1583.  
  1584. end
  1585.  
  1586. function Check_Sp1()
  1587.  
  1588.     if (not EGroup_IsCapturedByPlayer("eg_Sp_Capture1", World_GetPlayerAt(0), false) and not EGroup_IsCapturedByPlayer("eg_Sp_Capture1", World_GetPlayerAt(1), false)) then
  1589.    
  1590.         if(timerShift > 3 * 60) then
  1591.        
  1592.             if(checkSeePlayerArray[8] == 1) then
  1593.            
  1594.                 checkSeePlayerArray[8] = 0
  1595.                
  1596.                 timerWaveKroot = 0
  1597.            
  1598.             elseif(timerWaveKroot == 300) then
  1599.            
  1600.                 print("WAVE SP1")
  1601.            
  1602.                 SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU1")
  1603.                    
  1604.                 if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU1") then
  1605.                    
  1606.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU1", "tau_kroot_carnivore_squad", "mkr_SpawnTauWave1", 3, 5)
  1607.                    
  1608.                     if(math.mod(timerBaseKroot, 15) == 0 and timerBaseKroot > 1) then
  1609.                    
  1610.                         local countWarrior = 0
  1611.                        
  1612.                         for i = 1, timerBaseKroot / 15 do
  1613.                            
  1614.                             countWarrior = i
  1615.                            
  1616.                         end
  1617.                        
  1618.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU1", "tau_kroot_carnivore_squad", "mkr_SpawnTauWave1", countWarrior + 1, 5)
  1619.                        
  1620.                     end
  1621.                    
  1622.                     Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU1", "mkr_Player_HQ")
  1623.                    
  1624.                 end
  1625.                
  1626.             end
  1627.            
  1628.         end
  1629.    
  1630.     end
  1631.  
  1632. end
  1633.  
  1634. function Check_Sp2()
  1635.  
  1636.     if (not EGroup_IsCapturedByPlayer("eg_Sp_Capture2", World_GetPlayerAt(0), false) and not EGroup_IsCapturedByPlayer("eg_Sp_Capture2", World_GetPlayerAt(1), false)) then
  1637.    
  1638.         if(timerShift > 2 * 60) then
  1639.        
  1640.             if(checkSeePlayerArray[9] == 1) then
  1641.            
  1642.                 checkSeePlayerArray[9] = 0
  1643.                
  1644.                 timerFireWarrior = 0
  1645.            
  1646.             elseif(timerFireWarrior == 300) then
  1647.            
  1648.                 print("WAVE SP2")
  1649.            
  1650.                 SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2")
  1651.        
  1652.                 if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2") then
  1653.  
  1654.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2", "tau_fire_warrior_squad", "mkr_SpawnTauWave2", 3, 6)
  1655.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2", "tau_crisis_suit_squad", "mkr_SpawnTauWave2", 1, 1)
  1656.                    
  1657.                     if(math.mod(timerBaseSuperKroot, 20) == 0 and timerBaseSuperKroot > 1) then
  1658.                                
  1659.                         local countWarrior = 0
  1660.                        
  1661.                         for i = 1, timerBaseSuperKroot / 20 do
  1662.                            
  1663.                             countWarrior = i
  1664.                            
  1665.                         end
  1666.                        
  1667.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2", "tau_fire_warrior_squad", "mkr_SpawnTauWave2", countWarrior + 1, 6)
  1668.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2", "tau_crisis_suit_squad", "mkr_SpawnTauWave2", countWarrior + 1, 1)
  1669.                        
  1670.                     end
  1671.                    
  1672.                     for i = 1, 2 do
  1673.            
  1674.                         SGroup_AddLeaders ( "sg_TunnelSaboteurs_TAU2")
  1675.        
  1676.                     end
  1677.                    
  1678.                     Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU2", "mkr_Player_HQ")
  1679.                    
  1680.                 end
  1681.            
  1682.             end
  1683.        
  1684.         end
  1685.        
  1686.     end
  1687.  
  1688. end
  1689.  
  1690.  
  1691. function Check_Sp3()
  1692.  
  1693.     if (not EGroup_IsCapturedByPlayer("eg_Sp_Capture3", World_GetPlayerAt(0), false) and not EGroup_IsCapturedByPlayer("eg_Sp_Capture3", World_GetPlayerAt(1), false)) then
  1694.    
  1695.         if(timerShift > 6 * 60) then
  1696.        
  1697.             if(checkSeePlayerArray[10] == 1) then
  1698.            
  1699.                 checkSeePlayerArray[10] = 0
  1700.                
  1701.                 timerTank = 0
  1702.            
  1703.             elseif(timerTank == 240) then
  1704.            
  1705.                 print("WAVE SP3")
  1706.            
  1707.                 SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU3")
  1708.        
  1709.                 if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU3") then
  1710.                
  1711.                     if(timerGlobal > 700) then
  1712.                    
  1713.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU3", "tau_drone_squad", "mkr_SpawnTauWave3", 2, 5)
  1714.                    
  1715.                     end
  1716.  
  1717.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU3", "tau_skyray_squad", "mkr_SpawnTauWave3", 1, 1)
  1718.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU3", "tau_drone_harbinger_squad", "mkr_SpawnTauWave3", 1, 1)
  1719.                    
  1720.                     if(math.mod(timerBaseSuperKroot, 20) == 0 and timerBaseSuperKroot > 1) then
  1721.                                
  1722.                         local countWarrior = 0
  1723.                        
  1724.                         for i = 1, timerBaseSuperKroot / 20 do
  1725.                            
  1726.                             countWarrior = i
  1727.                            
  1728.                         end
  1729.                        
  1730.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU3", "tau_skyray_squad", "mkr_SpawnTauWave3", countWarrior + 1, 1)
  1731.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU3", "tau_drone_harbinger_squad", "mkr_SpawnTauWave3", countWarrior + 1, 1)
  1732.                        
  1733.                     end
  1734.                    
  1735.                     Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU3", "mkr_Player_HQ")
  1736.                    
  1737.                 end
  1738.            
  1739.             end
  1740.        
  1741.         end
  1742.  
  1743.     end
  1744.  
  1745. end
  1746.  
  1747. function Check_Sp4()
  1748.  
  1749.     if (not EGroup_IsCapturedByPlayer("eg_Sp_Capture4", World_GetPlayerAt(0), false) and not EGroup_IsCapturedByPlayer("eg_Sp_Capture4", World_GetPlayerAt(1), false)) then
  1750.    
  1751.         if(timerShift > 7 * 60) then
  1752.        
  1753.             if(checkSeePlayerArray[11] == 1) then
  1754.            
  1755.                 checkSeePlayerArray[11] = 0
  1756.                
  1757.                 timerSuperKroot = 0
  1758.            
  1759.             elseif(timerSuperKroot == 700) then
  1760.            
  1761.                 print("WAVE SP4")
  1762.            
  1763.                 SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU4")
  1764.                    
  1765.                 if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU4") then
  1766.                    
  1767.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU4", "tau_krootox_squad", "mkr_SpawnTauWave4", 2, 2)
  1768.                    
  1769.                     if(math.mod(timer30Min, 40) == 0 and timer30Min > 1) then
  1770.                                
  1771.                         local countWarrior = 0
  1772.                        
  1773.                         for i = 1, timer30Min / 40 do
  1774.                            
  1775.                             countWarrior = i
  1776.                            
  1777.                         end
  1778.                        
  1779.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU4", "tau_krootox_squad", "mkr_SpawnTauWave4", countWarrior + 1, 1)
  1780.                         --Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU4", "tau_drone_harbinger_squad", "mkr_SpawnTauWave2", countWarrior + 1, 1)
  1781.                        
  1782.                     end
  1783.                    
  1784.                     Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU4", "mkr_Player_HQ")
  1785.                    
  1786.                 end
  1787.                
  1788.             end
  1789.        
  1790.         end
  1791.        
  1792.     end
  1793.  
  1794. end
  1795.  
  1796. function Check_Sp5()
  1797.  
  1798.     if (not EGroup_IsCapturedByPlayer("eg_Sp_Capture5", World_GetPlayerAt(0), false) and not EGroup_IsCapturedByPlayer("eg_Sp_Capture5", World_GetPlayerAt(1), false)) then
  1799.    
  1800.         if(timerShift > 7 * 60) then
  1801.        
  1802.             if(checkSeePlayerArray[12] == 1) then
  1803.            
  1804.                 checkSeePlayerArray[12] = 0
  1805.                
  1806.                 timerSuperTank = 0
  1807.            
  1808.             elseif(timerSuperTank == 700) then
  1809.            
  1810.                 print("WAVE SP5")
  1811.            
  1812.                 SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU5")
  1813.        
  1814.                 if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU5") then
  1815.  
  1816.                     Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU5", "tau_hammerhead_gunship_squad", "mkr_SpawnTauWave5", 2, 5)
  1817.                    
  1818.                     if(math.mod(timer30Min, 40) == 0 and timer30Min > 1) then
  1819.                                
  1820.                         local countWarrior = 0
  1821.                        
  1822.                         for i = 1, timer30Min / 40 do
  1823.                            
  1824.                             countWarrior = i
  1825.                            
  1826.                         end
  1827.                        
  1828.                         Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU5", "tau_hammerhead_gunship_squad", "mkr_SpawnTauWave5", countWarrior + 1, 1)
  1829.                         --Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU4", "tau_drone_harbinger_squad", "mkr_SpawnTauWave2", countWarrior + 1, 1)
  1830.                        
  1831.                     end
  1832.                    
  1833.                     Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU5", "mkr_Player_HQ")
  1834.                    
  1835.                 end
  1836.            
  1837.             end
  1838.        
  1839.         end
  1840.        
  1841.     end
  1842.  
  1843. end
  1844.  
  1845. function Reinforcement()
  1846.  
  1847.     if (EGroup_IsCapturedByPlayer("eg_Sp_Reinforcement", World_GetPlayerAt(0), false)) then
  1848.    
  1849.         --EGroup_SetPlayerOwner("eg_Reinforcement", World_GetPlayerAt(0))
  1850.  
  1851.         SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU6")
  1852.        
  1853.         if(timerAttackReinforcement > 90) then
  1854.        
  1855.             timerAttackReinforcement = 0
  1856.    
  1857.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU6") then
  1858.  
  1859.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_krootox_squad", "mkr_AttackBaseTau", 2, 5)
  1860.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_hammerhead_gunship_squad", "mkr_AttackBaseTau", 2, 5)
  1861.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_drone_squad", "mkr_AttackBaseTau", 2, 5)
  1862.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_skyray_squad", "mkr_AttackBaseTau", 1, 1)
  1863.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_drone_harbinger_squad", "mkr_AttackBaseTau", 1, 1)
  1864.                 Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU6", "mkr_AttackAndDestroy")
  1865.                    
  1866.             end
  1867.                
  1868.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2311121ewew212az4234")
  1869.        
  1870.             if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2311121ewew212az4234") then
  1871.  
  1872.                 Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2311121ewew212az4234", "tau_stealth_team_squad", "mkr_AttackBaseTau", 2, 3)
  1873.                 Cmd_Capture("sg_TunnelSaboteurs_TAU2311121ewew212az4234", "eg_Sp_Reinforcement")
  1874.                    
  1875.             end
  1876.            
  1877.             SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU827623489")
  1878.        
  1879.         end
  1880.        
  1881.         if(timerReinforcement == 300 and SGroup_IsEmpty("sg_TunnelSaboteurs_TAU827623489")) then
  1882.  
  1883.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_TunnelSaboteurs_TAU827623489", "tau_hammerhead_gunship_squad", "mkr_AttackAndDestroy", 4, 1)
  1884.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(0), "sg_TunnelSaboteurs_TAU827623489", "tau_fire_warrior_squad", "mkr_AttackAndDestroy", 4, 6)
  1885.            
  1886.             for i = 1, 2 do
  1887.        
  1888.                 SGroup_AddLeaders ( "sg_TunnelSaboteurs_TAU827623489")
  1889.            
  1890.             end
  1891.        
  1892.         end
  1893.            
  1894.     end
  1895.  
  1896.     if (EGroup_IsCapturedByPlayer("eg_Sp_Reinforcement", World_GetPlayerAt(1), false)) then
  1897.    
  1898.         --EGroup_SetPlayerOwner("eg_Reinforcement", World_GetPlayerAt(1))
  1899.  
  1900.         SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU6")
  1901.    
  1902.         if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU6") then
  1903.  
  1904.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_krootox_squad", "mkr_AttackBaseTau", 2, 5)
  1905.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_hammerhead_gunship_squad", "mkr_AttackBaseTau", 2, 5)
  1906.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_drone_squad", "mkr_AttackBaseTau", 2, 5)
  1907.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_skyray_squad", "mkr_AttackBaseTau", 1, 1)
  1908.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU6", "tau_drone_harbinger_squad", "mkr_AttackBaseTau", 1, 1)
  1909.             Cmd_AttackMoveMarker("sg_TunnelSaboteurs_TAU6", "mkr_AttackAndDestroy")
  1910.                
  1911.         end
  1912.            
  1913.         SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU2311121ewew212az4234")
  1914.    
  1915.         if SGroup_IsEmpty("sg_TunnelSaboteurs_TAU2311121ewew212az4234") then
  1916.  
  1917.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(2), "sg_TunnelSaboteurs_TAU2311121ewew212az4234", "tau_stealth_team_squad", "mkr_AttackBaseTau", 2, 3)
  1918.             Cmd_Capture("sg_TunnelSaboteurs_TAU2311121ewew212az4234", "eg_Sp_Reinforcement")
  1919.                
  1920.         end
  1921.        
  1922.         SGroup_CreateIfNotFound("sg_TunnelSaboteurs_TAU827623489")
  1923.            
  1924.         if(timerReinforcement == 300 and SGroup_IsEmpty("sg_TunnelSaboteurs_TAU827623489")) then
  1925.        
  1926.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(1), "sg_TunnelSaboteurs_TAU827623489", "tau_hammerhead_gunship_squad", "mkr_AttackAndDestroy", 4, 1)
  1927.             Util_CreateSquadsAtMarkerEx(World_GetPlayerAt(1), "sg_TunnelSaboteurs_TAU827623489", "tau_fire_warrior_squad", "mkr_AttackAndDestroy", 4, 6)
  1928.        
  1929.         end
  1930.            
  1931.     end
  1932.  
  1933. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement