├── @ExileServer └── addons │ ├── custom_server │ ├── $PREFIX$ │ ├── AIMission │ │ ├── clearMines.sqf │ │ ├── removeGear.sqf │ │ ├── fitSights.sqf │ │ ├── AIM.sqf │ │ ├── Minor2 │ │ │ ├── compositions │ │ │ │ └── compositionsRed.sqf │ │ │ ├── minor2Timer.sqf │ │ │ └── SM1.sqf │ │ ├── spawnVehicle.sqf │ │ ├── spawnCrate.sqf │ │ ├── Minor │ │ │ ├── compositions │ │ │ │ └── compositionsBlue.sqf │ │ │ ├── minorTimer.sqf │ │ │ └── SM1.sqf │ │ ├── spawnComposition.sqf │ │ ├── playerInRange.sqf │ │ ├── selectClosest.sqf │ │ ├── randomPosn.sqf │ │ ├── Major2 │ │ │ ├── major2Timer.sqf │ │ │ ├── compositions │ │ │ │ ├── compositionsGreen.sqf │ │ │ │ └── compositionsGreen_pub.sqf │ │ │ └── SM1.sqf │ │ ├── decomissionAIVehicle.sqf │ │ ├── spawnMissionVehicles.sqf │ │ ├── spawnMines.sqf │ │ ├── setWaypoints.sqf │ │ ├── signalEnd2.sqf │ │ ├── Major │ │ │ ├── majorTimer.sqf │ │ │ ├── compositions │ │ │ │ └── compositionsOrange.sqf │ │ │ └── SM1.sqf │ │ ├── signalEnd.sqf │ │ ├── findSafePosn.sqf │ │ ├── cleanUpObjects.sqf │ │ ├── smokeAtCrate.sqf │ │ ├── spawnGroups.sqf │ │ ├── spawnMissionCrates.sqf │ │ ├── AIHit.sqf │ │ ├── spawnEmplaced.sqf │ │ ├── vehicleMonitor.sqf │ │ ├── smokeAtCrates.sqf │ │ ├── spawnGroup.sqf │ │ ├── vehicleHit.sqf │ │ ├── configOverrides.sqf │ │ ├── otl7_Mapper.sqf │ │ ├── fillBoxes.sqf │ │ ├── spawnVehiclePatrols.sqf │ │ ├── findWorld.sqf │ │ ├── AIKilled.sqf │ │ ├── spawnUnit.sqf │ │ ├── AIFunctions.sqf │ │ └── AIconfigs.sqf │ └── init.sqf │ └── custom_server.pbo ├── mpmissions ├── Exile.Altis.pbo └── Exile.Altis │ ├── init.sqf │ ├── debug │ ├── deleteMarker.sqf │ ├── missionCompleteMarker.sqf │ └── spawnMarker.sqf │ └── blckClient.sqf ├── .gitattributes ├── .gitignore └── README.md /@ExileServer/addons/custom_server/$PREFIX$: -------------------------------------------------------------------------------- 1 | q\addons\custom_server -------------------------------------------------------------------------------- /mpmissions/Exile.Altis.pbo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AriesLR/Exile-AI-Missions/HEAD/mpmissions/Exile.Altis.pbo -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server.pbo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AriesLR/Exile-AI-Missions/HEAD/@ExileServer/addons/custom_server.pbo -------------------------------------------------------------------------------- /mpmissions/Exile.Altis/init.sqf: -------------------------------------------------------------------------------- 1 | execVM "blckClient.sqf"; 2 | 3 | if (isServer) then { 4 | [] execVM "\q\addons\custom_server\init.sqf"; 5 | }; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/clearMines.sqf: -------------------------------------------------------------------------------- 1 | // Immediately deletes everything in a list 2 | // by Ghostrider-DBD- 3 | // Last modified 8/2/15 4 | 5 | private ["_mines"]; 6 | _mines = _this select 0; 7 | //diag_log format["deleting %1 mines----- >>>> ", count _mines]; 8 | { 9 | deleteVehicle _x; 10 | } forEach _mines; 11 | 12 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/removeGear.sqf: -------------------------------------------------------------------------------- 1 | // remove all gear from a unit 2 | // Last updated 8/2/15 3 | 4 | private["_unit"]; 5 | _unit = _this select 0; 6 | 7 | removeVest _unit; 8 | //removeHeadgear _this; 9 | removeGoggles _unit; 10 | removeAllItems _unit; 11 | removeAllWeapons _unit; 12 | removeBackpackGlobal _unit; 13 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/fitSights.sqf: -------------------------------------------------------------------------------- 1 | // Not used 2 | // Retained for possible future update 3 | 4 | _smgOptics = ["optic_Aco_smg","optic_ACO_grn_smg","optic_Holosight_smg"]; 5 | _sniperOptics = ["optic_Nightstalker", "optic_SOS", "optic_LRPS", "optic_DMS"]; 6 | _rifleOptics = ["optic_Aco","optic_ACO_grn","optic_Holosight","optic_Hamr","optic_Arco"]; -------------------------------------------------------------------------------- /mpmissions/Exile.Altis/debug/deleteMarker.sqf: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////// 2 | // Create, delete and change Mission Markers 3 | // 7/10/15 4 | // by Ghostrider-DbD- 5 | ////////////////////////////////////////// 6 | // delete a marker 7 | 8 | private["_markerName"]; 9 | _markerName = _this select 0; 10 | deleteMarker _markerName; 11 | _markerName = "label" + _markerName; 12 | deleteMarker _markerName; 13 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/AIM.sqf: -------------------------------------------------------------------------------- 1 | // Original code by blckeagl 2 | //This script sends Message Information to allplayers 3 | // Last modified 7/18/15 by Ghostrider-DBD- 4 | //diag_log format["====AIM.sqf: _this = %1",_this]; 5 | blck_Message = _this; 6 | //diag_log format["AIM.sqf ===] _this = %1",_this]; 7 | { 8 | (owner _x) publicVariableClient "blck_Message"; 9 | } foreach playableUnits; 10 | 11 | 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Minor2/compositions/compositionsRed.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Mission Compositions by Bill prepared for DBD Clan 3 | */ 4 | private ["_default","_resupplyCamp","_redCamp","_medicalCamp","_crateLoot"]; 5 | 6 | _default = [ 7 | [ 8 | "A group of Bandits was sighted in a nearby sector! Check the Red marker on your map for the location!", 9 | "The Sector at the Red Marker is under survivor control!", // Mission End message for player 10 | "Bandit Patrol" 11 | ], 12 | [ // select 1 13 | ], 14 | [], // select 2 15 | [], // select 3 16 | [], // select 4 17 | [] // select 5 18 | ]; 19 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnVehicle.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn a vehicle and protect it against cleanup by Epoch 3 | Returns the object (vehicle) created. 4 | By Ghostrider-DBD- 5 | Last modified 7-16-15 6 | */ 7 | 8 | private["_veh","_pos","_vehType"]; 9 | 10 | _vehType = _this select 0; // type of vehicle to be spawned 11 | _pos = _this select 1; // position at which vehicle is to be spawned 12 | //diag_log format["spawnVehicle.sqf: _this = %1",_this]; 13 | _veh = createVehicle[_vehType, _pos, [], 0, "NONE"]; 14 | _veh setVariable["LAST_CHECK",14400]; 15 | _veh call EPOCH_server_setVToken; 16 | _veh 17 | 18 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnCrate.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | spawn a crate at a specific location and protect it against cleanup by Epoch 3 | returns the object (crate) that was created. 4 | By Ghostrider-DBD- 5 | Last modified 7-14-15 6 | */ 7 | 8 | private ["_coords","_crate","_px","_py","_crateType"]; 9 | 10 | _coords = _this select 0; 11 | _px = _coords select 0; 12 | _py = _coords select 1; 13 | 14 | _crateType = blck_crateTypes call BIS_fnc_selectRandom; 15 | _crate = objNull; 16 | _crate = createVehicle [_crateType,_coords,[], 0, "CAN_COLLIDE"]; 17 | _crate setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 18 | _crate setPos [_px, _py, 0.5]; 19 | 20 | _crate; 21 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Minor/compositions/compositionsBlue.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Mission Compositions by Bill prepared for DBD Clan 3 | */ 4 | private ["_default","_resupplyCamp","_redCamp","_medicalCamp","_crateLoot"]; 5 | 6 | 7 | _default = [ 8 | [ // select 0 9 | "A group of Bandits was sighted in a nearby sector! Check the Blue marker on your map for the location!", 10 | "The Sector at the Blue Marker is under survivor control!", // Mission End message for player 11 | "Bandit Patrol" 12 | ], 13 | [ // select 1 Buildings 14 | ], 15 | [], // select 2 Loot boxes 16 | [], // select 3 vehicles with loot 17 | [], // select 4 Static weapons 18 | [] // select 5 AI Vehicles 19 | ]; 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnComposition.sqf: -------------------------------------------------------------------------------- 1 | // Spawn objects from a list of object names and offsets 2 | 3 | private ["_coords","_objList","_list","_obj","_xpos","_ypos","_offset","_baseObj"]; 4 | _coords = _this select 0; 5 | _objList = _this select 1; 6 | _list = []; 7 | _obj = nil; 8 | 9 | { 10 | _obj = _x select 0; 11 | _offset = _x select 1; 12 | _xpos = _offset select 0; 13 | _ypos = _offset select 1; 14 | _xpos = (_coords select 0) + _xpos; 15 | _ypos = (_coords select 1) + _ypos; 16 | _baseObj = createVehicle [_x select 0,[_xpos,_ypos,0],[], 0, "CAN_COLLIDE"]; 17 | _baseObj setVariable["LAST_CHECK",14400]; 18 | _baseObj setPos [_xpos,_ypos,,0]; 19 | _list = _list + [_baseObj]; 20 | uiSleep 0.2; 21 | } forEach _objList; 22 | 23 | _list 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/playerInRange.sqf: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////// 2 | // Test whether one object (e.g., a player) is within a certain range of any of an array of other objects 3 | // by Ghostrider-DBD- 4 | // Last modified 7/16/15 5 | ///////////////////////////////////////////////////// 6 | 7 | private ["_obj1","_objList","_minDist","_result"]; 8 | _obj1 = _this select 0; // player or other object 9 | _objList = _this select 1; // array of objects 10 | _minDist = _this select 2; // distance below which the function would return true; 11 | _result = false; 12 | 13 | //diag_log format["playerInRange.sqf: _obj1 = %1, _objList = %2 _minDist = %3",_obj1,_objList,_minDist]; 14 | { 15 | if ((_x distance _obj1) < _minDist) exitWith {_result = true;}; 16 | } forEach _objList; 17 | 18 | _result -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/selectClosest.sqf: -------------------------------------------------------------------------------- 1 | // Not used, retained for possible future purpose 2 | 3 | private["_pos","_arr","_sorted","_return"]; 4 | /* 5 | Source: http://forums.bistudio.com/showthread.php?97602-Sort-Array-per-Distance 6 | Edited by KiloSwiss to directly return the closest element in the array that is a player 7 | */ 8 | 9 | _pos = _this select 0; 10 | _arr = _this select 1; 11 | diag_log format["### Possible threads: %1", _arr]; 12 | _sorted = []; 13 | { private "_closest"; 14 | _closest = _arr select 0; diag_log format["### A: %1", _closest]; 15 | {if ((_x distance _pos) < (_closest distance _pos)) then {_closest = _x}} count _arr; 16 | _sorted pushBack _closest; 17 | _arr = _arr - [_closest]; 18 | }forEach _arr; 19 | diag_log format["### B: %1", _sorted]; 20 | _return = _sorted select 0; 21 | diag_log format["### C: %1", _return]; 22 | 23 | _return 24 | -------------------------------------------------------------------------------- /mpmissions/Exile.Altis/debug/missionCompleteMarker.sqf: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////// 2 | // Create, delete and change Mission Markers 3 | // 7/10/15 4 | // by Ghostrider-DbD- 5 | ////////////////////////////////////////// 6 | // spawn a temporary marker to indicate the position of a 'completed' mission 7 | // this will not show to JIP players 8 | 9 | private["_location","_MainMarker","_name"]; 10 | 11 | _location = _this select 0; 12 | _name = str(random(1000000)) + "MarkerCleared"; 13 | //diag_log format["#### missionCompleteMarker.sqf: _this = %3; _location = %1; _name = %2",_location,_name,_this]; 14 | _MainMarker = createMarker [_name, _location]; 15 | _MainMarker setMarkerColor "ColorBlack"; 16 | //_MainMarker setMarkerType "hd_dot"; 17 | _MainMarker setMarkerType "n_hq"; 18 | _MainMarker setMarkerText "Mission Cleared"; 19 | uiSleep blck_MarkerPeristTime; 20 | deleteMarker _MainMarker; 21 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/randomPosn.sqf: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // returns a position array at random position within a radius of _range relative to _pos. 3 | // Ghostrider-DBD- 4 | // Last updated 7/11/15 5 | //////////////////////////////////////////// 6 | 7 | private["_pos","_range","_newX","_newY"]; 8 | _pos = _this select 0; 9 | _range = _this select 1; 10 | 11 | //diag_log format["--<><>randomPosn.sqf: called with parameters %1",_this]; 12 | //diag_log format["--<><>randomPosn.sqf: _pos = %1; _range = %2",_pos, _range]; 13 | _signs = [1,-1]; 14 | _sign = _signs call BIS_fnc_selectRandom; 15 | 16 | _newX = ((_pos select 0) + (random(_range)) * (_signs call BIS_fnc_selectRandom)); 17 | _newY = ((_pos select 1) + (random(_range)) * (_signs call BIS_fnc_selectRandom)); 18 | 19 | //diag_log format["--<><>randomPosn.sqf: return values %1",[_newX,_newY,0]]; 20 | [_newX,_newY,0] 21 | 22 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Minor2/minor2Timer.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Red Mission timer 3 | Code by blckeagls 4 | Modified by Ghostrider 5 | Last modified 7/18/15 6 | See Major\majorTimer.sqf for comments 7 | */ 8 | private ["_coords","_wait","_timeDiff","_timeVar","_wait","_startTime","_allAIGroups","_mission","_minor2Missions","_oldAI"]; 9 | diag_log "[blckeagls] RED mission timer started"; 10 | if (isNil "blck_AIMinor2") then { blck_AIMinor2 = [];}; 11 | 12 | _minor2Missions = ["SM1"]; 13 | 14 | while {true} do { 15 | waitUntil {[blck_TMin_Minor2, blck_TMax_Minor2] call blck_waitTimer}; 16 | blck_AIMinor2 = []; 17 | _coords = [] call blck_FindSafePosn; 18 | _coords pushback 0; 19 | AllMissionCoords set [2,_coords]; 20 | _mission = _minor2Missions call BIS_fnc_selectRandom; 21 | MissionGoMinor2 = true; 22 | [_coords] execVM format["\q\addons\custom_server\AIMission\Minor2\%1.sqf",_mission]; 23 | waitUntil {!MissionGoMinor2}; 24 | _oldAI = blck_AIMinor2; 25 | [_oldAI] spawn blck_AICleanup; 26 | AllMissionCoords set [2,[0,0,0]]; 27 | }; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major2/major2Timer.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Green Mission timer 3 | By blckeagls 4 | Modified by Ghostrider 5 | Last modified 7/11/15 6 | See Major\majorTime.sqf for comments 7 | */ 8 | 9 | private ["_coords","_allAIGroups","_mission","_Major2Missions","_oldAI"]; 10 | diag_log "[blckeagls] GREEN mission timer started"; 11 | if (isNil "blck_AIMajor2") then { blck_AIMajor2 = [];}; 12 | 13 | _Major2Missions = ["SM1"]; 14 | 15 | while {true} do { 16 | waitUntil {[blck_TMin_Major2, blck_TMax_Major2] call blck_waitTimer}; 17 | blck_AIMajor2 = []; 18 | _coords = [] call blck_FindSafePosn; 19 | _coords pushback 0; 20 | //diag_log format["Major2[Green]\MajorTimer.sqf: _coords = %1",_coords]; 21 | AllMissionCoords set [1,_coords]; 22 | _mission = _Major2Missions call BIS_fnc_selectRandom; 23 | MissionGoMajor2 = true; 24 | [_coords] execVM format["\q\addons\custom_server\AIMission\Major2\%1.sqf",_mission]; 25 | waitUntil {!MissionGoMajor2;}; 26 | AllMissionCoords set [1,[0,0,0]]; 27 | _oldAI = blck_AIMajor2; 28 | [_oldAI] spawn blck_AICleanup; 29 | }; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Minor/minorTimer.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Blue Mission timer 3 | Code by blckeagls 4 | Modified by Ghostrider 5 | Last modified 7/11/15 6 | See Major\majorTimer.sqf for comments 7 | */ 8 | private ["_coords","_wait","_timeDiff","_timeVar","_wait","_startTime","_allAIGroups","_mission","_minorMissions","_oldAI"]; 9 | diag_log "[blckeagls] BLUE mission timer started"; 10 | 11 | _minorMissions = ["SM1"]; 12 | if (isNil "blck_AIMinor") then { blck_AIMinor = [];}; 13 | 14 | while {true} do { 15 | waitUntil {[blck_TMin_Minor, blck_TMax_Minor] call blck_waitTimer}; 16 | blck_AIMinor = []; 17 | _coords = [] call blck_FindSafePosn; 18 | _coords pushback 0; 19 | AllMissionCoords set [3,_coords]; 20 | AllMissionCoords = AllMissionCoords + [_coords]; 21 | _mission = _minorMissions call BIS_fnc_selectRandom; 22 | MissionGoMinor = true; 23 | [_coords] execVM format["\q\addons\custom_server\AIMission\Minor\%1.sqf",_mission]; 24 | waitUntil {!MissionGoMinor}; 25 | AllMissionCoords set [3,[0,0,0]]; 26 | _oldAI = blck_AIMinor; 27 | [_oldAI] spawn blck_AICleanup; 28 | }; 29 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/decomissionAIVehicle.sqf: -------------------------------------------------------------------------------- 1 | // ========================================================================================================= 2 | // blckeagls mission system 3 | // Author: Ghostrider-DBD- 4 | // ------------------------------------------------------------------------------------------------------------ 5 | // Unused at present, reserved for the future 6 | 7 | private ["_ai_veh","_ai_veh_hitsource","_ai_veh_type","_ai_veh_name","_ai_veh_side","_ai_veh_group_side","_ai_veh_hitsource_group_side","_ai_veh_hitsource_type","_ai_veh_hitsource_name","_ai_veh_hitsource_side"]; 8 | 9 | diag_log "Vehicle Decommisioning handler activated"; 10 | 11 | _ai_veh = _this select 0; 12 | 13 | _ai_veh_type = typeof _ai_veh; 14 | _ai_veh_name = name _ai_veh; 15 | 16 | _ai_veh setFuel 0; 17 | _ai_veh setVehicleAmmo 0; 18 | _ai_veh setAmmoCargo 0; 19 | 20 | _s = ["MOTOR", 21 | "wheel_1_1_steering","wheel_2_1_steering","wheel_1_2_steering","wheel_2_2_steering", 22 | "wheel_1_3_steering","wheel_2_3_steering","wheel_1_4_steering","wheel_2_4_steering"]; 23 | {_ai_veh setHit [_x,1]} forEach _s; 24 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major2/compositions/compositionsGreen.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Mission Compositions by Bill prepared for DBD Clan 3 | */ 4 | private ["_default","_resupplyCamp","_redCamp","_medicalCamp","_crateLoot"]; 5 | 6 | 7 | _default = [ 8 | [ 9 | "A group of Bandits was sighted in a nearby sector! Check the Green marker on your map for the location!", 10 | "The Sector at the Green Marker is under survivor control!", 11 | "Bandit Patrol" 12 | ], 13 | [ // buildings 14 | ], 15 | [ // loot 16 | ["Box_NATO_Wps_F",[0,0,0],blck_BoxesLoot_Major2,blck_lootCountsMajor2], // Standard loot crate with standard loadout 17 | ["Land_PaperBox_C_EPOCH",[-5,-5,0],blck_BoxesLoot_Major2,[0,0,0,10,10,3]] // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks 18 | //["Land_CargoBox_V1_F",[7, 5.4,0],_crateLoot/*blck_BoxLoot_Major*/,[0,15,7,10,0,0]] // Weapons, magazines, optics, nothing else 19 | ], 20 | [], // Loot Boxes - select 2 21 | [], // vehicles with Loot - select 3 22 | [], // Custom Static Weapons - select 4 23 | [] // Custom AI Vehicles - select 5 24 | ]; 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major2/compositions/compositionsGreen_pub.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Mission Compositions by Bill prepared for DBD Clan 3 | */ 4 | private ["_default","_resupplyCamp","_redCamp","_medicalCamp","_crateLoot"]; 5 | 6 | 7 | _default = [ 8 | [ 9 | "A group of Bandits was sighted in a nearby sector! Check the Green marker on your map for the location!", 10 | "The Sector at the Green Marker is under survivor control!", 11 | "Bandit Patrol" 12 | ], 13 | [ // buildings 14 | ], 15 | [ // loot 16 | ["Box_NATO_Wps_F",[0,0,0],blck_BoxesLoot_Major2,blck_lootCountsMajor2], // Standard loot crate with standard loadout 17 | ["Land_PaperBox_C_EPOCH",[-5,-5,0],blck_BoxesLoot_Major2,[0,0,0,10,10,3]] // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks 18 | //["Land_CargoBox_V1_F",[7, 5.4,0],_crateLoot/*blck_BoxLoot_Major*/,[0,15,7,10,0,0]] // Weapons, magazines, optics, nothing else 19 | ], 20 | [], // Loot Boxes - select 2 21 | [], // vehicles with Loot - select 3 22 | [], // Custom Static Weapons - select 4 23 | [] // Custom AI Vehicles - select 5 24 | ]; 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnMissionVehicles.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn temporary vehicles such as might be used at a mission 3 | By Ghostrider-DBD- 4 | Last updated 7-18-15 5 | */ 6 | 7 | private ["_coords","_vehicles","_vehs","_pos","_offset","_veh"]; 8 | //diag_log format["spawnMissionVehicles.sqf _this = %1",_this]; 9 | _coords =[_this,0,[0,0,0]] call BIS_fnc_param; // base coordinates to which any offsets will be applied 10 | _vehicles = [_this,1,[]] call BIS_fnc_param; // array containing descriptions of vehicles, their offset positions, and loot if any 11 | _vehs = []; 12 | { 13 | //diag_log format["spawnMissionCVehicles.sqf _x = %1",_x]; 14 | _offset = _x select 1; // offset relative to _coords at which to spawn the vehicle 15 | _pos = [(_coords select 0)+(_offset select 0),(_coords select 1) + (_offset select 1),(_coords select 2)+(_offset select 2)]; 16 | _veh = [_x select 0 /* vehicle class name*/, _pos] call blck_spawnVehicle; 17 | _veh setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 18 | _vehs pushback _veh; 19 | [_veh,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fillBoxes; 20 | }forEach _vehicles; 21 | 22 | _vehs 23 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnMines.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawns mines in a region centered around a specific position. 3 | By Ghostrider-DBD- 4 | Last updated 8/2/15 5 | */ 6 | private ["_pos","_noMines","_mineTypes","_minesPlaced","_minDis","_maxDis","_closest","_radius","_xpos","_ypos","_dir","_incr","_i","_j","_posMine","_mine"]; 7 | 8 | _pos = _this select 0; 9 | 10 | _noMines = 50; 11 | _mineTypes = ["ATMine","SLAMDirectionalMine"]; 12 | _minesPlaced = []; 13 | _minDis = 50; 14 | _maxDis = 150; 15 | _closest = 5; 16 | _dir = 0; 17 | _incr = 360/ (_noMines/2); 18 | for "_i" from 1 to _noMines/2 do 19 | { 20 | for "_j" from 1 to 2 do 21 | { 22 | _radius = _maxDis - floor(random(_maxDis - _minDis)); 23 | _xpos = (_pos select 0) + sin (_dir) * _radius; 24 | _ypos = (_pos select 1) + cos (_dir) * _radius; 25 | _posMine = [_xpos,_ypos,0]; 26 | //_posMine = [[_xpos,_ypos,0],0,10,_closest,0,20,0] call BIS_fnc_findSafePos; // find a random loc 27 | _mine = createMine ["ATMine", _posMine, [], 0]; 28 | _mine setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 29 | _mine setPos _posMine; 30 | _minesPlaced = _minesPlaced + [_mine]; 31 | //diag_log format["[spawnMines.sqf] mine # %2 spawned at %1",_posMine,_i]; 32 | }; 33 | _dir = _dir + _incr; 34 | }; 35 | _minesPlaced -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/setWaypoints.sqf: -------------------------------------------------------------------------------- 1 | // Sets up waypoints for a specified group. 2 | // By Ghostrider-DBD- 3 | // Last updated 8/2/15 4 | 5 | private["_pos","_minDis","_maxDis","_dist","_dir","_arc","_xpos","_ypos","_newpos","_wpradius","_wpnum","_oldpos","_group"]; 6 | 7 | _pos = _this select 0; // center of the patrol area 8 | _minDis = _this select 1; // minimum distance from the center of a patrol area for waypoints 9 | _maxDis = _this select 2; // maximum distance from the center of a patrol area for waypoints 10 | _group = _this select 3; 11 | 12 | _group setSpeedMode (["FULL","NORMAL","LIMITED"]call BIS_fnc_selectRandom); 13 | _group setFormation (["WEDGE","VEE","FILE","DIAMOND"]call BIS_fnc_selectRandom); 14 | _wpradius = 20; 15 | _wpnum = 6; 16 | _oldpos = _pos; 17 | _newpos = _oldpos; 18 | _dir = random 360; 19 | _arc = 360/_wpnum; 20 | //Set up waypoints for our AI 21 | for [{ _x=1 },{ _x < _wpnum },{ _x = _x + 1; }] do { 22 | _dir = _dir + _arc; 23 | if (_dir > 360) then {_dir = _dir - 360;}; 24 | while{_oldpos distance _newpos < 30}do{ 25 | sleep .1; 26 | 27 | _dist = (_minDis+(random (_maxDis - _minDis))); 28 | _xpos = (_pos select 0) + sin (_dir) * _dist; 29 | _ypos = (_pos select 1) + cos (_dir) * _dist; 30 | _newpos = [_xpos,_ypos,0]; 31 | }; 32 | _oldPos = _newpos; 33 | _wp = _group addWaypoint [[_xpos,_ypos,0], _wpradius]; 34 | _wp setWaypointType "MOVE"; 35 | }; 36 | _wp = _group addWaypoint [[_xpos,_ypos,0], _wpradius]; 37 | _wp setWaypointType "CYCLE"; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/signalEnd2.sqf: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////// 2 | // Attach a marker of type _marker to the first object in the array _crates every 60 seconds for 5 min. 3 | // by Ghostrider-DBD- based on an idea from Wicked AI for Arma 2 Dayz Epoch 4 | // Last modified 7/18/15 5 | ///////////////////////////////////////////////////// 6 | 7 | private ["_crate","_start","_bbr","_p1","_p2","_maxHeight","_signalCrate"]; 8 | _crate = _this select 0; 9 | _start = diag_tickTime; 10 | diag_log format["signalEnd.sqf: _this = %1, _crate = %2",_this, _crate]; 11 | 12 | _smokeTypes = ["SmokeShellOrange","SmokeShellBlue","SmokeShellPurple","SmokeShellRed","SmokeShellGreen","SmokeShellYellow","SmokeShell"]; 13 | _smoke = [_smokeTypes] call BIS_fnc_selectRandom; 14 | _signalCrate = _crate; 15 | _bbr = boundingBoxReal _signalCrate; 16 | _p1 = _bbr select 0; 17 | _p2 = _bbr select 1; 18 | _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); 19 | diag_log format["signalEnd.sqf: Spawning Smoke of type _marker %1 at crate of type _crate = %2",_marker, _crate]; 20 | while { (diag_tickTime - _start) < 300 } do // loop for 5 min accounting for the fact that smoke grenades do not last very long 21 | { 22 | diag_log format["signalEnd.sqf: Loop pass at diag_tickTime %1",diag_tickTime]; 23 | _marker = _smoke createVehicle (getPos _signalCrate); 24 | _marker setPosATL (getPosATL _signalCrate); 25 | // bounding box code from example attachTo 26 | // https://community.bistudio.com/wiki/boundingBoxReal 27 | _marker attachTo [_signalCrate,[0,0,(_maxHeight + 0.01)]]; 28 | uiSleep 60; 29 | deleteVehicle _marker; 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /mpmissions/Exile.Altis/blckClient.sqf: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////// 2 | // Create, delete and change Mission Markers 3 | // Last Updated 8/1/15 4 | // by Ghostrider-DbD- 5 | ////////////////////////////////////////// 6 | 7 | blck_MarkerPeristTime = 300; 8 | blck_useHint = false; 9 | blck_useSystemChat = true; 10 | blck_useTitleText = false; 11 | 12 | "blck_Message" addPublicVariableEventHandler { 13 | private["_event","_msg","_mission"]; 14 | _event = _this select 1 select 0; 15 | _message = _this select 1 select 1; 16 | _mission = _this select 1 select 2; 17 | if (blck_useSystemChat) then {systemChat format["%1",_message];}; 18 | if (blck_useHint) then { 19 | hint parseText format[ 20 | "%1
21 | ______________

22 | %2
23 | ______________

24 | Any loot you find is yours as payment for eliminating the threat!",_mission,_message 25 | ]; 26 | if (blck_useTitleText) then {titleText [_message, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5]}; 27 | }; 28 | 29 | switch (_event) do 30 | { 31 | case "start": { 32 | playSound "UAV_05"; 33 | }; 34 | case "end": { 35 | playSound "UAV_03"; 36 | }; 37 | }; 38 | }; 39 | 40 | if (!isNil "blck_OrangeMarker") then {[blck_OrangeMarker] execVM "debug\spawnMarker.sqf"}; 41 | if (!isNil "blck_GreenMarker") then {[blck_GreenMarker] execVM "debug\spawnMarker.sqf"}; 42 | if (!isNil "blck_RedMarker") then {[blck_RedMarker] execVM "debug\spawnMarker.sqf"}; 43 | if (!isNil "blck_BlueMarker") then {[blck_BlueMarker] execVM "debug\spawnMarker.sqf"}; 44 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major/majorTimer.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Orange Mission timer 3 | Original code by blckeagls 4 | Modified by Ghostrider 5 | Last modified 7/11/15 6 | */ 7 | // Loop to spawn Orange (Major) missions at intervals specified by blck_TMin_Major and blck_TMax_Major 8 | 9 | private ["_coords","_allAIGroups","_mission","_MajorMissions","_oldAI"]; 10 | diag_log "[blckeagls] Orange mission timer started"; 11 | // Use a global variable to store a list of AI units associated with this mission 12 | if (isNil "blck_AIMajor") then { blck_AIMajor = [];}; 13 | 14 | // Define an array of possible missions 15 | _MajorMissions = ["SM1"]; 16 | 17 | while {true} do { 18 | //diag_log "---->>>> Start of Mission Timer Loop"; 19 | waitUntil {[blck_TMin_Major, blck_TMax_Major] call blck_waitTimer}; 20 | blck_AIMajor = []; 21 | //Find a safe position on map to spawn marker and AI units 22 | _coords = [] call blck_FindSafePosn; 23 | _coords pushback 0; 24 | //diag_log format["Major[Orange]\MajorTimer.sqf: _coords = %1",_coords]; 25 | AllMissionCoords set [0,_coords]; 26 | // select a mission from the list of available missions 27 | _mission = _MajorMissions call BIS_fnc_selectRandom; 28 | // Everything is ready, time to spawn the mission 29 | blck_MissionGoMajor = true; 30 | [_coords] execVM format["\q\addons\custom_server\AIMission\Major\%1.sqf",_mission]; 31 | // Wait until the mission script has ended. It should toggle MissionGoMajor to false so that the loop will proceed 32 | waitUntil {!blck_MissionGoMajor}; 33 | // remove any alive AI hanging around from the last missions after waiting for the body clean up time 34 | // and delete the groups they were associated with 35 | _oldAI = blck_AIMajor; 36 | [_oldAI] spawn blck_AICleanup; 37 | AllMissionCoords set [0,[0,0,0]]; 38 | }; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Exile-AI-Missions 2 | blckeagl's AI Missions edited for Exile Mod 3 | 4 | 5 | How to install: 6 | 7 | Step 1: Unpack the Zip file anywhere you would like. 8 | 9 | Step 2: Unpack your mission pbo. 10 | 11 | Step 3: Open the folder you just created in Step 1. 12 | 13 | Step 4: Copy the debug folder and file called blckClient.sqf from MPMissions into the folder you just created by unpacking your mission pbo in Step 2. 14 | 15 | Step 5: Either use the init.sqf provided in MPMissions or add the following to the your init.sqf: 16 | 17 | execVM "blckClient.sqf"; 18 | if (isServer) then { 19 | [] ExecVM "\q\addons\custom_server\init.sqf"; 20 | }; 21 | 22 | NOTE: Be sure to add these lines above any code that reads: 23 | 24 | if (isServer) exitWith {}; 25 | 26 | Step 6: Repack your mission pbo. 27 | 28 | Step 8: Copy custom_server.pbo from @ExileServer\addons into the @ExileServer\addons folder for your server. 29 | 30 | Now that you've done this you need to follow the steps below to make AI Attack players. 31 | 32 | 33 | How to make the AI Attack players: 34 | 35 | 36 | Step 1: Extract your current “exile_server.pbo” 37 | 38 | Step 2: Open the “code” folder and find “ExileServer_object_player_createBambi.sqf” 39 | 40 | Step 3a: Find lines 29-48 (in Notepad++) 41 | Step 3b: Locate the following within those lines _bambiPlayer disableAI "TARGET"; 42 | 43 | Step 4: Under that line paste the following _bambiPlayer addRating -3000; 44 | 45 | What this does is sets the player to “ENEMY” which will make all factions attack. 46 | 47 | 48 | Note: I don't know how or why, but people still find this repo. I haven't touched this in 9 years and don't have any plans to support it. Just thought I'd update the readme to clarify. ~~I will however merge pull requests that are super old, so hopefully they fixed things properly.~~ Turns out I can't. 49 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/signalEnd.sqf: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////// 2 | // Attach a marker of type _marker to an object _crate 3 | // by Ghostrider-DBD- based on code from Wicked AI for Arma 2 Dayz Epoch 4 | // Last modified 8/2/15 5 | ///////////////////////////////////////////////////// 6 | 7 | private ["_crate","_start","_bbr","_p1","_p2","_maxHeight","_signalCrate","_smokeShell","_light","_lightSource"]; 8 | _crate = _this select 0; 9 | _start = diag_tickTime; 10 | //diag_log format["signalEnd.sqf: _this = %1, _crate = %2",_this, _crate]; 11 | _smokeShell = ["SmokeShellOrange","SmokeShellBlue","SmokeShellPurple","SmokeShellRed","SmokeShellGreen","SmokeShellYellow"] call BIS_fnc_selectRandom; 12 | _lightSource = ["Chemlight_green","Chemlight_red","Chemlight_yellow","Chemlight_blue"] call BIS_fnc_selectRandom; 13 | diag_log format["signalEnd.sqf: _smokeShell = %1",_smokeShell]; 14 | // Determine crate height. Method is from: 15 | // https://community.bistudio.com/wiki/boundingBoxReal 16 | _bbr = boundingBoxReal _crate; 17 | _p1 = _bbr select 0; 18 | _p2 = _bbr select 1; 19 | _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); 20 | 21 | while {diag_tickTime - _start < (5 * 60)} do // loop for 5 min accounting for the fact that smoke grenades do not last very long 22 | { 23 | _smoke = _smokeShell createVehicle getPosATL _crate; 24 | _smoke setPosATL (getPosATL _crate); 25 | _smoke attachTo [_crate,[0,0,(_maxHeight + 0.3)]]; // put the smoke a fixed distance above the top of any object to make it as visible as possible 26 | if(sunOrMoon < 0.2) then 27 | { 28 | _light = _lightSource createVehicle getPosATL _crate; 29 | _light setPosATL (getPosATL _crate); 30 | _light attachTo [_crate,[0,0,(_maxHeight + 0.35)]]; 31 | }; 32 | uiSleep 60; 33 | deleteVehicle _smoke; 34 | if(sunOrMoon < 0.2) then 35 | { 36 | deleteVehicle _light; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/findSafePosn.sqf: -------------------------------------------------------------------------------- 1 | // self explanatory. Checks to see if the position is in either a black listed location or near a player spawn. 2 | // As written this relies on BIS_fnc_findSafePos to ensure that the spawn point is not on water or an excessively steep slope. 3 | // The parameter for slope needs verification 4 | // By Ghostrider-DBD- 5 | // Last updated 8/2/15 6 | 7 | private["_findNew","_coords","_blackListCenter","_blackListRadius","_dist","_xpos","_ypos","_newPos","_townPos"]; 8 | 9 | _findNew = true; 10 | 11 | while {_findNew} do { 12 | _findNew = false; 13 | //[_centerForSearch,_minDistFromCenter,_maxDistanceFromCenter,_minDistanceFromNearestObj,_waterMode,_maxTerainGradient,_shoreMode] call BIS_fnc_findSafePos 14 | // https://community.bistudio.com/wiki/BIS_fnc_findSafePos 15 | _coords = [blck_mapCenter,0,blck_mapRange,30,0,5,0] call BIS_fnc_findSafePos; 16 | { 17 | if ((_x distance _coords) < MinDistanceFromMission) then { 18 | _FindNew = true; 19 | }; 20 | } forEach AllMissionCoords; 21 | 22 | { 23 | _blackListCenter = _x select 0; 24 | _blackListRadius = _x select 1; 25 | if ( (_blackListCenter distance _coords) < _blackListRadius) exitWith 26 | { 27 | _FindNew = true; 28 | }; 29 | //}; 30 | } forEach blck_locationBlackList; 31 | 32 | // test for water nearby 33 | private ["_i"]; 34 | _dist = 100; 35 | for [{_i=0}, {_i<360}, {_i=_i+20}] do 36 | { 37 | _xpos = (_coords select 0) + sin (_i) * _dist; 38 | _ypos = (_coords select 1) + cos (_i) * _dist; 39 | _newPos = [_xpos,_ypos,0]; 40 | if (surfaceIsWater _newPos) then 41 | { 42 | _FindNew = true; 43 | _i = 361; 44 | }; 45 | }; 46 | // check that missions spawn at least 1 kkm from towns 47 | { 48 | _townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0]; 49 | if (_townPos distance _coords < 1000) exitWith { 50 | _FindNew = true; 51 | }; 52 | } forEach blck_townLocations; 53 | }; 54 | 55 | _coords; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/cleanUpObjects.sqf: -------------------------------------------------------------------------------- 1 | // Delete a list of objects after a certain time. 2 | // By Ghostrider-DBD- 3 | // Last modified 8/2/15 4 | // code to delete any smoking or on fire objects adapted from kalania but .. unfortunately not yet working 5 | //http://forums.bistudio.com/showthread.php?165184-Delete-Fire-Effect/page1 6 | // http://forums.bistudio.com/showthread.php?165184-Delete-Fire-Effect/page2 7 | 8 | private ["_buildings","_startTime","_waitTime"]; 9 | 10 | _buildings = _this select 0; 11 | _waitTime = _this select 1; 12 | 13 | _startTime = diag_tickTime; 14 | //diag_log format["cleanUpObjects: -- >> _buildings = %1",_buildings]; 15 | waitUntil {sleep 10; (diag_tickTime - _startTime) > _waitTime;}; 16 | 17 | 18 | fn_deleteParticleSource = { 19 | private ["_wokka","_emitterArray"]; 20 | 21 | _wokka = _this select 0; 22 | //diag_log format["fn_deleteParticleSource: -- >> _wokka is %1", _wokka]; 23 | //_emitterArray = _wokka getVariable "effects"; 24 | //diag_log format["fn_deleteParticleSource: -- >> emmitterArray is %1",_emitterArray]; 25 | { 26 | diag_log format["deleting emiter %1 of type %2",_x, typeOf _x]; 27 | deleteVehicle _x; 28 | } forEach _wokka; 29 | deleteVehicle _wokka; 30 | }; 31 | /////////////////////////////////////////////////// 32 | // Main body of the function 33 | ////////////////////////////////////////////////// 34 | { 35 | 36 | if (typeOf _x == "test_EmptyObjectForSmoke") then { 37 | //diag_log "cleanupobjects.sqf: _x is a test_EmptyObjectForSmoke, calling subroutine"; 38 | //[_x] call fn_deleteParticleSource; 39 | _x setVariable ["LAST_CHECK", (diag_tickTime + blck_cleanupCompositionTimer)]; 40 | } else { 41 | //diag_log format["cleanupObjects.sqf: -- >> object %1 is typeOf %2",_x, typeOf _x]; 42 | deleteVehicle _x; 43 | //_x setVariable ["LAST_CHECK", (diag_tickTime + blck_cleanupCompositionTimer)]; 44 | }; 45 | } forEach _buildings; 46 | //////////////////////////////////////////////// 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/smokeAtCrate.sqf: -------------------------------------------------------------------------------- 1 | 2 | private ["_pos","_objs","_smokeSource","_smokeTrail","_fire","_posFire","_posWreck","_smoke","_dis","_minDis","_maxDis","_closest","_wrecks"]; 3 | 4 | _objs = []; 5 | 6 | // http://www.antihelios.de/EK/Arma/index.htm 7 | _wrecks = ["Land_Wreck_Car2_F","Land_Wreck_Car3_F","Land_Wreck_Car_F","Land_Wreck_Offroad2_F","Land_Wreck_Offroad_F","Land_Tyres_F","Land_Pallets_F","Land_MetalBarrel_F"]; 8 | _smokeSource = _wrecks call BIS_fnc_selectRandom; 9 | // Use the Land_Fire_burning item if you want a bright visual cue at night but be forewarned that the flames are blinding with NVG at close range and may damage players 10 | _smokeTrail = "test_EmptyObjectForSmoke"; // "options are "test_EmptyObjectForFireBig", "test_EmptyObjectForSmoke" 11 | _pos = _this select 0; 12 | _dis = 0; 13 | //_posWreck = [_pos, 0, 30, 10, 0, 20, 0] call BIS_fnc_findSafePos; // Position the wreck within 30 meters of the position and 5 meters away from the nearest object 14 | // _minDis and _maxDis determine the spacing between the smoking item and the loot crate. 15 | _minDis = 5; // Minimum distance of 16 | _maxDis = 50; 17 | _closest = 10; 18 | 19 | while {_dis < 7} do 20 | { 21 | _posWreck = [_pos, _minDis, _maxDis, _closest, 0, 20, 0] call BIS_fnc_findSafePos; // find a safe spot near the location passed in the call 22 | _dis = _posWreck distance _pos; 23 | }; 24 | 25 | _fire = createVehicle [_smokeSource, _posWreck, [], 0, "can_collide"]; 26 | _fire setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 27 | _fire setPos _posWreck; 28 | _fire setDir floor(random(360)); 29 | //https://community.bistudio.com/wiki/setVectorUp 30 | //_fire setVectorUp surfaceNormal position _fire; 31 | 32 | _smoke = createVehicle [_smokeTrail, _posWreck, [], 0, "can_collide"]; // "test_EmptyObjectForSmoke" createVehicle _posFire; 33 | _smoke setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 34 | _smoke attachto [_fire, [0,0,1]]; 35 | 36 | _objs = _objs + [_fire,_smoke]; 37 | //diag_log format ["--smokeAtCrate.sqf:: _objs = %1",_objs]; 38 | _objs -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnGroups.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Code by Ghostrider-DBD- 3 | Spawn a collection of groups around a particular position 4 | Last updated 8/2/15 5 | */ 6 | //Sets Private Variables to they don't interfere when this script is called more than once 7 | private["_pos","_i","_skillLevel","_numai","_aiGroup","_numai1","_numai2","_xpos","_ypos","_newpos","_group","_numGroups","_minDist","_maxDist","_numai","_arc","_dir","_dist","_numAIPerGroup"]; 8 | 9 | //Gets variables passed from SM1.sqf 10 | _pos = _this select 0; 11 | _numai1 = [_this,1,5] call BIS_fnc_param; // minimum # of mission AI to spawn 12 | _numai2 = [_this,2,10] call BIS_fnc_param; // maximum # of mission AI to spawn 13 | _skillLevel = [_this,3,"blue"] call BIS_fnc_param; // "blue", "red", "green", "orange" 14 | _numGroups = [_this,4,1] call BIS_fnc_param; // AIi will be devided into this # of groups 15 | _minDist = [_this,5,20] call BIS_fnc_param; // Min dist from mission center at which to spawn AI 16 | _maxDist = [_this,6,35] call BIS_fnc_param; // Max dist from mission center at which to spawn AI 17 | 18 | _aiGroup = []; 19 | 20 | _numai = round(_numai2 + round(random(_numai2 - _numai1))); 21 | //Spawns the AI at several randomized locations relative to the loot box 22 | _numAIPerGroup = round(_numai /_numGroups); 23 | _arc = 360/_numGroups; 24 | _dir = random 360; 25 | //diag_log format["spawnGroups.sqf: spawning %1 groups of ~ %2 AI at postion %3",_numGroups,_numAIPerGroup,_pos]; 26 | for "_i" from 1 to _numGroups do { 27 | _dist = (_minDist+(random (_maxDist - _minDist))); 28 | _dir = _dir + _arc; 29 | if (_dir > 360) then {_dir = _dir - 360}; 30 | _xpos = (_coords select 0) + sin (_dir) * _dist; 31 | _ypos = (_coords select 1) + cos (_dir) * _dist; 32 | _newPos = [_xpos,_ypos,0]; 33 | //diag_log format["spawnGroups.sqf: spawning group # %1 at %2",_i,_newPos]; 34 | _group = [_newPos,_numAIPerGroup,_numAIPerGroup+1,"orange",_pos,_minDist,_maxDist] call blck_spawnGroup; 35 | _aiGroup = _aiGroup + _group; 36 | _dir = _dir + _arc; 37 | }; 38 | //diag_log format["spawnGroups.sqf: %1 units spawned", count _aiGroup]; 39 | _aiGroup; // return an array containing the units just spawned. 40 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnMissionCrates.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn some crates using an array containing crate types and their offsets relative to a reference position and prevent their cleanup. 3 | By Ghostrider-DBD- 4 | Last Modified 7-31-15 5 | */ 6 | 7 | private ["_coords","_crates","_objs","_pos","_offset"]; 8 | 9 | _coords = [_this,0,[0,0,0]] call BIS_fnc_param; 10 | _crates = [_this,1,[]] call BIS_fnc_param; //array of crates to be spawned where each is described as ["crate type",[offset relative to coords as x,y,z], loot array, array of values specifying how many of each item type in the loot array to add as weapons,magazines,optics,materials,items,backpacks] 11 | //diag_log format["spawnMissionCrates.sqf: _coords = %1", _coords]; 12 | //diag_log format["spawnMissionCrates.sqf: crate count = %1", count _crates]; 13 | _objs = []; 14 | { 15 | //diag_log format["spawnMissionCrates.sqf crate = %1",_x]; 16 | //diag_log format["spawnMissionCrates.sqf _x crate type = %1",_x select 0]; 17 | //diag_log format["spawnMissionCrates.sqf _x offset type = %1",_x select 1]; 18 | //diag_log format["spawnMissionCrates.sqf _x item amounts = %1",_x select 3]; 19 | _offset = _x select 1; // offset relative to _coords at which to spawn the vehicle 20 | if ((count _coords) == 3) then // assume that there is a Z offset provided 21 | { 22 | _pos = [(_coords select 0)+(_offset select 0),(_coords select 1) + (_offset select 1),(_coords select 2)+(_offset select 2)]; // calculate the world coordinates 23 | } 24 | else 25 | { 26 | if ((count _coords) == 2) then // assume only X and Y offsets are provided 27 | { 28 | _pos = [(_coords select 0)+(_offset select 0),(_coords select 1) + (_offset select 1),0]; // calculate the world coordinates 29 | }; 30 | }; 31 | //diag_log format["spawnMissionCrates.sqf _pos = %1",_pos]; 32 | _crate = createVehicle [_x select 0 /*vehicle type*/,_pos,[], 0, "CAN_COLLIDE"]; 33 | _crate setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 34 | _objs pushback _crate; 35 | [_crate,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fillBoxes; 36 | }forEach _crates; 37 | 38 | _objs 39 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/AIHit.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Based on code by SARGE 3 | Modified by Ghostrider 4 | Updated 1-26-15 - 5 | Because this is p-ecompiled there is less concern about keeping comments in. 6 | */ 7 | // ========================================================================================================= 8 | // SAR_AI - DayZ AI library 9 | // Version: 1.1.0 10 | // Author: Sarge (sarge@krumeich.ch) 11 | // 12 | // Wiki: to come 13 | // Forum: http://opendayz.net/index.php?threads/sarge-ai-framework-public-release.8391/ 14 | // 15 | // --------------------------------------------------------------------------------------------------------- 16 | // SAR_aihit.sqf 17 | // last modified: 1.4.2013 18 | // --------------------------------------------------------------------------------------------------------- 19 | // Parameters: 20 | // [ _ai (AI unit that was killed, 21 | // _aikiller (unit that killed the AI) 22 | // ] 23 | 24 | // Modified by Ghostrider 25 | // ------------------------------------------------------------------------------------------------------------ 26 | 27 | 28 | private ["_ai","_aikiller","_aikilled_type","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_humanity"]; 29 | 30 | _unit = _this select 0; 31 | _aikiller = _this select 1; 32 | 33 | _aikilled_type = typeof _unit; 34 | _aikilled_side = side _unit; 35 | _aikilled_group_side = side (group _unit); 36 | 37 | _aikiller_type = typeof _aikiller; 38 | _aikiller_name = name _aikiller; 39 | _aikiller_side = side _aikiller; 40 | _aikiller_group_side = side (group _aikiller); 41 | 42 | if (blck_debugON && (isServer)) then { 43 | diag_log format["blck_HITKILL_DEBUG: AI hit - Type: %1 Side: %3 Group Side: %4",_aikilled_type,_aikilled_side,_aikilled_group_side]; 44 | diag_log format["blck_HITKILL_DEBUG: AI attacker - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side]; 45 | }; 46 | 47 | if(isPlayer _aikiller) then { 48 | 49 | { 50 | _x doTarget _aikiller; 51 | _x doFire _aikiller; 52 | } foreach units group _unit; 53 | }; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnEmplaced.sqf: -------------------------------------------------------------------------------- 1 | // Spawns anemplaced weapons, man's it, and destroys it when the AI gets out. 2 | // by Ghostrider-DBD- 3 | // Last Updated 7/30/15 4 | 5 | private["_pos","_emplaced","_emplacedTypes","_aiGroup","_safepos","_ai","_ai1","_slot","_vehSE","_i","_noEmplaced","_minDist","_maxDist","_level","_objSE","_unitsSE","_gunner","_dist","_dir","_arc","_xpos","_ypos","_newpos"]; 6 | 7 | _pos = _this select 0; 8 | _noEmplaced = [_this,1,-1] call BIS_fnc_param; 9 | _emplacedTypes = _this select 2; 10 | _minDist = [_this,3,30] call BIS_fnc_param; 11 | _maxDist = [_this,4,45] call BIS_fnc_param; 12 | _level = [_this,5,"red"] call BIS_fnc_param; 13 | 14 | if (_noEmplaced <= 0) exitWith {}; 15 | 16 | _unitsSE = []; 17 | _dir = round(random(360)); 18 | _arc = 360/_noEmplaced; 19 | //diag_log format["spawnEmplaced.sqf: arc is %1 and _dir is %2",_arc,_dir]; 20 | for "_i" from 1 to _noEmplaced do 21 | { 22 | // spread out the spawn points for the static weapons 23 | _dir = _dir + _arc; 24 | //diag_log format["spawnEmplaced: _dir is %1 for cycle %2",_dir,_i]; 25 | _dist = round(_minDist + (random(_maxDist - _minDist))); 26 | _xpos = (_pos select 0) + sin (_dir) * _dist; 27 | _ypos = (_pos select 1) + cos (_dir) * _dist; 28 | _newpos = [_xpos,_ypos,0]; 29 | 30 | _safepos = [_pos,_minDist,_maxDist,0,0,20,0] call BIS_fnc_findSafePos; 31 | _emplaced = _emplacedTypes call BIS_fnc_selectRandom; 32 | _vehSE = createVehicle[_emplaced, _safepos, [], 0, "NONE"]; 33 | _vehSE setVariable["LAST_CHECK",14400]; 34 | _vehSE call EPOCH_server_setVToken; 35 | clearWeaponCargoGlobal _vehSE; 36 | clearMagazineCargoGlobal _vehSE; 37 | clearBackpackCargoGlobal _vehSE; 38 | clearItemCargoGlobal _vehSE; 39 | _vehSE addEventHandler ["GetOut",{(_this select 0) setDamage 1;}]; 40 | _vehSE addEventHandler ["GetIn",{(_this select 0) setDamage 1;}]; 41 | _vehSE setVehicleLock "LOCKEDPLAYER"; 42 | 43 | _aiGroup = [_safepos,1,1,"orange",_pos,_minDist,_maxDist] call blck_spawnGroup; 44 | _unitsSE = _unitsSE + _aiGroup; 45 | _gunner = _aiGroup select 0; 46 | _gunner moveingunner _vehSE; 47 | _vehSE setVariable ["Gunner", gunner _vehSE, true]; 48 | 49 | [_vehSE] spawn blck_vehicleMonitor; 50 | //diag_log format["spawnEmplaced.sqf: Emplaced weapon %1 spawned",_i]; 51 | }; 52 | 53 | _unitsSE 54 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/vehicleMonitor.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Handle the case that all AI assigned to a vehicle are dead. 3 | Allows players to enter and use the vehicle when appropriate 4 | or otherwise destroys the vehicle. 5 | 6 | By Ghostrider-DBD- 7 | for the mission system by blckeagl. 8 | Last modified 7-14-15 9 | */ 10 | 11 | private ["_veh","_unit","_units","_count","_group","_driver","_gunner","_cargo"]; 12 | _veh = _this select 0; 13 | 14 | _count = 0; 15 | 16 | waitUntil { count crew _veh > 0}; 17 | //diag_log format["vehicle Manned %1",_veh]; 18 | while { (getDammage _veh < 1.0) && ({alive _x} count crew _veh > 0)} do 19 | { //diag_log format["vehicleMonitor: vehicle crew consists of %1", crew _veh]; 20 | //diag_log format["vehicleMonitor: number of crew alive is %1", {alive _x} count crew _veh]; 21 | _veh setVehicleAmmo 1; 22 | _veh setFuel 1; 23 | sleep 10; 24 | /* 25 | //if ({alive _x} count crew _veh < 1) then { _veh setDamage 1.1;}; 26 | if (!alive gunner _veh) then { 27 | { 28 | if (_x != driver _veh) exitWith {_x moveingunner _veh;}; 29 | } forEach crew _veh; 30 | }; 31 | if (!alive gunner _veh) then {driver _veh moveingunner _veh;}; 32 | if (!alive driver _veh) then { 33 | { 34 | if (_x != gunner _veh) exitWith { _x moveindriver _veh;}; 35 | } forEach crew _veh; 36 | }; 37 | */ 38 | //diag_log format["vehicleMonitor.sqf: driver is %1; gunner is %2", driver _veh, gunner _veh]; 39 | }; 40 | //diag_log format["vehiclemonitor.sqf all crew for vehicle %1 are dead",_veh]; 41 | 42 | if (typeOf _veh in blck_staticWeapons) then // always destroy mounted weapons 43 | { 44 | //diag_log format["vehicleMonitor.sqf: _veh %1 is (in blck_staticWeapons) = true",_veh]; 45 | _veh setDamage 1; 46 | } else { 47 | //diag_log format["vehicleMonitor.sqf: _veh %1 is (in blck_staticWeapons) = false",_veh]; 48 | if (blck_killEmptyAIVehicles) then 49 | { 50 | private ["_v","_startTime"]; 51 | //diag_log format["vehicleMonitor.sqf: _veh %1 is about to be killed",_veh]; 52 | uiSleep 10; 53 | _veh setDamage 1.1; 54 | _startTime = diag_ticktime; 55 | waitUntil{sleep 5;(diag_tickTime - _startTime) > 120;}; // delete destroyed vehicles after 2 min 56 | deleteVehicle _veh; 57 | } 58 | else 59 | { 60 | //diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from_veh %1",_veh]; 61 | _veh removealleventhandlers "GetIn"; 62 | _veh removealleventhandlers "GetOut"; 63 | }; 64 | }; 65 | 66 | 67 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/smokeAtCrates.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawns a wreck and plumb of smoke within the area specified by _pos 3 | by Ghostrider-DBD- 4 | Last updated 8/2/15 5 | */ 6 | 7 | 8 | private ["_pos","_objs","_smokeSource","_smokeTrail","_fire","_posFire","_posWreck","_smoke","_dis","_minDis","_maxDis","_closest","_wrecks","_mode"]; 9 | 10 | _objs = []; 11 | 12 | // http://www.antihelios.de/EK/Arma/index.htm 13 | _wrecks = ["Land_Wreck_Car2_F","Land_Wreck_Car3_F","Land_Wreck_Car_F","Land_Wreck_Offroad2_F","Land_Wreck_Offroad_F","Land_Tyres_F","Land_Pallets_F","Land_MetalBarrel_F"]; 14 | _smokeSource = _wrecks call BIS_fnc_selectRandom; 15 | // Use the Land_Fire_burning item if you want a bright visual cue at night but be forewarned that the flames are blinding with NVG at close range and may damage players 16 | _smokeTrail = "test_EmptyObjectForSmoke"; // "options are "test_EmptyObjectForFireBig", "test_EmptyObjectForSmoke" 17 | _pos = _this select 0; 18 | _mode = _this select 1; 19 | 20 | switch (_mode) do { 21 | case "none": {if (true) exitWith {};}; 22 | case "center": {_minDis = 5; _maxDis = 15; _closest = 5;}; 23 | case "random": {_minDis = 15; _maxDis = 50; _closest = 10;}; 24 | default {_minDis = 5; _maxDis = 15; _closest = 5;}; 25 | }; 26 | _dis = 0; 27 | //_posWreck = [_pos, 0, 30, 10, 0, 20, 0] call BIS_fnc_findSafePos; // Position the wreck within 30 meters of the position and 5 meters away from the nearest object 28 | // _minDis and _maxDis determine the spacing between the smoking item and the loot crate. 29 | //_minDis = 5; // Minimum distance of 30 | //_maxDis = 50; 31 | //_closest = 10; 32 | 33 | while {_dis < 7} do 34 | { 35 | _posWreck = [_pos, _minDis, _maxDis, _closest, 0, 20, 0] call BIS_fnc_findSafePos; // find a safe spot near the location passed in the call 36 | _dis = _posWreck distance _pos; 37 | }; 38 | 39 | _fire = createVehicle [_smokeSource, _posWreck, [], 0, "can_collide"]; 40 | _fire setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 41 | _fire setPos _posWreck; 42 | _fire setDir floor(random(360)); 43 | //https://community.bistudio.com/wiki/setVectorUp 44 | //_fire setVectorUp surfaceNormal position _fire; 45 | 46 | _smoke = createVehicle [_smokeTrail, _posWreck, [], 0, "can_collide"]; // "test_EmptyObjectForSmoke" createVehicle _posFire; 47 | _smoke setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; 48 | _smoke attachto [_fire, [0,0,1]]; 49 | 50 | _objs = _objs + [_fire,_smoke]; 51 | //diag_log format ["--smokeAtCrate.sqf:: _objs = %1",_objs]; 52 | _objs -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/init.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | AI Mission Compiled by blckeagls @ Zombieville.net 3 | Code was modified by blckeagls using other peoples code. Been over a year, don't have their names anymore. 4 | Code was modified by Narines fixing several bugs. 5 | Modified by Ghostrider with thanks to ctbcrwker for input, testing, and troubleshooting. 6 | Credits to Vampire, Narines, KiloSwiss, blckeagls, theFUCHS, lazylink, Mark311 who wrote mission systems upon which this one is based and who's code is used with modification in some parts of this addon. 7 | 8 | Thanks to cyncrwler for testing and bug fixes. 9 | */ 10 | private ["_version","_versionDate"]; 11 | _blck_version = "3.54"; 12 | _blck_versionDate = "8-2-2015"; 13 | 14 | waitUntil{{isPlayer _x}count playableUnits > 0}; 15 | sleep 10; 16 | 17 | diag_log format["[blckeagls] loading version %1 Build %2 ...... >>",_blck_versionDate,_blck_version]; 18 | // Load Configuration information 19 | 20 | call compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\AIconfigs.sqf"; 21 | 22 | // Get information about the map 23 | sleep 5; 24 | execVM "\q\addons\custom_server\AIMission\findWorld.sqf"; 25 | sleep 5; 26 | 27 | // compile functions 28 | call compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\AIfunctions.sqf"; 29 | sleep 5; 30 | 31 | // Load any user-defined specifications or overrides 32 | execVM "\q\addons\custom_server\AIMission\configOverrides.sqf"; 33 | 34 | //Start the mission timers 35 | [] execVM "\q\addons\custom_server\AIMission\Major\majorTimer.sqf"; //Starts major mission system (Orange Map Markers) 36 | [] execVM "\q\addons\custom_server\AIMission\Major2\major2Timer.sqf";//Starts major mission system 2 (Green Map Markers) 37 | [] execVM "\q\addons\custom_server\AIMission\Minor2\minor2Timer.sqf";//Starts minor mission system 2 (Red Map Markers) 38 | [] execVM "\q\addons\custom_server\AIMission\Minor\minorTimer.sqf";//Starts minor mission system (Blue Map Markers) 39 | 40 | 41 | diag_log "[blckeagls] >>--- Completed initialization"; 42 | sleep 15; 43 | 44 | blck_Initialized = true; 45 | publicVariable "blck_Initialized"; 46 | //diag_log format["[blckeagls] Mission system settings:blck_debugON = %4 blck_useSmokeAtCrates = %1 blck_useMines = %2 blck_useStatic = %3 blck_useVehiclePatrols %4",blck_useSmokeAtCrates,blck_useMines,blck_useStatic,blck_debugON,blck_useVehiclePatrols]; 47 | //diag_log format["[blckeagls] AI Settings: blck_useNVG = %1 blck_useLaunchers = %2",blck_useNVG,blck_useLaunchers]; 48 | //diag_log format["[blckeagls] AI Runover and other Vehicle Kill settings: blck_RunGear = %1 blck_VG_Gear =%2 blck_VK_RunoverDamage = %3 blck_VK_GunnerDamage = %4",blck_RunGear,blck_VG_Gear,blck_VK_RunoverDamage,blck_VK_GunnerDamage]; 49 | 50 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnGroup.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn and configure a group 3 | Code by blckeagls 4 | Modified by Ghostrider-DBD- 5 | Last updated 8/2/15 6 | */ 7 | //Sets Private Variables to they don't interfere when this script is called more than once 8 | private["_pos","_weaponlist","_ammolist","_skinlist","_itemlist","_randomNumberWeapon","_randomNumberSkin","_randomNumberItem","_numbertospawn","_whichweap","_whichitem","_whichskin","_weapon","_ammo","_item", 9 | "_skin","_i","_skillLevel","_aiGroup","_numai1","_numai2","_safepos","_wppos","_xpos","_ypos","_wpradius","_wpnum","_oldpos","_newpos","_x","_wp","_useLauncher","_launcherType","_aiSkills","_center", 10 | "_minDist","_maxDist"]; 11 | 12 | //Gets variables passed from SM1.sqf 13 | _pos = _this select 0; 14 | _numai1 = [_this,1,5] call BIS_fnc_param; 15 | _numai2 = [_this,2,10] call BIS_fnc_param; 16 | _skillLevel = [_this,3,"blue"] call BIS_fnc_param; // "blue", "red", "green", "orange" 17 | _center = _this select 4; 18 | _minDist = [_this,5,20] call BIS_fnc_param; 19 | _maxDist = [_this,6,35] call BIS_fnc_param; 20 | 21 | //Spawns correct number of AI 22 | if (_numai2 > _numai1) then { 23 | _numbertospawn = floor( (random (_numai2 - _numai1) + _numai1 ) ); 24 | } else { 25 | _numbertospawn = _numai2; 26 | }; 27 | 28 | //Creates a group to make them attack players 29 | _aiGroup = createGroup EAST; 30 | _aiGroup setcombatmode blck_combatMode; 31 | _aiGroup allowfleeing 0; 32 | _aiGroup setspeedmode "FULL"; 33 | _aiGroup setFormation blck_groupFormation; 34 | 35 | // Determines whether or not the group has launchers 36 | _useLauncher = blck_useLaunchers; 37 | 38 | // define weapons list for the group 39 | switch (_skillLevel) do { 40 | case "blue": {_weaponList = blck_WeaponList_Blue;}; 41 | case "red": {_weaponList = blck_WeaponList_Red;}; 42 | case "green": {_weaponList = blck_WeaponList_Green;}; 43 | case "orange": {_weaponList = blck_WeaponList_Orange;}; 44 | default {_weaponList = blck_WeaponList_Blue;}; 45 | }; 46 | 47 | 48 | //Spawns the correct number of AI Groups, each with the correct number of units 49 | //Counter variable 50 | _i = 0; 51 | while {_i < _numbertospawn} do { 52 | _i = _i + 1; 53 | if (blck_useLaunchers && _i <= blck_launchersPerGroup) then 54 | { 55 | _launcherType = blck_launcherTypes call BIS_fnc_selectRandom; 56 | } else { 57 | _launcherType = "none"; 58 | }; 59 | 60 | //Finds a safe positon to spawn the AI in the area given 61 | _safepos = [_pos,0,27,1,0,2000,0] call BIS_fnc_findSafePos; 62 | 63 | //Spawns the AI unit 64 | [_safepos,_weaponList,_aiGroup,_skillLevel,_launcherType] call blck_spawnAI; 65 | }; 66 | [_pos,_minDist,_maxDist,_aiGroup] call blck_setupWaypoints; 67 | _aiGroup selectLeader (units _aiGroup select 0); 68 | // return the group spawned so that this can be used for mission clean up or triggers regarding completion 69 | units _aiGroup; 70 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/vehicleHit.sqf: -------------------------------------------------------------------------------- 1 | // ========================================================================================================= 2 | // SAR_AI - DayZ AI library 3 | // Version: 1.1.0 4 | // Author: Sarge (sarge@krumeich.ch) 5 | // 6 | // Wiki: to come 7 | // Forum: http://opendayz.net/index.php?threads/sarge-ai-framework-public-release.8391/ 8 | // 9 | // --------------------------------------------------------------------------------------------------------- 10 | // --------------------------------------------------------------------------------------------------------- 11 | // SAR_ai_vehicle_hit.sqf 12 | // last modified: 1.4.2013 13 | // not used yet, some issues with the eventhandler 14 | // --------------------------------------------------------------------------------------------------------- 15 | // Modified by Ghostrider 16 | // Not used currently as a vehicle hit causes all AI to exit the vehicle which defeats the purpose of the script 17 | // ------------------------------------------------------------------------------------------------------------ 18 | 19 | 20 | private ["_ai_veh","_ai_veh_hitsource","_ai_veh_type","_ai_veh_name","_ai_veh_side","_ai_veh_group_side","_ai_veh_hitsource_group_side","_ai_veh_hitsource_type","_ai_veh_hitsource_name","_ai_veh_hitsource_side"]; 21 | 22 | diag_log "Vehicle Damage Handler activated"; 23 | 24 | _ai_veh = _this select 0; 25 | _ai_veh_hitsource = _this select 1; 26 | 27 | _ai_veh_type = typeof _ai_veh; 28 | _ai_veh_name = name _ai_veh; 29 | _ai_veh_side = side _ai_veh; 30 | _ai_veh_group_side = side (group _ai_veh); 31 | 32 | _ai_veh_hitsource_type = typeof _ai_veh_hitsource; 33 | _ai_veh_hitsource_name = name _ai_veh_hitsource; 34 | _ai_veh_hitsource_side = side _ai_veh_hitsource; 35 | _ai_veh_hitsource_group_side = side (group _ai_veh_hitsource); 36 | 37 | if (blck_DebugON) then { 38 | diag_log format["SAR_HITKILL_DEBUG: AI vehicle hit - Type: %1 Name: %2 Side: %3 Group Side: %4",_ai_veh_type,_ai_veh_name, _ai_veh_side,_ai_veh_group_side]; 39 | diag_log format["SAR_HITKILL_DEBUG: AI vehicle attacker - Type: %1 Name: %2 Side: %3 Group Side: %4",_ai_veh_hitsource_type,_ai_veh_hitsource_name, _ai_veh_hitsource_side,_ai_veh_hitsource_group_side]; 40 | }; 41 | 42 | if(isPlayer _ai_veh_hitsource) then { 43 | 44 | (gunner _ai_veh) doTarget _ai_veh_hitsource; 45 | (gunner _ai_veh) doFire _ai_veh_hitsource; 46 | // https://community.bistudio.com/wiki/atan2 47 | _xy = _ai_veh worldToModel getPosASL _ai_veh_hitsource; 48 | _dir = (_xy select 0) atan2 (_xy select 1); //_dir range from -180 to +180 49 | if (_dir < 0) then {_dir = 360 + _dir}; //_dir range from 0 to 360 50 | _pos = getPos _ai_veh; 51 | _dist = 50; 52 | _xpos = (_pos select 0) + sin (_xy) * _dist; 53 | _ypos = (_pos select 1) + cos (_xy) * _dist; 54 | _newpos = [_xpos,_ypos,0]; 55 | _grp = _ai_veh getVariable ["Group","Vacant"]; 56 | if (_grp != "Vacant") then 57 | { 58 | _wp = _grp addWaypoint _newpos; 59 | _wp setWaypointType "MOVE"; 60 | _wp setWaypointTimeout [5, 10, 15]; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/configOverrides.sqf: -------------------------------------------------------------------------------- 1 | 2 | // Place any overrides of the default configurations here. 3 | // An example would be to move the center or change the dimensions for the map on which the missions are spawned so that only part of the map is used. 4 | // Or map-specific configurations if you run the mission system on multiple servers. Our configurations are shown below as an example 5 | 6 | 7 | diag_log "[blckeagls] Loading Configuration Overides"; 8 | 9 | if (blck_WorldName == "bornholm") then 10 | { // 6022.8906,23.348747,17387.381 11 | 12 | blck_locationBlackList = blck_locationBlackList + [[[4274,19753,0], 1500]]; // 13 | diag_log "[DBD Clan] --- >>> Loading config overides for Bornholm"; 14 | }; 15 | if (blck_WorldName == "chernarus") then 16 | { // 6022.8906,23.348747,17387.381 17 | 18 | diag_log "[DBD Clan] --- >>> Loading config overides for Chernarus"; 19 | }; 20 | if (blck_WorldName == "altis") then 21 | { // 6022.8906,23.348747,17387.381 22 | 23 | blck_locationBlackList = blck_locationBlackList + [[[10846,10672,12.8],300]]; // 24 | 25 | diag_log "[DBD Clan] --- >>> Loading config overides for Altis"; 26 | }; 27 | //================================ ESSEKER ============================== 28 | if (blck_WorldName == "Esseker") then 29 | { // 6022.8906,23.348747,17387.381 30 | 31 | blck_locationBlackList = blck_locationBlackList + [[[6802,0,5187],300],[[10134,0.1,7979],300],[[4014,0,9223],300]]; // 32 | diag_log "[DBD Clan] --- >>> Loading config overides for Esseker"; 33 | }; 34 | //================================ ESSEKER ============================== 35 | if (blck_debugON) then 36 | { 37 | diag_log "[blckeagls] Debug seting is ON, Custom configurations used"; 38 | 39 | blck_cleanupCompositionTimer = 5; // Time after mission completion at which items in the composition are deleted. 40 | blck_AICleanUpTimer = 10; // Time after mission completion at which any remaining live AI are deleted. 41 | blck_bodyCleanUpTimer = 15; 42 | blck_SpawnEmplaced_Major = 1; // Number of static weapons at Orange Missions 43 | blck_SpawnEmplaced_Major2 = 1; // Number of static weapons at Green Missions 44 | blck_SpawnEmplaced_Minor = 1; // Number of static weapons at Blue Missions 45 | blck_SpawnEmplaced_Minor2 = 1; 46 | blck_SpawnVeh_Major = 1; // Number of static weapons at Orange Missions 47 | blck_SpawnVeh_Major2 = 1; // Number of static weapons at Green Missions 48 | blck_SpawnVeh_Minor = 1; // Number of static weapons at Blue Missions 49 | blck_SpawnVeh_Minor2 = 1; 50 | 51 | blck_TMin_Major = 5; 52 | blck_TMin_Major2 = 6; 53 | blck_TMin_Minor = 7; 54 | blck_TMin_Minor2 = 8; 55 | 56 | //Maximum Spawn time between missions in seconds 57 | blck_TMax_Major = 10; 58 | blck_TMax_Major2 = 11; 59 | blck_TMax_Minor = 12; 60 | blck_TMax_Minor2 = 13; 61 | 62 | blck_SkillsBlue = [ 63 | ["aimingAccuracy",0.01], 64 | ["aimingShake",0.01], 65 | ["aimingSpeed",0.01], 66 | ["endurance",0.01], 67 | ["spotDistance",0.01], 68 | ["spotTime",0.01], 69 | ["courage",0.01], 70 | ["reloadSpeed",0.80], 71 | ["commanding",0.8], 72 | ["general",1.00] 73 | ]; 74 | }; 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /mpmissions/Exile.Altis/debug/spawnMarker.sqf: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////// 2 | // Create, delete, Mission Markers 3 | // 8/1/15 4 | // by Ghostrider-DbD- 5 | ////////////////////////////////////////// 6 | // spawn a round marker of a size and color specified in passed parameters 7 | private["_blck_fn_configureRoundMarker"]; 8 | _blck_fn_configureRoundMarker = { 9 | private["_name","_pos","_color","_size","_MainMarker","_labelType"]; 10 | //diag_log format["_blck_fn_configureRoundMarker: -: _this = %1", _this]; 11 | _name = _this select 0; 12 | _pos = _this select 1; 13 | _color = _this select 2; 14 | _text = _this select 3; 15 | _size = _this select 4; 16 | _labelType = _this select 5; 17 | 18 | //diag_log format["_blck_fn_configureRoundMarker: _pos = %1, _color = %2, _size = %3, _name = %4, label %5",_pos, _color, _size, _name, _text]; 19 | // Do not show the marker if it is in the left upper corner 20 | if ((_pos distance [0,0,0]) < 10) exitWith {}; 21 | 22 | _MainMarker = createMarker [_name, _pos]; 23 | _MainMarker setMarkerColor _color; 24 | _MainMarker setMarkerShape "ELLIPSE"; 25 | _MainMarker setMarkerBrush "Grid"; 26 | _MainMarker setMarkerSize _size; // 27 | //diag_log format["_blck_fn_configureRoundMarker: -: _labelType = %1", _labelType]; 28 | if (count toArray(_text) > 0) then 29 | { 30 | switch (_labelType) do { 31 | case "arrow": 32 | { 33 | //diag_log "++++++++++++++--- marker label arrow detected"; 34 | 35 | _name = "label" + _name; 36 | _textPos = [(_pos select 0) + (count toArray (_text) * 12) - 200, (_pos select 1) - (_size select 0), 0]; 37 | _MainMarker = createMarker [_name, _textPos]; 38 | _MainMarker setMarkerShape "Icon"; 39 | _MainMarker setMarkerType "HD_Arrow"; 40 | _MainMarker setMarkerColor "ColorBlack"; 41 | _MainMarker setMarkerText _text; 42 | _MainMarker setMarkerDir 37; 43 | }; 44 | case "dot": 45 | { 46 | //diag_log "++++++++++++++--- marker label dot detected"; 47 | _name = "label" + _name; 48 | _MainMarker = createMarker [_name, _pos]; 49 | _MainMarker setMarkerShape "Icon"; 50 | _MainMarker setMarkerType "hd_dot"; 51 | _MainMarker setMarkerColor "ColorBlack"; 52 | _MainMarker setMarkerText _text; 53 | }; 54 | }; 55 | }; 56 | }; 57 | 58 | // determine the type of marker and call the spawn routine with appropriate parameters 59 | private["_mArray","_MainMarker"]; 60 | _mArray = _this select 0; 61 | //diag_log format["********spawnMarker.sqf: _this = %1",_this]; 62 | switch (_mArray select 0) do { 63 | case "OrangeMarker": {[_mArray select 0, _mArray select 1, "ColorOrange", _mArray select 2, [275,275],_mArray select 3] call _blck_fn_configureRoundMarker;}; 64 | case "GreenMarker": {[_mArray select 0, _mArray select 1, "ColorGreen",_mArray select 2, [250,250],_mArray select 3] call _blck_fn_configureRoundMarker;}; 65 | case "RedMarker": {[_mArray select 0, _mArray select 1, "ColorRed",_mArray select 2, [225,225],_mArray select 3] call _blck_fn_configureRoundMarker;}; 66 | case "BlueMarker": {[_mArray select 0, _mArray select 1, "ColorBlue",_mArray select 2, [200,200],_mArray select 3] call _blck_fn_configureRoundMarker;}; 67 | }; 68 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/otl7_Mapper.sqf: -------------------------------------------------------------------------------- 1 | scriptName "otl7_Mapper.sqf"; 2 | /* 3 | Author: Joris-Jan van 't Land, modified for ArmA3: Outlawz7 4 | 5 | Description: 6 | Takes an array of data about a dynamic object template and creates the objects. 7 | 8 | Parameter(s): 9 | _this select 0: position of the template - Array [X, Y, Z] 10 | _this select 1: azimuth of the template in degrees - Number 11 | _this select 2: object template script name - script 12 | (optional) _this select 3: set vector up - boolean 13 | 14 | Example(s): 15 | _newComp = [(getPos this), (getDir this), "dyno_a3\doc\csat_guardpost01.sqf", false] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf")); 16 | _newComp = [(getPos this), (getDir this), "dyno_a3\doc\csat_guardpost01.sqf", true] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf")); 17 | 18 | Modified by Ghostrider-DBD- for blckeagls mission system 19 | */ 20 | 21 | private ["_pos", "_azi", "_objs", "_rdm"]; 22 | _pos = _this select 0; 23 | _azi = _this select 1; 24 | _objs = _this select 2; 25 | _setVector = _this select 3; 26 | 27 | private ["_newObjs"]; 28 | 29 | //If the object array is in a script, call it. 30 | //_objs = call (compile (preprocessFileLineNumbers _script)); 31 | 32 | _newObjs = []; 33 | 34 | private ["_posX", "_posY"]; 35 | _posX = _pos select 0; 36 | _posY = _pos select 1; 37 | 38 | //Function to multiply a [2, 2] matrix by a [2, 1] matrix. 39 | private ["_multiplyMatrixFunc"]; 40 | _multiplyMatrixFunc = 41 | { 42 | private ["_array1", "_array2", "_result"]; 43 | _array1 = _this select 0; 44 | _array2 = _this select 1; 45 | 46 | _result = 47 | [ 48 | (((_array1 select 0) select 0) * (_array2 select 0)) + (((_array1 select 0) select 1) * (_array2 select 1)), 49 | (((_array1 select 1) select 0) * (_array2 select 0)) + (((_array1 select 1) select 1) * (_array2 select 1)) 50 | ]; 51 | 52 | _result 53 | }; 54 | 55 | for "_i" from 0 to ((count _objs) - 1) do 56 | { 57 | 58 | private ["_obj", "_type", "_relPos", "_azimuth", "_fuel", "_damage", "_newObj"]; 59 | _obj = _objs select _i; 60 | _type = _obj select 0; 61 | _relPos = _obj select 1; 62 | _azimuth = _obj select 2; 63 | 64 | //Optionally map fuel and damage for backwards compatibility. 65 | if ((count _obj) > 3) then {_fuel = _obj select 3}; 66 | if ((count _obj) > 4) then {_damage = _obj select 4}; 67 | 68 | //Rotate the relative position using a rotation matrix. 69 | private ["_rotMatrix", "_newRelPos", "_newPos"]; 70 | _rotMatrix = 71 | [ 72 | [cos _azi, sin _azi], 73 | [-(sin _azi), cos _azi] 74 | ]; 75 | _newRelPos = [_rotMatrix, _relPos] call _multiplyMatrixFunc; 76 | 77 | //Backwards compatability causes for height to be optional. 78 | private ["_z"]; 79 | if ((count _relPos) > 2) then {_z = _relPos select 2} else {_z = 0}; 80 | 81 | _newPos = [_posX + (_newRelPos select 0), _posY + (_newRelPos select 1), _z]; 82 | 83 | //Create the object and make sure it's in the correct location. 84 | _newObj = _type createVehicle _newPos; 85 | _newObj setDir (_azi + _azimuth); 86 | _newObj setPos _newPos; 87 | if (_setVector) then {_newObj setVectorUp [0,0,1];}; 88 | 89 | //If fuel and damage were grabbed, map them. 90 | if (!isNil "_fuel") then {_newObj setFuel _fuel}; 91 | if (!isNil "_damage") then {_newObj setDamage _damage}; 92 | 93 | _newObjs = _newObjs + [_newObj]; 94 | 95 | }; 96 | 97 | _newObjs -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/fillBoxes.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | for the Mission System by blckeagls 3 | By Ghostrider-DBD- 4 | Last Updated 7-16-15 5 | Fill a crate with items 6 | */ 7 | 8 | private["_crate","_boxLoot","__itemCnts","_wepCnt","_magCnt","_itemCnt","_opticsCnt","_materialsCnt","_a1","_item","_diff","_bkcPckCnt"]; 9 | 10 | _crate = _this select 0; 11 | _boxLoot = _this select 1; // Array of [[weapons],[magazines],[optics],[materials],[items],[backpacks]] 12 | _itemCnts = _this select 2; // number of items to load for each of the above [weapons,magazines,optics,materials,items,backpacks] 13 | //diag_log format["fillBoxes.sqf: _boxLoot = %1", _boxLoot]; 14 | //diag_log format["fillBoxes.sqf: _itemCnts = %1", _itemCnts]; 15 | 16 | _wepCnt = _itemCnts select 0; // number of types of weapons to load 17 | _magCnt = _itemCnts select 1; // Number of types of additional, optional magazines to add (this includes building supplies) 18 | _opticsCnt = _itemCnts select 2; // number of types of optics to be added 19 | _materialsCnt = _itemCnts select 3; // Number of cinder, motar etc to be added 20 | _itemCnt = _itemCnts select 4; // number of items (first aid packs, multigun bits) to load 21 | _bkcPckCnt = _itemCnts select 5; // Number of backpacks to add 22 | 23 | clearWeaponCargoGlobal _crate; 24 | clearMagazineCargoGlobal _crate; 25 | 26 | if (_wepCnt > 0) then 27 | { 28 | _a1 = _boxLoot select 0; // choose the subarray of weapons and corresponding magazines 29 | // Add some randomly selected weapons and corresponding magazines 30 | for "_i" from 1 to _wepCnt do { 31 | _item = _a1 call BIS_fnc_selectRandom; 32 | _crate addWeaponCargoGlobal [_item select 0,1]; 33 | _crate addMagazineCargoGlobal [_item select 1, 1 + round(random(3))]; 34 | }; 35 | }; 36 | if (_magCnt > 0) then 37 | { 38 | // Add Magazines, grenades, and 40mm GL shells 39 | _a1 = _boxLoot select 1; 40 | for "_i" from 1 to _magCnt do { 41 | _item = _a1 call BIS_fnc_selectRandom; 42 | _diff = (_item select 2) - (_item select 1); // Take difference between max and min number of items to load and randomize based on this value 43 | _crate addMagazineCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; 44 | }; 45 | }; 46 | if (_opticsCnt > 0) then 47 | { 48 | // Add Optics 49 | _a1 = _boxLoot select 2; 50 | for "_i" from 1 to _opticsCnt do { 51 | _item = _a1 call BIS_fnc_selectRandom; 52 | _diff = (_item select 2) - (_item select 1); 53 | _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; 54 | }; 55 | }; 56 | if (_materialsCnt > 0) then 57 | { 58 | // Add materials (cindar, mortar, electrical parts etc) 59 | _a1 = _boxLoot select 3; 60 | for "_i" from 1 to _materialsCnt do { 61 | _item = _a1 call BIS_fnc_selectRandom; 62 | _diff = (_item select 2) - (_item select 1); 63 | _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; 64 | }; 65 | }; 66 | if (_itemCnt > 0) then 67 | { 68 | // Add Items (first aid kits, multitool bits, vehicle repair kits, food and drinks) 69 | _a1 = _boxLoot select 4; 70 | for "_i" from 1 to _itemCnt do { 71 | _item = _a1 call BIS_fnc_selectRandom; 72 | _diff = (_item select 2) - (_item select 1); 73 | _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; 74 | }; 75 | }; 76 | if (_bkcPckCnt > 0) then 77 | { 78 | _a1 = _boxLoot select 5; 79 | for "_i" from 1 to _bkcPckCnt do { 80 | _item = _a1 call BIS_fnc_selectRandom; 81 | _diff = (_item select 2) - (_item select 1); 82 | _crate addbackpackcargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; 83 | }; 84 | }; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnVehiclePatrols.sqf: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////// 2 | // Spawn vehicles, man with AI, give AI waypoints around the perimeter of the mission area 3 | // Returns an array _units that contains a list of the units that were spawned and placed in the vehicle 4 | // By Ghostrider-DBD- 5 | // Last updated 7/30/15 6 | 7 | fn_setWaypoints = 8 | { 9 | _group = _this select 0; // The group to which waypoints should be assigned 10 | _center = _this select 1; // center of the mission area 11 | 12 | while {(count (waypoints _group)) > 0} do 13 | { 14 | deleteWaypoint ((waypoints _group) select 0); 15 | }; 16 | [_center,50,100,_group] call blck_setupWaypoints; 17 | }; 18 | 19 | private["_pos","_index","_noVehPatrols","_level","_vehType","_minDis","_maxDis","_dir","_arc","_xpos","_ypos","_newpos","_vehType","_safepos","_units","_dist","_aiGroup","_numAI","_veh","_grp"]; 20 | //diag_log format["---***>>>spawnVehiclePatrols.sqf: _this = %1",_this]; 21 | //Gets position information from spawnai1.sqf 22 | _pos = _this select 0; // Center of the mission area 23 | _noVehPatrols = [_this,1,-1] call BIS_fnc_param; // number of vehicles to spawn 24 | _vehTypes = [_this,2,blck_AIPatrolVehicles] call BIS_fnc_param; 25 | _minDis = [_this,3,30] call BIS_fnc_param; // minimum distance from the center of the mission for vehicle waypoints 26 | _maxDis = [_this,4,45] call BIS_fnc_param; // maximum distance from the center of the mission for vehicle waypoints 27 | _level = [_this,5,"red"] call BIS_fnc_param; // difficulty level of the AI 28 | _numAI = [_this,6,3] call BIS_fnc_param; // Number of AI to spawn 29 | 30 | if (_noVehPatrols <= 0) exitWith {}; 31 | 32 | _units = []; 33 | _dir = round(random(360)); 34 | _arc = 360/_noVehPatrols; 35 | 36 | for "_i" from 1 to _noVehPatrols do 37 | { 38 | // spread out the spawn points for the vehicles 39 | _dir = _dir + _arc; 40 | if (_dir > 360) then {_dir = _dir - 360;}; // for conceptual purposes. 41 | _dist = round(_minDis + (random(_maxDis - _minDis))); 42 | _xpos = (_pos select 0) + sin (_dir) * _dist; 43 | _ypos = (_pos select 1) + cos (_dir) * _dist; 44 | _newpos = [_xpos,_ypos,0]; 45 | 46 | // Spawn the vehicle 47 | _index = floor(random(count blck_AIPatrolVehicles)); 48 | _vehType = blck_AIPatrolVehicles select _index; 49 | //diag_log format["spawnVehiclePatrols.sqf: _vehType is %1",_vehType]; 50 | _safepos = [_newpos,0,25,0,0,20,0] call BIS_fnc_findSafePos; 51 | _veh = [_vehType,_safepos] call blck_spawnVehicle; 52 | 53 | _veh addEventHandler ["GetIn",{ // forces player to be ejected if he/she tries to enter the vehicle 54 | private ["_theUnit"]; 55 | _theUnit = _this select 2; 56 | _theUnit action ["Eject", vehicle _theUnit]; 57 | }]; 58 | _veh setVehicleLock "LOCKEDPLAYER"; 59 | 60 | // Spawn AI to man the vehicle 61 | _aiGroup = [_safepos,_numAI,_numAI,_level,_pos,_minDis,_maxDis] call blck_spawnGroup; 62 | //diag_log format["spawnVehiclePatrols.sqf: _aiGroup is %1",_aiGroup]; 63 | _units = _units + _aiGroup; 64 | //diag_log format["spawnVehiclePatrols.sqf: _units is %1",_units]; 65 | // delete any waypoints that may have been assigned and add new waypoints along the periphery of the mission area 66 | _grp = group (_aiGroup select 0); 67 | //diag_log format["spawnVehicle.sqf: typeName of _grp is %1", typeName _grp]; 68 | //[_pos, _grp] call fn_setWaypoints; 69 | 70 | //Moves 3 AI units into vehicle 71 | (_aiGroup select 0) moveingunner _veh; 72 | (_aiGroup select 1) moveindriver _veh; 73 | for "i" from 2 to (count _aiGroup) do { 74 | (_aiGroup select _i) moveInCargo _veh; 75 | }; 76 | _veh lockCargo true; 77 | _veh setVariable ["Driver", driver _veh,true]; 78 | _veh setVariable ["Gunner", gunner _veh, true]; 79 | _veh setVariable ["Cargo", (_aiGroup select 2), true]; 80 | _veh setVariable ["Group", group (driver _veh), true]; 81 | 82 | //diag_log format["spawnVehicle.sqf: vehicle crew is %1", (crew _veh)]; 83 | //Clears vehicle inventory 84 | clearWeaponCargoGlobal _veh; 85 | clearMagazineCargoGlobal _veh; 86 | clearBackpackCargoGlobal _veh; 87 | clearItemCargoGlobal _veh; 88 | _veh setVehicleLock "LOCKEDPLAYER"; 89 | 90 | [_veh] spawn blck_vehicleMonitor; 91 | }; 92 | 93 | //diag_log format["spawnVehiclePatrols.sqf: RETURN value of _units is %1",_units]; 94 | _units -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/findWorld.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Determine the map name, sets the map center and size, and returns the map name. 3 | Spawn coordinates were pulled from the config.cfg 4 | By Ghostrider-DBD- 5 | Last updated 8/2/15 6 | */ 7 | private["_blck_WorldName"]; 8 | 9 | _blck_WorldName = toLower format ["%1", worldName]; 10 | 11 | switch (_blck_WorldName) do {// These may need some adjustment - including a test for shore or water should help as well to avoid missions spawning on water. 12 | case "altis":{ 13 | //diag_log "Altis-specific settings loaded"; 14 | blck_mapCenter = [6322,7801,0]; 15 | blck_mapRange = 12000; 16 | if (blck_blacklistSpawns) then { 17 | diag_log "Spawn black list locations added for Altis"; 18 | blck_locationBlackList = blck_locationBlackList + [[[14939,15083,0],1000],[[23600, 18000,0],1000],[[23600,18000,0],1000]]; 19 | }; 20 | }; // Add Central, East and West respawns/traders 21 | case "stratis":{ 22 | diag_log "Stratis-specific settings loaded"; 23 | blck_mapCenter = [6322,7801,0]; 24 | blck_mapRange = 4500; 25 | if (blck_blacklistSpawns) then { 26 | blck_locationBlackList = blck_locationBlackList + [[[4031,4222,0],1000],[[1719,5120,0],1000],[[1719,5121,0],1000]]; 27 | diag_log "Spawn black list locations added for Stratis"; 28 | }; 29 | }; // Add Central, East and West respawns/traders 30 | case "chernarus":{ 31 | diag_log "Chernarus-specific settings loaded"; 32 | blck_mapCenter = [7100, 7750, 0]; //centerPosition = {7100, 7750, 300}; 33 | blck_mapRange = 5300; 34 | if (blck_blacklistSpawns) then { 35 | blck_locationBlackList = blck_locationBlackList + [[[4569.52, 4524.24, 0.201431],800],[[12077.8, 5121.92, 0.00144958],800],[[10688.6, 9428.98, 0.00144958],800]]; 36 | diag_log "Spawn black list locations added for Chernarus"; 37 | }; 38 | }; 39 | case "chernarus_summer":{blck_mapCenter = [7100, 7750, 0]; blck_mapRange = 6000;}; 40 | case "bornholm":{ 41 | //diag_log "Bornholm-specific settings loaded"; 42 | blck_mapCenter = [11240, 11292, 0]; 43 | blck_mapRange = 14400; 44 | if (blck_blacklistSpawns) then { 45 | blck_locationBlackList = blck_locationBlackList + [[[10058.346680,9015.847656,117.542267],800],[[13812.688477, 6877.921387,80.874428],800],[[13812.661133, 6877.968262,80.876938],800]]; 46 | diag_log "Spawn black list locations added for Bornholm"; 47 | }; 48 | }; 49 | case "esseker":{ 50 | diag_log "Esseker-specific settings loaded"; 51 | blck_mapCenter = [6144, 6144, 0]; //centerPosition = {7100, 7750, 300}; 52 | blck_mapRange = 5300; 53 | if (blck_blacklistSpawns) then { 54 | blck_locationBlackList = blck_locationBlackList + [ [[5073.31, 8903.09, 0],800],[[4407.77, 6054.78, 0],800],[[8692.93, 3854.72, 0],800]]; // { } 55 | diag_log "Spawn black list locations added for Esseker"; 56 | }; 57 | }; 58 | case "australia":{ 59 | blck_mapCenter = [20480,20480, 150];blck_mapRange = 40960; 60 | if (blck_blacklistSpawns) then { 61 | blck_locationBlackList = blck_locationBlackList + [ [[24398.3, 13971.6,0],800],[[34751.5, 13431.9,0],800],[[19032.7, 33974.6, 0],800],[[4056.35, 19435.9, 0],800] ]; 62 | diag_log "Spawn black list locations added for Australia"; 63 | }; 64 | }; // 65 | case "tavi":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14090;}; 66 | case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; 67 | case "namalsk":{blck_mapCenter = [4352, 7348, 0]}; 68 | case "napf":{blck_mapCenter = [10240, 10240, 0];blck_mapRange = 10240;}; 69 | case "panthera2":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; 70 | case "isladuala":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; 71 | case "sauerland":{blck_mapCenter = [12800, 12800, 0];blck_mapRange = 12800;}; 72 | case "trinity":{blck_mapCenter = [6400, 6400, 0];blck_mapRange = 6400;}; 73 | case "utes":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;}; 74 | case "zargabad":{blck_mapCenter = [4096, 4096, 0];blck_mapRange = 4096;}; 75 | case "fallujah":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;}; 76 | case "takistan":{ 77 | blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000; 78 | if (blck_blacklistSpawns) then { 79 | blck_locationBlackList = blck_locationBlackList + [ [[4695.13,9215.56,0.00141907],800],[[6028.83,1118.3,0.00149536],800],[[19032.7, 33974.6, 0],800],[[6817.97,4988.9,0.00137329],800] ]; 80 | diag_log "Spawn black list locations added for Takistan"; 81 | }; 82 | }; 83 | default { 84 | _blck_WorldName = "default"; // provide the defaults for "altis" 85 | blck_mapCenter = [6322,7801,0]; 86 | blck_mapRange = 12000; 87 | }; 88 | 89 | }; 90 | 91 | if (_blck_WorldName == "default") then { 92 | diag_log "[blckeagls]: Unknown map. Default World Settings Used"; 93 | } else { 94 | diag_log format["[blckeagls]: Worldname is %1. Map Specific Settings Defined",_blck_WorldName]; 95 | }; 96 | blck_townLocations = nearestLocations [blck_mapCenter, ["NameCity","NameCityCapital"], 30000]; 97 | //diag_log format["findWorld.sqf blck_townLocations = %1",blck_townLocations]; 98 | blck_WorldName = _blck_WorldName; 99 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major2/SM1.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn Green Mission 3 | Original Code by blckeagls 4 | Modified by Ghostrider 5 | Last modified 8/2/15 6 | See Major\SM1.sqf for comments 7 | */ 8 | 9 | private ["_coords","_crates","_aiGroup","_numAIGrp","_arc","_dir","_dist","_xpos","_ypos","_newPos","_objects","_startMsg","_endMsg","_missionObjs","_compositions","_missionCfg","_compSel","_mines"]; 10 | diag_log "[blckeagls] Starting GREEN mission SM1"; 11 | 12 | _coords = _this select 0; 13 | //diag_log format["Major2[Green]\SM1.sqf: _coords = %1",_coords]; 14 | _objects = []; 15 | _mines = []; 16 | _aiGroup = []; 17 | 18 | #include "\q\addons\custom_server\AIMission\Major2\compositions\compositionsGreen.sqf"; 19 | 20 | _compositions = 21 | [ 22 | "default" 23 | ]; 24 | 25 | _compSel = _compositions call BIS_fnc_selectRandom; 26 | 27 | switch (_compositions call BIS_fnc_selectRandom) do 28 | { 29 | case "default": {_missionCfg = _default}; 30 | case "default2": {_missionCfg = _default2}; 31 | case "medicalCamp": {_missionCfg = _medicalCamp}; 32 | case "redCamp": {_missionCfg = _redCamp}; 33 | case "resupplyCamp": {_missionCfg = _resupplyCamp}; 34 | }; 35 | 36 | _startMsg = _missionCfg select 0 select 0; 37 | _endMsg = _missionCfg select 0 select 1; 38 | _missionObjs = _missionCfg select 1; 39 | 40 | if (blck_labelMapMarkers select 0) then 41 | { 42 | //diag_log "SM1.sqf: labeling map markers *****"; 43 | blck_GreenMarker set [2, (_missionCfg select 0 select 2)]; 44 | } 45 | else 46 | { 47 | //diag_log "SM1.sqf: NOT labeling map markers *****"; 48 | blck_GreenMarker set [2, ""]; // 49 | }; 50 | blck_GreenMarker set [3,blck_labelMapMarkers select 1]; 51 | if (blck_preciseMapMarkers) then 52 | { 53 | //diag_log "SM1.sqf: Map marker will be PRECISELY at mission position"; 54 | blck_GreenMarker set [1,_coords]; 55 | } 56 | else 57 | { 58 | //diag_log "SM1.sqf: Map marker will be OFFSET from the mission position"; 59 | blck_GreenMarker set [1,[_coords,75] call blck_randomPosition]; 60 | }; 61 | 62 | //Sends message to all players about the AI Mission 63 | ["start",_startMsg,blck_GreenMarker select 2] call blck_MessagePlayers; 64 | [blck_GreenMarker] execVM "debug\spawnMarker.sqf"; 65 | waitUntil{ {isPlayer _x && _x distance _coords <= blck_TriggerDistance /*&& vehicle _x == _x*/} count playableunits > 0 }; 66 | _objects = [_coords, round(random(360)),_missionObjs,true] call blck_spawnCompositionObjects; 67 | if (count (_missionCfg select 2) > 0) then 68 | { 69 | // Spawn crates and fill them with loot 70 | _crates = [_coords,_missionCfg select 2/* array of crates*/] call blck_spawnMissionCrates; 71 | } 72 | else 73 | { 74 | _crates = [_coords,[[blck_crateTypes call BIS_fnc_selectRandom,[0,0,0],blck_BoxesLoot_Major2,blck_lootCountsMajor2]]] call blck_spawnMissionCrates; 75 | }; 76 | 77 | if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate 78 | { 79 | private ["_temp"]; 80 | _temp = [_coords,blck_SmokeAtMissions select 1] call blck_smokeAtCrates; 81 | _objects = _objects + _temp; 82 | }; 83 | if (blck_useMines) then 84 | { 85 | _mines = [_coords] call blck_spawnMines; 86 | }; 87 | 88 | 89 | 90 | if (count (_missionCfg select 3) > 0) then 91 | { 92 | // spawn vehicles and fill them with loot 93 | _vehicles = [_coords,_missionCfg select 3 /* array of vehicles*/] call blck_spawnMissionVehicles; 94 | }; 95 | 96 | if (blck_useStatic) then 97 | { 98 | if (blck_SpawnEmplaced_Major2 > 0) then 99 | { 100 | private["_static","_count"]; 101 | //diag_log format["SM1.sqf _missionCfg select 4 = %1", _missionCfg select 4]; 102 | if ( count (_missionCfg select 4) > 0 ) then 103 | { 104 | _static = _missionCfg select 4 select 1; 105 | _count = _missionCfg select 4 select 0; 106 | } 107 | else 108 | { 109 | _static = blck_staticWeapons; 110 | _count = blck_SpawnEmplaced_Major2; 111 | }; 112 | _aiGroup = [_coords,_count,_static,35,50,"green"] call blck_spawnEmplacedWeapon; 113 | blck_AIMajor2 = blck_AIMajor2 + _aiGroup; 114 | }; 115 | }; 116 | 117 | if (blck_useVehiclePatrols) then 118 | { 119 | if (blck_SpawnVeh_Major2 > 0) then 120 | { 121 | private["_veh","_count"]; 122 | if (count (_missionCfg select 5) > 0) then 123 | { 124 | _veh = _missionCfg select 5 select 1; 125 | _count = _missionCfg select 5 select 0; 126 | 127 | } 128 | else 129 | { 130 | _count = blck_SpawnVeh_Major2; 131 | _veh = blck_AIPatrolVehicles; 132 | }; 133 | _aiGroup = [_coords,_count,_veh,45,60,"green",3] call blck_spawnVehiclePatrols; 134 | blck_AIMajor2 = blck_AIMajor2 + _aiGroup; 135 | }; 136 | }; 137 | 138 | _aiGroup = [_coords,blck_MinAI_Major2,blck_MaxAI_Major2,"green",blck_AIGrps_Major2,20,40] call blck_spawnGroups; 139 | blck_AIMajor2 = blck_AIMajor2 + _aiGroup; 140 | 141 | waitUntil{uiSleep 1; {(isPlayer _x) && ([_x,_crates,15] call blck_playerInRange) && (vehicle _x == _x) } count playableunits > 0}; 142 | [_mines] call blck_clearMines; 143 | [_objects, blck_cleanupCompositionTimer] spawn blck_cleanupObjects; 144 | ["end",_endMsg,blck_GreenMarker select 2] call blck_MessagePlayers; 145 | [blck_GreenMarker select 1, "Green"] execVM "debug\missionCompleteMarker.sqf"; 146 | [blck_GreenMarker select 0] execVM "debug\deleteMarker.sqf"; 147 | blck_GreenMarker set [1,[0,0,0]]; 148 | blck_GreenMarker set [2,""]; 149 | if (blck_useSignalEnd) then 150 | { 151 | 152 | [_crates select 0] call blck_signalEnd; 153 | }; 154 | MissionGoMajor2 = false; 155 | diag_log "[blckeagls] End of GREEN mission SM1"; -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Minor2/SM1.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn Red Mision2 3 | Code by blckeagls 4 | Modified by Ghostrider 5 | Last updated 8/2/15 6 | */ 7 | //See Major/SM1.sqf for comments 8 | private ["_coords","_crates","_aiGroup","_numAIGrp","_arc","_dir","_dist","_xpos","_ypos","_newPos","_objects","_startMsg","_endMsg","_missionObjs","_compositions","_missionCfg","_compSel","_mines"]; 9 | diag_log "[blckeagls] Starting RED mission SM1"; 10 | 11 | _coords = _this select 0; 12 | //diag_log format["Minor2[Red]\SM1.sqf: _coords = %1",_coords]; 13 | _objects = []; 14 | _mines = []; 15 | _aiGroup = []; 16 | 17 | #include "\q\addons\custom_server\AIMission\Minor2\compositions\compositionsRed.sqf"; 18 | 19 | // a listing of mission compositions for this mission set. 20 | _compositions = 21 | [ 22 | "default" 23 | ]; 24 | 25 | _compSel = _compositions call BIS_fnc_selectRandom; 26 | diag_log format["[blckeagls] Red Mission composition = %1 ",_compSel]; 27 | // Select a mission configuration and load the data into _missionCfg 28 | switch (_compositions call BIS_fnc_selectRandom) do 29 | { 30 | case "default": {_missionCfg = _default}; 31 | case "default2": {_missionCfg = _default2}; 32 | case "medicalCamp": {_missionCfg = _medicalCamp}; 33 | case "redCamp": {_missionCfg = _redCamp}; 34 | case "resupplyCamp": {_missionCfg = _resupplyCamp}; 35 | }; 36 | 37 | // Parse the _missionCfg into messages and a list of objects for clarity of code 38 | _startMsg = _missionCfg select 0 select 0; 39 | _endMsg = _missionCfg select 0 select 1; 40 | _missionObjs = _missionCfg select 1; 41 | 42 | if (blck_labelMapMarkers select 0) then 43 | { 44 | //diag_log "SM1.sqf: labeling map markers *****"; 45 | blck_RedMarker set [2, (_missionCfg select 0 select 2)]; 46 | } 47 | else 48 | { 49 | //diag_log "SM1.sqf: NOT labeling map markers *****"; 50 | blck_RedMarker set [2, ""]; // 51 | }; 52 | 53 | if (blck_preciseMapMarkers) then 54 | { 55 | //diag_log "SM1.sqf: Map marker will be PRECISELY at mission position"; 56 | blck_RedMarker set [1,_coords]; 57 | } 58 | else 59 | { 60 | //diag_log "SM1.sqf: Map marker will be OFFSET from the mission position"; 61 | blck_RedMarker set [1,[_coords,75] call blck_randomPosition]; 62 | }; 63 | blck_RedMarker set [3,blck_labelMapMarkers select 1]; 64 | ["start",_startMsg,blck_RedMarker select 2] call blck_MessagePlayers; 65 | [blck_RedMarker] execVM "debug\spawnMarker.sqf"; 66 | waitUntil{ {isPlayer _x && _x distance _coords <= blck_TriggerDistance /*&& vehicle _x == _x*/} count playableunits > 0 }; 67 | _objects = [_coords, round(random(360)),_missionObjs,true] call blck_spawnCompositionObjects; 68 | if (count (_missionCfg select 2) > 0) then 69 | { 70 | // Spawn crates and fill them with loot 71 | _crates = [_coords,_missionCfg select 2/* array of crates*/] call blck_spawnMissionCrates; 72 | } 73 | else 74 | { 75 | _crates = [_coords,[[blck_crateTypes call BIS_fnc_selectRandom,[0,0,0],blck_BoxesLoot_Minor2,blck_lootCountsMinor2]]] call blck_spawnMissionCrates; 76 | }; 77 | if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate 78 | { 79 | private ["_temp"]; 80 | _temp = [_coords,blck_SmokeAtMissions select 1] call blck_smokeAtCrates; 81 | _objects = _objects + _temp; 82 | }; 83 | if (blck_useMines) then 84 | { 85 | _mines = [_coords] call blck_spawnMines; 86 | }; 87 | 88 | if (count (_missionCfg select 3) > 0) then 89 | { 90 | // spawn vehicles and fill them with loot 91 | _vehicles = [_coords,_missionCfg select 3 /* array of vehicles*/] call blck_spawnMissionVehicles; 92 | }; 93 | 94 | if (blck_useStatic) then 95 | { 96 | if (blck_SpawnEmplaced_Minor2 > 0) then 97 | { 98 | private["_static","_count"]; 99 | //diag_log format["SM1.sqf _missionCfg select 4 = %1", _missionCfg select 4]; 100 | if ( count (_missionCfg select 4) > 0 ) then 101 | { 102 | _static = _missionCfg select 4 select 1; 103 | _count = _missionCfg select 4 select 0; 104 | } 105 | else 106 | { 107 | _static = blck_staticWeapons; 108 | _count = blck_SpawnEmplaced_Minor2; 109 | }; 110 | _aiGroup = [_coords,_count,_static,35,50,"red"] call blck_spawnEmplacedWeapon; 111 | blck_AIMinor2 = blck_AIMinor2 + _aiGroup; 112 | }; 113 | }; 114 | 115 | if (blck_useVehiclePatrols) then 116 | { 117 | if (blck_SpawnVeh_Minor2 > 0) then 118 | { 119 | private["_veh","_count"]; 120 | if (count (_missionCfg select 5) > 0) then 121 | { 122 | _veh = _missionCfg select 5 select 1; 123 | _count = _missionCfg select 5 select 0; 124 | 125 | } 126 | else 127 | { 128 | _veh = blck_AIPatrolVehicles; 129 | _count = blck_SpawnVeh_Minor2; 130 | }; 131 | _aiGroup = [_coords,_count,_veh,45,60,"red",3] call blck_spawnVehiclePatrols; 132 | blck_AIMinor2 = blck_AIMinor2 + _aiGroup; 133 | }; 134 | }; 135 | 136 | _aiGroup = [_coords,blck_MinAI_Minor2,blck_MaxAI_Minor2,"red",blck_AIGrps_Minor2,20,40] call blck_spawnGroups; 137 | blck_AIMinor2 = blck_AIMinor2 + _aiGroup; 138 | 139 | waitUntil{uiSleep 1; {(isPlayer _x) && ([_x,_crates,15] call blck_playerInRange) && (vehicle _x == _x) } count playableunits > 0}; 140 | [_mines] call blck_clearMines; 141 | [_objects, blck_cleanupCompositionTimer] spawn blck_cleanupObjects; 142 | ["end",_endMsg,blck_RedMarker select 2] call blck_MessagePlayers; 143 | [blck_RedMarker select 1, "Red"] execVM "debug\missionCompleteMarker.sqf"; 144 | [blck_RedMarker select 0] execVM "debug\deleteMarker.sqf"; 145 | blck_RedMarker set [1,[0,0,0]]; 146 | blck_RedMarker set [2,""]; 147 | if (blck_useSignalEnd) then 148 | { 149 | [_crates select 0] call blck_signalEnd; 150 | }; 151 | diag_log "[blckeagls] End of RED mission SM1"; 152 | MissionGoMinor2 = false; 153 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Minor/SM1.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn Blue 3 | Original Code by blckeagls 4 | Modified by Ghostrider 5 | Last updated 8/2/15 6 | See \Major\SM1.sqf for comments 7 | */ 8 | 9 | private ["_coords","_crates","_aiGroup","_numAIGrp","_arc","_dir","_dist","_xpos","_ypos","_newPos","_objects","_startMsg","_endMsg","_missionObjs","_compositions","_missionCfg","_compSel","_mines"]; 10 | diag_log "[blckeagls] Starting BLUE mission SM1"; 11 | 12 | _coords = _this select 0; 13 | //diag_log format["Minor[Blue]\SM1.sqf: _coords = %1",_coords]; 14 | _objects = []; 15 | _mines = []; 16 | _aiGroup = []; 17 | 18 | #include "\q\addons\custom_server\AIMission\Minor\compositions\compositionsBlue.sqf"; 19 | 20 | _compositions = 21 | [ 22 | "default" 23 | ]; 24 | 25 | _compSel = _compositions call BIS_fnc_selectRandom; 26 | diag_log format["[blckeagls] Blue Mission composition = %1 ",_compSel]; 27 | // Select a mission configuration and load the data into _missionCfg 28 | switch (_compositions call BIS_fnc_selectRandom) do 29 | { 30 | case "default": {_missionCfg = _default}; 31 | case "default2": {_missionCfg = _default2}; 32 | case "medicalCamp": {_missionCfg = _medicalCamp}; 33 | case "redCamp": {_missionCfg = _redCamp}; 34 | case "resupplyCamp": {_missionCfg = _resupplyCamp}; 35 | }; 36 | 37 | // Parse the _missionCfg into messages and a list of objects for clarity of code 38 | _startMsg = _missionCfg select 0 select 0; 39 | _endMsg = _missionCfg select 0 select 1; 40 | _missionObjs = _missionCfg select 1; 41 | 42 | if (blck_labelMapMarkers select 0) then 43 | { 44 | //diag_log "SM1.sqf: labeling map markers *****"; 45 | blck_BlueMarker set [2, (_missionCfg select 0 select 2)]; 46 | } 47 | else 48 | { 49 | //diag_log "SM1.sqf: NOT labeling map markers *****"; 50 | blck_BlueMarker set [2, ""]; // 51 | }; 52 | 53 | if (blck_preciseMapMarkers) then 54 | { 55 | //diag_log "SM1.sqf: Map marker will be PRECISELY at mission position"; 56 | blck_BlueMarker set [1,_coords]; 57 | } 58 | else 59 | { 60 | //diag_log "SM1.sqf: Map marker will be randomly OFFSET from the mission position"; 61 | blck_BlueMarker set [1,[_coords,75] call blck_randomPosition]; 62 | }; 63 | blck_BlueMarker set [3,blck_labelMapMarkers select 1]; 64 | ["start",_startMsg,blck_BlueMarker select 2] call blck_MessagePlayers; 65 | [blck_BlueMarker] execVM "debug\spawnMarker.sqf"; 66 | waitUntil{ {isPlayer _x && _x distance _coords <= blck_TriggerDistance && vehicle _x == _x} count playableunits > 0 }; 67 | _objects = [_coords, round(random(360)),_missionObjs,true] call blck_spawnCompositionObjects; 68 | if (count (_missionCfg select 2) > 0) then 69 | { 70 | _crates = [_coords,_missionCfg select 2/* array of crates*/] call blck_spawnMissionCrates; 71 | } 72 | else 73 | { 74 | _crates = [_coords,[[blck_crateTypes call BIS_fnc_selectRandom,[0,0,0],blck_BoxesLoot_Minor,blck_lootCountsMinor]]] call blck_spawnMissionCrates; 75 | }; 76 | 77 | if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate 78 | { 79 | private ["_temp"]; 80 | _temp = [_coords,blck_SmokeAtMissions select 1] call blck_smokeAtCrates; 81 | _objects = _objects + _temp; 82 | }; 83 | 84 | if (blck_useMines) then 85 | { 86 | _mines = [_coords] call blck_spawnMines; 87 | }; 88 | 89 | if (count (_missionCfg select 3) > 0) then // spawn loot vehicles 90 | { 91 | _vehicles = [_coords,_missionCfg select 3 /* array of vehicles*/] call blck_spawnMissionVehicles; 92 | }; 93 | 94 | if (blck_useStatic) then 95 | { 96 | if (blck_SpawnEmplaced_Minor > 0) then 97 | { 98 | private["_static","_count"]; 99 | if ( count (_missionCfg select 4) > 0 ) then 100 | { 101 | _static = _missionCfg select 4 select 1; 102 | _count = _missionCfg select 4 select 0; 103 | } 104 | else 105 | { 106 | _static = blck_staticWeapons; 107 | _count = blck_SpawnEmplaced_Minor; 108 | }; 109 | _aiGroup = [_coords,_count,_static,35,50,"blue"] call blck_spawnEmplacedWeapon; 110 | //diag_log format["Minor\SM1.sqf: results returned by blck_spawnEmplacedWeapon are %1",_aiGroup]; 111 | blck_AIMinor = blck_AIMinor + _aiGroup; 112 | }; 113 | }; 114 | 115 | if (blck_useVehiclePatrols) then 116 | { 117 | if (blck_SpawnVeh_Minor > 0) then 118 | { 119 | private["_veh","_count"]; 120 | if (count (_missionCfg select 5) > 0) then 121 | { 122 | _veh = _missionCfg select 5 select 1; 123 | _count = _missionCfg select 5 select 0; 124 | 125 | } 126 | else 127 | { 128 | _veh = blck_AIPatrolVehicles; 129 | _count = blck_SpawnVeh_Minor; 130 | }; 131 | 132 | _aiGroup = [_coords,_count,_veh,45,60,"blue",3] call blck_spawnVehiclePatrols; 133 | blck_AIMinor = blck_AIMinor + _aiGroup; 134 | }; 135 | }; 136 | 137 | _aiGroup = [_coords,blck_MinAI_Minor,blck_MaxAI_Minor,"blue",blck_AIGrps_Minor,20,40] call blck_spawnGroups; 138 | blck_AIMinor = blck_AIMinor + _aiGroup; 139 | 140 | waitUntil{uiSleep 1; {(isPlayer _x) && ([_x,_crates,15] call blck_playerInRange) && (vehicle _x == _x) } count playableunits > 0}; 141 | [_mines] call blck_clearMines; 142 | [_objects, blck_cleanupCompositionTimer] spawn blck_cleanupObjects; 143 | ["end",_endMsg,blck_BlueMarker select 2] call blck_MessagePlayers; 144 | [blck_BlueMarker select 1, "Blue"] execVM "debug\missionCompleteMarker.sqf"; 145 | [blck_BlueMarker select 0] execVM "debug\deleteMarker.sqf"; 146 | blck_BlueMarker set [1,[0,0,0]]; 147 | blck_BlueMarker set [2,""]; 148 | if (blck_useSignalEnd) then 149 | { 150 | //diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0]; 151 | [_crates select 0] call blck_signalEnd; 152 | }; 153 | diag_log "[blckeagls] End of BLUE mission SM1"; 154 | MissionGoMinor = false; 155 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/AIKilled.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Influenced by code by blckeagls and Vampire and from Wicked AI for Arma 2. 3 | Modified by Ghostrider 4 | Handles actions required at the time an AI unit is killed 5 | Last updated 8/1/15 6 | */ 7 | private ["_unit","_killer","_startTime","_grpUnits","_alertDist","_intelligence","_weapons","_killersVehicle","_handle","_launcher","_runover","_unitMission"]; 8 | _unit = _this select 0; 9 | _killer = _this select 1; 10 | _launcher = secondaryWeapon _unit; 11 | _alertDist = _unit getVariable ["alertDist",300]; 12 | _intelligence = _unit getVariable ["intelligence",1]; 13 | 14 | if (_alertDist > 0) then { 15 | { 16 | if (((position _x) distance (position _unit)) <= _alertDist) then { 17 | _x reveal [_killer, _intelligence]; 18 | //diag_log "Killer revealed"; 19 | } 20 | } forEach allUnits; 21 | }; 22 | if ((count (units group _unit)) > 1) then { 23 | if ((leader group _unit) == _unit) then { 24 | _grpUnits = units group _unit; 25 | _grpUnits = _grpUnits - [_unit]; 26 | (group _unit) selectLeader (_grpUnits call BIS_fnc_selectRandom); 27 | }; 28 | }; 29 | 30 | if (blck_launcherCleanup) then 31 | { 32 | if (_launcher != "") then 33 | { 34 | _launcherRounds = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines"); //0; 35 | _unit removeWeapon _Launcher; 36 | removeBackpack _unit; 37 | { 38 | if(_x in _launcherRounds) then { 39 | _unit removeMagazine _x; 40 | }; 41 | } count magazines _unit; 42 | 43 | }; 44 | }; 45 | 46 | if (blck_useNVG) then 47 | { 48 | if (_unit getVariable ["hasNVG",false]) then 49 | { 50 | _unit unassignitem "NVG_EPOCH"; _unit removeweapon "NVG_EPOCH"; 51 | }; 52 | }; 53 | //diag_log format["[AIKilled.sqf] --- >>> unit %1 killed",_unit]; 54 | [_unit] joinSilent grpNull; 55 | // use the epoch cleanup routines to delete the ai corpse 56 | _unit setVariable ["LAST_CHECK", (diag_tickTime + blck_bodyCleanUpTimer)]; 57 | 58 | 59 | _missionType = _unit getVariable ["Mission","none"]; 60 | switch (_missionType) do 61 | { 62 | case "blue": {blck_AIMinor = blck_AIMinor - [_unit];}; 63 | case "red": {blck_AIMinor2 = blck_AIMinor2 - [_unit];}; 64 | case "green": {blck_AIMajor2 = blck_AIMajor2 - [_unit];}; 65 | case "orange": {blck_AIMajor = blck_AIMajor - [_unit];}; 66 | default {}; 67 | }; 68 | 69 | //diag_log format["isPlayer killer is %1", isPlayer _killer]; 70 | // Handle case where one AI kills another or AI die from falling or explosions unrelated to player activity 71 | if (!(isPlayer _killer)) exitWith {}; 72 | 73 | // handle situations where the AI was killed by being run over or by a gun on a vehicle's gun 74 | // These functions assist with handling vehicle kills 75 | fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped 76 | private ["_vk","_unit"]; 77 | _unit = _this select 0; 78 | _vk = _this select 1; 79 | 80 | { 81 | if (((position _x) distance (position _unit)) <= 350) then 82 | { 83 | _x reveal [_vk, 4]; 84 | //diag_log "Killers vehicle revealed"; 85 | _x dowatch _vk; 86 | _x doTarget _vk; 87 | if (_launcher != "") then 88 | { 89 | //diag_log "launcher selected"; 90 | _x selectWeapon (secondaryWeapon _unit); 91 | _handle = _x fireAtTarget [_vk,_launcher]; 92 | //diag_log format["AIKilled.sqf] result of fireAtTarget is %1",_handle]; 93 | } else { 94 | _x doFire _vk; 95 | }; 96 | }; 97 | } forEach allUnits; 98 | }; 99 | 100 | fn_applyVehicleDamage = { // apply a bit of damage 101 | private["_vk","_vd"]; 102 | _vk = _this select 0; 103 | _vd = getDammage _vk; 104 | _vk setDamage (_vd + blck_RunGearDamage); 105 | //diag_log format["[AIKilled.sqf] vehicle damage applied, damage now %1", getDammage _vk]; 106 | }; 107 | 108 | fn_deleteAIGear = { 109 | private["_ai"]; 110 | _ai = _this select 0; 111 | {deleteVehicle _x}forEach nearestObjects [(getPosATL _ai), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 3]; //Adapted from the AI cleanup logic by KiloSwiss 112 | [_ai] call blck_removeGear; 113 | }; 114 | 115 | //diag_log format["[AIKilled.sqf] --->>> AI was killed by a %1 which is a kind of %2",_killer,typeOf _killer]; 116 | //diag_log format["[AIKilled.sqf] --- >>> killer's vehicle was %1 which is a kind of %2",vehicle _killer, typeOf (vehicle _killer)]; 117 | 118 | if(typeOf _killer != typeOf (vehicle _killer)) then // AI was killed by a vehicle 119 | { 120 | //diag_log "[AIKilled.sqf] AI was killed by a vehicle in some way <<<<<<<<<-------------->>>>>>>>>>>>"; 121 | if(_killer == driver(vehicle _killer))then{ // The AI was runover 122 | //diag_log "[AIKilled.sqf] AI was run over"; 123 | if(blck_RunGear) then { 124 | [_unit] call fn_deleteAIGear; 125 | }; 126 | if (blck_VK_RunoverDamage) then {//apply vehicle damage 127 | [vehicle _killer] call fn_applyVehicleDamage; 128 | }; 129 | [_unit, vehicle _killer] call fn_targetVehicle; 130 | }; 131 | }; 132 | //diag_log format["AIKilled.sqf -- >> killerName is %1 and he is armed with %2", name _killer, currentWeapon _killer]; 133 | // 134 | if ( (typeOf vehicle _killer) in blck_forbidenVehicles or (currentWeapon _killer) in blck_forbidenVehicleGuns) then { 135 | //diag_log "[AIKilled] --- >>> evaluating case where killer is vehicle in the forbiden list or a gun in that forbiden list"; 136 | if (blck_VK_Gear) then {[_unit] call fn_deleteAIGear;}; 137 | [_unit, vehicle _killer] call fn_targetVehicle; 138 | //diag_log "[AIKilled.sqf] Vehicle is in forbiddentlist !!!"; 139 | if (blck_VK_GunnerDamage) then { 140 | [vehicle _killer] call fn_applyVehicleDamage; 141 | }; 142 | }; 143 | // unit cleanup depends on epoch cleanup; this code was left in the event that the epoch-cleanup approach no longer works properly. 144 | /* 145 | _unit spawn { 146 | //_this setOwner 1; 147 | sleep blck_aiCleanUpTimer; 148 | deleteVehicle _this; 149 | }; 150 | */ -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/spawnUnit.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Original code by blckeagls 3 | Modified by Ghostrider 4 | Logic for adding AI Ammo, GL Shells and Attachments addapted from that by Vampire. 5 | Code to delete dead AI bodies moved to AIKilled.sqf 6 | */ 7 | 8 | //Defines private variables so they don't interfere with other scripts 9 | private ["_pos","_i","_weap","_ammo","_other","_skin","_aiGroup","_ai1","_magazines","_players","_owner","_ownerOnline","_nearEntities","_skillLevel","_aiSkills","_specialItems", 10 | "_Launcher","_launcherRound","_vest","_index","_WeaponAttachments","_Meats","_Drink","_Food","_aiConsumableItems","_weaponList","_ammoChoices","_attachment","_attachments"]; 11 | 12 | _WeaponAttachments = [ 13 | "acc_flashlight","acc_pointer_IR","optic_Arco","optic_Hamr","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","optic_Holosight","optic_Holosight_smg","optic_SOS", 14 | "optic_MRCO","optic_DMS","optic_Yorris","optic_MRD","optic_LRPS","optic_NVS","optic_Nightstalker","optic_tws","optic_tws_mg","muzzle_snds_H","muzzle_snds_L","muzzle_snds_M", 15 | "muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp" 16 | ]; 17 | //CraftingFood 18 | _Meats=[ 19 | "" 20 | ]; 21 | _Drink = [ 22 | "" 23 | ]; 24 | _Food = [ 25 | "" 26 | ]; 27 | _aiConsumableItems = _Meats + _Drink + _Food; 28 | 29 | _pos = _this select 0; // Position at which to spawn AI 30 | _weaponList = _this select 1; 31 | _aiGroup = _this select 2; // Group to which AI belongs 32 | _skillLevel = [_this,3,"red"] call BIS_fnc_param; // Assign a skill level in case one was not passed."blue", "red", "green", "orange" 33 | _Launcher = [_this, 4, "none"] call BIS_fnc_param; // Set launchers to "none" if no setting was passed. 34 | 35 | _ai1 = ObjNull; 36 | "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"]; 37 | [_ai1] call blck_removeGear; 38 | _skin = blck_SkinList call BIS_fnc_selectRandom; 39 | _ai1 forceAddUniform _skin; 40 | 41 | //Stops the AI from being cleaned up 42 | _ai1 setVariable["LASTLOGOUT_EPOCH",14400]; //Not sure if this is breaking or fixing anything in Exile... 43 | _ai1 setVariable["LAST_CHECK",14400]; 44 | 45 | //Sets AI Tactics 46 | _ai1 enableAI "TARGET"; 47 | _ai1 enableAI "AUTOTARGET"; 48 | _ai1 enableAI "MOVE"; 49 | _ai1 enableAI "ANIM"; 50 | _ai1 enableAI "FSM"; 51 | _ai1 allowDammage true; 52 | _ai1 setBehaviour "COMBAT"; 53 | _ai1 setunitpos "AUTO"; 54 | 55 | uiSleep 0.2; //For some reason without this sometimes they don't spawn the weapon on them 56 | 57 | // Add a vest to AI for storage 58 | _vest = blck_vests call BIS_fnc_selectRandom; 59 | _ai1 addVest _vest; 60 | 61 | // Add a primary weapon : Vampires logic used here. 62 | _weap = _weaponList call BIS_fnc_selectRandom; 63 | //diag_log format["[spawnUnit.sqf] _weap os %1",_weap]; 64 | _ai1 addWeaponGlobal _weap; 65 | // get the ammo that can be used with this weapon. This function returns an array with all possible ammo choices in it. 66 | _ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines"); 67 | _ammo = _ammoChoices call BIS_fnc_selectRandom; 68 | //diag_log format["[spawnUnit.sqf] _ammo returned as %1",_ammo]; 69 | for "_i" from 0 to (floor(random 3)) do { 70 | _ai1 addMagazine _ammo; 71 | }; 72 | 73 | // If the weapon has a GL, add some rounds for it: based on Vampires code 74 | if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then { 75 | _ai1 addMagazine "1Rnd_HE_Grenade_shell"; 76 | }; 77 | 78 | uiSleep 0.2; //For some reason without this sometimes they don't spawn the weapon on them 79 | 80 | //adds 3 random items to AI. _other = ["ITEM","COUNT"] 81 | _i = 0; 82 | while {_i < 3} do { 83 | _i = _i + 1; 84 | _ai1 addItem (_aiConsumableItems call BIS_fnc_selectRandom); 85 | }; 86 | 87 | // Add an FAK or Grenade 50% of the time 88 | if (round(random 10) <= 9) then 89 | { 90 | _specialItems = ["HandGrenade","FAK"]; 91 | 92 | _item = _specialItems call BIS_fnc_selectRandom; 93 | //diag_log format["spawnUnit.sqf] -- Item is %1", _item]; 94 | _ai1 addItem _item; 95 | }; 96 | if (_Launcher != "none") then 97 | { 98 | private["_bpck"]; 99 | _bpck = blck_backpack call BIS_fnc_selectRandom; 100 | _ai1 addBackpack _bpck; 101 | //diag_log format["spawnUnit.sqf: Available Launcher Rounds are %1",getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines")]; 102 | _ai1 addWeaponGlobal _Launcher; 103 | _launcherRound = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0; 104 | //diag_log format["[spawnUnit.sqf] Launcher round is %1",_launcherRound]; 105 | for "_i" from 1 to 3 do 106 | { 107 | //diag_log format["[spawnUnit.saf] Adding Launcher Round %1 ",_launcherRound]; 108 | _ai1 addItemToBackpack _launcherRound call BIS_fnc_selectRandom; 109 | }; 110 | _ai1 selectWeapon (secondaryWeapon _ai1); 111 | }; 112 | 113 | if(sunOrMoon < 0.2 && blck_useNVG)then 114 | { 115 | _ai1 addWeapon "NVG_EPOCH"; 116 | _ai1 setVariable ["hasNVG", true]; 117 | } 118 | else 119 | { 120 | _ai1 setVariable ["hasNVG", false]; 121 | }; 122 | 123 | // Infinite ammo 124 | _ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1;}]; 125 | 126 | // Do something if AI is killed 127 | _ai1 addEventHandler ["Killed",{ [(_this select 0), (_this select 1)] execVM blck_EH_AIKilled;}]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }]; 128 | 129 | switch (_skillLevel) do 130 | { 131 | case "blue": {_index = 0;_aiSkills = blck_SkillsBlue;}; 132 | case "red": {_index = 1;_aiSkills = blck_SkillsRed;}; 133 | case "green": {_index = 2;_aiSkills = blck_SkillsGreen;}; 134 | case "orange": {_index = 3;_aiSkills = blck_SkillsOrange;}; 135 | default {_index = 0;_aiSkills = blck_SkillsBlue;}; 136 | }; 137 | 138 | _alertDist = blck_AIAlertDistance select _index; 139 | _intelligence = blck_AIIntelligence select _index; 140 | 141 | [_ai1,_aiSkills] call blck_setSkill; 142 | _ai1 setVariable ["alertDist",_alertDist,true]; 143 | _ai1 setVariable ["intelligence",_intelligence,true]; 144 | _ai1 setVariable ["Mission",_skillLevel,true]; 145 | 146 | _ai1 -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major/compositions/compositionsOrange.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Mission Compositions by Bill prepared for DBD Clan 3 | */ 4 | private ["_default","_resupplyCamp","_redCamp","_medicalCamp","_crateLoot"]; 5 | 6 | _crateLoot = 7 | [ 8 | [// Weapons 9 | 10 | ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] 11 | ], 12 | [//Magazines 13 | 14 | ["10Rnd_93x64_DMR_05_Mag" ,1,4] 15 | ], 16 | [ // Optics 17 | ["optic_KHS_tan",1,3] 18 | ], 19 | [// Materials and supplies 20 | 21 | ["EnergyPackLg",1,3] 22 | ], 23 | [//Items 24 | ["ItemTrout",1,3] 25 | ], 26 | [ // Backpacks 27 | ["smallbackpack_pink_epoch",1,2] 28 | ] 29 | ]; 30 | /* Nested arrays are: 31 | [ 32 | ["start message","end message","mission mame(used for map marker)"], 33 | [objects to spawn provided as output from ObjectGraber], 34 | [["crateType",[offset from mission center x, y, z],_loot array to use, _array with numbers of each category of loot to add]], 35 | [vehicles to spawn], 36 | [no static weapons, [weapon1, weapon2, ...]], 37 | [No vehicle patrols,[vehicle1, vehicle2, ...]] 38 | ] 39 | */ 40 | 41 | _default = [ // Start, end message and map marker 42 | [ // mesasges 43 | "A group of Bandits was sighted in a nearby sector! Check the Orange marker on your map for the location!", // Mission Start message 1 for players 44 | "The Sector at the Orange Marker is under survivor control!", // Mission End message for player 45 | "Bandit Patrol" // Map marker label 46 | ], 47 | [ // Map objects 48 | 49 | ], 50 | 51 | [], 52 | [], // select 3 53 | [], // select 4 54 | [] // select 5 55 | ]; 56 | 57 | _default2 = [ 58 | [ // Select 0 59 | "A group of Bandits was sighted in a nearby sector! Check the Orange marker on your map for the location!", // Mission Start message 1 for players 60 | "The Sector at the Orange Marker is under survivor control!", // Mission End message for player 61 | "Bandit Patrol" // Map marker label 62 | ], 63 | [ // Select 1 64 | // This nested array defines loot crates to be spawned at the mission. 65 | // for each loot crate the array lists: ["loot box type",[position x,y,z],Loot array from which to select loot, [weapons,mazazines,optics,materials,items,backpacks]] 66 | // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. 67 | // Weapons, magazines, optics, nothing else 68 | 69 | ["Land_Camping_Light_F",[-10.5957,10.332,0.687943],344.243,1,0,[],"","",true,false], 70 | ["Land_Camping_Light_F",[10.5957,10.332,0.687943],344.243,1,0,[],"","",true,false], 71 | ["Land_Camping_Light_F",[-10.5957,-10.332,0.687943],344.243,1,0,[],"","",true,false], 72 | ["Flag_ARMEX_F",[-29.41016,0.13477,-0.0224228],359.992,1,0,[],"","",true,false] // Something to mark the position of the crate. 73 | // using the format output by objectgrabber 74 | // https://community.bistudio.com/wiki/Dynamic_Object_Compositions 75 | ], 76 | 77 | [ // Select 2 Customized loot chests 78 | // format ["chest class name",[offset from mission center x,y,z],loot array, [items from each loot category to add (see below)]] 79 | // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. 80 | // The idea here was that you could define the position of loot boxes relative to buildings and bunkers so set them in 3D space as you wished. 81 | ["Box_NATO_Wps_F",[0,0,0],_crateLoot,[0,0,0,7,7,1]], // Standard loot crate with standard loadout 82 | ["Land_PaperBox_C_EPOCH",[-5,-5,0],blck_BoxLoot_Major,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks 83 | ["Land_CargoBox_V1_F",[7, 5.4,0],blck_BoxLoot_Major,[0,15,7,10,0,0]] 84 | ], 85 | [ // select 3 86 | // Note that the relative position of these vehicles could be setup in the Editor then taken from objectgrabber or other output formats. 87 | ["I_Truck_02_covered_F",[-8,-5,0],blck_BoxLoot_Major,[0,0,0,7,7,1]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks 88 | ["I_Truck_02_transport_F",[8, 5.4,0],blck_BoxLoot_Major,[4,10,5,0,0,0]] 89 | ], 90 | [2,["B_HMG_01_high_F","B_GMG_01_high_F","O_static_AT_F"]], // Select 4 Spawns 2 Static AI Weapons from the list and mans each with one AI 91 | [2,["I_G_Offroad_01_armed_F"]] // Select 5 Spawns 2 AI Vehicle patrols using vehicles randomly selected from the list. 92 | 93 | ]; 94 | 95 | _resupplyCamp = 96 | [ 97 | [ 98 | "A Bandit resupply camp has been spotted. Check the Orange marker on your map for its location", 99 | "The Bandit resupply camp the Orange Marker is under player control", 100 | "Resupply Camp" 101 | ], 102 | [ 103 | // spawn some items to give AI cover and make the mission more interesting 104 | // using the format output by objectgrabber 105 | // https://community.bistudio.com/wiki/Dynamic_Object_Compositions // https://community.bistudio.com/wiki/Dynamic_Object_Compositions 106 | ["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,1,0,[],"","",true,false], 107 | ["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,0,0.848867,[],"","",true,false], 108 | ["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,1,0,[],"","",true,false], 109 | ["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,1,0,[],"","",true,false], 110 | ["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,1,0,[],"","",true,false], 111 | ["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,1,0,[],"","",true,false], 112 | ["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,1,0,[],"","",true,false], 113 | ["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,1,0,[],"","",true,false] 114 | ], 115 | [ 116 | ["Box_NATO_Wps_F",[0,0,0],blck_BoxLoot_Major,blck_lootCountsMajor], // Standard loot crate with standard loadout 117 | ["Land_PaperBox_C_EPOCH",[-5,-5,0],blck_BoxLoot_Major,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks 118 | ["Land_CargoBox_V1_F",[7, 5.4,0],blck_BoxLoot_Major,[0,15,7,10,0,0]] 119 | ], 120 | [], // select 3 121 | [], // select 4 122 | [] // select 5 123 | ]; 124 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/Major/SM1.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | Spawn Orange Mission 3 | Original Code by blckeagls 4 | Modified by Ghostrider 5 | Last updated 8/2/15 6 | */ 7 | private ["_coords","_crates","_aiGroup","_numAIGrp","_objects","_startMsg","_endMsg","_mapLabel","_missionObjs","_compositions","_missionCfg","_compSel","_mines","_result","_markerName","_markerCoords"]; 8 | diag_log "[blckeagls] Starting ORANGE mission SM1"; 9 | 10 | _coords = _this select 0; 11 | // holds a list of objects spawned for this mission for cleanup later on. 12 | _objects = []; 13 | _mines = []; 14 | _aiGroup = []; 15 | 16 | // Use include here so as not to distract from the flow of the code. The included file defines arrays specifying the parameters for each mission. 17 | #include "\q\addons\custom_server\AIMission\Major\compositions\compositionsOrange.sqf"; 18 | 19 | // a listing of mission compositions for this mission set. 20 | _compositions = 21 | [ 22 | "resupplyCamp", 23 | "default2", 24 | "default" 25 | ]; 26 | 27 | _compSel = _compositions call BIS_fnc_selectRandom; 28 | diag_log format["[blckeagls] Orange Mission composition = %1 ",_compSel]; 29 | 30 | //Load the _missionCfg 31 | switch (_compositions call BIS_fnc_selectRandom) do 32 | { 33 | case "default": {_missionCfg = _default}; 34 | case "default2": {_missionCfg = _default2}; 35 | case "medicalCamp": {_missionCfg = _medicalCamp}; 36 | case "redCamp": {_missionCfg = _redCamp}; 37 | case "resupplyCamp": {_missionCfg = _resupplyCamp}; 38 | }; 39 | 40 | //diag_log format["++++ SM1.sqf: _missionCfg = %1", _missionCfg]; 41 | // Parse the _missionCfg into messages and a list of objects for clarity of code 42 | _startMsg = _missionCfg select 0 select 0; 43 | _endMsg = _missionCfg select 0 select 1; 44 | //diag_log format["++++ SM1.sqf: _startMsg = %1; _endMsg = %2", _startMsg,_endMsg]; 45 | 46 | if (blck_labelMapMarkers select 0) then 47 | { 48 | //diag_log "SM1.sqf: labeling map markers *****"; 49 | blck_OrangeMarker set [2, (_missionCfg select 0 select 2)]; 50 | } 51 | else 52 | { 53 | //diag_log "SM1.sqf: NOT labeling map markers *****"; 54 | blck_OrangeMarker set [2, ""]; // 55 | }; 56 | blck_OrangeMarker set [3,blck_labelMapMarkers select 1]; 57 | if (blck_preciseMapMarkers) then 58 | { 59 | //diag_log "SM1.sqf: Map marker will be PRECISELY at mission position"; 60 | blck_OrangeMarker set [1,_coords]; 61 | } 62 | else 63 | { 64 | //diag_log "SM1.sqf: Map marker will be OFFSET from the mission position"; 65 | blck_OrangeMarker set [1,[_coords,75] call blck_randomPosition]; 66 | }; 67 | 68 | // Define the array of objects to be spawned at the mission, e.g., buildings, bunkers, cammo nets 69 | _missionObjs = _missionCfg select 1; 70 | 71 | //Sends message to all players about the AI Mission 72 | ["start",_startMsg,blck_OrangeMarker select 2] call blck_MessagePlayers; 73 | 74 | //diag_log "SM1.sqf: Setup Mission Map Marker"; 75 | // Spawn a map marker on each client 76 | [blck_OrangeMarker] execVM "debug\spawnMarker.sqf"; 77 | 78 | waitUntil{ {isPlayer _x && _x distance _coords <= blck_TriggerDistance && vehicle _x == _x} count playableunits > 0 }; 79 | //Spawns the objects in the composition 80 | // do this before spawning any loot chests so that the chests to properly support the chests when spawned inside structures. 81 | _objects = [_coords, round(random(360)),_missionObjs,true] call blck_spawnCompositionObjects; 82 | 83 | if (count (_missionCfg select 2) > 0) then // Then there are specific loot crate configurations defined in the composition 84 | { 85 | // Spawn crates and fill them with loot 86 | _crates = [_coords,_missionCfg select 2/* array of crates*/] call blck_spawnMissionCrates; 87 | } 88 | else 89 | { // otherwise spawn a default crate with default contents 90 | //diag_log "SM1.sqf: Spawn Loot Crates"; 91 | _crates = [_coords,[[blck_crateTypes call BIS_fnc_selectRandom,[0,0,0],blck_BoxLoot_Major,blck_lootCountsMajor]]] call blck_spawnMissionCrates; 92 | }; 93 | 94 | //diag_log "SM1.sqf: Spawn Smoking Wreck"; 95 | if (blck_SmokeAtMissions select 0) then // spawn a fire and/or smoke near the crate 96 | { 97 | private ["_temp"]; 98 | _temp = [_coords,blck_SmokeAtMissions select 1] call blck_smokeAtCrates; 99 | _objects = _objects + _temp; 100 | }; 101 | 102 | //diag_log "SM1.sqf: Spawn Mines"; 103 | if (blck_useMines) then 104 | { 105 | _mines = [_coords] call blck_spawnMines; 106 | }; 107 | 108 | // If there are loot vehicles define in the configuration spawn them 109 | if (count (_missionCfg select 3) > 0) then 110 | { 111 | // spawn vehicles and fill them with loot 112 | _vehicles = [_coords,_missionCfg select 3 /* array of vehicles*/] call blck_spawnMissionVehicles; 113 | }; 114 | 115 | //diag_log format["SM1.sqf: Spawn %1 Static Weapons",blck_useStatic]; uiSleep 1; 116 | // Spawn any randomly generated static weapons and man them 117 | if (blck_useStatic) then 118 | { 119 | if (blck_SpawnEmplaced_Major > 0) then 120 | { 121 | private["_static","_count"]; 122 | if ( count (_missionCfg select 4) > 0 ) then // Specific static weapon parameters are defined for this composition 123 | { 124 | _static = _missionCfg select 4 select 1; 125 | _count = _missionCfg select 4 select 0; 126 | } 127 | else // Use the default static weapon parameters. 128 | { 129 | //diag_log "sm1.sqf: default static spawns utilized"; 130 | _static = blck_staticWeapons; 131 | _count = blck_SpawnEmplaced_Major; 132 | }; 133 | // spawn static weapons and assign AI to them; note that this function exits immediately if the _count == -1 134 | _aiGroup = [_coords,_count,_static,35,50,"orange"] call blck_spawnEmplacedWeapon; 135 | blck_AIMajor = blck_AIMajor + _aiGroup; 136 | }; 137 | }; 138 | 139 | if (blck_useVehiclePatrols) then 140 | { 141 | if (blck_SpawnVeh_Major > 0) then 142 | { 143 | private["_veh","_count"]; 144 | if (count (_missionCfg select 5) > 0) then // Specific parameters are defined for this composition so use them 145 | { 146 | //diag_log "sm1.sqf: default AI Vehicle Patrol spawns utilized"; 147 | _veh = _missionCfg select 5 select 1; 148 | _count = _missionCfg select 5 select 0; 149 | 150 | } 151 | else // Otherwise use the default parameters for vehicle patrols 152 | { 153 | //diag_log "sm1.sqf: default AI Vehicle Patrol spawns utilized"; 154 | _count = blck_SpawnVeh_Major; 155 | _veh = blck_AIPatrolVehicles; 156 | }; 157 | // Spawn the vehicle patrols and keep a record of any AI spawned so that they can be cleaned up later if necessary. Note that the function exits immediately if the count of vehicle patrols is -1. 158 | _aiGroup = [_coords,_count,_veh,45,60,"orange",3] call blck_spawnVehiclePatrols; 159 | blck_AIMajor = blck_AIMajor + _aiGroup; 160 | }; 161 | }; 162 | 163 | // Spawn the mission AI and keep a log of the units spawned for cleanup; note that this function exits immediately if the _count == -1 164 | _aiGroup = [_coords,blck_MinAI_Major,blck_MaxAI_Major,"orange",blck_AIGrps_Major,20,40] call blck_spawnGroups; 165 | blck_AIMajor = blck_AIMajor + _aiGroup; 166 | 167 | //Waits until player gets near the _crates to end mission 168 | waitUntil{uiSleep 1; {(isPlayer _x) && ([_x,_crates,15] call blck_playerInRange) && (vehicle _x == _x) } count playableunits > 0}; 169 | [_mines] call blck_clearMines; 170 | [_objects, blck_cleanupCompositionTimer] spawn blck_cleanupObjects; 171 | //Announce that the mission is complete 172 | ["end",_endMsg,blck_OrangeMarker select 2] call blck_MessagePlayers; 173 | [blck_OrangeMarker select 1, "Orange"] execVM "debug\missionCompleteMarker.sqf"; 174 | [blck_OrangeMarker select 0] execVM "debug\deleteMarker.sqf"; 175 | blck_OrangeMarker set [1,[0,0,0]]; 176 | blck_OrangeMarker set [2,""]; 177 | if (blck_useSignalEnd) then 178 | { 179 | 180 | [_crates select 0] call blck_signalEnd; 181 | }; 182 | diag_log "[blckeagls] End of ORANGE mission SM1"; 183 | blck_MissionGoMajor = false; 184 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/AIFunctions.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | For the Mission System originally coded by blckeagls 3 | By Ghostrider 4 | Functions and global variables used by the mission system. 5 | Last modified 8/1/15 6 | 7 | ============================================================================================================================================== 8 | 9 | */ 10 | // Set to true to activate Debug settings - these are limited at the present time. 11 | blck_debugON = false; 12 | 13 | 14 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 15 | // Do NOT edit variables below this line. 16 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 17 | blck_removeGear = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\removeGear.sqf"; // Strip an AI unit of all gear. 18 | blck_spawnAI = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnUnit.sqf"; // spawn individual AI 19 | blck_EH_AIKilled = "\q\addons\custom_server\AIMission\AIKilled.sqf"; // Event handler to process AI deaths 20 | blck_spawnGroup = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnGroup.sqf"; // Spawn a single group and populate it with AI units] 21 | blck_setupWaypoints = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\setWaypoints.sqf"; // Set default waypoints for a group 22 | blck_spawnGroups = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnGroups.sqf"; // Call spawnGroup multiple times using specific parameters for group positioning 23 | blck_spawnEmplacedWeapon = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnEmplaced.sqf"; // Self-evident 24 | blck_spawnVehicle = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnVehicle.sqf"; // Spawn a temporary vehicle of a specified type at a specific position 25 | blck_spawnVehiclePatrols = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnVehiclePatrols.sqf"; // Spawn an AI vehicle control and have it patrol the mission perimeter 26 | blck_MessagePlayers = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\AIM.sqf"; // Send messages to players regarding Missions 27 | blck_vehicleMonitor = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\vehicleMonitor.sqf"; // Process events wherein all AI in a vehicle are killed 28 | 29 | blck_spawnMissionVehicles = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnMissionVehicles.sqf"; // Spawn non-AI vehicles at missions; these will be filled with loot following the parameters in the composition array for the mission 30 | blck_spawnCrate = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnCrate.sqf"; // Simply spawns a crate of a specified type at a specific position. 31 | blck_spawnMissionCrates = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnMissionCrates.sqf"; // Spawn loot crates at specific positions relative to the mission center; these will be filled with loot following the parameters in the composition array for the mission 32 | 33 | blck_cleanupObjects = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\cleanUpObjects.sqf"; 34 | blck_spawnCompositionObjects = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\otl7_Mapper.sqf"; 35 | blck_fillBoxes = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\fillBoxes.sqf"; // Adds items to an object according to passed parameters. See the script for details. 36 | blck_smokeAtCrates = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\smokeAtCrates.sqf"; // Spawns a wreck and adds smoke to it 37 | blck_spawnMines = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\spawnMines.sqf"; // Deploys mines at random locations around the mission center 38 | blck_clearMines = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\clearMines.sqf"; // clears mines in an array passed as a parameter 39 | blck_FindSafePosn = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\findSafePosn.sqf"; 40 | //blck_playerGetInAIVehicle = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\decomissionAIVehicle.sqf"; 41 | blck_EH_vehicleHit = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\decomissionAIVehicle.sqf"; // processes instances in which a vehicle is hit 42 | blck_randomPosition = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\randomPosn.sqf";// find a randomPosn. see script for details. 43 | blck_playerInRange = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\playerInRange.sqf"; 44 | blck_signalEnd = compile preprocessFileLineNumbers "\q\addons\custom_server\AIMission\signalEnd.sqf"; // deploy smoke grenades at loot crates at the end of the mission. 45 | 46 | //Minimum distance between missions 47 | MinDistanceFromMission = 1000; 48 | 49 | // Define map marker coordinates 50 | blck_OrangeMarker = ["OrangeMarker",[0,0,0],"",""]; /// Format:["MarkerName",[Marker Position - [0,0,0] when not in use, "Marker Label"]; 51 | blck_GreenMarker = ["GreenMarker",[0,0,0],"",""]; 52 | blck_RedMarker = ["RedMarker",[0,0,0],"",""]; 53 | blck_BlueMarker = ["BlueMarker",[0,0,0],"",""]; 54 | 55 | //sets Mission Variables 56 | blck_MissionGoMajor = false; 57 | MissionGoMajor2 = false; 58 | MissionGoMinor = false; 59 | MissionGoMinor2 = false; 60 | AllMissionCoords = [[0,0,0],[0,0,0],[0,0,0],[0,0,0]]; 61 | 62 | // the chopper used to fly in paratroops as reinforcements will be randomly selected from this list 63 | // Experimental 64 | blck_reinforcementHeli = []; 65 | 66 | // Settings for each mission class with regard to paratrooper reinforcements. 67 | // Parameters are [[No Times Reinforcements called, Min number of paratroopers, Max number of paratroopers, "Skill level of paratroopers"]] 68 | // Experimental 69 | blck_MissionsParaReinforce = [[0,2,3,"blue"],[1,2,3,"red"],[1,2,5,"green"],[1,3,5,"orange"]]; 70 | 71 | // Chance that reinforcements will be called when one AI is killed at a mission of a particular class ("blue, red, green, orange") 72 | // Experimental 73 | blck_MissionsParaReinforceChance = 0.1; 74 | 75 | // When a random vehicle is to be selected and spawned at a mission it will be randomly chosen from this list 76 | // I recommend that you choose vehicles that can not be sold in order to avoid bloating trader inventories, orange 77 | // setting the trader inventory cleanup time to expiresAIdata = "14000"; to force vehicles to be deleted from inventory roughly every server restart 78 | blck_defaultMissionVehicles = ["I_Truck_02_covered_F","I_Truck_02_transport_F"]; 79 | 80 | // Arrays for use during cleanup of alive AI at some time after the end of a mission 81 | blck_AIMajor = []; 82 | blck_AIMajor2 = []; 83 | blck_AIMinor = []; 84 | blck_AIMinor2 = []; 85 | 86 | blck_cleanupCompositionTimer = 900; // Time after mission completion at which items in the composition are deleted. 87 | blck_AICleanUpTimer = 600; // Time after mission completion at which any remaining live AI are deleted. 88 | 89 | // radius within whih missions are triggered. The trigger causes the crate and AI to spawn. 90 | blck_TriggerDistance = 1000; 91 | 92 | // wait for a random period within the range defined by _min, _max 93 | blck_waitTimer = { 94 | // Call as 95 | //[_minTime, _maxTime] call blck_waitTimer 96 | // Returns true; 97 | //can be used in waitUntil {[_minTime, _maxTime] call blck_waitTimer}; 98 | private["_min","_max","_wait","_Tstart"]; 99 | _min = _this select 0; 100 | _max = _this select 1; 101 | _wait = round(_min + (_max - _min)); 102 | _Tstart = diag_tickTime; 103 | waitUntil{sleep 5;(diag_tickTime - _Tstart) > _wait;}; 104 | true 105 | }; 106 | 107 | // Delete any alive AI associated with a completed mission. 108 | // one passes an array of units 109 | blck_AICleanup = { 110 | private ["_ai","_group","_aiGroups","_aiUnits"]; 111 | 112 | if (count _this < 1) exitWith {diag_log "----<<<< function blck_UnitsCleanup >>>---- no parameters passed";}; 113 | _aiUnits = _this select 0; 114 | sleep blck_AICleanUpTimer; 115 | if (count _aiUnits >= 1) then { 116 | { 117 | //diag_log format["---->>>> blckAICleanup Group of unit to be deleted is %1 and its unit count is %2", group _x, count units group _x]; 118 | deleteVehicle _x; 119 | } forEach _aiUnits; 120 | }; 121 | }; 122 | 123 | // Self explanatory 124 | blck_setSkill = { 125 | // [_group, _skill] call blck_setSkill; 126 | private ["_unit","_skillsArrray"]; 127 | 128 | _unit = _this select 0; 129 | _skillsArrray = _this select 1; 130 | 131 | { 132 | _unit setSkill [(_x select 0),(_x select 1)]; 133 | } forEach _skillsArrray; 134 | }; 135 | 136 | //diag_log "[blckeagls] Functions Loaded"; 137 | -------------------------------------------------------------------------------- /@ExileServer/addons/custom_server/AIMission/AIconfigs.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | For the AI Mission Compiled by blckeagls @ Zombieville.net 3 | by Ghostrider-DBD 4 | This file contains most constants that define mission parameters, AI behavior and loot for mission system. 5 | Last modified 8/1/15 6 | */ 7 | /************************************************************** 8 | 9 | BLACKLIST LOCATIONS 10 | 11 | **************************************************************/ 12 | // if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis. 13 | blck_blacklistSpawns = true; 14 | // list of locations that are protected against mission spawns 15 | blck_locationBlackList = [ 16 | //Add location as [xpos,ypos,0],minimumDistance], 17 | // Note that there should not be a comma after the last item in this table 18 | [[0,0,0],0] 19 | ]; 20 | 21 | /*********************************************************** 22 | 23 | GENERAL MISSION SYSTEM CONFIGURATION 24 | 25 | ***********************************************************/ 26 | 27 | // MISSION MARKER CONFIGURATION 28 | // blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type 29 | //When set to true,"arrow", text will be to the right of an arrow below the mission marker. 30 | // When set to true,"dot", ext will be to the right of a black dot at the center the mission marker. 31 | blck_labelMapMarkers = [true,"dot"]; 32 | blck_preciseMapMarkers = true; // Map markers are/are not centered at the loot crate 33 | 34 | // Options to spawn a smoking wreck near the mission. When the first parameter is true, a wreck or junk pile will be spawned. 35 | // It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission. 36 | blck_SmokeAtMissions = [true,"random"]; // set to [false,"anything here"] to disable this function altogether. 37 | blck_useSignalEnd = true; // When true a smoke grenade will appear at the loot crate for 2 min after mission completion. 38 | 39 | // PLAYER PENALTIES 40 | blck_RunGear = true; // When set to true, AI that have been run over will ve stripped of gear, and the vehicle will be given blck_RunGearDamage of damage. 41 | blck_RunGearDamage = 0.2; // Damage applied to player vehicle for each AI run over 42 | blck_VK_Gear = true; // When set to true, AI that have been killed by a player in a vehicle in the list of forbidden vehicles or using a forbiden gun will be stripped of gear and the vehicle will be given blck_RunGearDamage of damage 43 | blck_VK_RunoverDamage = true; // when the AI was run over blck_RunGearDamage of damage will be applied to the killer's vehicle. 44 | blck_VK_GunnerDamage = true; // when the AI was killed by a gunner on a vehicle that is is in the list of forbidden vehicles, blck_RunGearDamage of damage will be applied to the killer's vehicle each time an AI is killed with a vehicle's gun. 45 | blck_forbidenVehicles = ["B_MRAP_01_hmg_F","O_MRAP_02_hmg_F"]; // Add any vehicles for which you wish to forbid vehicle kills 46 | // For a listing of the guns mounted on various land vehicles see the following link: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Vehicle_Weapons 47 | // HMG_M2 is mounted on the armed offroad that is spawned by Epoch 48 | blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC",/*"HMG_M2",*/"HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm"]; // Add any vehicles for which you wish to forbid vehicle kills, o 49 | 50 | // GLOBAL MISSION PARAMETERS 51 | blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. 52 | blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. 53 | blck_killEmptyAIVehicles = true; // when true, the AI vehicle will be extensively damaged once all AI have gotten out. 54 | blck_AIPatrolVehicles = ["I_G_Offroad_01_armed_F"]; // Type of vehicle spawned to defend AI bases 55 | 56 | // AI VEHICLE PATROL PARAMETERS 57 | //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high 58 | blck_SpawnVeh_Major = 3; // Number of static weapons at Orange Missions 59 | blck_SpawnVeh_Major2 = 2; // Number of static weapons at Green Missions 60 | blck_SpawnVeh_Minor = -1; // Number of static weapons at Blue Missions 61 | blck_SpawnVeh_Minor2 = -1; // Number of static weapons at Red Missions 62 | 63 | // AI STATIC WEAPON PARAMETERS 64 | blck_useStatic = true; // When true, AI will man static weapons spawned 20-30 meters from the mission center. These are very effective against most vehicles 65 | blck_staticWeapons = ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; // [0.50 cal, grenade launcher, AT Launcher] 66 | 67 | // Defines how many static weapons to spawn. Set this to -1 to disable spawning 68 | blck_SpawnEmplaced_Major = 3; // Number of static weapons at Orange Missions 69 | blck_SpawnEmplaced_Major2 = 2; // Number of static weapons at Green Missions 70 | blck_SpawnEmplaced_Minor = -1; // Number of static weapons at Blue Missions 71 | blck_SpawnEmplaced_Minor2 = 2; // Number of static weapons at Red Missions 72 | 73 | // MISSION TIMERS 74 | // Reduce to 1 sec for immediate spawns, or longer if you wish to space the missions out 75 | blck_TMin_Major = 250; 76 | blck_TMin_Major2 = 200; 77 | blck_TMin_Minor = 120; 78 | blck_TMin_Minor2 = 150; 79 | 80 | //Maximum Spawn time between missions in seconds 81 | blck_TMax_Major = 360; 82 | blck_TMax_Major2 = 300; 83 | blck_TMax_Minor = 200; 84 | blck_TMax_Minor2 = 250; 85 | 86 | /**************************************************************** 87 | 88 | GENERAL AI SETTINGS 89 | 90 | ****************************************************************/ 91 | blck_useNVG = true; // When true, AI will be spawned with NVG if is dark 92 | blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now 93 | //blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"]; 94 | blck_launcherTypes = ["launch_RPG32_F"]; 95 | blck_backpack = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; 96 | blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher 97 | blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI. 98 | blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes. 99 | blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND" 100 | //This defines how long after an AI dies that it's body disappears. 101 | blck_bodyCleanUpTimer = 1200; // time in seconds after which dead AI bodies are deleted 102 | // Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable 103 | // values are ordered as follows [blue, red, green, orange]; 104 | blck_AIAlertDistance = [150,225,250,300]; 105 | // How precisely player locations will be revealed to AI after an AI kill 106 | // values are ordered as follows [blue, red, green, orange]; 107 | blck_AIIntelligence = [0.5, 1, 2, 4]; 108 | 109 | /*************************************************************** 110 | 111 | MISSION TYPE SPECIFIC AI SETTINGS 112 | 113 | **************************************************************/ 114 | //This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type 115 | // Orange Missions 116 | blck_MinAI_Major = 20; 117 | blck_MaxAI_Major = 25; 118 | blck_AIGrps_Major = 5; 119 | blck_SkillsOrange = [ 120 | ["aimingAccuracy",0.15],["aimingShake",0.3],["aimingSpeed",0.5],["endurance",1.00],["spotDistance",0.7],["spotTime",0.7],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] 121 | ]; 122 | 123 | // Green Missions 124 | blck_MinAI_Major2 = 16; 125 | blck_MaxAI_Major2 = 21; 126 | blck_AIGrps_Major2 = 4; 127 | blck_SkillsGreen = [ 128 | ["aimingAccuracy",0.1],["aimingShake",0.3],["aimingSpeed",0.4],["endurance",0.9],["spotDistance",0.6],["spotTime",0.6],["courage",85],["reloadSpeed",0.75],["commanding",0.9],["general",0.75] 129 | ]; 130 | 131 | // Red Missions 132 | blck_MinAI_Minor2 = 12; 133 | blck_MaxAI_Minor2 = 15; 134 | blck_AIGrps_Minor2 = 3; 135 | blck_SkillsRed = [ 136 | ["aimingAccuracy",0.08],["aimingShake",0.1],["aimingSpeed",0.3],["endurance",0.60],["spotDistance",0.4],["spotTime",0.4],["courage",0.70],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] 137 | ]; 138 | 139 | // Blue Missions 140 | blck_MinAI_Minor = 8; 141 | blck_MaxAI_Minor = 12; 142 | blck_AIGrps_Minor = 2; 143 | blck_SkillsBlue = [ 144 | ["aimingAccuracy",0.06],["aimingShake",0.1],["aimingSpeed",0.20],["endurance",0.50],["spotDistance",0.30],["spotTime",0.30],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] 145 | ]; 146 | 147 | /********************************************************************************* 148 | 149 | AI WEAPONS, UNIFORMS, VESTS AND GEAR 150 | 151 | **********************************************************************************/ 152 | _RifleSniper = [ 153 | "srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F" 154 | ]; 155 | 156 | _RifleAssault = [ 157 | "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F", 158 | "arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F", 159 | "arifle_MXM_Black_F","arifle_MX_GL_Black_F","arifle_MX_Black_F","arifle_MXC_Black_F","arifle_MX_SW_F","arifle_MX_SW_Black_F" 160 | ]; 161 | 162 | _RifleLMG = [ 163 | "LMG_Mk200_F","LMG_Zafir_F" 164 | ]; 165 | 166 | _RifleOther = [ 167 | "SMG_01_F","SMG_02_F" 168 | ]; 169 | 170 | _Pistols = [ 171 | "hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","ruger_pistol_epoch","hgun_Pistol_Signal_F" 172 | ]; 173 | 174 | _DLC_MMG = [ 175 | "MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F" 176 | ]; 177 | 178 | _DLC_Sniper = [ 179 | "srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F" 180 | ]; 181 | 182 | //This defines the random weapon to spawn on the AI 183 | //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons 184 | blck_WeaponList_Orange = _RifleSniper + _RifleAssault + _RifleLMG + _DLC_Sniper + _DLC_MMG; 185 | blck_WeaponList_Green = _RifleSniper + _RifleAssault +_RifleLMG + _DLC_MMG; 186 | blck_WeaponList_Blue = _RifleOther + _RifleAssault +_RifleLMG; 187 | blck_WeaponList_Red = _RifleOther + _RifleSniper + _RifleAssault + _RifleLMG; 188 | 189 | //This defines the skin list, some skins are disabled by default to permit players to have high visibility uniforms distinct from those of the AI. 190 | blck_SkinList = [ 191 | //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment 192 | "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest", 193 | "U_B_GhillieSuit","U_B_SpecopsUniform_sgg","U_O_CombatUniform_oucamo", 194 | "U_O_SpecopsUniform_ocamo","U_O_OfficerUniform_ocamo","U_IG_Guerilla2_3" 195 | ]; 196 | 197 | blck_vests = [ 198 | // DLC Vests 199 | "V_PlateCarrierIA2_dgtl","V_PlateCarrierSpec_mtp","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierIAGL_oli" 200 | ]; 201 | 202 | /*************************************************************************************** 203 | DEFAULT CONTENTS OF LOOT CRATES FOR EACH MISSION 204 | Note however that these configurations can be used in any way you like or replaced with mission-specific customized loot arrays 205 | for examples of how you can do this see \Major\Compositions.sqf 206 | ***************************************************************************************/ 207 | 208 | // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. 209 | blck_lootCountsMajor = [8,24,8,12,12,1]; // Orange 210 | blck_lootCountsMajor2 = [7,16,6,10,10,1]; // Green 211 | blck_lootCountsMinor2 = [5,12,4,6,6,1]; // Red 212 | blck_lootCountsMinor = [4,10,3,6,6,1]; // Blue 213 | 214 | blck_BoxLoot_Major = 215 | // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. 216 | // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. 217 | 218 | [ 219 | [// Weapons 220 | ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], 221 | ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], 222 | ["arifle_Mk20_F","30Rnd_556x45_Stanag"], 223 | ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], 224 | ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], 225 | ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], 226 | ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], 227 | ["arifle_MX_F","30Rnd_65x39_caseless_mag"], 228 | ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], 229 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], 230 | ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], 231 | ["arifle_TRG20_F","30Rnd_556x45_Stanag"], 232 | ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], 233 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], 234 | ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], 235 | ["srifle_DMR_01_F","10Rnd_762x51_Mag"], 236 | ["srifle_LRR_F","7Rnd_408_Mag"], 237 | ["srifle_EBR_F","20Rnd_762x51_Mag"], 238 | ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], 239 | ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], 240 | ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], 241 | ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], 242 | ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], 243 | ["MMG_01_hex_F","150Rnd_93x64_Mag"], 244 | ["MMG_01_tan_F","150Rnd_93x64_Mag"], 245 | ["MMG_02_black_F","150Rnd_93x64_Mag"], 246 | ["MMG_02_camo_F","150Rnd_93x64_Mag"], 247 | ["MMG_02_sand_F","150Rnd_93x64_Mag"], 248 | ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], 249 | ["srifle_DMR_02_F","10Rnd_338_Mag"], 250 | ["srifle_DMR_02_sniper_F","10Rnd_338_Mag"], 251 | ["srifle_DMR_03_F","10Rnd_338_Mag"], 252 | ["srifle_DMR_03_tan_F","10Rnd_338_Mag"], 253 | ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], 254 | ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], 255 | ["srifle_DMR_05_tan_F","10Rnd_338_Mag"], 256 | ["srifle_DMR_06_camo_F","10Rnd_338_Mag"], 257 | ["srifle_DMR_04_F","10Rnd_127x54_Mag"], 258 | ["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"], 259 | ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] 260 | ], 261 | [//Magazines 262 | ["3rnd_HE_Grenade_Shell",3,6], 263 | ["30Rnd_65x39_caseless_green",3,6], 264 | ["30Rnd_556x45_Stanag",3,6], 265 | ["30Rnd_45ACP_Mag_SMG_01",3,6], 266 | ["20Rnd_556x45_UW_mag",3,6], 267 | ["20Rnd_762x51_Mag",7,14], 268 | ["200Rnd_65x39_cased_Box",3,6], 269 | ["100Rnd_65x39_caseless_mag_Tracer",3,6], 270 | ["3rnd_HE_Grenade_Shell",1,3], 271 | ["HandGrenade",1,4], 272 | // Marksman Pack Ammo 273 | ["10Rnd_338_Mag",1,4], 274 | ["10Rnd_338_Mag",1,4], 275 | ["10Rnd_127x54_Mag" ,1,4], 276 | ["10Rnd_127x54_Mag",1,4], 277 | ["10Rnd_93x64_DMR_05_Mag" ,1,4], 278 | ["10Rnd_93x64_DMR_05_Mag" ,1,4] 279 | ], 280 | [ // Optics 281 | ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Holosight",1,3],["acc_flashlight",1,3],["acc_pointer_IR",1,3], 282 | ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], 283 | ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], 284 | ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], 285 | ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], 286 | ["optic_AMS_khk",1,3],["optic_AMS_snd",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] 287 | ], 288 | [//Items 289 | ["Rangefinder",1,3] 290 | ], 291 | [ // Backpacks 292 | ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], 293 | ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], 294 | ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], 295 | ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], 296 | ["B_TacticalPack_rgr",1,2] 297 | ] 298 | ]; 299 | 300 | blck_BoxesLoot_Major2 = 301 | [ 302 | [// Weapons 303 | ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], 304 | ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], 305 | ["arifle_Mk20_F","30Rnd_556x45_Stanag"], 306 | ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], 307 | ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], 308 | ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], 309 | ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], 310 | ["arifle_MX_F","30Rnd_65x39_caseless_mag"], 311 | ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], 312 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], 313 | ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], 314 | ["arifle_TRG20_F","30Rnd_556x45_Stanag"], 315 | ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], 316 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], 317 | ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], 318 | ["srifle_DMR_01_F","10Rnd_762x51_Mag"], 319 | ["srifle_LRR_F","7Rnd_408_Mag"], 320 | ["srifle_EBR_F","20Rnd_762x51_Mag"], 321 | ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], 322 | ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], 323 | ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], 324 | ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], 325 | ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], 326 | ["MMG_01_hex_F","150Rnd_93x64_Mag"], 327 | ["MMG_01_tan_F","150Rnd_93x64_Mag"], 328 | ["MMG_02_black_F","150Rnd_93x64_Mag"], 329 | ["MMG_02_camo_F","150Rnd_93x64_Mag"], 330 | ["MMG_02_sand_F","150Rnd_93x64_Mag"], 331 | ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], 332 | ["srifle_DMR_02_F","10Rnd_338_Mag"], 333 | ["srifle_DMR_02_sniper_F","10Rnd_338_Mag"], 334 | ["srifle_DMR_03_F","10Rnd_338_Mag"], 335 | ["srifle_DMR_03_tan_F","10Rnd_338_Mag"], 336 | ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], 337 | ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], 338 | ["srifle_DMR_05_tan_F","10Rnd_338_Mag"], 339 | ["srifle_DMR_06_camo_F","10Rnd_338_Mag"], 340 | ["srifle_DMR_04_F","10Rnd_127x54_Mag"], 341 | ["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"], 342 | ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] 343 | ], 344 | [//Magazines 345 | ["3rnd_HE_Grenade_Shell",3,6], 346 | ["30Rnd_65x39_caseless_green",3,6], 347 | ["30Rnd_556x45_Stanag",3,6], 348 | ["30Rnd_45ACP_Mag_SMG_01",3,6], 349 | ["20Rnd_556x45_UW_mag",3,6], 350 | ["20Rnd_762x51_Mag",7,14], 351 | ["200Rnd_65x39_cased_Box",3,6], 352 | ["100Rnd_65x39_caseless_mag_Tracer",3,6], 353 | ["3rnd_HE_Grenade_Shell",1,3], 354 | ["HandGrenade",1,4], 355 | // Marksman Pack Ammo 356 | ["10Rnd_338_Mag",1,4], 357 | ["10Rnd_338_Mag",1,4], 358 | ["10Rnd_127x54_Mag" ,1,4], 359 | ["10Rnd_127x54_Mag",1,4], 360 | ["10Rnd_93x64_DMR_05_Mag" ,1,4], 361 | ["10Rnd_93x64_DMR_05_Mag" ,1,4] 362 | ], 363 | [ // Optics 364 | ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Holosight",1,3],["acc_flashlight",1,3],["acc_pointer_IR",1,3], 365 | ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], 366 | ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], 367 | ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], 368 | ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], 369 | ["optic_AMS_khk",1,3],["optic_AMS_snd",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] 370 | ], 371 | [//Items 372 | ["Rangefinder",1,3] 373 | ], 374 | [ // Backpacks 375 | ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], 376 | ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], 377 | ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], 378 | ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], 379 | ["B_TacticalPack_rgr",1,2] 380 | ] 381 | ]; 382 | 383 | blck_BoxesLoot_Minor = 384 | [ 385 | [// Weapons 386 | ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], 387 | ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], 388 | ["arifle_Mk20_F","30Rnd_556x45_Stanag"], 389 | ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], 390 | ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], 391 | ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], 392 | ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], 393 | ["arifle_MX_F","30Rnd_65x39_caseless_mag"], 394 | ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], 395 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], 396 | ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], 397 | ["arifle_TRG20_F","30Rnd_556x45_Stanag"], 398 | ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], 399 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], 400 | ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], 401 | ["srifle_DMR_01_F","10Rnd_762x51_Mag"], 402 | ["srifle_LRR_F","7Rnd_408_Mag"], 403 | ["srifle_EBR_F","20Rnd_762x51_Mag"], 404 | ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], 405 | ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], 406 | ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], 407 | ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], 408 | ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], 409 | ["MMG_01_hex_F","150Rnd_93x64_Mag"], 410 | ["MMG_01_tan_F","150Rnd_93x64_Mag"], 411 | ["MMG_02_black_F","150Rnd_93x64_Mag"], 412 | ["MMG_02_camo_F","150Rnd_93x64_Mag"], 413 | ["MMG_02_sand_F","150Rnd_93x64_Mag"], 414 | ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], 415 | ["srifle_DMR_02_F","10Rnd_338_Mag"], 416 | ["srifle_DMR_02_sniper_F","10Rnd_338_Mag"], 417 | ["srifle_DMR_03_F","10Rnd_338_Mag"], 418 | ["srifle_DMR_03_tan_F","10Rnd_338_Mag"], 419 | ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], 420 | ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], 421 | ["srifle_DMR_05_tan_F","10Rnd_338_Mag"], 422 | ["srifle_DMR_06_camo_F","10Rnd_338_Mag"], 423 | ["srifle_DMR_04_F","10Rnd_127x54_Mag"], 424 | ["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"], 425 | ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] 426 | ], 427 | [//Magazines 428 | ["3rnd_HE_Grenade_Shell",3,6], 429 | ["30Rnd_65x39_caseless_green",3,6], 430 | ["30Rnd_556x45_Stanag",3,6], 431 | ["30Rnd_45ACP_Mag_SMG_01",3,6], 432 | ["20Rnd_556x45_UW_mag",3,6], 433 | ["20Rnd_762x51_Mag",7,14], 434 | ["200Rnd_65x39_cased_Box",3,6], 435 | ["100Rnd_65x39_caseless_mag_Tracer",3,6], 436 | ["3rnd_HE_Grenade_Shell",1,3], 437 | ["HandGrenade",1,4], 438 | // Marksman Pack Ammo 439 | ["10Rnd_338_Mag",1,4], 440 | ["10Rnd_338_Mag",1,4], 441 | ["10Rnd_127x54_Mag" ,1,4], 442 | ["10Rnd_127x54_Mag",1,4], 443 | ["10Rnd_93x64_DMR_05_Mag" ,1,4], 444 | ["10Rnd_93x64_DMR_05_Mag" ,1,4] 445 | ], 446 | [ // Optics 447 | ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Holosight",1,3],["acc_flashlight",1,3],["acc_pointer_IR",1,3], 448 | ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], 449 | ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], 450 | ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], 451 | ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], 452 | ["optic_AMS_khk",1,3],["optic_AMS_snd",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] 453 | ], 454 | [//Items 455 | ["Rangefinder",1,3] 456 | ], 457 | [ // Backpacks 458 | ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], 459 | ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], 460 | ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], 461 | ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], 462 | ["B_TacticalPack_rgr",1,2] 463 | ] 464 | ]; 465 | 466 | blck_BoxesLoot_Minor2 = 467 | [ 468 | [// Weapons 469 | ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], 470 | ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], 471 | ["arifle_Mk20_F","30Rnd_556x45_Stanag"], 472 | ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], 473 | ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], 474 | ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], 475 | ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], 476 | ["arifle_MX_F","30Rnd_65x39_caseless_mag"], 477 | ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], 478 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], 479 | ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], 480 | ["arifle_TRG20_F","30Rnd_556x45_Stanag"], 481 | ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], 482 | ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], 483 | ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], 484 | ["srifle_DMR_01_F","10Rnd_762x51_Mag"], 485 | ["srifle_LRR_F","7Rnd_408_Mag"], 486 | ["srifle_EBR_F","20Rnd_762x51_Mag"], 487 | ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], 488 | ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], 489 | ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], 490 | ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], 491 | ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], 492 | ["MMG_01_hex_F","150Rnd_93x64_Mag"], 493 | ["MMG_01_tan_F","150Rnd_93x64_Mag"], 494 | ["MMG_02_black_F","150Rnd_93x64_Mag"], 495 | ["MMG_02_camo_F","150Rnd_93x64_Mag"], 496 | ["MMG_02_sand_F","150Rnd_93x64_Mag"], 497 | ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], 498 | ["srifle_DMR_02_F","10Rnd_338_Mag"], 499 | ["srifle_DMR_02_sniper_F","10Rnd_338_Mag"], 500 | ["srifle_DMR_03_F","10Rnd_338_Mag"], 501 | ["srifle_DMR_03_tan_F","10Rnd_338_Mag"], 502 | ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], 503 | ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], 504 | ["srifle_DMR_05_tan_F","10Rnd_338_Mag"], 505 | ["srifle_DMR_06_camo_F","10Rnd_338_Mag"], 506 | ["srifle_DMR_04_F","10Rnd_127x54_Mag"], 507 | ["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"], 508 | ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] 509 | ], 510 | [//Magazines 511 | ["3rnd_HE_Grenade_Shell",3,6], 512 | ["30Rnd_65x39_caseless_green",3,6], 513 | ["30Rnd_556x45_Stanag",3,6], 514 | ["30Rnd_45ACP_Mag_SMG_01",3,6], 515 | ["20Rnd_556x45_UW_mag",3,6], 516 | ["20Rnd_762x51_Mag",7,14], 517 | ["200Rnd_65x39_cased_Box",3,6], 518 | ["100Rnd_65x39_caseless_mag_Tracer",3,6], 519 | ["3rnd_HE_Grenade_Shell",1,3], 520 | ["HandGrenade",1,4], 521 | // Marksman Pack Ammo 522 | ["10Rnd_338_Mag",1,4], 523 | ["10Rnd_338_Mag",1,4], 524 | ["10Rnd_127x54_Mag" ,1,4], 525 | ["10Rnd_127x54_Mag",1,4], 526 | ["10Rnd_93x64_DMR_05_Mag" ,1,4], 527 | ["10Rnd_93x64_DMR_05_Mag" ,1,4] 528 | ], 529 | [ // Optics 530 | ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Holosight",1,3],["acc_flashlight",1,3],["acc_pointer_IR",1,3], 531 | ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], 532 | ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], 533 | ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], 534 | ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], 535 | ["optic_AMS_khk",1,3],["optic_AMS_snd",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] 536 | ], 537 | [//Items 538 | ["Rangefinder",1,3] 539 | ], 540 | [ // Backpacks 541 | ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], 542 | ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], 543 | ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], 544 | ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], 545 | ["B_TacticalPack_rgr",1,2] 546 | ] 547 | ]; 548 | 549 | 550 | // Time the marker remains after completing the mission in seconds - experimental not yet implemented 551 | 552 | blck_crateTypes = ["Box_NATO_Wps_F"]; // Default crate type. 553 | 554 | //diag_log "[blckeagls] Configurations Loaded"; 555 | 556 | true; --------------------------------------------------------------------------------