Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- "Lost In The Maze" static mission for Taunus.
- */
- // For logging purposes
- _num = DMS_MissionCount;
- // Set mission side (only "bandit" is supported for now)
- _side = "bandit";
- _pos = [0,0,0];
- if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
- // Set general mission difficulty
- _difficulty = "hardcore";
- // Define spawn locations for AI Soldiers. These will be used for the initial spawning of AI as well as reinforcements.
- // The center spawn location is added 3 times so at least 3 AI will spawn initially at the center location, and so that future reinforcements are more likely to spawn at the center.
- _AISoldierSpawnLocations =
- [
- [0,0,0],
- [0,0,0],
- [0,0,0],
- [0,0,0],
- [0,0,0],
- [0,0,0],
- ];
- // Create AI
- _AICount = 30 + (round (random 5));
- _group =
- [
- _AISoldierSpawnLocations+[_pos,_pos,_pos], // Pass the regular spawn locations as well as the center pos 3x
- _AICount,
- _difficulty,
- "random",
- _side
- ] call DMS_fnc_SpawnAIGroup_MultiPos;
- _staticGuns =
- [
- [
- [0,0,0],
- [0,0,0],
- [0,0,0],
- [0,0,0],
- [0,0,0],
- [0,0,0],
- ],
- _group,
- "assault",
- _difficulty,
- "bandit",
- "random"
- ] call DMS_fnc_SpawnAIStaticMG;
- // Define the classnames and locations where the crates can spawn (at least 2, since we're spawning 2 crates)
- _crateClasses_and_Positions =
- [
- [[0,0,0],"I_CargoNet_01_ammo_F"],
- [[0,0,0],"I_CargoNet_01_ammo_F"],
- [[0,0,0],"I_CargoNet_01_ammo_F"],
- [[0,0,0],"I_CargoNet_01_ammo_F"],
- [[0,0,0],"I_CargoNet_01_ammo_F"]
- ];
- {
- deleteVehicle (nearestObject _x); // Make sure to remove any previous crates.
- } forEach _crateClasses_and_Positions;
- // Shuffle the list
- _crateClasses_and_Positions = _crateClasses_and_Positions call ExileClient_util_array_shuffle;
- // Create Crates
- _crate0 = [_crateClasses_and_Positions select 0 select 1, _crateClasses_and_Positions select 0 select 0] call DMS_fnc_SpawnCrate;
- _crate1 = [_crateClasses_and_Positions select 1 select 1, _crateClasses_and_Positions select 1 select 0] call DMS_fnc_SpawnCrate;
- // Disable smoke on the crates so that the players have to search for them >:D
- {
- _x setVariable ["DMS_AllowSmoke", false];
- } forEach [_crate0,_crate1];
- /*
- // Don't think an armed AI vehicle fit the idea behind the mission. You're welcome to uncomment this if you want.
- _veh =
- [
- [
- [_pos,100,random 360] call DMS_fnc_SelectOffsetPos,
- _pos
- ],
- _group,
- "assault",
- _difficulty,
- _side
- ] call DMS_fnc_SpawnAIVehicle;
- */
- // Define mission-spawned AI Units
- _missionAIUnits =
- [
- _group // We only spawned the single group for this mission
- ];
- // Define the group reinforcements
- _groupReinforcementsInfo =
- [
- [
- _group, // pass the group
- [
- [
- -1, // Let's limit number of units instead...
- 0
- ],
- [
- 100, // Maximum 100 units can be given as reinforcements.
- 0
- ]
- ],
- [
- 240, // About a 4 minute delay between reinforcements.
- diag_tickTime
- ],
- _AISoldierSpawnLocations,
- "random",
- _difficulty,
- _side,
- "reinforce",
- [
- 10, // Reinforcements will only trigger if there's fewer than 10 members left in the group
- 7 // 7 reinforcement units per wave.
- ]
- ]
- ];
- // Define mission-spawned objects and loot values
- _missionObjs =
- [
- _staticGuns, // static gun(s). Note, we don't add the base itself because it already spawns on server start.
- [],
- [[_crate0,[0,0,0]],[_crate1,[0,0,0]]]
- ];
- // Define Mission Start message
- _msgStart = ['#FFFF00', "Some bandits have set up camp in The Maze"];
- // Define Mission Win message
- _msgWIN = ['#0080ff',"The bandit camp has been wiped out."];
- // Define Mission Lose message
- _msgLOSE = ['#FF0000',"The bandit camp was relocated to an unknown location."];
- // Define mission name (for map marker and logging)
- _missionName = "Lost In The Maze";
- // Create Markers
- _markers =
- [
- _pos,
- _missionName,
- _difficulty
- ] call DMS_fnc_CreateMarker;
- _circle = _markers select 1;
- _circle setMarkerDir 20;
- _circle setMarkerSize [150,50];
- _time = diag_tickTime;
- // Parse and add mission info to missions monitor
- _added =
- [
- _pos,
- [
- [
- "kill",
- _group
- ],
- [
- "playerNear",
- [_pos,100]
- ]
- ],
- _groupReinforcementsInfo,
- [
- _time,
- DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
- ],
- _missionAIUnits,
- _missionObjs,
- [_missionName,_msgWIN,_msgLOSE],
- _markers,
- _side,
- _difficulty,
- []
- ] 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,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
- };
Advertisement
Add Comment
Please, Sign In to add comment