Jump to content

[Release] Mission- Kill Benlate


Recommended Posts

Hey,guys.                            Closed sorry

So, I wrote this mission based on the the example mission from WAI

This is fairly easy to install, but you need to have WAI installed in server.pbo.

 

Mission Plot:

It's Benlate, OMG, guys, we gotta take him down.

-Two optional ending of the mission: 

1.This is not the real Benlate, we just killed a group of Middle East bandits.

2.Yes! We did it, Benlate is now died.

 

Screenshots:

- Screenshots of Benlate mission and real benlatemission:

https://www.dropbox.com/sh/zt19qpgi8hm4byf/AAA7NohKmvzq51WgxQiUyMRQa?dl=0

 

Requirement:

-PBO to pack mission file

-WAI

 

Installation:

---Download and install WAI to your server.pbo

Link :  

---Create file named benlate.sqf and real_benlate.sqf dayz_server\WAI\missions\hero

In benlate.sqf, copy and paste:

 




Closed sorry
 

In real_benlate.sqf, Copy and paste

Closed sorry
 

 

---Edit the config.sqf :

find 

// Missions
		wai_hero_missions			= [ 								// ["mission filename",% chance of picking this mission],Make sure the chances add up to 100,or it will not be accurate percentages
						["black_hawk_crash",12],
						["armed_vehicle",10],
						["bandit_base",10],
						["captured_mv22",10],
						["ikea_convoy",12],
						["destroyed_ural",12],
						["disabled_milchopper",12],
						["mayors_mansion",10],
						["weapon_cache",12]
						
									];

the missions you have may be different from me, and the number after the mission name is the chance of the mission will happen

Example:  ["mission_name",chance in %]

---Add in benlate and real_benlate

so it would look like this 

// Missions
		wai_hero_missions			= [ 								// ["mission filename",% chance of picking this mission],Make sure the chances add up to 100,or it will not be accurate percentages
						["black_hawk_crash",10],
						["armed_vehicle",10],
						["bandit_base",10],
						["captured_mv22",10],
						["ikea_convoy",10],
						["destroyed_ural",10],
						["disabled_milchopper",10],
						["mayors_mansion",10],
						["weapon_cache",12],
                                                ["benlate",4],
                                                ["real_benlate",4] 

						
									];

Make sure the number add up to 100.

 

Now you are done!

Repack your server.pbo to try out the missions :D

 

Let me know if there is any problem with the mission.

Link to comment
Share on other sites

Cool missions bud, checked them out and they were pretty cool. I redid the messages as the English wasn't great. Feel free to use them if you like:

 

"Rumour has it that Benlate is back on the scene. Heros, lock and load."

"Turns out it wasn't Benlate; just a group of Middle East bandits."    /    "Thank God, Benlate has been executed."

"Looks like Benlate escaped once again... sigh."

 

Edit: just found a little bug, in your real_benlate.sqf you have:

b_missionrunning = false;

Which should be:

h_missionrunning = false;

as they're hero missions. It stopped the map markers from showing for me.

Link to comment
Share on other sites

Cool missions bud, checked them out and they were pretty cool. I redid the messages as the English wasn't great. Feel free to use them if you like:

 

"Rumour has it that Benlate is back on the scene. Heros, lock and load."

"Turns out it wasn't Benlate; just a group of Middle East bandits."    /    "Thank God, Benlate has been executed."

"Looks like Benlate escaped once again... sigh."

 

Edit: just found a little bug, in your real_benlate.sqf you have:

b_missionrunning = false;

Which should be:

h_missionrunning = false;

as they're hero missions. It stopped the map markers from showing for me.

Thanks for correctting me, haha yeah, English isn't my first language :P

And I will make the correction and upload a new file :D

Link to comment
Share on other sites

Same here.

 

 

does this work for the WAI 2.2.0? I added it but have yet to see the mission appear

I am not sure actually, it works well on the newest version.

 

try to set the chance of other missions to zero, and set 50 50 for two benlate mission, and reduce the mission spawn time, so you can see if they spawn in

Link to comment
Share on other sites

The benlate/realbenlate mission does not want to be "secured" after killing everybody. This is what it spams in my RPT log :
 

if (_complet>
21:24:18   Error Undefined variable in expression: _objectivetarget
21:24:18 File z\addons\dayz_server\WAI\compile\mission_winorfail.sqf, line 82
21:24:20 Error in expression <ith {_complete = false;};
} count units _objectivetarget;
};
};
};
Link to comment
Share on other sites

 

