mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
github pls
Conflicts: @ExileServer/addons/a3_dms/DMS_init.sqf @ExileServer/addons/a3_dms/crates/DMS_CreateBox.sqf @ExileServer/addons/a3_dms/missions/MM1.sqf @ExileServer/addons/a3_dms/missions/MM10.sqf @ExileServer/addons/a3_dms/missions/MM2.sqf @ExileServer/addons/a3_dms/missions/MM3.sqf @ExileServer/addons/a3_dms/missions/MM4.sqf @ExileServer/addons/a3_dms/missions/MM5.sqf @ExileServer/addons/a3_dms/missions/MM6.sqf @ExileServer/addons/a3_dms/missions/MM7.sqf @ExileServer/addons/a3_dms/missions/MM8.sqf @ExileServer/addons/a3_dms/missions/MM9.sqf @ExileServer/addons/a3_dms/scripts/DMS_CreateMarker.sqf @ExileServer/addons/a3_dms/scripts/DMS_cleanup.sqf @ExileServer/addons/a3_dms/scripts/DMS_findSafePos.sqf @ExileServer/addons/a3_dms/scripts/DMS_fnc_nearbyPlayers.sqf @ExileServer/addons/a3_dms/scripts/DMS_selectMission.sqf @ExileServer/addons/a3_dms/scripts/DMS_spawnAI.sqf Pre-Packed PBO/a3_dms.pbo README.md
This commit is contained in:
commit
96bb053267
34
@ExileServer/addons/a3_dms/DMS_init.sqf
Normal file
34
@ExileServer/addons/a3_dms/DMS_init.sqf
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Made by Defent for Defents Mission System
|
||||||
|
// And for Numenadayz.com
|
||||||
|
|
||||||
|
// Compiles for custom files.
|
||||||
|
DMS_findSafePos = compile preprocessFileLineNumbers "\x\addons\dms\scripts\DMS_findSafePos.sqf";
|
||||||
|
DMS_createBox = compile preprocessFileLineNumbers "\x\addons\dms\crates\DMS_CreateBox.sqf";
|
||||||
|
DMS_CreateMarker = compile preprocessFileLineNumbers "\x\addons\dms\scripts\DMS_CreateMarker.sqf";
|
||||||
|
DMS_spawnAI = compile preprocessFileLineNumbers "\x\addons\dms\scripts\DMS_spawnAI.sqf";
|
||||||
|
DMS_selectMission = compile preprocessFileLineNumbers "\x\addons\dms\scripts\DMS_selectMission.sqf";
|
||||||
|
DMS_CleanUp = compile preprocessFileLineNumbers "\x\addons\dms\scripts\DMS_CleanUp.sqf";
|
||||||
|
DMS_markerLoop = compile preprocessFileLineNumbers "\x\addons\dms\scripts\DMS_markerLoop.sqf";
|
||||||
|
|
||||||
|
|
||||||
|
// CONFIGS
|
||||||
|
//DMS_UseMissions = true;
|
||||||
|
//DMS_DetectNearWater = true;
|
||||||
|
//DMS_MissionMin = 60; // Timers in seconds
|
||||||
|
//DMS_MissionMax = 120; // Timers in seconds
|
||||||
|
//DMS_player_minDist = 700;
|
||||||
|
|
||||||
|
DMS_MisMinTime = 600; // 10 mins
|
||||||
|
DMS_MisMaxTime = 1200; // 20 mins
|
||||||
|
DMS_CleanUpTimer = 300; // set to 300 for 5 minutes to clean up the missions.
|
||||||
|
// CONFIGS
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
|
||||||
|
// Selects the mission
|
||||||
|
[] call DMS_selectMission;
|
||||||
|
|
||||||
|
// Loops markers
|
||||||
|
//[] call DMS_markerLoop;
|
||||||
|
|
||||||
|
diag_log "DMS :: Functions loaded - starting the rest of the script.";
|
56
@ExileServer/addons/a3_dms/crates/DMS_CreateBox.sqf
Normal file
56
@ExileServer/addons/a3_dms/crates/DMS_CreateBox.sqf
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
// The content of the boxes.
|
||||||
|
private ["_type","_crate"];
|
||||||
|
_type = _this select 0;
|
||||||
|
_crate = _this select 1;
|
||||||
|
|
||||||
|
clearWeaponCargoGlobal _crate;
|
||||||
|
clearMagazineCargoGlobal _crate;
|
||||||
|
clearItemCargoGlobal _crate;
|
||||||
|
|
||||||
|
switch (_type) do
|
||||||
|
{
|
||||||
|
// Intermediate loot
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_WoodWallKit",6];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_WoodWallHalfKit",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_WoodDoorwayKit",1];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Melee_Axe",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_BBQSandwich",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_Beer",3];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_CamoTentKit",3];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_CampFireKit",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_InstaDoc",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_JunkMetal",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_SafeKit",1];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_MetalBoard",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_DuctTape",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_ExtensionCord",2];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_PortableGeneratorkit",1];
|
||||||
|
|
||||||
|
};
|
||||||
|
// Much loot
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_WoodWallKit",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_WoodWallHalfKit",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_WoodDoorwayKit",1];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_PlasticBottleFreshWater",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Melee_Axe",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_BBQSandwich",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_Beer",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_CamoTentKit",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_CampFireKit",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_InstaDoc",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_JunkMetal",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_SafeKit",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_MetalBoard",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_DuctTape",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_ExtensionCord",5];
|
||||||
|
_crate addItemCargoGlobal ["Exile_Item_PortableGeneratorkit",5];
|
||||||
|
|
||||||
|
};
|
||||||
|
// add more cases if you want.
|
||||||
|
};
|
||||||
|
|
43
@ExileServer/addons/a3_dms/missions/MM1.sqf
Normal file
43
@ExileServer/addons/a3_dms/missions/MM1.sqf
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
|
||||||
|
// associate pos with find safe pos fnc
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 1";
|
||||||
|
diag_log format ["DMS :: Main Mission 1 started at (%1)",_pos];
|
||||||
|
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
//[(_pos),(5),(4)] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
50
@ExileServer/addons/a3_dms/missions/MM10.sqf
Normal file
50
@ExileServer/addons/a3_dms/missions/MM10.sqf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 10";
|
||||||
|
diag_log format ["DMS :: Main Mission 10 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
||||||
|
|
47
@ExileServer/addons/a3_dms/missions/MM2.sqf
Normal file
47
@ExileServer/addons/a3_dms/missions/MM2.sqf
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 2";
|
||||||
|
diag_log format ["DMS :: Main Mission 2 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
48
@ExileServer/addons/a3_dms/missions/MM3.sqf
Normal file
48
@ExileServer/addons/a3_dms/missions/MM3.sqf
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
_missname = "Main Mission 3";
|
||||||
|
diag_log format ["DMS :: Main Mission 3 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
49
@ExileServer/addons/a3_dms/missions/MM4.sqf
Normal file
49
@ExileServer/addons/a3_dms/missions/MM4.sqf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
_missname = "Main Mission 4";
|
||||||
|
diag_log format ["DMS :: Main Mission 4 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
||||||
|
|
50
@ExileServer/addons/a3_dms/missions/MM5.sqf
Normal file
50
@ExileServer/addons/a3_dms/missions/MM5.sqf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 5";
|
||||||
|
diag_log format ["DMS :: Main Mission 5 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
//[_crate] call createBox;
|
||||||
|
// [_crate, amount of weapons, amount of ammo] call createBox;
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
|
||||||
|
|
||||||
|
//[_pos, amount of ai ] call DMS_SpawnAI;
|
||||||
|
[_pos,4,5] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
50
@ExileServer/addons/a3_dms/missions/MM6.sqf
Normal file
50
@ExileServer/addons/a3_dms/missions/MM6.sqf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 6";
|
||||||
|
diag_log format ["DMS :: Main Mission 6 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
49
@ExileServer/addons/a3_dms/missions/MM7.sqf
Normal file
49
@ExileServer/addons/a3_dms/missions/MM7.sqf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 7";
|
||||||
|
diag_log format ["DMS :: Main Mission 7 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
||||||
|
|
50
@ExileServer/addons/a3_dms/missions/MM8.sqf
Normal file
50
@ExileServer/addons/a3_dms/missions/MM8.sqf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 8";
|
||||||
|
diag_log format ["DMS :: Main Mission 8 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
||||||
|
|
47
@ExileServer/addons/a3_dms/missions/MM9.sqf
Normal file
47
@ExileServer/addons/a3_dms/missions/MM9.sqf
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
_playerClose = false;
|
||||||
|
_mainTimer = true;
|
||||||
|
//_missStartTime = floor(time);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// associate pos with find safe pos
|
||||||
|
_pos = call DMS_findSafePos;
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
|
||||||
|
_missname = "Main Mission 9";
|
||||||
|
diag_log format ["DMS :: Main Mission 9 started at (%1)",_pos];
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Spawn Marker
|
||||||
|
[_pos,_missname] call DMS_CreateMarker;
|
||||||
|
|
||||||
|
// Spawn Box
|
||||||
|
_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||||
|
[1,_crate] call DMS_createBox;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
//_crate = [_pos,40,4,2,2] execVM "mission\crates\MM_Box1.sqf";
|
||||||
|
|
||||||
|
// spawn AI
|
||||||
|
//[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
[_pos,5,4] call DMS_SpawnAI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0};
|
||||||
|
|
||||||
|
uiSleep 1;
|
||||||
|
|
||||||
|
["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast;
|
||||||
|
|
||||||
|
// Run Cleanup
|
||||||
|
[_pos,_crate] call DMS_CleanUp;
|
||||||
|
|
||||||
|
uiSleep 150;
|
||||||
|
|
||||||
|
[] call DMS_SelectMission;
|
16
@ExileServer/addons/a3_dms/scripts/DMS_CreateMarker.sqf
Normal file
16
@ExileServer/addons/a3_dms/scripts/DMS_CreateMarker.sqf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
private["_mark","_name"];
|
||||||
|
DMS_Cords = _this select 0;
|
||||||
|
DMS_MainName = _this select 1;
|
||||||
|
|
||||||
|
_mark = createMarker ["DMS_MainMarker", DMS_Cords];
|
||||||
|
"DMS_MainMarker" setMarkerColor "ColorRed";
|
||||||
|
"DMS_MainMarker" setMarkerShape "ELLIPSE";
|
||||||
|
"DMS_MainMarker" setMarkerBrush "Grid";
|
||||||
|
"DMS_MainMarker" setMarkerSize [150,150];
|
||||||
|
|
||||||
|
_name = createMarker ["DMS_MainDot", DMS_Cords];
|
||||||
|
"DMS_MainDot" setMarkerColor "ColorBlack";
|
||||||
|
"DMS_MainDot" setMarkerType "mil_dot";
|
||||||
|
"DMS_MainDot" setMarkerText DMS_MainName;
|
||||||
|
|
||||||
|
|
31
@ExileServer/addons/a3_dms/scripts/DMS_cleanup.sqf
Normal file
31
@ExileServer/addons/a3_dms/scripts/DMS_cleanup.sqf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
private ["_pos","_crate"];
|
||||||
|
_pos = _this select 0;
|
||||||
|
_crate = _this select 1;
|
||||||
|
deleteMarker "DMS_MainMarker";
|
||||||
|
deleteMarker "DMS_MainDot";
|
||||||
|
uiSleep DMS_CleanUpTimer;
|
||||||
|
{
|
||||||
|
_x enableSimulation false;
|
||||||
|
_x removeAllMPEventHandlers "mpkilled";
|
||||||
|
_x removeAllMPEventHandlers "mphit";
|
||||||
|
_x removeAllMPEventHandlers "mprespawn";
|
||||||
|
_x removeAllEventHandlers "FiredNear";
|
||||||
|
_x removeAllEventHandlers "HandleDamage";
|
||||||
|
_x removeAllEventHandlers "Killed";
|
||||||
|
_x removeAllEventHandlers "Fired";
|
||||||
|
_x removeAllEventHandlers "GetOut";
|
||||||
|
_x removeAllEventHandlers "GetIn";
|
||||||
|
_x removeAllEventHandlers "Local";
|
||||||
|
// clearVehicleInit _this;
|
||||||
|
deleteVehicle _crate;
|
||||||
|
deleteGroup (group _x);
|
||||||
|
_x = nil;
|
||||||
|
|
||||||
|
} forEach (_pos nearObjects 80);
|
||||||
|
|
||||||
|
diag_log "DMS :: Mission got cleaned up!";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
31
@ExileServer/addons/a3_dms/scripts/DMS_findSafePos.sqf
Normal file
31
@ExileServer/addons/a3_dms/scripts/DMS_findSafePos.sqf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
private ["_pos","_centerPos","_fetchPos","_mapRadii"];
|
||||||
|
|
||||||
|
//_centerPos = [getMarkerPos "center",4000,20000,10,0,25,0];
|
||||||
|
//_centerPos = [getMarkerPos "center",2000,4000,10,0,25,0];
|
||||||
|
_centerPos = [15440, 15342, 0];
|
||||||
|
_mapRadii = 17000;
|
||||||
|
|
||||||
|
|
||||||
|
_fetchPos = false;
|
||||||
|
|
||||||
|
_int = 1;
|
||||||
|
|
||||||
|
while {!_fetchPos} do {
|
||||||
|
|
||||||
|
sleep 2;
|
||||||
|
|
||||||
|
//_pos = _centerPos call BIS_fnc_findSafePos;
|
||||||
|
_pos = [_centerPos,150,_mapRadii,10,0,20,0] call BIS_fnc_findSafePos;
|
||||||
|
_int = _int + 1;
|
||||||
|
_fetchPos = true;
|
||||||
|
|
||||||
|
if (_fetchPos) then {
|
||||||
|
diag_log format ["DMS :: Found valid position at: (%1) in (%2) tries!",_pos,_int];
|
||||||
|
};
|
||||||
|
|
||||||
|
// more if exceptions to come
|
||||||
|
|
||||||
|
// water if exception to be added above
|
||||||
|
|
||||||
|
};
|
||||||
|
_pos
|
35
@ExileServer/addons/a3_dms/scripts/DMS_fnc_nearbyPlayers.sqf
Normal file
35
@ExileServer/addons/a3_dms/scripts/DMS_fnc_nearbyPlayers.sqf
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// Not being used at the moment.
|
||||||
|
DMS_fnc_nearbyPlayers = {
|
||||||
|
private ["_pos", "_isNearList", "_isNear"];
|
||||||
|
_pos = [_this, 0, objNull, [objNull,[]], [2,3]] call BIS_fnc_param;
|
||||||
|
_dis = [_this, 1, DMS_player_minDist, [0]] call BIS_fnc_param;
|
||||||
|
|
||||||
|
_isNearList = _pos nearEntities ["Exile_Unit_Player",_dis];
|
||||||
|
_isNear = false;
|
||||||
|
|
||||||
|
// Check for Players
|
||||||
|
if ((count(_isNearList)) > 0) then {
|
||||||
|
{
|
||||||
|
if (isPlayer _x) exitWith {
|
||||||
|
_isNear = true;
|
||||||
|
};
|
||||||
|
false;
|
||||||
|
} count _isNearList;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Check for Players in Vehicles
|
||||||
|
if !(_isNear) then {
|
||||||
|
_isNearList = _pos nearEntities [["LandVehicle", "Air", "Ship"], _dis];
|
||||||
|
{
|
||||||
|
if (_isNear) exitWith {};
|
||||||
|
{
|
||||||
|
if (isPlayer _x) exitWith {
|
||||||
|
_isNear = true;
|
||||||
|
};
|
||||||
|
false;
|
||||||
|
} count (crew _x);
|
||||||
|
false;
|
||||||
|
} count _isNearList;
|
||||||
|
};
|
||||||
|
_isNear
|
||||||
|
};
|
29
@ExileServer/addons/a3_dms/scripts/DMS_markerLoop.sqf
Normal file
29
@ExileServer/addons/a3_dms/scripts/DMS_markerLoop.sqf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
private["_mark","_name","_loop"];
|
||||||
|
_loop = true;
|
||||||
|
|
||||||
|
diag_log format ["DMS :: Marker loop script started."];
|
||||||
|
|
||||||
|
while {_loop} do
|
||||||
|
{
|
||||||
|
uiSleep 25;
|
||||||
|
if (!(getMarkerColor "DMS_MainMarker" = "")) then {
|
||||||
|
|
||||||
|
|
||||||
|
deleteMarker "DMS_MainMarker";
|
||||||
|
deleteMarker "DMS_MainDot";
|
||||||
|
|
||||||
|
_mark = createMarker ["DMS_MainMarker", DMS_Cords];
|
||||||
|
"DMS_MainMarker" setMarkerColor "ColorRed";
|
||||||
|
"DMS_MainMarker" setMarkerShape "ELLIPSE";
|
||||||
|
"DMS_MainMarker" setMarkerBrush "Grid";
|
||||||
|
"DMS_MainMarker" setMarkerSize [150,150];
|
||||||
|
|
||||||
|
_name = createMarker ["DMS_MainDot", DMS_Cords];
|
||||||
|
"DMS_MainDot" setMarkerColor "ColorBlack";
|
||||||
|
"DMS_MainDot" setMarkerType "mil_dot";
|
||||||
|
"DMS_MainDot" setMarkerText DMS_MainName;
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
*/
|
19
@ExileServer/addons/a3_dms/scripts/DMS_selectMission.sqf
Normal file
19
@ExileServer/addons/a3_dms/scripts/DMS_selectMission.sqf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
private ["_sleepTime","_run","_countArray","_randomMiss","_missVar","_missionFnc","_MainArray"];
|
||||||
|
|
||||||
|
_MainArray = ["MM1","MM2","MM3","MM4","MM5","MM6","MM7","MM8","MM9","MM10"];
|
||||||
|
|
||||||
|
|
||||||
|
_sleepTime = (random (DMS_MisMaxTime - DMS_MisMinTime)) + DMS_MisMinTime;
|
||||||
|
sleep _sleepTime;
|
||||||
|
|
||||||
|
_countArray = count _MainArray;
|
||||||
|
_slct = floor (random _countArray);
|
||||||
|
_missVar = _MainArray select _slct;
|
||||||
|
|
||||||
|
uiSleep 2;
|
||||||
|
// Help from secret skype group.
|
||||||
|
call compile preprocessfilelinenumbers format["\x\addons\DMS\missions\%1.sqf",_missVar];
|
||||||
|
|
||||||
|
|
||||||
|
|
111
@ExileServer/addons/a3_dms/scripts/DMS_spawnAI.sqf
Normal file
111
@ExileServer/addons/a3_dms/scripts/DMS_spawnAI.sqf
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
private ["_group", "_pos","_soldier","_skill","_units","_playerObject"];
|
||||||
|
_pos = _this select 0;
|
||||||
|
_units = _this select 1;
|
||||||
|
_skill = _this select 2;
|
||||||
|
_group = createGroup EAST;
|
||||||
|
_group setBehaviour "COMBAT";
|
||||||
|
_group setCombatMode "RED";
|
||||||
|
_group allowFleeing 0;
|
||||||
|
|
||||||
|
// Set AI owner to Player.
|
||||||
|
//_group setGroupOwner (owner player);
|
||||||
|
// Not tested this one, may need to apply above one.
|
||||||
|
//ExileServerOwnershipSwapQueue pushBack [_group,_playerObject];
|
||||||
|
|
||||||
|
|
||||||
|
for "_i" from 1 to _units do {
|
||||||
|
_soldier = _group createUnit ["i_g_soldier_unarmed_f", [_pos select 0, _pos select 1, 0], [], 1, "Form"];
|
||||||
|
_soldier addeventhandler ["fired", {(_this select 0) setvehicleammo 1}];
|
||||||
|
|
||||||
|
removeAllAssignedItems _soldier;
|
||||||
|
removeUniform _soldier;
|
||||||
|
removeHeadgear _soldier;
|
||||||
|
removeAllItems _soldier;
|
||||||
|
removeAllWeapons _soldier;
|
||||||
|
uiSleep 1;
|
||||||
|
_soldier forceaddUniform "U_I_officerUniform";
|
||||||
|
_soldier addVest " V_TacVest_blk_POLICE ";
|
||||||
|
_soldier addGoggles "G_Tactical_Clear";
|
||||||
|
for "_i" from 1 to 3 do {
|
||||||
|
_soldier addItemToVest "30Rnd_65x39_caseless_mag";
|
||||||
|
};
|
||||||
|
_soldier addWeapon "arifle_MXC_Holo_pointer_F";
|
||||||
|
_soldier setRank "Private";
|
||||||
|
{
|
||||||
|
_soldier enableAI _x;
|
||||||
|
}forEach ["TARGET","AUTOTARGET","MOVE","ANIM"];
|
||||||
|
_soldier disableAI "FSM";
|
||||||
|
_soldier allowDammage true;
|
||||||
|
|
||||||
|
// FIX FOR Ai vs Ai killing.
|
||||||
|
[_soldier] joinSilent _group;
|
||||||
|
|
||||||
|
switch (_skill) do
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
_soldier setSkill ["aimingspeed", 0.05];
|
||||||
|
_soldier setSkill ["spotdistance", 0.05];
|
||||||
|
_soldier setSkill ["aimingaccuracy", 0.02];
|
||||||
|
_soldier setSkill ["aimingshake", 0.02];
|
||||||
|
_soldier setSkill ["spottime", 0.1];
|
||||||
|
_soldier setSkill ["spotdistance", 0.3];
|
||||||
|
_soldier setSkill ["commanding", 0.3];
|
||||||
|
_soldier setSkill ["general", 0.2];
|
||||||
|
};
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
_soldier setSkill ["spotdistance", 0.1];
|
||||||
|
_soldier setSkill ["aimingaccuracy", 0.05];
|
||||||
|
_soldier setSkill ["aimingshake", 0.05];
|
||||||
|
_soldier setSkill ["spottime", 0.2];
|
||||||
|
_soldier setSkill ["spotdistance", 0.4];
|
||||||
|
_soldier setSkill ["commanding", 0.4];
|
||||||
|
_soldier setSkill ["general", 0.3];
|
||||||
|
};
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
_soldier setSkill ["aimingspeed", 0.15];
|
||||||
|
_soldier setSkill ["spotdistance", 0.15];
|
||||||
|
_soldier setSkill ["aimingaccuracy", 0.1];
|
||||||
|
_soldier setSkill ["aimingshake", 0.1];
|
||||||
|
_soldier setSkill ["spottime", 0.3];
|
||||||
|
_soldier setSkill ["spotdistance", 0.5];
|
||||||
|
_soldier setSkill ["commanding", 0.5];
|
||||||
|
_soldier setSkill ["general", 0.6];
|
||||||
|
};
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
_soldier setSkill ["aimingspeed", 0.3];
|
||||||
|
_soldier setSkill ["spotdistance", 0.3];
|
||||||
|
_soldier setSkill ["aimingaccuracy", 0.3];
|
||||||
|
_soldier setSkill ["aimingshake", 0.3];
|
||||||
|
_soldier setSkill ["spottime", 0.4];
|
||||||
|
_soldier setSkill ["spotdistance", 0.6];
|
||||||
|
_soldier setSkill ["commanding", 0.6];
|
||||||
|
_soldier setSkill ["general", 0.7];
|
||||||
|
};
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
|
||||||
|
_soldier setSkill ["aimingspeed", 0.9];
|
||||||
|
_soldier setSkill ["spotdistance", 0.9];
|
||||||
|
_soldier setSkill ["aimingaccuracy", 0.9];
|
||||||
|
_soldier setSkill ["aimingshake", 0.9];
|
||||||
|
_soldier setSkill ["spottime", 0.9];
|
||||||
|
_soldier setSkill ["spotdistance", 0.9];
|
||||||
|
_soldier setSkill ["commanding", 0.8];
|
||||||
|
};
|
||||||
|
case 6: // Stupidly fucking OP.
|
||||||
|
{
|
||||||
|
_soldier setSkill ["aimingspeed", 1];
|
||||||
|
_soldier setSkill ["spotdistance", 1];
|
||||||
|
_soldier setSkill ["aimingaccuracy", 1];
|
||||||
|
_soldier setSkill ["aimingshake", 1];
|
||||||
|
_soldier setSkill ["spottime", 1];
|
||||||
|
_soldier setSkill ["spotdistance", 1];
|
||||||
|
_soldier setSkill ["commanding", 1];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_soldier
|
Loading…
Reference in New Issue
Block a user