This commit is contained in:
2022-04-21 16:15:41 +03:00
commit 9d4fc88901
601 changed files with 66252 additions and 0 deletions

View File

@ -0,0 +1,281 @@
/*
AN-2 Bandit Supply Drop by Vampire
Example Code by Halv
Updated for DZMS 2.0 by JasonTM
*/
uiSleep 2;
local _markBox = true; // Mark the location of the crate once it's on the ground.
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _name = "AN2 Supply Drop";
local _localName = "STR_CL_DZMS_AN2_TITLE";
local _coords = call DZMSFindPos;
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _dotMarker = "DZMSDot" + str _mission;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,_dotMarker,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_AN2_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_AN2_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//Lets get the AN2 Flying
local _dist = 8000; // increase or decrease this number to adjust the time it takes the plane to get to the mission.
local _porM = if (random 1 > .5) then {"+"} else {"-"};
local _porM2 = if (random 1 > .5) then {"+"} else {"-"};
local _startPos = call compile format ["[(%1 select 0) %2 %4,(%1 select 1) %3 %4, 300]",_coords,_porM,_porM2,_dist];
local _plane = "AN2_DZ" createVehicle _startPos;
local _dir = [_plane, _coords] call BIS_fnc_relativeDirTo;
_plane setDir _dir;
_plane setPos _startPos;
_plane setVelocity [(sin _dir*150),(cos _dir*150),0];
_plane engineOn true;
_plane flyInHeight 150;
_plane forceSpeed 175;
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, _plane];
//Lets make AI for the plane and get them in it
local _aiGrp = createGroup east;
local _pilot = _aiGrp createUnit ["SurvivorW2_DZ",getPos _plane,[],0,"FORM"];
_pilot moveInDriver _plane;
//_pilot assignAsDriver _plane;
local _wp = _aiGrp addWaypoint [[(_coords select 0), (_coords select 1),150], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "CARELESS";
_wp_pos = waypointPosition [_aiGrp,1];
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[_coords,6,1,_aiType,_mission] call DZMSAISpawn;
[_coords,6,2,_aiType,_mission] call DZMSAISpawn;
[_coords,4,3,_aiType,_mission] call DZMSAISpawn;
uiSleep 2;
local _aiCount = (DZMSMissionData select _mission) select 0;
local _groups = (DZMSMissionData select _mission) select 4;
local _staticGuns = (DZMSMissionData select _mission) select 5;
local _killReq = _aiCount - (DZMSRequiredKillPercent * _aiCount);
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _missionName = ["Bandit " + _name,"Hero " + _name] select _hero;
local _text = "";
local _autoMarkDot = "DZMSAutoDot" + str _mission;
local _autoText = "";
// Add AI counter if enabled.
if (DZMSAICount) then {
_text = if (_hero) then {
["STR_CL_MISSION_HERO_COUNT",_localName,_aiCount,"STR_CL_MISSION_HEROS"];
} else {
["STR_CL_MISSION_BANDIT_COUNT",_localName,_aiCount,"STR_CL_MISSION_BANDITS"];
};
PVDZ_ServerMarkerSend = ["textSingle",[_dotMarker,_text]];
publicVariable "PVDZ_ServerMarkerSend";
(_markers select 1) set [7, _text];
DZE_ServerMarkerArray set [_markerIndex, _markers];
};
local _half = false;
local _complete = false;
local _dropped = false;
local _crates = [];
local _chute = "";
local _box = "";
local _closestPlayer = objNull;
local _acArray = [];
local _claimed = false;
local _acTime = diag_tickTime;
local _claimTime = 0;
local _left = false;
local _leftTime = 0;
local _warnArray = [];
local _playerNear = false;
local _newCount = 0;
while {!_complete} do {
_newCount = (DZMSMissionData select _mission) select 0;
if (DZMSAICount) then {
// Check to see if the AI count has changed and update the marker.
if (_newCount != _aiCount) then {
_aiCount = _newCount;
_text = if (_hero) then {
["STR_CL_MISSION_HERO_COUNT",_localName,_aiCount,"STR_CL_MISSION_HEROS"];
} else {
["STR_CL_MISSION_BANDIT_COUNT",_localName,_aiCount,"STR_CL_MISSION_BANDITS"];
};
(_markers select 1) set [7, _text];
PVDZ_ServerMarkerSend = ["textSingle",[_dotMarker,_text]];
publicVariable "PVDZ_ServerMarkerSend";
DZE_ServerMarkerArray set [_markerIndex, _markers];
};
};
if (DZMSAutoClaim) then {
#include "\z\addons\dayz_server\DZMS\Scripts\DZMSAutoClaim.sqf"
};
if (!alive _plane && !_dropped) exitWith {
deleteVehicle _pilot;
[_coords,_mission,[],[],[],_groups,_staticGuns,_posIndex,true] spawn DZMSCleanupThread;
[_aiType,"STR_CL_DZMS_AN2_TITLE","STR_CL_DZMS_AN2_DEST"] call DZMSMessage;
};
if ((_plane distance _wp_pos) <= 1200 && !_half) then {
[_aiType,"STR_CL_DZMS_AN2_TITLE","STR_CL_DZMS_AN2_CLOSE"] call DZMSMessage;
//Keep on truckin'
_plane forceSpeed 175;
_plane flyInHeight 135;
_plane setSpeedMode "LIMITED";
_half = true;
};
// Check for near players
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
// If player is within range of the mission reset the start timer.
if (_playerNear) then {_startTime = diag_tickTime;};
if ((_plane distance _wp_pos) <= 200 && !_dropped) then {
//Drop the package
uiSleep 2; // let the plane get close to the mission center
local _dropDir = getDir _plane;
local _newPos = [(getPosATL _plane select 0) - 15*sin(_dropDir), (getPosATL _plane select 1) - 15*cos(_dropDir), (getPosATL _plane select 2) - 10];
[_aiType,"STR_CL_DZMS_AN2_TITLE","STR_CL_DZMS_AN2_DROP"] call DZMSMessage;
_chute = createVehicle ["ParachuteMediumEast", _newPos, [], 0, "FLY"];
_chute setPos _newPos;
_box = [_mission,_coords,"DZ_AmmoBoxBigUS","weapons",[0,0,200]] call DZMSSpawnCrate;
_box attachTo [_chute, [0, 0, 1]];
deleteWaypoint [_aiGrp, 1];
local _wp2 = _aiGrp addWaypoint [[0,0,150], 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointBehaviour "CARELESS";
_plane forceSpeed 350;
_plane setSpeedmode "FULL";
_dropped = true;
};
if (_dropped) then {
//The box was dropped, lets get it on the ground.
// If the descent takes more than 45 seconds the chute is probably stuck in a tree.
if (isNil "_fallCount") then {
local _fallCount = 0;
while {_fallCount < 90} do {
uiSleep .5;
//if ((([_chute] call FNC_GetPos) select 2) < 2) then {_fallCount = 91};
if ((([_box] call FNC_GetPos) select 2) < 2) then {_fallCount = 91};
_fallCount = _fallCount + .5;
};
detach _box;
_coords = [(getPos _box select 0), (getPos _box select 1), 0];
_box setPos _coords;
deleteVehicle _chute;
if (_markBox) then {
_markers set [4, [_coords,"DZMSCrateDot" + str _coords,"ColorBlack","Vehicle","","",[],["STR_EPOCH_BULK_NAME"],0]];
DZE_ServerMarkerArray set [_markerIndex, _markers];
PVDZ_ServerMarkerSend = ["createSingle",(_markers select 4)];
publicVariable "PVDZ_ServerMarkerSend";
};
};
// Timeout the mission if a player is not near
if ((diag_tickTime - _startTime) > (DZMSMissionTimeOut * 60) && !_playerNear) then {
_crates = (DZMSMissionData select _mission) select 3;
[_coords,_mission,[],[],_crates,_groups,_staticGuns,_posIndex,true] spawn DZMSCleanupThread;
[_aiType,"STR_CL_DZMS_AN2_TITLE","STR_CL_DZMS_AN2_FAIL"] call DZMSMessage;
_complete = true;
};
// Check for completion
if (_newCount <= _killReq) then {
if ([_coords,10] call DZMSNearPlayer) then {
_complete = true;
[_aiType,"STR_CL_DZMS_AN2_TITLE","STR_CL_DZMS_AN2_WIN"] call DZMSMessage;
// Spawn loot in the crate
_crates = (DZMSMissionData select _mission) select 3;
{
[(_x select 0),(_x select 1)] call DZMSBoxSetup;
} count _crates;
if (DZMSSceneryDespawnTimer > 0) then {
[_coords,_mission,[],[],_crates,_groups,_staticGuns,_posIndex,false] spawn DZMSCleanupThread;
};
};
};
};
uiSleep 2;
};
// Tell all clients to remove the markers from the map
local _remove = [];
{
if (typeName _x == "ARRAY") then {
_remove set [count _remove, (_x select 1)];
};
} count _markers;
PVDZ_ServerMarkerSend = ["end",_remove];
publicVariable "PVDZ_ServerMarkerSend";
//Let the timer know the mission is over
if (_hero) then {
DZMSHeroEndTime = diag_tickTime;
DZMSHeroRunning = DZMSHeroRunning - 1;
} else {
DZMSBanditEndTime = diag_tickTime;
DZMSBanditRunning = DZMSBanditRunning - 1;
};
// Remove marker and mission data
DZE_ServerMarkerArray set [_markerIndex, -1];
DZE_MissionPositions set [_posIndex, -1];
DZMSMissionData set [_mission, -1];
//Clean up the pilot and plane (if they exist)
if (!isNull _plane) then {deleteVehicle _plane;};
if (!isNull _pilot) then {deleteVehicle _pilot;};
waitUntil{uiSleep 1; count units _aiGrp == 0};
deleteGroup _aiGrp;
diag_log text format["[DZMS]: %1 has Ended.",_missionName];

View File

@ -0,0 +1,84 @@
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "APCs";
local _localName = "STR_CL_DZMS_APC_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_APC_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_APC_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//We create the vehicles like normal
[_mission,_coords,(["BRDM2_WINTER_DZE","BRDM2_RUST_DZE","BRDM2_Desert_ACR_DZE","BTR60_TK_EP1_DZE","BTR60_Gue_DZE","BRDM2_TK_EP1_DZE","BRDM2_CDF_DZE","BRDM2_TK_GUE_EP1_DZE"] call BIS_fnc_selectRandom),[2.4,-4.3],150.5] call DZMSSpawnVeh;
//[_mission,_coords,(["BRDM2_WINTER_DZE","BRDM2_RUST_DZE","BRDM2_Desert_ACR_DZE","BTR60_TK_EP1_DZE","BTR60_Gue_DZE","BRDM2_TK_EP1_DZE","BRDM2_CDF_DZE","BRDM2_TK_GUE_EP1_DZE"] call BIS_fnc_selectRandom),[2.7,4.8],14.2] call DZMSSpawnVeh;
[_mission,_coords,(["HMMWV_Armored_DZE","Dingo_WDL_ACR_DZE","Dingo_DST_ACR_DZE","LAV25_HQ_DZE","HMMWV_Winter_Armored_DZE"] call BIS_fnc_selectRandom),[-6,-0.2],-74] call DZMSSpawnVeh;
// Put a crate in the middle
[_mission,_coords,"DZ_AmmoBoxMedium1US","ArmedVehicle",[0,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],6,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,1,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 7.3,(_coords select 1) + 17, 0],
[(_coords select 0) - 18.4,(_coords select 1) + 2, 0],
[(_coords select 0) + 8,(_coords select 1) - 14.7, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_APC_WIN",
"STR_CL_DZMS_APC_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,88 @@
/*
HMMWV Mission by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Mission Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Armed Vehicles";
local _localName = "STR_CL_DZMS_AV_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %3.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_AV_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_AV_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//We create the vehicles like normal
[_mission,_coords,["Offroad_DSHKM_INS",(["HMMWV_GPK_M2_WINTER_DZE","ArmoredSUV_PMC_DZE","LandRover_MG_TK_EP1_DZE","HMMWV_M1114_DSHKM_ACR_DZE"] call BIS_fnc_selectRandom)] select DZMSEpoch,[-6.8,-3.2],-61] call DZMSSpawnVeh;
[_mission,_coords,["Pickup_PK_INS",(["GAZ_Vodnik_DZE","BTR40_MG_TK_INS_EP1_DZE","UAZ_MG_WINTER_DZE","HMMWV_M2_DZE"] call BIS_fnc_selectRandom)] select DZMSEpoch,[6.5,4.2],0] call DZMSSpawnVeh;
// Put a crate in the middle
[_mission,_coords,"DZ_AmmoBoxMedium1US","ArmedVehicle",[0,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],4,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 15.5,(_coords select 1) - 13.2, 0],
[(_coords select 0) - 16,(_coords select 1) + 14.5, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_AV_WIN",
"STR_CL_DZMS_AV_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,108 @@
/*
Medical C-130 Crash by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Modified to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "C130 Crash";
local _localName = "STR_CL_DZMS_C130_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_C130_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_C130_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
local _objects = [[ // The last object in the list gets returned.
["Barrels",[-7.4511,3.8544],61.911976],
["Misc_palletsfoiled",[4.062,4.7216],-29.273479],
["Paleta2",[-3.4033,-2.2256],52.402905],
["Land_Pneu",[1.17,1.249],-117.27345],
["Land_transport_crates_EP1",[3.9029,-1.8477],-70.372086],
["Fort_Crate_wood",[-2.1181,5.9765],-28.122475],
([["C130J_wreck_EP1",[-8.8681,15.3554,-.55],149.834555],["C130J",[-8.8681,15.3554],-30]] select DZMSEpoch)
],_coords,_mission] call DZMSSpawnObjects;
local _wreck = _objects select 6;
if (typeOf _wreck == "C130J") then {
_wreck setVehicleLock "LOCKED";
_wreck animate ["ramp_top",1];
_wreck animate ["ramp_bottom",1];
};
//We create the mission vehicles
[_mission,_coords,DZMSSmallVic,[14.1426,-0.6202]] call DZMSSpawnVeh;
[_mission,_coords,DZMSSmallVic,[-6.541,-11.5557]] call DZMSSpawnVeh;
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
[_mission,_coords,"DZ_AmmoBoxBigUS","supply",[-1.5547,2.3486]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium1US","supply2",[0.3428,-1.8985]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 10.5005,(_coords select 1) - 2.6465,0],6,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 4.7027,(_coords select 1) + 12.2138,0],6,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 2.918,(_coords select 1) - 9.0342,0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 2.918,(_coords select 1) - 9.0342,0],4,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) - 28.4,(_coords select 1) + 6, 0],
[(_coords select 0) + 8.9,(_coords select 1) + 27.43, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_C130_WIN",
"STR_CL_DZMS_C130_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,106 @@
/*
Constructors Mission by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Mission Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Construction Site";
local _localName = "STR_CL_DZMS_CONST_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_CONST_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_CONST_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
local _objects = [[
["MAP_A_BuildingWIP",[-2,1,.04],-30],
["Land_Ind_TankBig",[37,-7]],
["Land_Ind_TankBig",[-13,-35]],
["Land_Ind_Workshop01_01",[-27,-15],-31.6],
["Land_Ind_Workshop01_03",[9,38],-72],
["Land_Misc_Cargo1Ao",[31,20],99.8],
["Land_Misc_Cargo1B",[-36,2]],
["Land_Ind_TankSmall",[18,21],59]
],_coords,_mission] call DZMSSpawnObjects;
local _wipBuilding = _objects select 0;
//Create the vehicles
[_mission,_coords,DZMSLargeVic,[-3,28]] call DZMSSpawnVeh;
[_mission,_coords,DZMSSmallVic,[-26,14]] call DZMSSpawnVeh;
//Create the loot
[_mission,(_wipBuilding modelToWorld [-2.06445,5.56738,-6.51697]),"DZ_AmmoBoxBigUS","supply",[0,0],-30] call DZMSSpawnCrate;
[_mission,(_wipBuilding modelToWorld [6.11914,5.56396,-6.40808]),"DZ_AmmoBoxBigUS","supply2",[0,0],-30] call DZMSSpawnCrate;
[_mission,(_wipBuilding modelToWorld [0.636719,5.57471,-6.43134]),"DZ_AmmoBoxBigUS","supply2",[0,0],-30] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 21,(_coords select 1) + 32,0],6,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 56,(_coords select 1) + 27,0],6,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 27,(_coords select 1) - 52,0],6,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 41,(_coords select 1) - 20,0],6,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
(_wipBuilding modelToWorld [3.88672,11.9736,5.3772]),
(_wipBuilding modelToWorld [-25.041,12.5439,5.8855]),
((_objects select 2) modelToWorld [-5.40625,-4.40625,5.35645]),
((_objects select 1) modelToWorld [4.62305,2.0127,5.35931])
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_CONST_WIN",
"STR_CL_DZMS_CONST_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,104 @@
/*
Fire Base Camp by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Mission Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Firebase";
local _localName = "STR_CL_DZMS_FB_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_FB_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_FB_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
[[
["MAP_fort_rampart",[8,-14],-30],
["MAP_fort_rampart",[-9,15],-210],
["MAP_fort_rampart",[-16.6,-8.9],60],
["MAP_fort_rampart",[16,10],-120],
["MAP_HBarrier5",[2.3,-8.5],-30],
["MAP_HBarrier5",[-8.9,-2.3],60],
["MAP_HBarrier5",[6.9,7.2],60],
["MAP_HBarrier5",[-6.1,6.8],-30],
["MAP_fort_watchtower",[4.4,14.3],60],
["MAP_fort_watchtower",[-15.3,2.3],60],
["MAP_fort_watchtower",[15.7,-2.5],-120],
["MAP_fort_watchtower",[-4.6,-14.1],-120]
],_coords,_mission] call DZMSSpawnObjects;
[_mission,_coords,"DZ_AmmoBoxMedium1US","supply",[2,-4],-30] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium1US","supply2",[-2,4],-30] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium1US","weapons",[-5,-2.5],60] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium1US","weapons",[5,3.3],60] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) + 12,(_coords select 1) - 23,0],6,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 24,(_coords select 1) - 13,0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 13,(_coords select 1) + 25,0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 26,(_coords select 1) + 14,0],4,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 18.45,(_coords select 1) - 8.41, 0],
[(_coords select 0) + 12.85,(_coords select 1) + 18.51, 0],
[(_coords select 0) - 18.09,(_coords select 1) + 9, 0],
[(_coords select 0) - 13.46,(_coords select 1) - 17.78, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_FB_WIN",
"STR_CL_DZMS_FB_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,98 @@
/*
General Store Mission by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "General Store";
local _localName = "STR_CL_DZMS_GS_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_GS_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_GS_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
local _objects = [[
["MAP_A_GeneralStore_01",[0,0],-120],
["MAP_Ind_TankSmall",[10.9,-12.9],-30],
["MAP_t_acer2s",[-6.1,-24.3]],
["MAP_t_acer2s",[-21.1,2.6]],
["MAP_t_acer2s",[7.9,19.6]],
["MAP_t_acer2s",[23,-7.2]]
],_coords,_mission] call DZMSSpawnObjects;
local _store = _objects select 0;
// Spawn the crate
[_mission,(_store modelToWorld [-8.94629,-3.66602,-1.2164]),"DZ_AmmoBoxMedium2US","store",[0,0],-30] call DZMSSpawnCrate;
[_mission,(_store modelToWorld [-6.87158,-3.67188,-1.21259]),"DZ_AmmoBoxMedium2US","weapons",[0,0],-30] call DZMSSpawnCrate;
//Create the vehicle
[_mission,_coords,DZMSSmallVic,[16.8,-17.4],98.6] call DZMSSpawnVeh;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) + 12,(_coords select 1) - 23,0],3,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 24,(_coords select 1) - 13,0],3,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 13,(_coords select 1) + 25,0],3,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 26,(_coords select 1) + 14,0],3,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 25,(_coords select 1) - 25, 0],
(_store modelToWorld [7.69385,11.2803,-1.19305])
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_GS_WIN",
"STR_CL_DZMS_GS_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,79 @@
/*
Bandit Heli Down! by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Helicopter Crash";
local _localName = "STR_CL_DZMS_HC_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_HC_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_HC_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
[[
["CrashSite_US",[0,0]]
],_coords,_mission] call DZMSSpawnObjects;
[_mission,_coords,"DZ_AmmoBoxLong2RU","weapons",[-6,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[_coords,3,0,_aiType,_mission] call DZMSAISpawn;
[_coords,3,1,_aiType,_mission] call DZMSAISpawn;
[_coords,3,2,_aiType,_mission] call DZMSAISpawn;
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_HC_WIN",
"STR_CL_DZMS_HC_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,95 @@
/*
Bandit Supply Heli Crash by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
New Mission Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Helicopter Landing";
local _localName = "STR_CL_DZMS_HL_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_HL_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_HL_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
[[
["Body1",[-3.0185,-0.084]],
["Body2",[1.9248,2.1201]]
],_coords,_mission] call DZMSSpawnObjects;
//We create the vehicles like normal
[_mission,_coords,DZMSChoppers,[0,0],-36.279881] call DZMSSpawnVeh;
[_mission,_coords,"HMMWV_DZ",[-8.7802,6.874]] call DZMSSpawnVeh;
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
[_mission,_coords,"DZ_AmmoBoxLongGUE","weapons",[-6.1718,0.6426]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxFlatUS","store",[-7.1718,1.6426]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],4,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 13.28,(_coords select 1) - 16.46, 0],
[(_coords select 0) - 11.29,(_coords select 1) + 15.89, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_HL_WIN",
"STR_CL_DZMS_HL_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,78 @@
/*
Hummer Wreck by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Humvee Crash";
local _localName = "STR_CL_DZMS_HUM_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_HUM_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_HUM_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
[[
["HMMWVwreck",[0,0]]
],_coords,_mission] call DZMSSpawnObjects;
// Spawn crate
[_mission,_coords,"DZ_AmmoBoxLong2RU","weapons",[-14,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, AI type, mission number]
[_coords,3,1,_aiType,_mission] call DZMSAISpawn;
[_coords,3,1,_aiType,_mission] call DZMSAISpawn;
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_HUM_WIN",
"STR_CL_DZMS_HUM_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,87 @@
/*
Medical Crate by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Medical Cache";
local _localName = "STR_CL_DZMS_MCACHE_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_MCACHE_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_MCACHE_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//Lets add the scenery
[[
["Land_CamoNetB_NATO",[-0.0649,0.6025]]
],_coords,_mission] call DZMSSpawnObjects;
//We create the vehicles like normal
[_mission,_coords,DZMSSmallVic,[10.0303,-12.2979]] call DZMSSpawnVeh;
[_mission,_coords,DZMSLargeVic,[-6.2764,-14.086]] call DZMSSpawnVeh;
//[_mission,_coords,"USVehicleBox","medical",[0,0]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_MedBox","medical",[-3.7251,-2.3614]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_MedBox","medical",[-3.4346,0]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_MedBox","medical",[4.0996,3.9072]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,3,_aiType,_mission] call DZMSAISpawn;
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_MCACHE_WIN",
"STR_CL_DZMS_MCACHE_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,99 @@
/*
Medical Supply Camp by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Mission Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Medical Camp";
local _localName = "STR_CL_DZMS_MCAMP_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_MCAMP_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_MCAMP_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//Create the scenery
[[
["Land_fort_artillery_nest",[-5.939,10.0459],-31.158424],
["Land_fort_artillery_nest",[6.3374,-11.1944],-211.14516],
["Land_fort_rampart",[12.2456,6.249],-120.93051],
["Land_fort_rampart",[-11.4253,-7.628],59.42643],
["Land_CamoNetVar_EAST",[4.1738,-7.9112],-27.004126],
["PowGen_Big",[-0.8936,8.1582],-56.044361],
["Barrel5",[-2.5074,7.3466]],
["Barrel5",[-3.293,7.9179]],
["Land_Campfire_burning",[3.1367,-5.087]],
["FoldChair",[0.8589,-6.2676],-132.43658],
["FoldChair",[2.6909,-7.4805],-184.45828],
["FoldChair",[5.4175,-5.4903],96.993355],
["FoldChair",[4.5722,-7.2305],142.91867],
["FoldChair",[5.0542,-3.4649],55.969147]
],_coords,_mission] call DZMSSpawnObjects;
//Create the vehicles
[_mission,_coords,DZMSSmallVic,[-17.5078,5.2578]] call DZMSSpawnVeh;
//Create the loot
//[_mission,_coords,"USLaunchersBox","weapons",[-6.8277,5.6748]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_MedBox","medical",[-7.1519,1.8144],-29.851013] call DZMSSpawnCrate;
[_mission,_coords,"DZ_MedBox","medical",[-7.4116,2.5244]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,3,_aiType,_mission] call DZMSAISpawn;
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_MCAMP_WIN",
"STR_CL_DZMS_MCAMP_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,89 @@
/*
Medical Outpost by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Medical Outpost";
local _localName = "STR_CL_DZMS_MOP_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_MOP_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_MOP_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
[[
["US_WarfareBFieldhHospital_Base_EP1",[2,5]],
["MASH_EP1",[-24,-5]],
["MASH_EP1",[-17,-5]],
["MASH_EP1",[-10,-5]]
],_coords,_mission] call DZMSSpawnObjects;
//We create the vehicles
[_mission,_coords,DZMSSmallVic,[10,-5]] call DZMSSpawnVeh;
[_mission,_coords,DZMSSmallVic,[15,-5]] call DZMSSpawnVeh;
//We create and fill the crates
[_mission,_coords,"DZ_MedBox","medical",[-3,0,0.15]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium2US","weapons",[-8,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 20, (_coords select 1) - 15,0],4,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 10, (_coords select 1) + 15,0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) - 10, (_coords select 1) - 15,0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 20, (_coords select 1) + 15,0],4,3,_aiType,_mission] call DZMSAISpawn;
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_MOP_WIN",
"STR_CL_DZMS_MOP_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,71 @@
/* //
Weapons Cache Mission by lazyink (Original Full Code by TheSzerdi & TAW_Tonic)
New Mission Format by Vampire
*/ //
private ["_missName","_coords","_net","_veh1","_veh2","_vehicle","_vehicle1","_crate","_crate1","_crate2","_crate3"];
//Name of the Mission
_missName = "NATO Weapons Cache";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Bandits have Overrun a NATO Weapons Cache!", "PLAIN",10] call RE;
//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;
//Lets add the scenery
_net = createVehicle ["Land_CamoNetB_NATO",[(_coords select 0) - 0.0649, (_coords select 1) + 0.6025,0],[], 0, "CAN_COLLIDE"];
[_net] call DZMSProtectObj;
//We create the vehicles like normal
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["large"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10.0303, (_coords select 1) - 12.2979,10],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 6.2764, (_coords select 1) - 14.086,10],[], 0, "CAN_COLLIDE"];
//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
[_vehicle1] call DZMSSetupVehicle;
_crate = createVehicle ["USVehicleBox",_coords,[], 0, "CAN_COLLIDE"];
_crate1 = createVehicle ["AmmoBoxSmall_556",[(_coords select 0) - 3.7251,(_coords select 1) - 2.3614, 0],[], 0, "CAN_COLLIDE"];
_crate2 = createVehicle ["AmmoBoxSmall_762",[(_coords select 0) - 3.4346, 0, 0],[], 0, "CAN_COLLIDE"];
_crate3 = createVehicle ["AmmoBoxSmall_556",[(_coords select 0) + 4.0996,(_coords select 1) + 3.9072, 0],[], 0, "CAN_COLLIDE"];
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
[_crate,"weapons"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
[_crate1] call DZMSProtectObj;
[_crate2] call DZMSProtectObj;
[_crate3] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
[_vehicle1] ExecVM DZMSSaveVeh;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Weapons Cache is Under Survivor Control!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM1 Weapon Cache Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";
//Let the timer know the mission is over
DZMSMajDone = true;

View File

@ -0,0 +1,163 @@
/*
AN-2 Bandit Supply Drop by Vampire
Example Code by Halv
*/
private ["_missName","_coords","_plane","_aiGrp","_pilot","_wp","_wp_pos","_loop","_half","_newPos","_plane2","_chute","_box","_dropDir","_wp2","_fallCount","_boxFin"];
//Name of the Mission
_missName = "AN-2 w/ Supplies";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Dave is flying in with an AN-2.\nCapture him and take his things!", "PLAIN",10] call RE;
//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;
//Lets get the AN2 Flying
_plane = createVehicle ["AN2_DZ", [0,0,500], [], 0, "FLY"];
[_plane] call DZMSProtectObj;
_plane engineOn true;
_plane flyInHeight 150;
_plane forceSpeed 175;
//Empty the plane
clearMagazineCargoGlobal _plane;
clearWeaponCargoGlobal _plane;
//Lets make AI for the plane and get them in it
_aiGrp = creategroup east;
_pilot = _aiGrp createUnit ["SurvivorW2_DZ",getPos _plane,[],0,"FORM"];
_pilot moveindriver _plane;
_pilot assignAsDriver _plane;
_wp = _aiGrp addWaypoint [[(_coords select 0), (_coords select 1),150], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "CARELESS";
_wp_pos = waypointPosition [_aiGrp,1];
_pilot addWeapon 'NVGoggles';
_pilot addWeapon 'ItemCompass';
_pilot addWeapon 'ItemRadio';
_pilot addWeapon 'ItemMap';
_pilot addWeapon 'ItemGPS';
sleep 5;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
_loop = true;
_half = false;
while {_loop} do {
if (!Alive _plane OR !Alive _pilot) then {
sleep 5;
// We are going to pretend the plane was shot down nearby
deleteVehicle _plane;
deleteVehicle _pilot;
_newPos = [(_coords select 0) + (random(2000)),(_coords select 1) - (random(2000)),0];
if (surfaceIsWater _newPos) then {
//newPos is water, so lets just drop it on mark
//This is a temporary fix for needed logic
_newPos = _coords;
};
//Create the plane and kill it
_plane2 = createVehicle ["AN2_DZ", [(_newPos select 0),(_newPos select 1),200], [], 0, "FLY"];
[_plane2] call DZMSProtectObj;
_plane2 engineOn true;
_plane2 flyInHeight 150;
_plane2 forceSpeed 175;
sleep 2;
_plane2 setDamage 1;
//Update the location
[_coords,"AN2 Wreck"] ExecVM DZMSAddMajMarker;
[nil,nil,rTitleText,"The AN2 was shot down by UN Peacekeepers!\nGo Find the Supplies!", "PLAIN",10] call RE;
_chute = createVehicle ["ParachuteMediumEast", [(_newPos select 0),(_newPos select 1),200], [], 0, "FLY"];
[_chute] call DZMSProtectObj;
_box = createVehicle ["USVehicleBox", [(_newPos select 0),(_newPos select 1),200],[], 0, "CAN_COLLIDE"];
[_box] call DZMSProtectObj;
_box attachTo [_chute, [0, 0, 1]];
_loop = false;
};
if ((Alive _plane) AND (Alive _pilot) AND ((_plane distance _wp_pos) <= 1200) AND (!(_half))) then {
[nil,nil,rTitleText,"The AN2 is only 1200m out from the drop point!", "PLAIN",10] call RE;
//Keep on truckin'
_plane forceSpeed 175;
_plane flyInHeight 135;
_plane setspeedmode "LIMITED";
_half = true;
};
if ((Alive _plane) AND (Alive _pilot) AND ((_plane distance _wp_pos) <= 200)) then {
//Drop the package
_dropDir = getDir _plane;
_newPos = [(getPosATL _plane select 0) - 15*sin(_dropDir), (getPosATL _plane select 1) - 15*cos(_dropDir), (getPosATL _plane select 2) - 10];
[nil,nil,rTitleText,"The AN2 has reached the location and dropped the cargo!", "PLAIN",10] call RE;
_chute = createVehicle ["ParachuteMediumEast", _newPos, [], 0, "FLY"];
[_chute] call DZMSProtectObj;
_box = createVehicle ["USVehicleBox", _newPos,[], 0, "CAN_COLLIDE"];
[_box] call DZMSProtectObj;
_box attachTo [_chute, [0, 0, 1]];
deleteWaypoint [_aiGrp, 1];
_wp2 = _aiGrp addWaypoint [[0,0,150], 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointBehaviour "CARELESS";
_plane forceSpeed 350;
_plane setSpeedmode "FULL";
_loop = false;
};
};
//The box was dropped, lets get it on the ground.
_fallCount = 0;
while {_fallCount < 45} do {
if (((getPos _box) select 2) < 1) then {_fallCount = 46};
sleep 0.1;
_fallCount = _fallCount + 0.1;
};
detach _box;
_box setpos [(getpos _box select 0), (getpos _box select 1), 0];
_boxFin = createVehicle ["USVehicleBox",[(getpos _box select 0),(getpos _box select 1), 0],[],0,"CAN_COLLIDE"];
deletevehicle _box;
deletevehicle _chute;
[[(getpos _boxFin select 0), (getpos _boxFin select 1), 0],"AN2 Cargo"] ExecVM DZMSAddMajMarker;
clearWeaponCargoGlobal _boxFin;
clearMagazineCargoGlobal _boxFin;
clearBackpackCargoGlobal _boxFin;
[_boxFin,"weapons"] ExecVM DZMSBoxSetup;
[_boxFin] call DZMSProtectObj;
//Wait until the player is within 30 meters and also meets the kill req
[position _boxFin,"DZMSUnitsMajor"] call DZMSWaitMissionComp;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The AN2 Cargo has been Secured by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM2 AN2 Drop Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";
//Let the timer know the mission is over
DZMSMajDone = true;

View File

@ -0,0 +1,128 @@
/*
Medical Supply Camp by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Mission Format by Vampire
*/
private ["_missName","_coords","_base1","_base2","_base3","_base4","_base5","_base6","_base7","_base8","_base9","_base10","_base11","_base12","_base13","_base14","_base15","_base16","_base17","_veh1","_vehicle","_crate"];
//Name of the Mission
_missName = "Bandit Medical Camp";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Bandits have Opened a Medical Camp!\nStop Them from Re-Supplying the Region!", "PLAIN",10] call RE;
//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;
//Create the scenery
_base1 = createVehicle ["Land_fort_artillery_nest",[(_coords select 0) - 5.939,(_coords select 1) + 10.0459,0],[], 0, "CAN_COLLIDE"];
_base1 setDir -31.158424;
[_base1] call DZMSProtectObj;
_base1 setVehicleLock "LOCKED";
_base1 setPos [(_coords select 0) - 5.939,(_coords select 1) + 10.0459,0];
_base2 = createVehicle ["Land_fort_artillery_nest",[(_coords select 0) + 6.3374, (_coords select 1) - 11.1944,0],[], 0, "CAN_COLLIDE"];
_base2 setDir -211.14516;
[_base2] call DZMSProtectObj;
_base2 setVehicleLock "LOCKED";
_base2 setPos [(_coords select 0) + 6.3374, (_coords select 1) - 11.1944,0];
_base3 = createVehicle ["Land_fort_rampart",[(_coords select 0) + 12.2456, (_coords select 1) + 6.249,0],[], 0, "CAN_COLLIDE"];
_base3 setDir -120.93051;
[_base3] call DZMSProtectObj;
_base3 setVehicleLock "LOCKED";
_base3 setPos [(_coords select 0) + 12.2456, (_coords select 1) + 6.249,0];
_base4 = createVehicle ["Land_fort_rampart",[(_coords select 0) - 11.4253, (_coords select 1) - 7.628,0],[], 0, "CAN_COLLIDE"];
_base4 setDir 59.42643;
[_base4] call DZMSProtectObj;
_base4 setVehicleLock "LOCKED";
_base4 setPos [(_coords select 0) - 11.4253, (_coords select 1) - 7.628,0];
_base5 = createVehicle ["MedBox0",[(_coords select 0) - 7.1519, (_coords select 1) + 1.8144,0],[], 0, "CAN_COLLIDE"];
_base5 setDir -29.851013;
[_base5] call DZMSProtectObj;
_base6 = createVehicle ["MedBox0",[(_coords select 0) - 7.4116, (_coords select 1) + 2.5244,0],[], 0, "CAN_COLLIDE"];
[_base6] call DZMSProtectObj;
_base7 = createVehicle ["WeaponHolder_ItemToolbox",[(_coords select 0) - 7.7041, (_coords select 1) + 3.332,0],[], 0, "CAN_COLLIDE"];
_base7 setDir -106.46461;
[_base7] call DZMSProtectObj;
_base8 = createVehicle ["Land_CamoNetVar_EAST",[(_coords select 0) + 4.1738, (_coords select 1) - 7.9112],[], 0, "CAN_COLLIDE"];
_base8 setDir -27.004126;
[_base8] call DZMSProtectObj;
_base8 setVehicleLock "LOCKED";
_base8 setPos [(_coords select 0) + 4.1738, (_coords select 1) - 7.9112];
_base9 = createVehicle ["PowGen_Big",[(_coords select 0) - 0.8936, (_coords select 1) + 8.1582,0],[], 0, "CAN_COLLIDE"];
_base9 setDir -56.044361;
[_base9] call DZMSProtectObj;
_base10 = createVehicle ["Barrel5",[(_coords select 0) - 2.5074, (_coords select 1) + 7.3466,0],[], 0, "CAN_COLLIDE"];
[_base10] call DZMSProtectObj;
_base11 = createVehicle ["Barrel5",[(_coords select 0) - 3.293, (_coords select 1) + 7.9179,0],[], 0, "CAN_COLLIDE"];
[_base11] call DZMSProtectObj;
_base12 = createVehicle ["Land_Campfire_burning",[(_coords select 0) + 3.1367, (_coords select 1) - 5.087,0],[], 0, "CAN_COLLIDE"];
[_base12] call DZMSProtectObj;
_base13 = createVehicle ["FoldChair",[(_coords select 0) + 0.8589, (_coords select 1) - 6.2676,0],[], 0, "CAN_COLLIDE"];
_base13 setDir -132.43658;
[_base13] call DZMSProtectObj;
_base14 = createVehicle ["FoldChair",[(_coords select 0) + 2.6909, (_coords select 1) - 7.4805,0],[], 0, "CAN_COLLIDE"];
_base14 setDir -184.45828;
[_base14] call DZMSProtectObj;
_base15 = createVehicle ["FoldChair",[(_coords select 0) + 5.4175, (_coords select 1) - 5.4903,0],[], 0, "CAN_COLLIDE"];
_base15 setDir 96.993355;
[_base15] call DZMSProtectObj;
_base16 = createVehicle ["FoldChair",[(_coords select 0) + 4.5722, (_coords select 1) - 7.2305,0],[], 0, "CAN_COLLIDE"];
_base16 setDir 142.91867;
[_base16] call DZMSProtectObj;
_base17 = createVehicle ["FoldChair",[(_coords select 0) + 5.0542, (_coords select 1) - 3.4649,0],[], 0, "CAN_COLLIDE"];
_base17 setDir 55.969147;
[_base17] call DZMSProtectObj;
//Create the vehicles
_veh1 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) - 17.5078, (_coords select 1) + 5.2578,0],[], 0, "CAN_COLLIDE"];
[_vehicle] call DZMSSetupVehicle;
//Create the loot
_crate = createVehicle ["USLaunchersBox",[(_coords select 0) - 6.8277, (_coords select 1) + 5.6748,0],[], 0, "CAN_COLLIDE"];
[_crate,"medical"] ExecVM DZMSBoxSetup;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,1,"DZMSUnitsMajor"] call DZMSAISpawn;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
//Let everyone know the mission is over
[nil,nil,rTitleText,"Survivors have Taken Control of the Camp and Medical Supplies.", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM3 Medical Camp Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";
//Let the timer know the mission is over
DZMSMajDone = true;

View File

@ -0,0 +1,71 @@
/*
Bandit Supply Heli Crash by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
New Mission Format by Vampire
*/
private ["_missName","_coords","_ranChopper","_chopper","_truck","_trash","_trash2","_crate","_crate2"];
//Name of the Mission
_missName = "Helicopter Landing";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"A Supply Helicopter has been Forced to Land!\nStop the Bandits from Taking Control of it!", "PLAIN",10] call RE;
//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;
//We create the vehicles like normal
_ranChopper = ["heli"] call DZMSGetVeh;
_chopper = createVehicle [_ranChopper,_coords,[], 0, "NONE"];
//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_chopper] call DZMSSetupVehicle;
_chopper setDir -36.279881;
_truck = createVehicle ["HMMWV_DZ",[(_coords select 0) - 8.7802,(_coords select 1) + 6.874,0],[], 0, "CAN_COLLIDE"];
[_truck] call DZMSSetupVehicle;
//Lets add the scenery
_trash = createVehicle ["Body1",[(_coords select 0) - 3.0185,(_coords select 1) - 0.084,0],[], 0, "CAN_COLLIDE"];
_trash2 = createVehicle ["Body2",[(_coords select 0) + 1.9248,(_coords select 1) + 2.1201,0],[], 0, "CAN_COLLIDE"];
[_trash] call DZMSProtectObj;
[_trash2] call DZMSProtectObj;
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
_crate = createVehicle ["USLaunchersBox",[(_coords select 0) - 6.1718,(_coords select 1) + 0.6426,0],[], 0, "CAN_COLLIDE"];
[_crate,"weapons"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
_crate2 = createVehicle ["USLaunchersBox",[(_coords select 0) - 7.1718,(_coords select 1) + 1.6426,0],[], 0, "CAN_COLLIDE"];
[_crate2,"weapons"] ExecVM DZMSBoxSetup;
[_crate2] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 7.5337,(_coords select 1) + 4.2656,0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_chopper] ExecVM DZMSSaveVeh;
[_truck] ExecVM DZMSSaveVeh;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Helicopter has been Taken by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM4 Helicopter Landing Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";
//Let the timer know the mission is over
DZMSMajDone = true;

