[Release] DayZChernarus Mission System

lazyink

Valued Member!
Staff member
DayZChernarus Mission System

V0.2

Original code by TheSzerdi, Falcyn and TAW_Tonic. Without the base system these guys wrote, this would not have been possible, so I doff my biggest hat to them!

This has only been tested on Chernarus (1.7.7.1)

This is an in-game mission system that creates AI groups and loot crates at random points on the map. There are 4 types of crates available and 12 missions.


Requirements:
  • The installation of this script is of moderate difficulty.
  • This script will take approx 10 minutes to install.
  • Before installing you must first customize the fillboxes SQF's inside the Missions/Misc folder and the NPC's load-outs in the addunitserver SQF's.
  • If you leave the script as is, you MUST update your BE filters with the attached files as it contains weapons that BE will kick for.
Installation

Step 1
Download the mission system files here:
https://github.com/lazyink/DayZ-Missions/archive/master.zip

Step 2
In your server.pbo
Copy the Missions folder to the root of the server PBO.


Step 3
Open server_functions.sqf

Find:
Code:
fn_bases = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fn_bases.sqf";

Insert after:
Code:
fnc_hTime = compile preprocessFile "\z\addons\dayz_server\Missions\misc\fnc_hTime.sqf"; //Random integer selector for mission wait time

Find:
Code:
dayz_recordLogin = {
private["_key"];
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
_key call server_hiveWrite;
};

Insert after:
Code:
//----------InitMissions--------//
  MissionGo = 0;
  MissionGoMinor = 0;
    if (isServer) then {
  SMarray = ["SM1","SM2","SM3","SM4","SM5","SM6"];
    [] execVM "\z\addons\dayz_server\missions\major\SMfinder.sqf"; //Starts major mission system
    SMarray2 = ["SM1","SM2","SM3","SM4","SM5","SM6"];
    [] execVM "\z\addons\dayz_server\missions\minor\SMfinder.sqf"; //Starts minor mission system
    };
    //---------EndInitMissions------//

Step 4
Open server_updateObject.sqf

Find:
Code:
#ifdef OBJECT_DEBUG
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
#endif
    //force fail
    _objectID = "0";
    _uid = "0";
};

Insert after:
Code:
if (_object getVariable "Mission" == 1) exitWith {};

Step 5
Open server_cleanup.fsm

Find:
Code:
if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

Replace with:
Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

Step 6 (skip if you don't have Sarge AI)
In Missions Folder


Find all instances of
Code:
setVariable ["Mission",1,true];

and change to
Code:
setVariable ["Sarge",1,true];


Step 7
In your mission.pbo:

Copy the included debug folder into the root of the mission.pbo.


Step 8 (skip if you have Sarge AI)
The AI require faction settings. If you have SARGE AI you're good to go. Otherwise add faction.sqf to the root of the mission.pbo and add this line to the end of your init.sqf:

Code:
[] execVM "faction.sqf";


INFO

The Crates
Inside the Missions/Misc folder, there are 4 differing fillboxes scripts. They are set up like so:

fillboxes.sqf - Large weapons crate.

fillboxesS.sqf - Small weapons crate.

fillboxesH.sqf - High value weapons crate.

fillboxesM.sqf - Medical crate.


The Missions
The missions are split into two types, major and minor, and run as follows.

Major
Bandit Weapon Cache.
Bandits have discovered a weapons cache!

Medical C130 Crash.
A C-130 carrying medical supplies has crashed and bandits are securing the site!

Bandit Medical Camp.
Bandits have set up a medical re-supply camp!

Bandit Heli Down!
A bandit supply helicopter has crash landed!

Medical Ural Attack.
Bandits have destroyed a Ural carrying medical supplies and secured it's cargo!

Medical Supply Crate.
A medical supply crate has been secured by bandits!


Minor
Bandit Hunting Party.
A bandit hunting party has been spotted! Kill them all and get their supplies!

Medical Outpost.
A group of bandits have taken over a Medical Outpost!

Bandit Stash House.
A group of bandits have set up a stash house!

Bandit Helicopter Crash.
A bandit helicopter has crashed!

Bandit Hummer Crash.
A bandit Humvee has crashed!

Bandit Weapons Truck.
A bandit weapons truck has crashed!


Enjoy!
https://github.com/lazyink/DayZ-Missions
 
Back
Top