diff --git a/@ExileServer/addons/a3_dms/missions/mission2.sqf b/@ExileServer/addons/a3_dms/missions/bandits.sqf
similarity index 83%
rename from @ExileServer/addons/a3_dms/missions/mission2.sqf
rename to @ExileServer/addons/a3_dms/missions/bandits.sqf
index 7fa6a91..384d74c 100644
--- a/@ExileServer/addons/a3_dms/missions/mission2.sqf
+++ b/@ExileServer/addons/a3_dms/missions/bandits.sqf
@@ -2,7 +2,7 @@
Sample mission (duplicate for testing purposes)
*/
-private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate", "_crate_loot_values", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added"];
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate", "_crate_loot_values", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_vehicle"];
// For logging purposes
_num = DMS_MissionCount;
@@ -17,7 +17,7 @@ _pos = call DMS_fnc_findSafePos;
// Set general mission difficulty
-_difficulty = "easy";
+_difficulty = "moderate";
// Create AI
@@ -36,6 +36,7 @@ _group =
// Create Crate
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+_vehicle = ["Exile_Car_Offroad_Armed_Guerilla01",_pos] call DMS_fnc_SpawnNonPersistentVehicle;
// Set crate loot values
_crate_loot_values =
@@ -56,21 +57,21 @@ _missionAIUnits =
_missionObjs =
[
[], // No spawned buildings
- [],
+ [_vehicle],
[[_crate,_crate_loot_values]]
];
+
// Define Mission Start message
-_msgStart = format["A group of mercenaries has been spotted at %1! Kill them and take their equipment!",mapGridPosition _pos];
+_msgStart = format["Armed Bandits!
A heavily armed bandit group has been spotted, take them out and claim their vehicle!"];
// Define Mission Win message
-_msgWIN = format["Convicts have successfully eliminated the mercenaries at %1!",mapGridPosition _pos];
+_msgWIN = format["Armed Bandits!
Convicts have successfully taken care of the bandit group!"];
// Define Mission Lose message
-_msgLOSE = format["The mercenaries are no longer at %1!",mapGridPosition _pos];
-
+_msgLOSE = format["Armed Bandits!
The bandits have taken their vehicle and drove off, no loot today!"];
// Define mission name (for map marker and logging)
-_missionName = "Mercenary Group";
+_missionName = "Armed Bandits";
// Create Markers
_markers =
diff --git a/@ExileServer/addons/a3_dms/missions/bauhaus.sqf b/@ExileServer/addons/a3_dms/missions/bauhaus.sqf
index f276088..db42eab 100644
--- a/@ExileServer/addons/a3_dms/missions/bauhaus.sqf
+++ b/@ExileServer/addons/a3_dms/missions/bauhaus.sqf
@@ -72,15 +72,14 @@ _missionObjs =
[[_crate1,_crate_loot_values1],[_crate2,_crate_loot_values2]]
];
-// Define Mission Start message
-_msgStart = format["A Bauhaus truck has crashed and lost all its building supplies, get there quickly!"];
+
+_msgStart = format["Bauhaus Truck
A Bauhaus truck has crashed and lost all its building supplies, get there quickly!"];
// Define Mission Win message
-_msgWIN = format["Convicts have successfully claimed the crashed Buahaus truck %1!"];
+_msgWIN = format["Bauhaus Truck
Convicts have successfully claimed the crashed Buahaus truck!"];
// Define Mission Lose message
-_msgLOSE = format["The Bauhause truck has been repaired and escaped!"];
-
+_msgLOSE = format["Bauhaus Truck!
The Bauhause truck has been repaired and escaped!"];
// Define mission name (for map marker and logging)
_missionName = "Bauhaus Truck";
diff --git a/@ExileServer/addons/a3_dms/missions/beertransport.sqf b/@ExileServer/addons/a3_dms/missions/beertransport.sqf
new file mode 100644
index 0000000..da597c4
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/beertransport.sqf
@@ -0,0 +1,153 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "difficult";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 3 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_Wreck_Van_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 8, // Weapons
+ [10,["Exile_Item_Beer"]], // Items
+ 1 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Beer transport!
A transport truck carrying beer and guns is being robbed, stop the robbers and steal the loot!"];
+
+// Define Mission Win message
+_msgWIN = format["Beer transport!
Convicts have successfully claimed all of the beer and guns. 'Murica."];
+
+// Define Mission Lose message
+_msgLOSE = format["Beer transport!
The robbers have taken off with all the beer and all the guns, what a travesty!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Beer & Guns Truck";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/behindenemylines.sqf b/@ExileServer/addons/a3_dms/missions/behindenemylines.sqf
new file mode 100644
index 0000000..71554f1
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/behindenemylines.sqf
@@ -0,0 +1,153 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "easy";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 2 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_BagBunker_Tower_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 5, // Weapons
+ 3, // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Enemy Bunker!
A team of soldiers have set up a bunker inside convict land. Rid them from this place!"];
+
+// Define Mission Win message
+_msgWIN = format["Enemy Bunker!
Convicts have successfully taken care of the enemies and their bunker!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Enemy Bunker!
The soldiers became impatient and have escaped the area!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Enemy Bunker";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/blackhawkdown.sqf b/@ExileServer/addons/a3_dms/missions/blackhawkdown.sqf
new file mode 100644
index 0000000..a745a3c
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/blackhawkdown.sqf
@@ -0,0 +1,153 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "difficult";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 6 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_UWreck_Heli_Attack_02_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 8, // Weapons
+ 4, // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Blackhawk down!
We got a Blackhawk down, Super 6-1 is down, secure the perimeter and claim what can be claimed!"];
+
+// Define Mission Win message
+_msgWIN = format["Blackhawk down!
Convicts have secured the blackhawk and claimed the remaining loot!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Blackhawk down!
The blackhawk has been sized by the enemy and the loot has been destroyed!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Blackhawk Down";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/cardealer.sqf b/@ExileServer/addons/a3_dms/missions/cardealer.sqf
new file mode 100644
index 0000000..0cbb88a
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/cardealer.sqf
@@ -0,0 +1,158 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_vehicle1","_vehicle2","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "easy";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 3 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_FuelStation_Build_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+_vehicle1 = ["Exile_Car_SUV_Red",_pos] call DMS_fnc_SpawnNonPersistentVehicle;
+_vehicle2 = ["Exile_Car_SUV_Grey",_pos] call DMS_fnc_SpawnNonPersistentVehicle;
+
+
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 5, // Weapons
+ 5, // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [_vehicle1,_vehicle2],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Car Dealer Robbery!
A local car dealership is being robbed by bandits, stop them!"];
+
+// Define Mission Win message
+_msgWIN = format["Car Dealer Robbery!
Convicts have secured the local dealership and removed the bandits!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Car Dealer Robbery!
The bandits have escaped with the cars and left nothing but a trail of smoke behind!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Car Dealer Robbery";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/construction.sqf b/@ExileServer/addons/a3_dms/missions/construction.sqf
new file mode 100644
index 0000000..bd969c0
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/construction.sqf
@@ -0,0 +1,156 @@
+/*
+ Sample mission (duplicate for testing purposes)
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate", "_crate_loot_values", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck1","_wreck2","_wreck3","_vehicle"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "hardcore";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 5 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "hardcore", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crate
+_crate = ["Box_NATO_Wps_F",[(_pos select 0)+2,(_pos select 1)-1,0]] call DMS_fnc_SpawnCrate;
+
+_wreck1 = createVehicle ["Land_CinderBlocks_F",[(_pos select 0) - 10, (_pos select 1),-0.1],[], 0, "CAN_COLLIDE"];
+_wreck2 = createVehicle ["Land_Bricks_V1_F",[(_pos select 0) - 5, (_pos select 1),-3.3],[], 0, "CAN_COLLIDE"];
+_wreck3 = createVehicle ["Land_Bricks_V1_F",[(_pos select 0) - 13, (_pos select 1),-1],[], 0, "CAN_COLLIDE"];
+
+_vehicle = ["Exile_Car_Zamak",_pos] call DMS_fnc_SpawnNonPersistentVehicle;
+
+
+// Set crate loot values
+_crate_loot_values =
+[
+ 3, // Weapons
+ [15,["Exile_Item_WoodWallKit","Exile_Item_WoodWallHalfKit","Exile_Item_WoodDoorwayKit","Exile_Item_WoodDoorKit","Exile_Item_Codelock","Exile_Item_PortableGeneratorKit","Exile_Item_WoodFloorKit","Exile_Item_WoodFloorPortKit"]], // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck1,_wreck2,_wreck3], // No spawned buildings
+ [_vehicle],
+ [[_crate,_crate_loot_values]]
+];
+
+// Define Mission Start message
+_msgStart = format["Construction Site!
A group of mercenaries have set up a construction site, clear them out!"];
+
+// Define Mission Win message
+_msgWIN = format["Construction Site!
Convicts have successfully demolished the construction site!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Construction Site!
The mercenaries have dismantled their construction site and escaped!"];
+
+
+// Define mission name (for map marker and logging)
+_missionName = "Construction Site";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/donthasslethehoff.sqf b/@ExileServer/addons/a3_dms/missions/donthasslethehoff.sqf
new file mode 100644
index 0000000..032d648
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/donthasslethehoff.sqf
@@ -0,0 +1,155 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck","_vehicle"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "difficult";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 6 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_UWreck_Heli_Attack_02_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+_vehicle = ["Exile_Car_SUV_Black",_pos] call DMS_fnc_SpawnNonPersistentVehicle;
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 8, // Weapons
+ 4, // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [_vehicle],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Knight Rider!
KITT has been kidnapped, secure the position and reclaim KITT!"];
+
+// Define Mission Win message
+_msgWIN = format["Knight Rider!
Convicts secured KITT, that will show the bandits not to Hassle the Hoff!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Knight Rider!
KITT was never secured and has now been dismantled by the bandits, what a grim fate."];
+
+// Define mission name (for map marker and logging)
+_missionName = "KITT's Location";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/foodtransport.sqf b/@ExileServer/addons/a3_dms/missions/foodtransport.sqf
new file mode 100644
index 0000000..c19ed85
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/foodtransport.sqf
@@ -0,0 +1,153 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "difficult";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 6 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_Wreck_Van_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 2, // Weapons
+ [12,["Exile_Item_GloriousKnakWorst_Cooked","Exile_Item_PlasticBottleFreshWater","Exile_Item_PlasticBottleFreshWater","Exile_Item_BBQSandwich_Cooked","Exile_Item_Catfood_Cooked","Exile_Item_ChristmasTinner_Cooked"]], // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Humantarian Supplies!
A humanitarian supply truck has been sized by ruthless bandits, stop them!"];
+
+// Define Mission Win message
+_msgWIN = format["Humantarian Supplies!
Convicts have successfully claimed the humanitarian supplies for themselves!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Humantarian Supplies!
The bandits have taken the humanitarian supplies and escaped!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Humantarian Supplies";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/guntransport.sqf b/@ExileServer/addons/a3_dms/missions/guntransport.sqf
new file mode 100644
index 0000000..39a8191
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/guntransport.sqf
@@ -0,0 +1,153 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "difficult";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 6 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_Wreck_Van_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 10, // Weapons
+ 5, // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Gun Transport!
A gun transport truck has crashed, secure the crash site and the guns!"];
+
+// Define Mission Win message
+_msgWIN = format["Gun Transport!
Convicts have successfully secured the area and claimed the guns for their own!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Gun Transport!
The transport truck has been repaired and escaped the area!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Gun Transport";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/humanitarian.sqf b/@ExileServer/addons/a3_dms/missions/humanitarian.sqf
new file mode 100644
index 0000000..796f6d2
--- /dev/null
+++ b/@ExileServer/addons/a3_dms/missions/humanitarian.sqf
@@ -0,0 +1,153 @@
+/*
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
+*/
+
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate1", "_crate_loot_values1", "_crate2", "_crate_loot_values2", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_wreck"];
+
+// For logging purposes
+_num = DMS_MissionCount;
+
+
+// Set mission side (only "bandit" is supported for now)
+_side = "bandit";
+
+
+// find position
+_pos = [10,100] call DMS_fnc_findSafePos;
+
+
+// Set general mission difficulty
+_difficulty = "moderate";
+
+
+// Create AI
+// TODO: Spawn AI only when players are nearby
+_AICount = 3 + (round (random 2));
+
+_group =
+[
+ _pos, // Position of AI
+ _AICount, // Number of AI
+ "random", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
+ _side // "bandit","hero", etc.
+] call DMS_fnc_SpawnAIGroup;
+
+
+// Create Crates
+_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+
+_wreck = createVehicle ["Land_Wreck_Van_F",[(_pos select 0) - 10, (_pos select 1),-0.2],[], 0, "CAN_COLLIDE"];
+
+// Set crate loot values
+_crate_loot_values1 =
+[
+ 2, // Weapons
+ [12,["Exile_Item_GloriousKnakWorst_Cooked","Exile_Item_PlasticBottleFreshWater","Exile_Item_PlasticBottleFreshWater","Exile_Item_BBQSandwich_Cooked","Exile_Item_Catfood_Cooked","Exile_Item_ChristmasTinner_Cooked"]], // Items
+ 2 // Backpacks
+];
+
+
+// Define mission-spawned AI Units
+_missionAIUnits =
+[
+ _group // We only spawned the single group for this mission
+];
+
+// Define mission-spawned objects and loot values
+_missionObjs =
+[
+ [_wreck],
+ [],
+ [[_crate1,_crate_loot_values1]]
+];
+
+// Define Mission Start message
+_msgStart = format["Humantarian Supplies!
A truck carrying humanitarian supplies has been sized by bandits, stop them!"];
+
+// Define Mission Win message
+_msgWIN = format["Humantarian Supplies!
Convicts have successfully claimed the humanitarian supplies for themselves!"];
+
+// Define Mission Lose message
+_msgLOSE = format["Humantarian Supplies!
The bandits have taken the humanitarian supplies and escaped!"];
+
+// Define mission name (for map marker and logging)
+_missionName = "Humantarian Supplies";
+
+// Create Markers
+_markers =
+[
+ _pos,
+ _missionName,
+ _difficulty
+] call DMS_fnc_CreateMarker;
+
+// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
+_time = diag_tickTime;
+
+// Parse and add mission info to missions monitor
+_added =
+[
+ _pos,
+ [
+ [
+ "kill",
+ _group
+ ],
+ [
+ "playerNear",
+ [_pos,DMS_playerNearRadius]
+ ]
+ ],
+ [
+ _time,
+ (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
+ ],
+ _missionAIUnits,
+ _missionObjs,
+ [_msgWIN,_msgLOSE],
+ _markers,
+ _side
+] call DMS_fnc_AddMissionToMonitor;
+
+// Check to see if it was added correctly, otherwise delete the stuff
+if !(_added) exitWith
+{
+ diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
+
+ // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
+ _cleanup = [];
+ {
+ _cleanup pushBack _x;
+ } forEach _missionAIUnits;
+
+ _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
+
+ {
+ _cleanup pushBack (_x select 0);
+ } foreach (_missionObjs select 2);
+
+ _cleanup call DMS_fnc_CleanUp;
+
+
+ // Delete the markers directly
+ {deleteMarker _x;} forEach _markers;
+
+
+ // Reset the mission count
+ DMS_MissionCount = DMS_MissionCount - 1;
+};
+
+
+// Notify players
+_msgStart call DMS_fnc_BroadcastMissionStatus;
+
+
+
+if (DMS_DEBUG) then
+{
+ diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
+};
\ No newline at end of file
diff --git a/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf b/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf
index f59d52d..967ab70 100644
--- a/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf
+++ b/@ExileServer/addons/a3_dms/missions/lost_battalion.sqf
@@ -20,12 +20,12 @@ _pos = [10,100] call DMS_fnc_findSafePos;
// Set general mission difficulty
-_difficulty = "hardcore";
+_difficulty = "random";
// Create AI
// TODO: Spawn AI only when players are nearby
-_AICount = 6 + (round (random 2));
+_AICount = 7 + (round (random 2));
_group =
[
@@ -43,9 +43,9 @@ _crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
// Set crate loot values
_crate_loot_values =
[
- 7, // Weapons
+ 8, // Weapons
5, // Items
- 5 // Backpacks
+ 2 // Backpacks
];
@@ -64,14 +64,13 @@ _missionObjs =
];
// Define Mission Start message
-_msgStart = format["A battalion of soldiers have gotten lost in convict land! Eliminate them!"];
+_msgStart = format["Lost Battalion!
A battalion of soldiers have gotten lost in convict land! Eliminate them!"];
// Define Mission Win message
-_msgWIN = format["Convicts have successfully eliminated the lost battalion!"];
+_msgWIN = format["Lost Battalion!
Convicts have successfully eliminated the lost battalion!"];
// Define Mission Lose message
-_msgLOSE = format["Whittlesey escaped with his Lost Battalion!"];
-
+_msgLOSE = format["Lost Battalion!
Whittlesey escaped with his Lost Battalion!"];
// Define mission name (for map marker and logging)
_missionName = "Lost Battalion";
diff --git a/@ExileServer/addons/a3_dms/missions/mission3.sqf b/@ExileServer/addons/a3_dms/missions/medical.sqf
similarity index 77%
rename from @ExileServer/addons/a3_dms/missions/mission3.sqf
rename to @ExileServer/addons/a3_dms/missions/medical.sqf
index 235bf74..94a3f51 100644
--- a/@ExileServer/addons/a3_dms/missions/mission3.sqf
+++ b/@ExileServer/addons/a3_dms/missions/medical.sqf
@@ -2,7 +2,7 @@
Sample mission (duplicate for testing purposes)
*/
-private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate", "_crate_loot_values", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added"];
+private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate", "_crate_loot_values", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added","_building","_vehicle"];
// For logging purposes
_num = DMS_MissionCount;
@@ -17,12 +17,12 @@ _pos = call DMS_fnc_findSafePos;
// Set general mission difficulty
-_difficulty = "difficult";
+_difficulty = "easy";
// Create AI
// TODO: Spawn AI only when players are nearby
-_AICount = 6 + (round (random 2));
+_AICount = 4 + (round (random 2));
_group =
[
@@ -37,11 +37,16 @@ _group =
// Create Crate
_crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
+_building = createVehicle ["Land_Medevac_HQ_V1_F",[(_pos select 0) - 10, (_pos select 1),-0.1],[], 0, "CAN_COLLIDE"];
+
+_vehicle = ["I_Truck_02_medical_F",_pos] call DMS_fnc_SpawnNonPersistentVehicle;
+
+
// Set crate loot values
_crate_loot_values =
[
5, // Weapons
- 10, // Items
+ [9,["Exile_Item_InstaDoc","Exile_Item_PlasticBottleFreshWater"]], // Items
3 // Backpacks
];
@@ -55,23 +60,22 @@ _missionAIUnits =
// Define mission-spawned objects and loot values
_missionObjs =
[
- [], // No spawned buildings
- [],
+ [_building], // No spawned buildings
+ [_vehicle],
[[_crate,_crate_loot_values]]
];
// Define Mission Start message
-_msgStart = format["A group of mercenaries has been spotted at %1! Kill them and take their equipment!",mapGridPosition _pos];
+_msgStart = format["Deranged Doctors!
A group of deranged doctors have set up a field hospital, sieze it for your own!"];
// Define Mission Win message
-_msgWIN = format["Convicts have successfully eliminated the mercenaries at %1!",mapGridPosition _pos];
+_msgWIN = format["Deranged Doctors!
Convicts have claimed the medical supplies for their own!"];
// Define Mission Lose message
-_msgLOSE = format["The mercenaries are no longer at %1!",mapGridPosition _pos];
-
+_msgLOSE = format["Deranged Doctors!
Hawkeye has ran off with the medical supplies, everything is gone!"];
// Define mission name (for map marker and logging)
-_missionName = "Mercenary Group";
+_missionName = "Deranged Doctors";
// Create Markers
_markers =
diff --git a/@ExileServer/addons/a3_dms/missions/mission1.sqf b/@ExileServer/addons/a3_dms/missions/mercenaries.sqf
similarity index 88%
rename from @ExileServer/addons/a3_dms/missions/mission1.sqf
rename to @ExileServer/addons/a3_dms/missions/mercenaries.sqf
index 1028d45..16315d3 100644
--- a/@ExileServer/addons/a3_dms/missions/mission1.sqf
+++ b/@ExileServer/addons/a3_dms/missions/mercenaries.sqf
@@ -64,14 +64,13 @@ _missionObjs =
];
// Define Mission Start message
-_msgStart = format["A group of mercenaries has been spotted at %1! Kill them and take their equipment!",mapGridPosition _pos];
+_msgStart = format["Mercenary Group!
A group of mercenaries has been spotted. Kill them and take their equipment!"];
// Define Mission Win message
-_msgWIN = format["Convicts have successfully eliminated the mercenaries at %1!",mapGridPosition _pos];
+_msgWIN = format["Mercenary Group!
Convicts have successfully eliminated the mercenaries"];
// Define Mission Lose message
-_msgLOSE = format["The mercenaries are no longer at %1!",mapGridPosition _pos];
-
+_msgLOSE = format["Mercenary Group!
The mercenaries have escaped and they took all their loot with them!"];
// Define mission name (for map marker and logging)
_missionName = "Mercenary Group";
diff --git a/@ExileServer/addons/a3_dms/missions/mission4.sqf b/@ExileServer/addons/a3_dms/missions/roguenavyseals.sqf
similarity index 78%
rename from @ExileServer/addons/a3_dms/missions/mission4.sqf
rename to @ExileServer/addons/a3_dms/missions/roguenavyseals.sqf
index 2be559a..0e37326 100644
--- a/@ExileServer/addons/a3_dms/missions/mission4.sqf
+++ b/@ExileServer/addons/a3_dms/missions/roguenavyseals.sqf
@@ -1,5 +1,8 @@
/*
- Sample mission (duplicate for testing purposes)
+ Sample mission
+ Created by Defent and eraser1
+
+ Called from DMS_selectMission
*/
private ["_num", "_side", "_pos", "_difficulty", "_AICount", "_group", "_crate", "_crate_loot_values", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_missionAIUnits", "_missionObjs", "_markers", "_time", "_added"];
@@ -13,7 +16,7 @@ _side = "bandit";
// find position
-_pos = call DMS_fnc_findSafePos;
+_pos = [10,100] call DMS_fnc_findSafePos;
// Set general mission difficulty
@@ -22,13 +25,13 @@ _difficulty = "hardcore";
// Create AI
// TODO: Spawn AI only when players are nearby
-_AICount = 5 + (round (random 2));
+_AICount = 4 + (round (random 2));
_group =
[
_pos, // Position of AI
_AICount, // Number of AI
- "hardcore", // "random","hardcore","difficult","moderate", or "easy"
+ "random", // "random","hardcore","difficult","moderate", or "easy"
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
_side // "bandit","hero", etc.
] call DMS_fnc_SpawnAIGroup;
@@ -41,8 +44,8 @@ _crate = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
_crate_loot_values =
[
7, // Weapons
- 15, // Items
- 5 // Backpacks
+ 2, // Items
+ 3 // Backpacks
];
@@ -55,23 +58,22 @@ _missionAIUnits =
// Define mission-spawned objects and loot values
_missionObjs =
[
- [], // No spawned buildings
+ [],
[],
[[_crate,_crate_loot_values]]
];
// Define Mission Start message
-_msgStart = format["A group of mercenaries has been spotted at %1! Kill them and take their equipment!",mapGridPosition _pos];
+_msgStart = format["Car Dealer Robbery!
A squad of proffesional Navy Seals team is performing gorilla warfare in convict land, deal with them!"];
// Define Mission Win message
-_msgWIN = format["Convicts have successfully eliminated the mercenaries at %1!",mapGridPosition _pos];
+_msgWIN = format["Car Dealer Robbery!
Convicts have successfully taken care of the Navy Seals, you must be the top of your class!"];
// Define Mission Lose message
-_msgLOSE = format["The mercenaries are no longer at %1!",mapGridPosition _pos];
-
+_msgLOSE = format["Car Dealer Robbery!
The Navy Seals have escaped and are now planning their next raid!"];
// Define mission name (for map marker and logging)
-_missionName = "Mercenary Group";
+_missionName = "Rogue Navy Seals";
// Create Markers
_markers =
diff --git a/@ExileServer/addons/a3_dms/missions/walmart.sqf b/@ExileServer/addons/a3_dms/missions/walmart.sqf
index a14c455..d2bd715 100644
--- a/@ExileServer/addons/a3_dms/missions/walmart.sqf
+++ b/@ExileServer/addons/a3_dms/missions/walmart.sqf
@@ -69,14 +69,13 @@ _missionObjs =
];
// Define Mission Start message
-_msgStart = format["A local Walmart shop is being raided, stop the raiders and take the loot!"];
+_msgStart = format["Walmart Riot!
A local Walmart shop is being raided, stop the raiders and take the loot!"];
// Define Mission Win message
-_msgWIN = format["Convicts have done a good deed and stopped the raiders!"];
+_msgWIN = format["Walmart Riot!
Convicts have done a good deed and stopped the raiders!"];
// Define Mission Lose message
-_msgLOSE = format["The raiders has looted everything from Walmart and escaped!"];
-
+_msgLOSE = format["Walmart Riot!
The raiders has looted everything from Walmart and escaped!"];
// Define mission name (for map marker and logging)
_missionName = "Walmart Riot";