View File

@ -0,0 +1,85 @@
/*
Medical Ural Attack by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Format by Vampire
*/
private ["_missName","_coords","_crash","_body","_body1","_body2","_body3","_veh1","_vehicle","_vehicle1","_crate","_crate2"];
//Name of the Mission
_missName = "Ural Ambush";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Bandits have Ambushed a Ural Carrying Supplies!", "PLAIN",10] call RE;
//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;
//We create the scenery
_crash = createVehicle ["UralWreck",_coords,[], 0, "CAN_COLLIDE"];
_crash setDir 149.64919;
[_crash] call DZMSProtectObj;
_body = createVehicle ["Body",[(_coords select 0) - 2.2905,(_coords select 1) - 3.3438,0],[], 0, "CAN_COLLIDE"];
_body setDir 61.798588;
[_body] call DZMSProtectObj;
_body1 = createVehicle ["Body",[(_coords select 0) - 2.8511,(_coords select 1) - 2.4346,0],[], 0, "CAN_COLLIDE"];
_body1 setDir 52.402905;
[_body1] call DZMSProtectObj;
_body2 = createVehicle ["Body",[(_coords select 0) - 3.435,(_coords select 1) - 1.4297,0],[], 0, "CAN_COLLIDE"];
_body2 setDir -117.27345;
[_body2] call DZMSProtectObj;
_body3 = createVehicle ["Body2",[(_coords select 0) - 4.0337,(_coords select 1) + 0.5,0],[], 0, "CAN_COLLIDE"];
_body3 setDir 23.664057;
[_body3] call DZMSProtectObj;
//We create the vehicles like normal
_veh1 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 5.7534, (_coords select 1) - 9.2149,0],[], 0, "CAN_COLLIDE"];
//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
_crate = createVehicle ["USBasicWeaponsBox",[(_coords select 0) + 2.6778,(_coords select 1) - 3.0889,0],[], 0, "CAN_COLLIDE"];
[_crate,"medical"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
_crate setDir -28.85478;
_crate2 = createVehicle ["USBasicWeaponsBox",[(_coords select 0) + 1.4805,(_coords select 1) - 3.7432,0],[], 0, "CAN_COLLIDE"];
[_crate2,"medical"] ExecVM DZMSBoxSetup;
[_crate2] call DZMSProtectObj;
_crate2 setDir 62.744293;
_crate3 = createVehicle ["USBasicAmmunitionBox",[(_coords select 0) + 2.5405,(_coords select 1) - 4.1612,0],[], 0, "CAN_COLLIDE"];
[_crate3,"weapons"] ExecVM DZMSBoxSetup;
[_crate3] call DZMSProtectObj;
_crate3 setDir -27.93351;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 6.9458,(_coords select 1) - 3.5352, 0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 4.4614,(_coords select 1) + 2.5898, 0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 4.4614,(_coords select 1) + 2.5898, 0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
[nil,nil,rTitleText,"The Ural Supplies have been Secured by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM5 Ural Ambush Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";
//Let the timer know the mission is over
DZMSMajDone = true;

View File

@ -0,0 +1,71 @@
/*
Medical Crate by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_net","_veh1","_veh2","_vehicle","_vehicle1","_crate"];
//Name of the Mission
_missName = "Bandit Protection";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Sweets broke his legs again.\nGo kill the bandits protecting him.", "PLAIN",10] call RE;
//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;
//Lets add the scenery
_net = createVehicle ["Land_CamoNetB_NATO",[(_coords select 0) - 0.0649, (_coords select 1) + 0.6025,0],[], 0, "CAN_COLLIDE"];
[_net] call DZMSProtectObj;
//We create the vehicles like normal
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["large"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10.0303, (_coords select 1) - 12.2979,10],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) - 6.2764, (_coords select 1) - 14.086,10],[], 0, "CAN_COLLIDE"];
//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
[_vehicle1] call DZMSSetupVehicle;
_crate = createVehicle ["USVehicleBox",_coords,[], 0, "CAN_COLLIDE"];
_crate1 = createVehicle ["MedBox0",[(_coords select 0) - 3.7251,(_coords select 1) - 2.3614, 0],[], 0, "CAN_COLLIDE"];
_crate2 = createVehicle ["MedBox0",[(_coords select 0) - 3.4346, 0, 0],[], 0, "CAN_COLLIDE"];
_crate3 = createVehicle ["MedBox0",[(_coords select 0) + 4.0996,(_coords select 1) + 3.9072, 0],[], 0, "CAN_COLLIDE"];
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
[_crate,"medical"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
[_crate1] call DZMSProtectObj;
[_crate2] call DZMSProtectObj;
[_crate3] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
[_vehicle1] ExecVM DZMSSaveVeh;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Medical Cache is Under Survivor Control!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM6 Medical Cache Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";
//Let the timer know the mission is over
DZMSMajDone = true;

View File

@ -0,0 +1,39 @@
/*
Bandit Hunting Party by lazyink (Full credit to TheSzerdi & TAW_Tonic for the code)
Updated to new format by Vampire
*/
private ["_missName","_coords","_vehicle"];
//Name of the Mission
_missName = "Bandit Squad";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"A Bandit Squad has been spotted!\nStop them from completing their patrol!", "PLAIN",10] call RE;
//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,2,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 5;
[_coords,2,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 5;
[_coords,2,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 5;
[_coords,2,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Bandit Squad has been Wiped Out!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Minor SM1 Bandit Squad Mission has Ended."];
deleteMarker "DZMSMinMarker";
deleteMarker "DZMSMinDot";
//Let the timer know the mission is over
DZMSMinDone = true;

View File

@ -0,0 +1,77 @@
/*
Medical Outpost by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_base","_base1","_base2","_base3","_veh1","_veh2","_vehicle","_vehicle1","_crate","_crate2"];
//Name of the Mission
_missName = "Medical Outpost";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Bandits have established a Medical Outpost!\nGo Secure their Medical Supplies!", "PLAIN",10] call RE;
//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;
//We create the scenery
_base = createVehicle ["US_WarfareBFieldhHospital_Base_EP1",[(_coords select 0) +2, (_coords select 1)+5,-0.3],[], 0, "CAN_COLLIDE"];
_base1 = createVehicle ["MASH_EP1",[(_coords select 0) - 24, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_base2 = createVehicle ["MASH_EP1",[(_coords select 0) - 17, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_base3 = createVehicle ["MASH_EP1",[(_coords select 0) - 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
//DZMSProtectObj prevents it from disappearing
[_base] call DZMSProtectObj;
[_base1] call DZMSProtectObj;
[_base2] call DZMSProtectObj;
[_base3] call DZMSProtectObj;
//We create the vehicles
_veh1 = ["small"] call DZMSGetVeh;
_veh2 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_vehicle1 = createVehicle [_veh2,[(_coords select 0) + 15, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
[_vehicle1] call DZMSSetupVehicle;
//We create and fill the crates
_crate = createVehicle ["USVehicleBox",[(_coords select 0) - 3, _coords select 1,0],[], 0, "CAN_COLLIDE"];
//DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
[_crate,"medical"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
_crate2 = createVehicle ["USLaunchersBox",[(_coords select 0) - 8, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate2,"weapons"] ExecVM DZMSBoxSetup;
[_crate2] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 20, (_coords select 1) - 15,0],4,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 3;
[[(_coords select 0) + 10, (_coords select 1) + 15,0],4,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 3;
[[(_coords select 0) - 10, (_coords select 1) - 15,0],4,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 3;
[[(_coords select 0) + 20, (_coords select 1) + 15,0],4,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 3;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
[_vehicle1] ExecVM DZMSSaveVeh;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Medical Outpost is under Survivor Control!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Minor SM2 Medical Outpost Mission has Ended."];
deleteMarker "DZMSMinMarker";
deleteMarker "DZMSMinDot";
//Let the timer know the mission is over
DZMSMinDone = true;

View File

@ -0,0 +1,66 @@
/*
Bandit Stash House by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_base","_base1","_veh1","_vehicle","_crate","_crate1"];
//Name of the Mission
_missName = "Stash House";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"Bandits have set up a Weapon Stash House!\nGo Empty it Out!", "PLAIN",10] call RE;
//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;
//We create the scenery
_base = createVehicle ["Land_HouseV_1I4",_coords,[], 0, "CAN_COLLIDE"];
_base setDir 152.66766;
_base setPos _coords;
_base1 = createVehicle ["Land_kulna",[(_coords select 0) + 5.4585, (_coords select 1) - 2.885,0],[], 0, "CAN_COLLIDE"];
_base1 setDir -28.282881;
_base1 setPos [(_coords select 0) + 5.4585, (_coords select 1) - 2.885,0];
//DZMSProtectObj prevents it from disappearing
[_base] call DZMSProtectObj;
[_base1] call DZMSProtectObj;
//We create the vehicles
_veh1 = ["small"] call DZMSGetVeh;
_vehicle = createVehicle [_veh1,[(_coords select 0) - 10.6206, (_coords select 1) - 0.49,0],[], 0, "CAN_COLLIDE"];
//DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such
[_vehicle] call DZMSSetupVehicle;
//We create and fill the crate
_crate = createVehicle ["USBasicAmmunitionBox",[(_coords select 0) + 0.7408, (_coords select 1) + 1.565, 0.10033049],[], 0, "CAN_COLLIDE"];
[_crate,"weapons"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
_crate1 = createVehicle ["USBasicAmmunitionBox",[(_coords select 0) - 0.2387, (_coords select 1) + 1.043, 0.10033049],[], 0, "CAN_COLLIDE"];
[_crate1,"weapons"] ExecVM DZMSBoxSetup;
[_crate1] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 4.0796, (_coords select 1) - 11.709,0],6,2,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 3;
[[(_coords select 0) + 2.8872, (_coords select 1) + 18.964,0],6,2,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 3;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_vehicle] ExecVM DZMSSaveVeh;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Stash House is under Survivor Control!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Minor SM3 Stash House Mission has Ended."];
deleteMarker "DZMSMinMarker";
deleteMarker "DZMSMinDot";
//Let the timer know the mission is over
DZMSMinDone = true;

View File

@ -0,0 +1,48 @@
/*
Bandit Heli Down! by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_crash","_crate"];
//Name of the Mission
_missName = "Helicopter Crash";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"A Helicopter has Crashed!\nGo Check for Survivors!", "PLAIN",10] call RE;
//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;
//Add the scenery
_crash = createVehicle ["UH60Wreck_DZ", _coords,[], 0, "CAN_COLLIDE"];
//DZMSProtectObj prevents it from disappearing
[_crash] call DZMSProtectObj;
//We create and fill the crates
_crate = createVehicle ["USLaunchersBox",[(_coords select 0) - 6, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate,"weapons"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
[_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
[_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Helicopter Crash has been Secured by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Minor SM4 Crash Site Mission has Ended."];
deleteMarker "DZMSMinMarker";
deleteMarker "DZMSMinDot";
//Let the timer know the mission is over
DZMSMinDone = true;

View File

@ -0,0 +1,46 @@
/*
Hummer Wreck by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_crash","_crate"];
//Name of the Mission
_missName = "Humvee Crash";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"A Humvee has crashed!\nGo Investigate the Cause of the Wreck!", "PLAIN",10] call RE;
//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;
//Add the scenery
_crash = createVehicle ["HMMWVwreck",_coords,[], 0, "CAN_COLLIDE"];
//DZMSProtectObj prevents it from disappearing
[_crash] call DZMSProtectObj;
//Add and fill the crate
_crate = createVehicle ["RULaunchersBox",[(_coords select 0) - 14, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate,"weapons"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
[_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Humvee has been Secured by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Minor SM5 Humvee Crash Mission has Ended."];
deleteMarker "DZMSMinMarker";
deleteMarker "DZMSMinDot";
//Let the timer know the mission is over
DZMSMinDone = true;

View File

@ -0,0 +1,58 @@
/*
Weapon Truck Crash by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
*/
private ["_missName","_coords","_crash","_crate","_crate1","_crate2"];
//Name of the Mission
_missName = "Weapons Truck";
//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;
[nil,nil,rTitleText,"A Weapons Truck has Crashed!\nGo Recover the Supplies!", "PLAIN",10] call RE;
//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;
//Add scenery
_crash = createVehicle ["UralWreck",_coords,[], 0, "CAN_COLLIDE"];
//DZMSProtectObj prevents it from disappearing
[_crash] call DZMSProtectObj;
//Add and fill the boxes
_crate = createVehicle ["USLaunchersBox",[(_coords select 0) + 3, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate,"weapons"] ExecVM DZMSBoxSetup;
[_crate] call DZMSProtectObj;
_crate1 = createVehicle ["USLaunchersBox",[(_coords select 0) - 3, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate1,"weapons"] ExecVM DZMSBoxSetup;
[_crate1] call DZMSProtectObj;
_crate2 = createVehicle ["RULaunchersBox",[(_coords select 0) - 6, _coords select 1,0],[], 0, "CAN_COLLIDE"];
[_crate2,"weapons"] ExecVM DZMSBoxSetup;
[_crate2] call DZMSProtectObj;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
[_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
[_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
[_coords,3,0,"DZMSUnitsMinor"] call DZMSAISpawn;
sleep 1;
//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp;
//Let everyone know the mission is over
[nil,nil,rTitleText,"The Weapons Truck has been Secured by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Minor SM6 Weapons Truck Mission has Ended."];
deleteMarker "DZMSMinMarker";
deleteMarker "DZMSMinDot";
//Let the timer know the mission is over
DZMSMinDone = true;

View File

@ -0,0 +1,71 @@
/*
Bandit Hunting Party by lazyink (Full credit to TheSzerdi & TAW_Tonic for the code)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Patrol Squad";
local _localName = "STR_CL_DZMS_PS_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_PS_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_PS_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[_coords,4,1,_aiType,_mission] call DZMSAISpawn;
[_coords,4,1,_aiType,_mission] call DZMSAISpawn;
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_PS_WIN",
"STR_CL_DZMS_PS_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,93 @@
/*
Bandit Stash House by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Stash House";
local _localName = "STR_CL_DZMS_STASH_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_STASH_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_STASH_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//We create the scenery
local _objects = [[
["MAP_HouseV_1I4",[0,0],152.66766],
["Land_kulna",[5.4585,-2.885],-28.282881]
],_coords,_mission] call DZMSSpawnObjects;
//We create the vehicle
[_mission,_coords,DZMSSmallVic,[-10.6206,-0.49]] call DZMSSpawnVeh;
//We create and fill the crate
[_mission,((_objects select 0) modelToWorld [2.19922,-0.253906,-2.78906]),"DZ_AmmoBoxSmallUS","weapons",[0,0],240] call DZMSSpawnCrate;
[_mission,((_objects select 0) modelToWorld [2.22461,-1.58496,-2.7829]),"DZ_AmmoBoxSmallUS","weapons",[0,0],240] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) - 4.0796, (_coords select 1) - 11.709,0],6,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 2.8872, (_coords select 1) + 18.964,0],6,2,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) - 7.9,(_coords select 1) + 13.78, 0],
[(_coords select 0) + 9.34,(_coords select 1) - 14.17, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_STASH_WIN",
"STR_CL_DZMS_STASH_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,97 @@
/*
Medical Ural Attack by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
Updated to New Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Ural Ambush";
local _localName = "STR_CL_DZMS_URAL_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_URAL_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_URAL_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
// Spawn Mission Objects
[[
["UralWreck",[0,0],149.64919],
["Body",[-2.2905,-3.3438],61.798588],
["Body",[-2.8511,-2.4346],52.402905],
["Body",[-3.435,-1.4297],-117.27345],
["Body2",[-4.0337,0.5],23.664057]
],_coords,_mission] call DZMSSpawnObjects;
//We create the vehicles like normal
[_mission,_coords,DZMSSmallVic,[5.7534,-9.2149]] call DZMSSpawnVeh;
// Spawn crates
[_mission,_coords,"DZ_AmmoBoxMedium1US","supply",[2.6778,-3.0889],-28.85478] call DZMSSpawnCrate;
[_mission,_coords,"DZ_MedBox","medical",[1.4805,-3.7432],62.744293] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium2US","weapons",[2.5405,-4.1612],-27.93351] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, AI type, mission number]
[[(_coords select 0) - 6.9458,(_coords select 1) - 3.5352, 0],6,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 4.4614,(_coords select 1) + 2.5898, 0],6,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 4.4614,(_coords select 1) + 2.5898, 0],4,1,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 11.64,(_coords select 1) + 11.5, 0],
[(_coords select 0) - 9.37,(_coords select 1) - 14.58, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_URAL_WIN",
"STR_CL_DZMS_URAL_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,92 @@
/*
Weapons Cache Mission by lazyink (Original Full Code by TheSzerdi & TAW_Tonic)
New Mission Format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Weapons Cache";
local _localName = "STR_CL_DZMS_WCACHE_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_WCACHE_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_WCACHE_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//Lets add the scenery
[[
["Land_CamoNetB_NATO",[-0.0649,0.6025]]
],_coords,_mission] call DZMSSpawnObjects;
//We create the vehicles like normal
[_mission,_coords,DZMSSmallVic,[10.0303,-12.2979]] call DZMSSpawnVeh;
[_mission,_coords,DZMSLargeVic,[-6.2764,-14.086]] call DZMSSpawnVeh;
[_mission,_coords,"DZ_AmmoBoxBigUS","weapons2",[0,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,0,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,1,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,2,_aiType,_mission] call DZMSAISpawn;
[[(_coords select 0) + 0.0352,(_coords select 1) - 6.8799, 0],4,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 25,(_coords select 1) - 25, 0],
[(_coords select 0) - 25,(_coords select 1) + 25, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_WCACHE_WIN",
"STR_CL_DZMS_WCACHE_FAIL"
] spawn DZMSWaitMissionComp;

View File

@ -0,0 +1,92 @@
/*
Weapon Truck Crash by lazyink (Full credit for code to TheSzerdi & TAW_Tonic)
Updated to new format by Vampire
Updated for DZMS 2.0 by JasonTM
*/
local _mission = count DZMSMissionData -1;
local _aiType = _this select 0;
local _coords = call DZMSFindPos;
local _name = "Weapons Truck";
local _localName = "STR_CL_DZMS_WT_TITLE";
local _hero = _aiType == "Hero";
local _markerColor = ["ColorRed","ColorBlue"] select _hero;
local _localized = ["STR_CL_MISSION_BANDIT","STR_CL_MISSION_HERO"] select _hero;
local _startTime = diag_tickTime;
diag_log format["[DZMS]: %1 %2 starting at %2.",_aiType,_name,_coords];
////////////////////// Do not edit this section ///////////////////////////
//[position,createMarker,setMarkerColor,setMarkerType,setMarkerShape,setMarkerBrush,setMarkerSize,setMarkerText,setMarkerAlpha]
local _markers = [1,1,1,1];
_markers set [0, [_coords,"DZMS" + str _mission,_markerColor,"","ELLIPSE","Grid",[200,200],[],0]];
_markers set [1, [_coords,"DZMSDot" + str _mission,"ColorBlack","Vehicle","","",[],[_localized,_localName],0]];
if (DZMSAutoClaim) then {_markers set [2, [_coords,"DZMSAuto" + str _mission,"ColorRed","","ELLIPSE","Border",[DZMSAutoClaimAlertDistance,DZMSAutoClaimAlertDistance],[],0]];};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers]; // Markers added to global array for JIP player requests.
local _markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
[_aiType,_localName,"STR_CL_DZMS_WT_START"] call DZMSMessage;
DZMSMarkerReady = true;
// Add the mission's position to the global array so that other missions do not spawn near it.
DZE_MissionPositions set [count DZE_MissionPositions, _coords];
local _posIndex = count DZE_MissionPositions - 1;
// Wait until a player is within range or timeout is reached.
local _playerNear = false;
local _timeout = false;
while {!_playerNear && !_timeout} do {
_playerNear = [_coords,DZMSTimeoutDistance] call DZMSNearPlayer;
if (diag_tickTime - _startTime >= (DZMSMissionTimeOut * 60)) then {
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith {
[_mission, _aiType, _markerIndex, _posIndex] call DZMSAbortMission;
[_aiType,_localName,"STR_CL_DZMS_WT_FAIL"] call DZMSMessage;
diag_log format["DZMS: %1 %2 aborted.",_aiType,_name,_coords];
};
//////////////////////////////// End //////////////////////////////////////
//Add scenery
[[
["UralWreck",[0,0]]
],_coords,_mission] call DZMSSpawnObjects;
// Spawn crates
[_mission,_coords,"DZ_AmmoBoxLong2RU","weapons",[3,0]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxLongGUE","weapons",[-3,0]] call DZMSSpawnCrate;
[_mission,_coords,"DZ_AmmoBoxMedium2US","weapons",[-6,0]] call DZMSSpawnCrate;
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, Hero or Bandit, Mission Number]
[_coords,3,0,_aiType,_mission] call DZMSAISpawn;
[_coords,3,1,_aiType,_mission] call DZMSAISpawn;
[_coords,3,2,_aiType,_mission] call DZMSAISpawn;
[_coords,3,3,_aiType,_mission] call DZMSAISpawn;
// Spawn Static M2 Gunner positions if enabled.
if (DZMSM2Static) then {
[[
[(_coords select 0) + 3.1,(_coords select 1) - 21.9, 0],
[(_coords select 0) - 0.27,(_coords select 1) + 17.7, 0]
],0,_aiType,_mission] call DZMSM2Spawn;
};
// Start the mission loop.
[
_mission,
_coords,
_aiType,
_name,
_localName,
_markerIndex,
_posIndex,
"STR_CL_DZMS_WT_WIN",
"STR_CL_DZMS_WT_FAIL"
] spawn DZMSWaitMissionComp;