------------------------------------------------------------------------------------------------------------------------------------- -- Define Local Variables ------------------------------------------------------------------------------------------------------------------------------------- local DEBUGGING = true -- This will draw circles where the trigger zones should be located and turn on log messaging. local blueFACA = SPAWN:New("Blue FACA") local TopMenu = MENU_COALITION:New(coalition.side.BLUE, "TACG PUBLIC MISSION" ) ------------------------------------------------------------------------------------------------------------------------------------- -- Debugging Functions, DO NOT TOUCH! ------------------------------------------------------------------------------------------------------------------------------------- --Print string debug local function DebugLogger(message) if DEBUGGING then env.info("SYRIA PUBLIC SCRIPT: " .. message) MESSAGE:New("SYRIA PUBLIC SCRIPT: " .. message, 20):ToAll() end end --Add debugging information DebugLogger("DYNAMIC CAMPAIGN SCRIPT Ver: 1.0") --Print Table debug function DebugTable(_table, _indentstring) if DEBUGGING then env.info(tostring(_table) .. " = {") _indentstring = _indentstring or "" for k, v in pairs(_table) do if type(v) == "table" then env.info(_indentstring .. tostring(k) .. " = {") DebugTable(v, _indentstring .. " ") env.info(_indentstring .. "},") else env.info(_indentstring .. tostring(k) .. " = " .. tostring(v) ..",") end end env.info("}") end end --Add debugging information DebugLogger("DEBUGGING SCRIPTS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Zone Objects ------------------------------------------------------------------------------------------------------------------------------------- --Carrier Control Areas local ABECCZoneObj = ZONE_POLYGON:New("CVN-72 CCA", GROUP:FindByName("CVN-72 BG")):DrawZone(-1,{0,0,1},1,{0,0,1},0.15,2,true) local TARCCZoneObj = ZONE_POLYGON:New("LHA-1 CCA", GROUP:FindByName("LHA-1 BG")):DrawZone(-1,{0,0,1},1,{0,0,1},0.15,2,true) --Define BORDER Zones Objects local redBorderZoneObj = ZONE_POLYGON:New("Red Border", GROUP:FindByName("BorderZone_Redfor")):DrawZone(-1,{1,0,0},1,{1,0,0},0.05,1,true) local blueBorderZoneObj = ZONE_POLYGON:New("Blue Border", GROUP:FindByName("BorderZone_Bluefor")):DrawZone(1,{0,0,1},1,{0,0,1},0.05,1,true) --Define CONFLICT Zone Objects local conflictZoneObj = ZONE_POLYGON:New("Conflict Zone", GROUP:FindByName("ConflictZone_SinaiPenninsula")):DrawZone(-1,{0.5,0.5,0.5},1,{0.5,0.5,0.5},0.15,1,true) --Define OP Zones for Capture --local AlHasanahOpsZoneObj = OPSZONE:New(ZONE:FindByName("Al Hasanah"), coalition.side.RED) -- AlHasanahOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) -- AlHasanahOpsZoneObj:SetCaptureTime(60) -- AlHasanahOpsZoneObj:SetCaptureNunits(1) -- AlHasanahOpsZoneObj:SetCaptureThreatlevel(1) local BaluzaOpsZoneObj = OPSZONE:New(ZONE:FindByName("Baluza Airbase"), coalition.side.RED) BaluzaOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) BaluzaOpsZoneObj:SetCaptureTime(60) BaluzaOpsZoneObj:SetCaptureNunits(1) BaluzaOpsZoneObj:SetCaptureThreatlevel(1) local BirAlAbdOpsZoneObj = OPSZONE:New(ZONE:FindByName("Bir Al Abd"), coalition.side.RED) BirAlAbdOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) BirAlAbdOpsZoneObj:SetCaptureTime(60) BirAlAbdOpsZoneObj:SetCaptureNunits(1) BirAlAbdOpsZoneObj:SetCaptureThreatlevel(1) local BirHasanahOpsZoneObj = OPSZONE:New(ZONE:FindByName("Bir Hasanah Airbase"), coalition.side.RED) BirHasanahOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) BirHasanahOpsZoneObj:SetCaptureTime(60) BirHasanahOpsZoneObj:SetCaptureNunits(1) BirHasanahOpsZoneObj:SetCaptureThreatlevel(1) local CmdHQOpsZoneObj = OPSZONE:New(ZONE:FindByName("Command HQ"), coalition.side.RED) CmdHQOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) CmdHQOpsZoneObj:SetCaptureTime(60) CmdHQOpsZoneObj:SetCaptureNunits(1) CmdHQOpsZoneObj:SetCaptureThreatlevel(1) local ElArishOpsZoneObj = OPSZONE:New(ZONE:FindByName("El Arish Airbase"), coalition.side.RED) ElArishOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) ElArishOpsZoneObj:SetCaptureTime(60) ElArishOpsZoneObj:SetCaptureNunits(1) ElArishOpsZoneObj:SetCaptureThreatlevel(1) local ElAirshPPOpsZoneObj = OPSZONE:New(ZONE:FindByName("El Arish Power Plant"), coalition.side.RED) ElAirshPPOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) ElAirshPPOpsZoneObj:SetCaptureTime(60) ElAirshPPOpsZoneObj:SetCaptureNunits(1) ElAirshPPOpsZoneObj:SetCaptureThreatlevel(1) local ElGoraOpsZoneObj = OPSZONE:New(ZONE:FindByName("El Gora Airbase"), coalition.side.RED) ElGoraOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) ElGoraOpsZoneObj:SetCaptureTime(60) ElGoraOpsZoneObj:SetCaptureNunits(1) ElGoraOpsZoneObj:SetCaptureThreatlevel(1) local MelezOpsZoneObj = OPSZONE:New(ZONE:FindByName("Melez Airbase"), coalition.side.RED) MelezOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) MelezOpsZoneObj:SetCaptureTime(60) MelezOpsZoneObj:SetCaptureNunits(1) MelezOpsZoneObj:SetCaptureThreatlevel(1) --local NekhelOpsZoneObj = OPSZONE:New(ZONE:FindByName("Nekhel"), coalition.side.RED) -- NekhelOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) -- NekhelOpsZoneObj:SetCaptureTime(60) -- NekhelOpsZoneObj:SetCaptureNunits(1) -- NekhelOpsZoneObj:SetCaptureThreatlevel(1) local OMousaPPOpsZoneObj = OPSZONE:New(ZONE:FindByName("OMousa Power Plant"), coalition.side.RED) OMousaPPOpsZoneObj:SetUnitCategories(Unit.Category.GROUND_UNIT) OMousaPPOpsZoneObj:SetCaptureTime(60) OMousaPPOpsZoneObj:SetCaptureNunits(1) OMousaPPOpsZoneObj:SetCaptureThreatlevel(1) --Unused OpZones - Added for future use --local AlIsmailiyahOpsZoneObj = OPSZONE:New("Al Ismailiyah Airbase") --local AlKhatatbahOpsZoneObj = OPSZONE:New("Al Khatatbah Airbase") --local AlMansurahOpsZoneObj = OPSZONE:New("Al Mansurah Airbase") --local AlRahmaniyaOpsZoneObj = OPSZONE:New("Al Rahmaniya Airbase") --local AlSalamBridgeOpsZoneObj = OPSZONE:New("Al Salam Bridge") --local AsSalihiyahOpsZoneObj = OPSZONE:New("As Salihiyah Airbase") --local AzZaqaziqOpsZoneObj = OPSZONE:New("AzZaqaziq Airbase") --local BilbeisOpsZoneObj = OPSZONE:New("Bilbeis Airbase") --local BirmaOpsZoneObj = OPSZONE:New("Birma Airbase") --local BorgElArabOpsZoneObj = OPSZONE:New("Borg El Arab International") --local CairoIntOpsZoneObj = OPSZONE:New("Cairo International") --local CairoWestOpsZoneObj = OPSZONE:New("Cairo West Airbase") --local DifarsuwarOpsZoneObj = OPSZONE:New(ZONE_AIRBASE:New("Difarsuwar Airfield",UTILS.FeetToMeters(4000))) --local FayedOpsZoneObj = OPSZONE:New("Fayed Airbase") --local GebelElBasurOpsZoneObj = OPSZONE:New("Gebel El Basur Airbase") --local InshasOpsZoneObj = OPSZONE:New("Inshas Airbase") --local JiyanklisOpsZoneObj = OPSZONE:New("Jiyanklis Airbase") --local KibritOpsZoneObj = OPSZONE:New("Kibrit Airbase") --local PortAbuQirOpsZoneObj = OPSZONE:New("Port Abu Qir") --local PortAlexandriaOpsZoneObj = OPSZONE:New("Port Alexandria") --local PortFuadOpsZoneObj = OPSZONE:New("Port Fuad") --local PortNewDamiettaOpsZoneObj = OPSZONE:New("Port New Damietta") --local PortRosettaOpsZoneObj = OPSZONE:New("Port Rosetta") --local PortSaidOpsZoneObj = OPSZONE:New("Port Said") --local PortSuezOpsZoneObj = OPSZONE:New("Port Suez") --local QuwaysinaOpsZoneObj = OPSZONE:New("Quwaysina Airbase") --local WadiAlJandaliOpsZoneObj = OPSZONE:New("Wadi Al Jandali Airbase") --local TantaOpsZoneObj = OPSZONE:New("Tanta") --Define AWACS Zones local redAwacsZoneObj = ZONE:FindByName("Red_AWACS_Zone") --Define CAP Zones local redCAPZone1Obj = ZONE:FindByName("Red_CAP_Zone-1") local redCAPZone2Obj = ZONE:FindByName("Red_CAP_Zone-2") local redSinaiCAPZoneObj = ZONE:FindByName("CapZone_Red_SinaiPenninsula") --Define Warehouse Objects local ElArishABWhObj = STATIC:FindByName("Warehouse El Arish Airbase") local ElGoraABWhObj = STATIC:FindByName("Warehouse El Gora Airbase") local AlHasanahWhObj = STATIC:FindByName("Warehouse Al Hasanah") local BaluzaABWhObj = STATIC:FindByName("Warehouse Baluza Airbase") local BirHasanahABWhObj = STATIC:FindByName("Warehouse Bir Hasanah Airbase") local MelezABWhObj = STATIC:FindByName("Warehouse Melez Airbase") local NekhelWhObj = STATIC:FindByName("Warehouse Nekhel") local KibritABWhObj = STATIC:FindByName("Warehouse Kibrit Airbase") local DifarsuwarABWhObj = STATIC:FindByName("Warehouse Difarsuwar Airbase") local FayedABWhObj = STATIC:FindByName("Warehouse Fayed Airbase") local AlIsmailiyaABWhObj = STATIC:FindByName("Warehouse Al Ismailiyah Airbase") local AlSalihiyaABWhObj = STATIC:FindByName("Warehouse Al Salihiyah Airbase") local AlMansurahABWhObj = STATIC:FindByName("Warehouse Al Mansurah Airbase") local BilbeisABWhObj = STATIC:FindByName("Warehouse Bilbeis Airbase") local CairoIntAPWhObj = STATIC:FindByName("Warehouse Cairo International Airport") local WadiAlJandaliABWhObj = STATIC:FindByName("Warehouse Wadi Al Jandali Airbase") local JiyanklisABWhObj = STATIC:FindByName("Warehouse Jiyanklis Airbase") local CairoWestABWhObj = STATIC:FindByName("Warehouse Cairo West Airbase") local InshasABWhObj = STATIC:FindByName("Warehouse Inshas Airbase") local AlKatatbahABWhObj = STATIC:FindByName("Warehouse Al Khatatbah Airbase") local GebelElBasurABWhObj = STATIC:FindByName("Warehouse Gebel El Basur Airbase") local QuwaysinaABWhObj = STATIC:FindByName("Warehouse Quwaysina Airbase") local BirmaABWhObj = STATIC:FindByName("Warehouse Birma Airbase") local AlRahmaniyahABWhObj = STATIC:FindByName("Warehouse Al Rahmaniyah Airbase") local AzZaqaziqABWhObj = STATIC:FindByName("Warehouse AzZaqaziq Airbase") local BorgElArabIntlWhObj = STATIC:FindByName("Warehouse Borg El Arab International Airport") local AlexandriaPrtWhObj = STATIC:FindByName("Warehouse Port Alexandria") local AbuQirPrtWhObj = STATIC:FindByName("Warehouse Port Abu Qir") local RosettaPrtWhObj = STATIC:FindByName("Warehouse Port Rosetta") local NewDamiettaPrtWhObj = STATIC:FindByName("Warehouse Port New Damietta") local SaidPrtWhObj = STATIC:FindByName("Warehouse Port Said") local FuadPrtWhObj = STATIC:FindByName("Warehouse Port Fuad") --Add Debugging Information DebugLogger("ZONE OBJECTS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Agents ------------------------------------------------------------------------------------------------------------------------------------- local Agents=SET_GROUP:New():FilterPrefixes("Red EWR"):FilterPrefixes("Red Reaper"):FilterOnce() --Add Debugging Information DebugLogger("AGENTS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Redfor Platoons ------------------------------------------------------------------------------------------------------------------------------------- --Define RedforPlatoons local INF90PlatoonObj = PLATOON:New("Red Infantry Template", 7, "90th IFB") INF90PlatoonObj:SetGrouping(5) INF90PlatoonObj:AddMissionCapability({AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.ONGUARD, AUFTRAG.Type.PATROL}, 70) --local Platoon2Obj = PLATOON:New("Red RPG Template", 7, "RPG Test") -- Platoon2Obj:SetGrouping(5) -- Platoon2Obj:AddMissionCapability({AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.ONGUARD}, 70) local MIB120Platoon3Obj = PLATOON:New("Red BTR80 Template", 3, "120th MIB") MIB120Platoon3Obj:AddMissionCapability({AUFTRAG.Type.OPSTRANSPORT,AUFTRAG.Type.TROOPTRANSPORT}, 90) MIB120Platoon3Obj:SetGrouping(1) MIB120Platoon3Obj:SetMissionRange(100) MIB120Platoon3Obj:SetAttribute(GROUP.Attribute.GROUND_APC) local AB56Platoon4Obj = PLATOON:New("Red M60A3 Template", 10, "56th AB") AB56Platoon4Obj:SetGrouping(5) AB56Platoon4Obj:AddMissionCapability({AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.ONGUARD, AUFTRAG.Type.PATROLZONE}, 90) local AB72Platoon4Obj = PLATOON:New("Red T-80U Template", 10, "72nd AB") AB72Platoon4Obj:SetGrouping(5) AB72Platoon4Obj:AddMissionCapability({AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.ONGUARD, AUFTRAG.Type.PATROLZONE}, 90) local AB23Platoon4Obj = PLATOON:New("Red T-55 Template", 10, "23rd AB") AB23Platoon4Obj:SetGrouping(5) AB23Platoon4Obj:AddMissionCapability({AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.ONGUARD, AUFTRAG.Type.PATROLZONE}, 90) --Add Debugging Information DebugLogger("PLATOONS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Redfor Squadrons and Parameters ------------------------------------------------------------------------------------------------------------------------------------- --Define Redfor Squadrons local MiG21_1_SqnObj = SQUADRON:New("Red MiG-21 Template", 8, "3rd TFS") MiG21_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT}, 100) MiG21_1_SqnObj:SetGrouping(2) MiG21_1_SqnObj:SetModex(300) MiG21_1_SqnObj:SetTakeoffType("Hot") MiG21_1_SqnObj:SetMissionRange(100) MiG21_1_SqnObj:SetDespawnAfterHolding(true) local MiG23_1_SqnObj = SQUADRON:New("Red MiG-23 Template", 8, "23rd TFS") MiG23_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT, AUFTRAG.Type.BAI}, 100) MiG23_1_SqnObj:SetGrouping(2) MiG23_1_SqnObj:SetModex(300) MiG23_1_SqnObj:SetTakeoffType("Hot") MiG23_1_SqnObj:SetMissionRange(100) MiG23_1_SqnObj:SetDespawnAfterHolding(true) local SU24_1_SqnObj = SQUADRON:New("Red Su-24 Template", 8, "27th TFS") SU24_1_SqnObj:SetGrouping(2) SU24_1_SqnObj:SetModex(300) SU24_1_SqnObj:SetTakeoffType("Hot") SU24_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT, AUFTRAG.Type.CAS, AUFTRAG.Type.CASENHANCED}, 100) SU24_1_SqnObj:SetMissionRange(100) SU24_1_SqnObj:SetDespawnAfterHolding(true) local MiG29_1_SqnObj = SQUADRON:New("Red MiG-29S Template", 8, "42nd TFS") MiG29_1_SqnObj:SetGrouping(2) MiG29_1_SqnObj:SetModex(300) MiG29_1_SqnObj:SetTakeoffType("Hot") MiG29_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT, AUFTRAG.Type.CAS, AUFTRAG.Type.CASENHANCED}, 100) MiG29_1_SqnObj:SetMissionRange(100) MiG29_1_SqnObj:SetDespawnAfterHolding(true) local M2000_1_SqnObj = SQUADRON:New("Red M2000 Template", 8, "71st TFS") M2000_1_SqnObj:SetGrouping(2) M2000_1_SqnObj:SetModex(300) M2000_1_SqnObj:SetTakeoffType("Hot") M2000_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT}, 100) M2000_1_SqnObj:SetMissionRange(100) M2000_1_SqnObj:SetDespawnAfterHolding(true) local F16_1_SqnObj = SQUADRON:New("Red F-16A Template", 8, "75th TFS") F16_1_SqnObj:SetGrouping(2) F16_1_SqnObj:SetModex(100) F16_1_SqnObj:SetTakeoffType("Hot") F16_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT, AUFTRAG.Type.SEAD, AUFTRAG.Type.BAI, AUFTRAG.Type.CAS, AUFTRAG.Type.CASENHANCED}, 100) F16_1_SqnObj:SetMissionRange(100) F16_1_SqnObj:SetDespawnAfterHolding(true) local H6J_1_SqnObj = SQUADRON:New("H-6J Template", 8, "76th TFS") H6J_1_SqnObj:SetGrouping(3) H6J_1_SqnObj:SetModex(100) H6J_1_SqnObj:SetTakeoffType("Hot") H6J_1_SqnObj:AddMissionCapability({AUFTRAG.Type.BOMBCARPET, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY, AUFTRAG.Type.STRIKE}, 100) H6J_1_SqnObj:SetMissionRange(100) H6J_1_SqnObj:SetDespawnAfterHolding(true) local A50_1_SqnObj = SQUADRON:New("Red A-50 Template", 10, "87th EWS") A50_1_SqnObj:AddMissionCapability({AUFTRAG.Type.AWACS, AUFTRAG.Type.ALERT5},100) A50_1_SqnObj:SetGrouping(1) A50_1_SqnObj:SetModex(900) A50_1_SqnObj:SetTakeoffType("Hot") A50_1_SqnObj:SetSkill(AI.Skill.EXCELLENT) A50_1_SqnObj:SetMissionRange(100) A50_1_SqnObj:SetDespawnAfterHolding(true) local Mi24_1_SqnObj = SQUADRON:New("Red Mi-24P Template", 10, "51st AHS") Mi24_1_SqnObj:AddMissionCapability({AUFTRAG.Type.BAI, AUFTRAG.Type.CAS, AUFTRAG.Type.CASENHANCED, AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.GROUNDESCORT, AUFTRAG.Type.OPSTRANSPORT, AUFTRAG.Type.TROOPTRANSPORT},100) Mi24_1_SqnObj:SetGrouping(2) Mi24_1_SqnObj:SetModex(60) Mi24_1_SqnObj:SetTakeoffType("Cold") Mi24_1_SqnObj:SetMissionRange(100) Mi24_1_SqnObj:SetDespawnAfterHolding(true) Mi24_1_SqnObj:SetAttribute(GROUP.Attribute.AIR_TRANSPORTHELO) local Mi26_1_SqnObj = SQUADRON:New("Red Mi-26 Template", 10, "18th THS") Mi26_1_SqnObj:AddMissionCapability({AUFTRAG.Type.CARGOTRANSPORT, AUFTRAG.Type.OPSTRANSPORT, AUFTRAG.Type.TROOPTRANSPORT},100) Mi26_1_SqnObj:SetGrouping(1) Mi26_1_SqnObj:SetModex(200) Mi26_1_SqnObj:SetTakeoffType("Cold") Mi26_1_SqnObj:SetMissionRange(100) Mi26_1_SqnObj:SetDespawnAfterHolding(true) Mi26_1_SqnObj:SetAttribute(GROUP.Attribute.AIR_TRANSPORTHELO) --Add Debugging Information DebugLogger("SQUADONS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Brigades ------------------------------------------------------------------------------------------------------------------------------------- --Define Red Brigades local MelezBrigadeObj = BRIGADE:New(MelezABWhObj:GetName(),"Melez Brigade") MelezBrigadeObj:AddPlatoon(INF90PlatoonObj) MelezBrigadeObj:AddPlatoon(MIB120Platoon3Obj) MelezBrigadeObj:AddPlatoon(AB56Platoon4Obj) MelezBrigadeObj:AddPlatoon(AB72Platoon4Obj) MelezBrigadeObj:AddPlatoon(AB23Platoon4Obj) --MelezBrigadeObj:SetSpawnZone(ZONE:New("testspawnzone")) --local DifarsuwarBrigadeObj = BRIGADE:New(DifarsuwarABWhObj:GetName(),"Difarsuwar Brigade") -- DifarsuwarBrigadeObj:AddPlatoon(INF90PlatoonObj) -- DifarsuwarBrigadeObj:AddPlatoon(MIB120Platoon3Obj) -- DifarsuwarBrigadeObj:AddPlatoon(AB56Platoon4Obj) -- DifarsuwarBrigadeObj:AddPlatoon(AB72Platoon4Obj) -- DifarsuwarBrigadeObj:AddPlatoon(AB23Platoon4Obj) -- --DifarsuwarBrigadeObj:SetSpawnZone(ZONE:New("testspawnzone")) --Add Debugging Information DebugLogger("BRIGADES LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Air Wings and Parameters ------------------------------------------------------------------------------------------------------------------------------------- --Define Redfor Air Wings local AW601Obj = AIRWING:New(CairoIntAPWhObj:GetName(),"601st TFW") AW601Obj:AddSquadron(A50_1_SqnObj) AW601Obj:NewPayload("Red A-50 Template", 1, {AUFTRAG.Type.AWACS, AUFTRAG.Type.ALERT5}, 100) --Define the Alert5 for the AWACS local cairoIntAWACSAlert5Obj=AUFTRAG:NewALERT5(AUFTRAG.Type.AWACS) cairoIntAWACSAlert5Obj:SetRequiredAssets(5) AW601Obj:AddMission(cairoIntAWACSAlert5Obj) --MiG21_1_SqnObj --MiG23_1_SqnObj --SU24_1_SqnObj --MiG29_1_SqnObj --M2000_1_SqnObj --F16_1_SqnObj --H6J_1_SqnObj --A50_1_SqnObj --Mi24_1_SqnObj --Mi26_1_SqnObj local AW312Obj = AIRWING:New(MelezABWhObj:GetName(),"Melez AW") AW312Obj:AddSquadron(MiG21_1_SqnObj) AW312Obj:AddSquadron(MiG23_1_SqnObj) AW312Obj:AddSquadron(SU24_1_SqnObj) AW312Obj:AddSquadron(Mi24_1_SqnObj) AW312Obj:NewPayload("Red MiG-21 Payload Medium Range", 4, {AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP}, 100) AW312Obj:NewPayload("Red MiG-23 Payload CAP", 4, {AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP}, 100) AW312Obj:NewPayload("Red Su-24 Template", 4, {AUFTRAG.Type.CAS, AUFTRAG.Type.CASENHANCED}, 100) AW312Obj:NewPayload("H-6J Template", 3, {AUFTRAG.Type.BOMBCARPET, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY, AUFTRAG.Type.STRIKE}, 100) AW312Obj:NewPayload("Red Mi-24P Payload CAS", 2, {AUFTRAG.Type.BAI, AUFTRAG.Type.CAS, AUFTRAG.Type.CASENHANCED, AUFTRAG.Type.GROUNDATTACK, AUFTRAG.Type.GROUNDESCORT},100) local AW272Obj = AIRWING:New(JiyanklisABWhObj:GetName(),"Jiyanlkis AW") AW272Obj:AddSquadron(F16_1_SqnObj) AW272Obj:NewPayload("Red F-16A Payload CAP", 4, {AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP}, 100) AW272Obj:NewPayload("Red F-16A Payload Intercept", 4, {AUFTRAG.Type.INTERCEPT}, 100) local AW370Obj = AIRWING:New(BilbeisABWhObj:GetName(),"Bilbeis AW") AW370Obj:AddSquadron(M2000_1_SqnObj) AW370Obj:NewPayload("Red M2000 Template", 2, {AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.ALERT5, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.ESCORT},100) --Add Debugging Information DebugLogger("AIRWNGS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Chief and Parameters ------------------------------------------------------------------------------------------------------------------------------------- --Define Red Chief local redChiefObj = CHIEF:New(coalition.side.RED, Agents, "REDCHIEF") --Define zones redChiefObj:AddBorderZone(redBorderZoneObj) --Add Brigades redChiefObj:AddBrigade(MelezBrigadeObj) --redChiefObj:AddBrigade(DifarsuwarBrigadeObj) --Add Airwings redChiefObj:AddAirwing(AW601Obj) redChiefObj:AddAirwing(AW312Obj) redChiefObj:AddAirwing(AW272Obj) redChiefObj:AddAirwing(AW370Obj) --Set mission limits redChiefObj:SetLimitMission(4, AUFTRAG.Type.INTERCEPT) redChiefObj:SetLimitMission(4, AUFTRAG.Type.CAP) redChiefObj:SetLimitMission(4, AUFTRAG.Type.GCICAP) redChiefObj:SetLimitMission(5, AUFTRAG.Type.AWACS) redChiefObj:SetLimitMission(4, AUFTRAG.Type.ONGUARD) --Set Strategy/Tactical Overview redChiefObj:SetStrategy(CHIEF.Strategy.DEFENSIVE) if DEBUGGING then redChiefObj:SetTacticalOverviewOn() end --Add AWACS Zones redChiefObj:AddAwacsZone(redAwacsZoneObj, 35000, 350, 086, 30) --Add CAP Zones redChiefObj:AddGciCapZone(redCAPZone1Obj, 20000, 300, 091, 50) redChiefObj:AddGciCapZone(redCAPZone2Obj, 20000, 300, 2, 50) redChiefObj:AddGciCapZone(redSinaiCAPZoneObj, 20000, 340, 2, 50) --Start the Red Chief redChiefObj:Start() --Add Debugging Information DebugLogger("CHIEF LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define JTAC/FACA ------------------------------------------------------------------------------------------------------------------------------------- -- Define JTAC/FACA Object local blueFACAObj = SET_GROUP:New():FilterPrefixes("Blue FACA"):FilterCoalitions("blue"):FilterStart() local BlueAutoLazeObj = AUTOLASE:New(blueFACAObj,coalition.side.BLUE,"11TH RECON SQUDRON", nil) --JTAC settings BlueAutoLazeObj:SetLasingParameters(35000, 300) -- Might not be needed. I believe autolase doesn't care about vertical distance, only horizontal. Unsure. BlueAutoLazeObj:SetSmokeTargets(false, SMOKECOLOR.Red) -- Deploy smoke on targets automatically BlueAutoLazeObj:SetNotifyPilots(true) -- Whether to flash notifications on screen when target changes, etc. BlueAutoLazeObj:SetLaserCoolDown(false) -- Prevents laser from turning off after 5 minutes? BlueAutoLazeObj:SetMaxLasingTargets(1) -- Lase only 1 target at once BlueAutoLazeObj:SetLaserCodes({math.random(1511,1788), math.random(1511,1788), math.random(1511,1788), math.random(1511,1788)}) --General FAC Spawn function function SpawnFACA(args) --Spawn the new FACA blueFACA:New("Blue FACA"):SpawnInZone(ZONE:New(args), true, 1828, 1829) MESSAGE:New("PREADATOR ON STATION, " .. string.upper(args) .. ", AT 6 THOUSAND! \n SEE F10 MENU AUTO LASE FOR TGT INFO!", 30):ToAll() --.."\n " --.."\n Use F10 Menu Auto Lase for TGT Info." end --Setup the FACA Menu System FACATopMenu = MENU_COALITION:New(coalition.side.BLUE, "REQUEST FACA" , TopMenu) --FACARegionMenu1 = MENU_COALITION:New(coalition.side.BLUE, "REGION SINAI PENN.", FACATopMenu) FACAAlHasanahMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT AL HASANAH", FACATopMenu, SpawnFACA, "Al Hasanah") FACABaluzaMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT BALUZA AIRBASE", FACATopMenu, SpawnFACA, "Baluza") FACABiraLaBDMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT BIR AL ABD", FACATopMenu, SpawnFACA, "Bir Al Abd") FACABirHasanahMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT BIR HASANAH AIRBASE", FACATopMenu, SpawnFACA, "Bir Hasanah") FACAElArishMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT EL ARISH AIRBASE", FACATopMenu, SpawnFACA, "El Arish") FACAElArishPPMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT EL ARISH POWER PLANT", FACATopMenu, SpawnFACA, "El Arish Power Plant") FACAElGoraMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT EL GORA AIRBASE", FACATopMenu, SpawnFACA, "El Gora") FACAMelezMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT MELEZ AIRBASE", FACATopMenu, SpawnFACA, "Melez") FACABirAlAbdMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT NEKHEL", FACATopMenu, SpawnFACA, "Nekhel") FACAOmousaPPMenu = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"AT OMOUSA POWER PLANT", FACATopMenu, SpawnFACA, "OMousa Power Plant") --FACAHatzerimMenu:Remove() --Add Debugging Information DebugLogger("JTAC LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define CTLD ------------------------------------------------------------------------------------------------------------------------------------- --Table for groups to include in the blue side CTLD local blueCTLDGroups = { "Talon-1-1", "Talon-1-2", "Talon-1-3", "Talon-1-4", "Corsair-1-1", "Corsair-1-2", "Corsair-1-3", "Corsair-1-4", "King-Pin-1-1", "King-Pin-1-2", "King-Pin-1-3", "King-Pin-1-4", "AAQ-UH-60L-1-1", "AAQ-UH-60L-1-2", "AAQ-UH-60L-1-3", "AAQ-UH-60L-1-4", "AAQ-CH-47F-1-1", "AAQ-CH-47F-1-2", "AAQ-CH-47F-1-3", "AAQ-CH-47F-1-4", } --Define Blue CTLD Object and its settings blueCTLDObj = CTLD:New(coalition.side.BLUE, blueCTLDGroups, "82nd CAB") blueCTLDObj.useprefix = true -- (DO NOT SWITCH THIS OFF UNLESS YOU KNOW WHAT YOU ARE DOING!) Adjust **before** starting CTLD. If set to false, *all* choppers of the coalition side will be enabled for CTLD. blueCTLDObj.CrateDistance = 35 -- List and Load crates in this radius only. blueCTLDObj.PackDistance = 35 -- Pack crates in this radius only blueCTLDObj.dropcratesanywhere = true -- Option to allow crates to be dropped anywhere. blueCTLDObj.dropAsCargoCrate = false -- Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked. Needs a cargo with the same name defined like the cargo that was dropped. blueCTLDObj.maximumHoverHeight = 15 -- Hover max this high to load. blueCTLDObj.minimumHoverHeight = 4 -- Hover min this low to load. blueCTLDObj.forcehoverload = false -- Crates (not: troops) can **only** be loaded while hovering. blueCTLDObj.hoverautoloading = true -- Crates in CrateDistance in a LOAD zone will be loaded automatically if space allows. blueCTLDObj.smokedistance = 2000 -- Smoke or flares can be request for zones this far away (in meters). blueCTLDObj.movetroopstowpzone = true -- Troops and vehicles will move to the nearest MOVE zone... blueCTLDObj.movetroopsdistance = 5000 -- .. but only if this far away (in meters) blueCTLDObj.smokedistance = 2000 -- Only smoke or flare zones if requesting player unit is this far away (in meters) blueCTLDObj.suppressmessages = false -- Set to true if you want to script your own messages. blueCTLDObj.repairtime = 300 -- Number of seconds it takes to repair a unit. blueCTLDObj.buildtime = 0 -- Number of seconds it takes to build a unit. Set to zero or nil to build instantly. blueCTLDObj.cratecountry = country.id.GERMANY -- ID of crates. Will default to country.id.RUSSIA for RED coalition setups. blueCTLDObj.allowcratepickupagain = true -- allow re-pickup crates that were dropped. blueCTLDObj.enableslingload = false -- allow cargos to be slingloaded - might not work for all cargo types blueCTLDObj.pilotmustopendoors = false -- force opening of doors blueCTLDObj.SmokeColor = SMOKECOLOR.Red -- default color to use when dropping smoke from heli blueCTLDObj.FlareColor = FLARECOLOR.Red -- color to use when flaring from heli blueCTLDObj.basetype = "ammo_cargo" -- default shape of the cargo container blueCTLDObj.droppedbeacontimeout = 600 -- dropped beacon lasts 10 minutes blueCTLDObj.usesubcats = true -- use sub-category names for crates, adds an extra menu layer in "Get Crates", useful if you have > 10 crate types. blueCTLDObj.placeCratesAhead = false -- place crates straight ahead of the helicopter, in a random way. If true, crates are more neatly sorted. blueCTLDObj.nobuildinloadzones = false -- forbid players to build stuff in LOAD zones if set to `true` blueCTLDObj.movecratesbeforebuild = false -- crates must be moved once before they can be build. Set to false for direct builds. blueCTLDObj.surfacetypes = {land.SurfaceType.LAND,land.SurfaceType.ROAD,land.SurfaceType.RUNWAY,land.SurfaceType.SHALLOW_WATER} -- surfaces for loading back objects. blueCTLDObj.nobuildmenu = false -- if set to true effectively enforces to have engineers build/repair stuff for you. --blueCTLDObj.RadioSound = "beacon.ogg" -- -- this sound will be hearable if you tune in the beacon frequency. Add the sound file to your miz. --blueCTLDObj.RadioSoundFC3 = "beacon.ogg" -- this sound will be hearable by FC3 users (actually all UHF radios); change to something like "beaconsilent.ogg" and add the sound file to your miz if you don't want to annoy FC3 pilots. blueCTLDObj.enableChinookGCLoading = true -- this will effectively suppress the crate load and drop for CTLD_CARGO.Enum.STATIc types for CTLD for the Chinook blueCTLDObj.TroopUnloadDistGround = 5 -- If hovering, spawn dropped troops this far away in meters from the helo blueCTLDObj.TroopUnloadDistHover = 1.5 -- If grounded, spawn dropped troops this far away in meters from the helo blueCTLDObj.TroopUnloadDistGroundHerc = 25 -- On the ground, unload troops this far behind the Hercules blueCTLDObj.TroopUnloadDistGroundHook = 15 -- On the ground, unload troops this far behind the Chinook --For Herculese Mod by Anubis blueCTLDObj.enableHercules = true blueCTLDObj.HercMinAngels = 155 -- for troop/cargo drop via chute in meters, ca 470 ft blueCTLDObj.HercMaxAngels = 2000 -- for troop/cargo drop via chute in meters, ca 6000 ft blueCTLDObj.HercMaxSpeed = 77 -- 77mps or 270kph or 150kn --Define Blue Unit Capabilities --blueCTLDObj:SetUnitCapabilities("SA342Mistral", false, true, 0, 4, 12, 400) --blueCTLDObj:SetUnitCapabilities("SA342Mistral", false, true, 0, 4, 12, 400) --blueCTLDObj:SetUnitCapabilities("SA342L", false, true, 0, 2, 12, 400) --blueCTLDObj:SetUnitCapabilities("SA342M", false, true, 0, 4, 12, 400) --blueCTLDObj:SetUnitCapabilities("SA342Minigun", false, true, 0, 2, 12, 400) blueCTLDObj:SetUnitCapabilities("UH-1H", true, true, 1, 8, 15, 700) --blueCTLDObj:SetUnitCapabilities("Mi-8MT", true, true, 2, 12, 15, 3000) --blueCTLDObj:SetUnitCapabilities("Mi-8MTV2", true, true, 2, 12, 15, 3000) --blueCTLDObj:SetUnitCapabilities("Ka-50", false, false, 0, 0, 15, 0) --blueCTLDObj:SetUnitCapabilities("Mi-24P", true, true, 2, 8, 18, 700) --blueCTLDObj:SetUnitCapabilities("Mi-24V", true, true, 2, 8, 18, 700) blueCTLDObj:SetUnitCapabilities("Hercules", true, true, 7, 64, 25, 19000) blueCTLDObj:SetUnitCapabilities("UH-60L", true, true, 2, 20, 16, 3500) blueCTLDObj:SetUnitCapabilities("AH-64D_BLK_II", false, true, 0, 2, 17, 200) blueCTLDObj:SetUnitCapabilities("MH-60R", true, true, 2, 20, 16, 3500) blueCTLDObj:SetUnitCapabilities("SH-60B", true, true, 2, 20, 16, 3500) blueCTLDObj:SetUnitCapabilities("Bronco-OV-10A", false, true, 0, 5, 13, 1450) blueCTLDObj:SetUnitCapabilities("Bronco-OV-10A", false, true, 0, 5, 13, 1450) blueCTLDObj:SetUnitCapabilities("OH-6A", false, true, 0, 4, 7, 550) blueCTLDObj:SetUnitCapabilities("CH-47Fbl1", true, true, 4, 31, 20, 8000) --Define Cargo Types blueCTLDObj:AddTroopsCargo("INFANTRY SQUAD", {"Blue IFS"}, CTLD_CARGO.Enum.TROOPS, 6, 91, 6) blueCTLDObj:AddTroopsCargo("ANTI TANK SQUAD", {"Blue ATS"}, CTLD_CARGO.Enum.TROOPS, 6, 91, 6) blueCTLDObj:AddTroopsCargo("MORTAR SQUAD", {"Blue Mortar"}, CTLD_CARGO.Enum.TROOPS, 6, 91, 6) blueCTLDObj:AddTroopsCargo("ENGINEER SQUAD", {"Blue Engineer"}, CTLD_CARGO.Enum.TROOPS, 6, 91, 6) blueCTLDObj:AddTroopsCargo("JTAC SQUAD", {"Blue JTAC"}, CTLD_CARGO.Enum.TROOPS, 1, 72) --Define Vehicle Types blueCTLDObj:AddCratesCargo("HMMWV M2", {"Blue HMMWV Armament"}, CTLD_CARGO.Enum.VEHICLE, 1, 1090, nil, "VEHICLES") blueCTLDObj:AddCratesCargo("HMMWV TOW", {"Blue HMMWV Tow"}, CTLD_CARGO.Enum.VEHICLE, 1, 1090, nil, "VEHICLES") blueCTLDObj:AddCratesCargo("LAV25", {"Blue LAV-25"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "VEHICLES") blueCTLDObj:AddCratesCargo("M2 BRADLEY", {"Blue M-2 Bradley"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "VEHICLES") blueCTLDObj:AddCratesCargo("M939 TRUCK", {"Blue M939 Truck"}, CTLD_CARGO.Enum.VEHICLE, 1, 1090, nil, "VEHICLES") --Define SAM Types blueCTLDObj:AddCratesCargo("SAM RAPIER SITE", {"Blue SAM Rapier Template"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "SAMS") blueCTLDObj:AddCratesCargo("SAM HAWK SITE", {"Blue SAM Hawk Template"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "SAMS") blueCTLDObj:AddCratesCargo("SAM NASAM SITE", {"Blue SAM NASAM Template"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "SAMS") blueCTLDObj:AddCratesCargo("SAM PATRIOT SITE", {"Blue SAM Patriot Template"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "SAMS") blueCTLDObj:AddCratesCargo("SAM IRON DOME SITE",{"Blue SAM Iron Dome Template"}, CTLD_CARGO.Enum.VEHICLE, 1, 11611, nil, "SAMS") --Define Load/Move/Drop Zones blueCTLDObj:AddCTLDZoneFromAirbase("Hatzerim", CTLD.CargoZoneType.LOAD, SMOKECOLOR.Blue, true, true) blueCTLDObj:AddCTLDZoneFromAirbase("Ramon Airbase", CTLD.CargoZoneType.LOAD, SMOKECOLOR.Blue, true, true) blueCTLDObj:AddCTLDZone("LHA-1",CTLD.CargoZoneType.SHIP, SMOKECOLOR.Blue, true, true, 245, 37) blueCTLDObj:AddCTLDZone("CVN-72",CTLD.CargoZoneType.SHIP, SMOKECOLOR.Blue, true, true, 330, 74) blueCTLDObj:AddCTLDZone(CmdHQOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(BaluzaOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(MelezOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(OMousaPPOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(BirAlAbdOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(BirHasanahOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) --blueCTLDObj:AddCTLDZone(NekhelOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(ElArishOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(ElAirshPPOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) --blueCTLDObj:AddCTLDZone(AlHasanahOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) blueCTLDObj:AddCTLDZone(ElGoraOpsZoneObj:GetName(),CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) --Start CTLD blueCTLDObj:Start(2) --Add Debugging Information DebugLogger("CTLD LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define CSAR ------------------------------------------------------------------------------------------------------------------------------------- --Table for groups to include in the blue side CSAR --local blueCSARGroups = { -- "Talon-1-1", -- "Talon-1-2", -- "Talon-1-3", -- "Talon-1-4", -- "Corsair-1-1", -- "Corsair-1-2", -- "Corsair-1-3", -- "Corsair-1-4", -- "King-Pin-1-1", -- "King-Pin-1-2", -- "King-Pin-1-3", -- "King-Pin-1-4", -- "AAQ-UH-60L-1-1", -- "AAQ-UH-60L-1-2", -- "AAQ-UH-60L-1-3", -- "AAQ-UH-60L-1-4", -- "AAQ-CH-47F-1-1", -- "AAQ-CH-47F-1-2", -- "AAQ-CH-47F-1-3", -- "AAQ-CH-47F-1-4", -- } --Define Blue CSAR Object and its settings --blueCSARObj = CSAR:New(coalition.side.BLUE, "Downed BLUE Pilot", "82nd CAB") -- blueCSARObj.allowDownedPilotCAcontrol = false -- Set to false if you don\'t want to allow control by Combined Arms. -- blueCSARObj.allowFARPRescue = true -- allows pilots to be rescued by landing at a FARP or Airbase. Else MASH only! -- blueCSARObj.FARPRescueDistance = 1000 -- you need to be this close to a FARP or Airport for the pilot to be rescued. -- blueCSARObj.autosmoke = false -- automatically smoke a downed pilot\'s location when a heli is near. -- blueCSARObj.autosmokedistance = 1000 -- distance for autosmoke -- blueCSARObj.coordtype = 1 -- Use Lat/Long DDM (0), Lat/Long DMS (1), MGRS (2), Bullseye imperial (3) or Bullseye metric (4) for coordinates. -- blueCSARObj.csarOncrash = false -- (WIP) If set to true, will generate a downed pilot when a plane crashes as well. -- blueCSARObj.enableForAI = false -- set to false to disable AI pilots from being rescued. -- blueCSARObj.pilotRuntoExtractPoint = true -- Downed pilot will run to the rescue helicopter up to mycsar.extractDistance in meters. -- blueCSARObj.extractDistance = 500 -- Distance the downed pilot will start to run to the rescue helicopter. -- blueCSARObj.immortalcrew = true -- Set to true to make wounded crew immortal. -- blueCSARObj.invisiblecrew = false -- Set to true to make wounded crew insvisible. -- blueCSARObj.loadDistance = 75 -- configure distance for pilots to get into helicopter in meters. -- blueCSARObj.mashprefix = {"MASH"} -- prefixes of #GROUP objects used as MASHes. -- blueCSARObj.max_units = 6 -- max number of pilots that can be carried if #CSAR.AircraftType is undefined. -- blueCSARObj.messageTime = 15 -- Time to show messages for in seconds. Doubled for long messages. -- blueCSARObj.radioSound = "beacon.ogg" -- the name of the sound file to use for the pilots\' radio beacons. -- blueCSARObj.smokecolor = 4 -- Color of smokemarker, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue. -- blueCSARObj.useprefix = true -- Requires CSAR helicopter #GROUP names to have the prefix(es) defined below. -- blueCSARObj.csarPrefix = { "helicargo", "MEDEVAC"} -- #GROUP name prefixes used for useprefix=true - DO NOT use # in helicopter names in the Mission Editor! -- blueCSARObj.verbose = 0 -- set to > 1 for stats output for debugging. -- -- limit amount of downed pilots spawned by **ejection** events -- blueCSARObj.limitmaxdownedpilots = true -- blueCSARObj.maxdownedpilots = 10 -- -- allow to set far/near distance for approach and optionally pilot must open doors -- blueCSARObj.approachdist_far = 5000 -- switch do 10 sec interval approach mode, meters -- blueCSARObj.approachdist_near = 3000 -- switch to 5 sec interval approach mode, meters -- blueCSARObj.pilotmustopendoors = false -- switch to true to enable check of open doors -- blueCSARObj.suppressmessages = false -- switch off all messaging if you want to do your own -- blueCSARObj.rescuehoverheight = 20 -- max height for a hovering rescue in meters -- blueCSARObj.rescuehoverdistance = 10 -- max distance for a hovering rescue in meters -- -- Country codes for spawned pilots -- blueCSARObj.countryblue= country.id.USA -- blueCSARObj.countryred = country.id.RUSSIA -- blueCSARObj.countryneutral = country.id.UN_PEACEKEEPERS -- blueCSARObj.topmenuname = "CSAR" -- set the menu entry name -- blueCSARObj.ADFRadioPwr = 1000 -- ADF Beacons sending with 1KW as default -- blueCSARObj.PilotWeight = 80 -- Loaded pilots weigh 80kgs each -- blueCSARObj.AllowIRStrobe = false -- Allow a menu item to request an IR strobe to find a downed pilot at night (requires NVGs to see it). -- blueCSARObj.IRStrobeRuntime = 300 -- If an IR Strobe is activated, it runs for 300 seconds (5 mins). --Add Debugging Information --DebugLogger("CSAR LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define OpZone Functions ------------------------------------------------------------------------------------------------------------------------------------- parashoo = {} -- remove parachuted pilots after landing function parashoo:onEvent(event) if event.id == 31 then -- landing_after_eject if event.initiator then if Unit~=nil then Unit.destroy(event.initiator) end end end end -- add event handler world.addEventHandler(parashoo) --Start the Opzones CmdHQOpsZoneObj:Start() BaluzaOpsZoneObj:Start() MelezOpsZoneObj:Start() OMousaPPOpsZoneObj:Start() BirAlAbdOpsZoneObj:Start() BirHasanahOpsZoneObj:Start() --NekhelOpsZoneObj:Start() ElArishOpsZoneObj:Start() ElAirshPPOpsZoneObj:Start() --AlHasanahOpsZoneObj:Start() ElGoraOpsZoneObj:Start() --Add the Opzones to Chief redChiefObj:AddStrategicZone(CmdHQOpsZoneObj, 1, 1, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(BaluzaOpsZoneObj, 2, 2, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(MelezOpsZoneObj, 3, 3, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(OMousaPPOpsZoneObj, 4, 4, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(BirAlAbdOpsZoneObj, 5, 5, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(BirHasanahOpsZoneObj, 6, 6, ResourceOccupied, ResourceEmpty) --redChiefObj:AddStrategicZone(NekhelOpsZoneObj, 7, 7, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(ElArishOpsZoneObj, 8, 8, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(ElAirshPPOpsZoneObj, 9, 9, ResourceOccupied, ResourceEmpty) --redChiefObj:AddStrategicZone(AlHasanahOpsZoneObj, 10, 10, ResourceOccupied, ResourceEmpty) redChiefObj:AddStrategicZone(ElGoraOpsZoneObj, 11, 11, ResourceOccupied, ResourceEmpty) function CmdHQOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --ENTER CODE HERE-- elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end function BaluzaOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --Spawn Redfor Defense SPAWN:New("Red Shilka Baluza"):Spawn() elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end function MelezOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --ENTER CODE HERE-- elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end function OMousaPPOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --Spawn Redfor Defense SPAWN:New("Red Shilka OMousePP"):Spawn() elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end function BirAlAbdOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --Spawn Redfor Defense SPAWN:New("Red Insurgents BirAlAbd"):Spawn() SPAWN:New("Red SA-11 BirAlAbd"):Spawn() SPAWN:New("Red SA-17 BirAlAbd"):Spawn() elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end function BirHasanahOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --ENTER CODE HERE-- elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end --function NekhelOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) -- --Check for coalition owner -- if string.upper(self:GetOwnerName()) == "RED" then -- --Send Message to All -- MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() -- -- --ENTER CODE HERE-- -- -- elseif string.upper(self:GetOwnerName()) == "BLUE" then -- --Send Message to All -- MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() -- -- --ENTER CODE HERE-- -- -- end --end function ElArishOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --Spawn Redfor Defense SPAWN:New("Red ElArish SA3"):Spawn() SPAWN:New("Red ElArish Response"):Spawn() elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end function ElAirshPPOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --Spawn Redfor Defense SPAWN:New("Red ElArishPP SA3"):Spawn() SPAWN:New("Red ElArishPP Telar"):Spawn() SPAWN:New("ElArishCaptureGroup"):Spawn() elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end --function AlHasanahOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) -- --Check for coalition owner -- if string.upper(self:GetOwnerName()) == "RED" then -- --Send Message to All -- MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() -- -- --ENTER CODE HERE-- -- -- elseif string.upper(self:GetOwnerName()) == "BLUE" then -- --Send Message to All -- MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() -- -- --ENTER CODE HERE-- -- -- end --end function ElGoraOpsZoneObj:OnAfterCaptured(From, Event, To, Coalition, Country) --Check for coalition owner if string.upper(self:GetOwnerName()) == "RED" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY NIF FORCES!",60):ToAll() --Spawn Redfor Defense SPAWN:New("Red Elgora SA3"):Spawn() SPAWN:New("Red Elgora AAA"):Spawn() SPAWN:New("Red ElGora Inf"):Spawn() SPAWN:New("Red ElGora Armor"):Spawn() elseif string.upper(self:GetOwnerName()) == "BLUE" then --Send Message to All MESSAGE:New(string.upper(self:GetName()) .. " HAS BEEN CAPTURED BY US/NATO FORCES!",60):ToAll() --ENTER CODE HERE-- end end --Add Debugging Information DebugLogger("OPSZONE FUNCTIONS LOADED") ------------------------------------------------------------------------------------------------------------------------------------- -- Define Chief Functions ------------------------------------------------------------------------------------------------------------------------------------- --Add the Custom Response Resources local ResourceEmpty, ResourceINF = redChiefObj:CreateResource(AUFTRAG.Type.ONGUARD, 2, 2, GROUP.Attribute.GROUND_INFANTRY) redChiefObj:AddTransportToResource(ResourceINF, 1, 4, {GROUP.Attribute.AIR_TRANSPORTHELO, GROUP.Attribute.GROUND_APC}) redChiefObj:AddToResource(ResourceEmpty, AUFTRAG.Type.PATROLZONE, 2, 4) --redChiefObj:AddToResource(ResourceEmpty, AUFTRAG.Type.AIRDEFENSE, 2) local ResourceOccupied, resourceCAS = redChiefObj:CreateResource(AUFTRAG.Type.CAS, 1, 2) redChiefObj:AddToResource(ResourceOccupied, AUFTRAG.Type.PATROLZONE, 2, 3, GROUP.Attribute.GROUND_TANK) redChiefObj:AddToResource(ResourceOccupied, AUFTRAG.Type.PATROLZONE, 2) redChiefObj:AddToResource(ResourceOccupied, AUFTRAG.Type.BOMBCARPET, 4) --Function called each time Chief Agents detect a new contact. --function redChiefObj:OnAfterNewContact(From, Event, To, Contact) -- -- -- Gather info of contact. -- local ContactName=redChiefObj:GetContactName(Contact) -- local ContactType=redChiefObj:GetContactTypeName(Contact) -- local ContactThreat=redChiefObj:GetContactThreatlevel(Contact) -- -- -- Text message. -- local text=string.format("Detected NEW contact: Name=%s, Type=%s, Threat Level=%d", ContactName, ContactType, ContactThreat) -- -- -- Show message in log file. -- env.info(text) -- --end -- ----Function called each time the Chief sends an asset group on a mission. --function redChiefObj:OnAfterOpsOnMission(From, Event, To, OpsGroup, Mission) -- local opsgroup=OpsGroup --Ops.OpsGroup#OPSGROUP -- local mission=Mission --Ops.Auftrag#AUFTRAG -- -- -- Info message to log file which group is launched on which mission. -- local text=string.format("Group %s is on mission %s [%s]", opsgroup:GetName(), mission:GetName(), mission:GetType()) -- env.info(text) -- -- MESSAGE:New("There is something happening", 25):ToBlue() -- --end --Add Debugging Information DebugLogger("CHIEF FUNCTIONS LOADED") ----------------------------------------------------------------------------------------------------------------------------------- -- Update logs that script loaded successfully ----------------------------------------------------------------------------------------------------------------------------------- DebugLogger("SCRIPT HAS SUCCESSFULLY LOADED!") env.info("SYRIA PUBLIC SCRIPT: SCRIPT HAS SUCCESSFULLY LOADED!")