The benlate/realbenlate mission does not want to be "secured" after killing everybody. This is what it spams in my RPT log :

 

if (_complet>
21:24:18   Error Undefined variable in expression: _objectivetarget
21:24:18 File z\addons\dayz_server\WAI\compile\mission_winorfail.sqf, line 82
21:24:20 Error in expression <ith {_complete = false;};
} count units _objectivetarget;
};
};
};

can you write down what is on line 82 of mission_winorfail.sqg?

Link to comment
Share on other sites

 

Sure, here it is : 

 

 if (_type == "assassinate") exitWith {
_objectivetarget = (_this select 1) select 1;
{
_complete = true;
if (alive _x) exitWith {_complete = false;};
} count units _objectivetarget;                  // This is the line 82 for me here
};
};
};

do the fake benlate mission work well?

for the real benlate one, do benlate spawn? or the mission doesnt end after you kill him?

 

is there an extra "};" in mission_winorfail.sqg? not quite sure what is causing this

Link to comment
Share on other sites

I do not remember much if the fake_benlate mission did work or not. The last time I did the mission it was real_benlate, he appeared but does not complete the mission after killing him and his wife. I am not quite sure of if there is an extra }; in the mission_winorfail.sqf but I will post it here. :

if(isServer) then {

 
private ["_max_ai","_timeout_time","_currenttime","_starttime","_msglose","_msgwin","_msgstart","_objectives","_crate","_marker","_in_range","_objectivetarget","_position","_type","_complete","_timeout","_mission","_killpercent","_delete_mines","_cleanunits","_clearmission","_baseclean"];
 
_mission = (_this select 0) select 0;
_crate = (_this select 0) select 1;
_type = (_this select 1) select 0;
_baseclean = _this select 2;
_msgstart = _this select 3;
_msgwin = _this select 4;
_msglose = _this select 5;
 
_position = position _crate;
_timeout = false;
_complete = false;
_starttime = time;
_timeout_time = ((wai_mission_timeout select 0) + random((wai_mission_timeout select 1) - (wai_mission_timeout select 0)));
_max_ai = (wai_mission_data select _mission) select 0;
_killpercent = _max_ai - (_max_ai * (wai_kill_percent / 100));
 
[nil,nil,rTitleText,_msgstart,"PLAIN",10] call RE;
 
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
 
_crate setVariable ["ObjectID","1",true];
_crate setVariable ["permaLoot",true];
_crate allowDamage false;
 
while {!_timeout && !_complete} do {
 
sleep 1;
_currenttime = time;
{
if((isPlayer _x) && (_x distance _position <= wai_timeout_distance)) then {
_starttime = time;
};
 
} count playableUnits;
 
if (_currenttime - _starttime >= _timeout_time) then {
_timeout = true;
};
 
call {
 
if (_type == "crate") exitWith {
 
if(wai_kill_percent == 0) then {
 
{
if((isPlayer _x) && (_x distance _position <= 20)) then {
_complete = true
};
} count playableUnits;
 
} else {
 
if(((wai_mission_data select _mission) select 0) <= _killpercent) then {
{
if((isPlayer _x) && (_x distance _position <= 20)) then {
_complete = true
};
} count playableUnits;
};
 
};
 
};
 
if (_type == "kill") exitWith {
if(((wai_mission_data select _mission) select 0) == 0) then {
_complete = true
};
};
 
if (_type == "assassinate") exitWith {
_objectivetarget = (_this select 1) select 1;
{
_complete = true;
if (alive _x) exitWith {_complete = false;};
} count units _objectivetarget;
};
};
};
 
if (_complete) then {
 
// if (typeOf(_crate) in (crates_large + crates_medium + crates_small)) then {
if(wai_crates_smoke && sunOrMoon == 1) then {
_marker = "smokeShellPurple" createVehicle getPosATL _crate;
_marker setPosATL (getPosATL _crate);
_marker attachTo [_crate,[0,0,0]];
};
 
if (wai_crates_flares && sunOrMoon != 1) then {
_marker = "RoadFlare" createVehicle getPosATL _crate;
_marker setPosATL (getPosATL _crate);
_marker attachTo [_crate, [0,0,0]];
 
_in_range = _crate nearEntities ["CAManBase",1250];
 
{
if(isPlayer _x && _x != player) then {
PVDZE_send = [_x,"RoadFlare",[_marker,0]];
publicVariableServer "PVDZE_send";
};
} count _in_range;
 
};
 
// };
_delete_mines = ((wai_mission_data select _mission) select 2);
 
if(count _delete_mines > 0) then {
 
{
if(typeName _x == "ARRAY") then {
 
{
deleteVehicle _x;
} count _x;
 
} else {
 
deleteVehicle _x;
 
};
 
} count _delete_mines;
 
};
 
wai_mission_data set [_mission, -1];
 
[nil,nil,rTitleText,_msgwin,"PLAIN",10] call RE;
 
if (wai_clean_mission) then {
 
[_position,_baseclean] spawn {
private ["_pos","_clean","_finish_time","_cleaned","_playernear","_currenttime"];
_pos = _this select 0;
_clean = _this select 1;
_finish_time = time;
_cleaned = false;
while {!_cleaned} do {
 
_playernear = false;
 
{
if ((isPlayer _x) && (_x distance _pos < 400)) exitWith { _playernear = true };
} count playableUnits;
 
_currenttime = time;
 
if ((_currenttime - _finish_time >= wai_clean_mission_time) && !_playernear) then {
 
{
if(typeName _x == "ARRAY") then {
 
{
if ((_x getVariable ["ObjectID", nil]) == nil) then {
deleteVehicle _x;
};
} count _x;
 
} else {
if ((_x getVariable ["ObjectID", nil]) == nil) then {
deleteVehicle _x;
};
};
 
} forEach _clean;
 
_cleaned = true;
 
};
 
sleep 1;
};
};
};
};
 
if (_timeout) then {
 
{
 
if (_x getVariable ["mission", nil] == _mission) then {
 
if (alive _x) then {
 
_cleanunits = _x getVariable ["missionclean",nil];
 
if (!isNil "_cleanunits") then {
 
call {
if(_cleanunits == "ground") exitWith { ai_ground_units = (ai_ground_units -1); };
if(_cleanunits == "air") exitWith { ai_air_units = (ai_air_units -1); };
if(_cleanunits == "vehicle") exitWith { ai_vehicle_units = (ai_vehicle_units -1); };
if(_cleanunits == "static") exitWith { ai_emplacement_units = (ai_emplacement_units -1); };
};
};
};
 
deleteVehicle _x;
};
 
} count allUnits + vehicles + allDead;
 
{
if(typeName _x == "ARRAY") then {
 
{
deleteVehicle _x;
} count _x;
 
} else {
 
deleteVehicle _x;
};
 
} forEach _baseclean + ((wai_mission_data select _mission) select 2) + [_crate];
 
wai_mission_data set [_mission, -1];
 
[nil,nil,rTitleText,_msglose,"PLAIN",10] call RE;
};
 
_complete
 
};
 

Link to comment
Share on other sites

I do not remember much if the fake_benlate mission did work or not. The last time I did the mission it was real_benlate, he appeared but does not complete the mission after killing him and his wife. I am not quite sure of if there is an extra }; in the mission_winorfail.sqf but I will post it here. :

if(isServer) then {

 
private ["_max_ai","_timeout_time","_currenttime","_starttime","_msglose","_msgwin","_msgstart","_objectives","_crate","_marker","_in_range","_objectivetarget","_position","_type","_complete","_timeout","_mission","_killpercent","_delete_mines","_cleanunits","_clearmission","_baseclean"];
 
_mission = (_this select 0) select 0;
_crate = (_this select 0) select 1;
_type = (_this select 1) select 0;
_baseclean = _this select 2;
_msgstart = _this select 3;
_msgwin = _this select 4;
_msglose = _this select 5;
 
_position = position _crate;
_timeout = false;
_complete = false;
_starttime = time;
_timeout_time = ((wai_mission_timeout select 0) + random((wai_mission_timeout select 1) - (wai_mission_timeout select 0)));
_max_ai = (wai_mission_data select _mission) select 0;
_killpercent = _max_ai - (_max_ai * (wai_kill_percent / 100));
 
[nil,nil,rTitleText,_msgstart,"PLAIN",10] call RE;
 
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
 
_crate setVariable ["ObjectID","1",true];
_crate setVariable ["permaLoot",true];
_crate allowDamage false;
 
while {!_timeout && !_complete} do {
 
sleep 1;
_currenttime = time;
{
if((isPlayer _x) && (_x distance _position <= wai_timeout_distance)) then {
_starttime = time;
};
 
} count playableUnits;
 
if (_currenttime - _starttime >= _timeout_time) then {
_timeout = true;
};
 
call {
 
if (_type == "crate") exitWith {
 
if(wai_kill_percent == 0) then {
 
{
if((isPlayer _x) && (_x distance _position <= 20)) then {
_complete = true
};
} count playableUnits;
 
} else {
 
if(((wai_mission_data select _mission) select 0) <= _killpercent) then {
{
if((isPlayer _x) && (_x distance _position <= 20)) then {
_complete = true
};
} count playableUnits;
};
 
};
 
};
 
if (_type == "kill") exitWith {
if(((wai_mission_data select _mission) select 0) == 0) then {
_complete = true
};
};
 
if (_type == "assassinate") exitWith {
_objectivetarget = (_this select 1) select 1;
{
_complete = true;
if (alive _x) exitWith {_complete = false;};
} count units _objectivetarget;
};
};
};
 
if (_complete) then {
 
// if (typeOf(_crate) in (crates_large + crates_medium + crates_small)) then {
if(wai_crates_smoke && sunOrMoon == 1) then {
_marker = "smokeShellPurple" createVehicle getPosATL _crate;
_marker setPosATL (getPosATL _crate);
_marker attachTo [_crate,[0,0,0]];
};
 
if (wai_crates_flares && sunOrMoon != 1) then {
_marker = "RoadFlare" createVehicle getPosATL _crate;
_marker setPosATL (getPosATL _crate);
_marker attachTo [_crate, [0,0,0]];
 
_in_range = _crate nearEntities ["CAManBase",1250];
 
{
if(isPlayer _x && _x != player) then {
PVDZE_send = [_x,"RoadFlare",[_marker,0]];
publicVariableServer "PVDZE_send";
};
} count _in_range;
 
};
 
// };
_delete_mines = ((wai_mission_data select _mission) select 2);
 
if(count _delete_mines > 0) then {
 
{
if(typeName _x == "ARRAY") then {
 
{
deleteVehicle _x;
} count _x;
 
} else {
 
deleteVehicle _x;
 
};
 
} count _delete_mines;
 
};
 
wai_mission_data set [_mission, -1];
 
[nil,nil,rTitleText,_msgwin,"PLAIN",10] call RE;
 
if (wai_clean_mission) then {
 
[_position,_baseclean] spawn {
private ["_pos","_clean","_finish_time","_cleaned","_playernear","_currenttime"];
_pos = _this select 0;
_clean = _this select 1;
_finish_time = time;
_cleaned = false;
while {!_cleaned} do {
 
_playernear = false;
 
{
if ((isPlayer _x) && (_x distance _pos < 400)) exitWith { _playernear = true };
} count playableUnits;
 
_currenttime = time;
 
if ((_currenttime - _finish_time >= wai_clean_mission_time) && !_playernear) then {
 
{
if(typeName _x == "ARRAY") then {
 
{
if ((_x getVariable ["ObjectID", nil]) == nil) then {
deleteVehicle _x;
};
} count _x;
 
} else {
if ((_x getVariable ["ObjectID", nil]) == nil) then {
deleteVehicle _x;
};
};
 
} forEach _clean;
 
_cleaned = true;
 
};
 
sleep 1;
};
};
};
};
 
if (_timeout) then {
 
{
 
if (_x getVariable ["mission", nil] == _mission) then {
 
if (alive _x) then {
 
_cleanunits = _x getVariable ["missionclean",nil];
 
if (!isNil "_cleanunits") then {
 
call {
if(_cleanunits == "ground") exitWith { ai_ground_units = (ai_ground_units -1); };
if(_cleanunits == "air") exitWith { ai_air_units = (ai_air_units -1); };
if(_cleanunits == "vehicle") exitWith { ai_vehicle_units = (ai_vehicle_units -1); };
if(_cleanunits == "static") exitWith { ai_emplacement_units = (ai_emplacement_units -1); };
};
};
};
 
deleteVehicle _x;
};
 
} count allUnits + vehicles + allDead;
 
{
if(typeName _x == "ARRAY") then {
 
{
deleteVehicle _x;
} count _x;
 
} else {
 
deleteVehicle _x;
};
 
} forEach _baseclean + ((wai_mission_data select _mission) select 2) + [_crate];
 
wai_mission_data set [_mission, -1];
 
[nil,nil,rTitleText,_msglose,"PLAIN",10] call RE;
};
 
_complete
 
};
 

Yeah I found an error in the mission file, I uploaded the new sqf,

it should be working fine now

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...