Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- "Underwater Stash" mission for Tanoa
- Created by eraser1
- */
- // For logging purposes
- _num = DMS_MissionCount;
- // Set mission side (only "bandit" is supported for now)
- _side = "bandit";
- _pos = [18761,14808.7,173.052];
- // This mission should spawn on server start. Otherwise, if somebody is dumb enough to wait for it to spawn, then they're gonna get killed lol.
- //if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
- DMS_CrateCase_DiverGear =
- [
- [
- "arifle_SDAR_F",
- "arifle_SDAR_F",
- "arifle_SDAR_F",
- "arifle_SDAR_F",
- "arifle_SDAR_F"
- ],
- [
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "20Rnd_556x45_UW_mag",
- "U_O_Wetsuit",
- "U_O_Wetsuit",
- "U_O_Wetsuit",
- "U_O_Wetsuit",
- "U_O_Wetsuit",
- "V_RebreatherIA",
- "V_RebreatherIA",
- "V_RebreatherIA",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "Exile_Headgear_GasMask",
- "V_RebreatherIA"
- ],
- [
- "B_Carryall_oli",
- "B_Bergen_tna_F",
- "B_ViperHarness_oli_F"
- ]
- ];
- // I only made some of the variables in this file "private" because I couldn't bother making all of them private :p
- private _crate = ["Box_IND_AmmoVeh_F",[18761,14808.7,173.052]] call DMS_fnc_SpawnCrate;
- _crate setVariable ["DMS_AllowSmoke", false];
- [_crate, "DiverGear"] call DMS_fnc_FillCrate;
- private _sub1 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
- _sub1 setPosASL [18747.7,14711.8,168.145];
- _sub1 setVariable ["DMS_AllowSmoke", false];
- private _sub2 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
- _sub2 setPosASL [18740.8,14713.7,166.459];
- _sub2 setVariable ["DMS_AllowSmoke", false];
- private _diverGearSet =
- [
- "CUP_sgun_AA12",
- [],
- [["CUP_20Rnd_B_AA12_Pellets",6]],
- "",
- [],
- ["Rangefinder","ItemGPS","NVGoggles"],
- "",
- "",
- "U_C_Scientist",
- "CUP_V_PMC_CIRAS_Winter_Veh",
- "B_Messenger_IDAP_F"
- ];
- private _temp = DMS_ai_use_launchers;
- DMS_ai_use_launchers = false;
- private _diverGroup =
- [
- [
- [18822.3,14803.7,203.461],
- [18792,14799.2,203.403],
- [18755.2,14829.7,181.272],
- [18760.6,14806.4,174.083],
- [18777.3,14779.7,199.123],
- [18718.1,14772.4,183.908],
- [18759.3,14847.7,201.132],
- [18759.9,14800.4,174.097],
- [18772.5,14742.3,186.772],
- [18810.5,14789.9,190.515],
- [18830,14761.9,206.789],
- [18711,14800.1,172.881],
- [18775.8,14818.6,187.436],
- [18723.7,14825.6,179.245],
- [18757.3,14806.7,173.193],
- [18808.7,14780.5,228.534],
- [18749,14803.2,170.107]
- ],
- 17,
- "hardcore",
- "custom",
- _side,
- _diverGearSet
- ] call DMS_fnc_SpawnAIGroup_MultiPos;
- DMS_ai_use_launchers = _temp;
- {
- _x disableAI "PATH";
- } forEach (units _diverGroup);
- private _landGroup =
- [
- [18761,14808.7,173.052],
- 5,
- "hardcore",
- "sniper",
- "bandit"
- ] call DMS_fnc_SpawnAIGroup;
- // Define mission-spawned AI Units
- _missionAIUnits =
- [
- _diverGroup, // We only spawned the single group for this mission
- _landGroup
- ];
- // Define the group reinforcements
- //_groupReinforcementsInfo =
- //[
- // // Removed reinforcements for this because while I was testing the mission the AI took too long to get back to the objective, and that's annoying
- // /*
- // [
- // _diverGroup, // pass the group
- // [
- // [
- // -1, // Let's limit number of units instead...
- // 0
- // ],
- // [
- // 10, // Maximum 10 units can be given as reinforcements.
- // 0
- // ]
- // ],
- // [
- // 180, // About a 3 minute delay between reinforcements.
- // diag_tickTime
- // ],
- // [
- // [5810,2874,1],
- // [5933,2912,2],
- // [5862,3132,0.5]
- // ],
- // "custom",
- // "hardcore",
- // _side,
- // "reinforce",
- // [
- // 5, // Reinforcements will only trigger if there's fewer than 5 members left in the group
- // 3 // 3 reinforcement units per wave.
- // ],
- // _diverGearSet
- // ]
- // */
- //];
- // Define mission-spawned objects and loot values
- _missionObjs =
- [
- [],
- [_sub1, _sub2],
- [
- [
- _sub1,
- [
- 1,
- [2,DMS_Box_BaseParts_Concrete],
- 1
- ]
- ],
- [
- _sub2,
- [
- [2,DMS_sniper_weps], // Spawn a random 5 weapons that AI snipers can spawn with.
- [5,DMS_BoxSurvivalSupplies],
- 1
- ]
- ]
- ]
- ];
- // Define Mission Start message
- _msgStart = ['#FFFF00', "We have found KillBill's Secret Stash! Lets kill the guards and take it!"];
- // Define Mission Win message
- _msgWIN = ['#0080ff',"Convicts have successfully eliminated the CSAT and obtained the KillBill's Secret Stash!"];
- // Define Mission Lose message
- _msgLOSE = ['#FF0000',"KillBill's Secret Stash has been lost..."];
- // Define mission name (for map marker and logging)
- _missionName = "KillBill's Secret Stash";
- // Create Markers
- _markers =
- [
- _pos,
- _missionName,
- "hardcore"
- ] call DMS_fnc_CreateMarker;
- // Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
- _time = diag_tickTime;
- // Parse and add mission info to missions monitor
- _added =
- [
- _pos,
- [
- [
- "kill",
- _diverGroup // Only need to kill the diver group.
- ],
- [
- "playerNear",
- [_sub1,40]
- ]
- ],
- _groupReinforcementsInfo,
- [
- _time,
- DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
- ],
- _missionAIUnits,
- _missionObjs,
- [_missionName,_msgWIN,_msgLOSE],
- _markers,
- _side,
- "hardcore",
- [],
- [
- [
- [
- _sub1,
- {_this setVariable ["ExileMoney",25000,true]} // The submarine will have 25,000 poptabs after the mission completes. The capacity is actually 5000, but I just overload it.
- ]
- ],
- [],
- {},
- {}
- ]
- ] call DMS_fnc_AddMissionToMonitor_Static;
- // Check to see if it was added correctly, otherwise delete the stuff
- if !(_added) exitWith
- {
- diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
- _cleanup = [];
- {
- _cleanup pushBack _x;
- } forEach _missionAIUnits;
- _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
- {
- _cleanup pushBack (_x select 0);
- } foreach (_missionObjs select 2);
- _cleanup call DMS_fnc_CleanUp;
- // Delete the markers directly
- {deleteMarker _x;} forEach _markers;
- // Reset the mission count
- DMS_MissionCount = DMS_MissionCount - 1;
- };
- // Notify players
- [_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
- if (DMS_DEBUG) then
- {
- (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,26,"hardcore",_time]) call DMS_fnc_DebugLog;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement