Jump to content

[Release] Heli Guard on DDOS


Recommended Posts

If this is not of your interest. Sorry. I believe you can ignore. Thankyou.

 

DDOS HELI GUARD

 

WHAT THIS DO

Park your heli if all the crew is sudenly disconected.

 

WHERE THE HELI IS PARKED?

If the heli is above a open camp, it will be parked on this camp.

 

AND IF THE HELI IS ABOVE A CITY OR FOREST?

So the heli will be parked on the nearest open area.

 

IF JUST THE PILOT LOST CONNECTION THE HELI WILL BE PARKED?

No. 

 

INSTALATION

1 - Download the script on this link: https://www.dropbox.com/s/8tseh7u8ct6gy49/andre_ddos_heli_guard.sqf?dl=0

2 - Put the script on the root of your mission folder.

3 - Open the file init.sqf.

4 - Put this line at the end of your init.sqf: execVM "andre_ddos_heli_guard.sqf";

 

BE FILTERS

On publicvariable.txt add this at the end of the line that begins with 5 "" (usually first or second line):

!="donn_heli_monitor"

 

MAKE A TEST
1 - Fly on a Heli as a pilot.
2 - Press Alt + F4 to close the Arma 2 OA client.
3 - Re-join the server.
4 - Look for your Heli.
It will be parked.
Link to comment
Share on other sites

  • 3 weeks later...

An issue that I'm coming across is that it kicks players for public variable #0. Anyway to fix, or add an exception to battleye?

 

Did you do this?

BE FILTERS

On publicvariable.txt add this at the end of the line that begins with 5 "" (usually first or second line):

!="donn_heli_monitor"

Link to comment
Share on other sites

  • 1 month later...

Anti-Relog for safe you vehicle, if vehicle hight damaget:

 

after: 

waitUntil {uiSleep 1.5;_crewOk = _crew;_crew = crew _veh;count _crew == 0};

add this:

			_abort=false;
			if((fuel _veh)<0.01)then{_abort=true;};
			{
				if (([_veh,_x] call object_getHit)>0.7)then{
					if(["Engine",_x,false] call fnc_inString)exitWith{_abort=true;};
					if(["VRotor",_x,false] call fnc_inString)exitWith{_abort= true;};
					if(["HRotor",_x,false] call fnc_inString)exitWith{_abort=true;};
					if(["HitHull",_x,false] call fnc_inString)exitWith{_abort=true;};
				};
			}forEach(_veh call vehicle_getHitpoints);
			if(_abort)exitWith{
				_veh setVariable ["donn_protect",false,true];
				diag_log(format["DDOS_HELI_GUARD: Vehicle: %1. BAD STATE, DESTROYED.",_veh]);
			};

Auto lock and save vehicle

 

To auto-lock vehicle:

before: 

_vPosNew = [_vPosNew select 0,_vPosNew select 1,0.5];

add this:

if((parseNumber(_veh getVariable ["CharacterID","0"]))!=0)then{[_veh,true] call vehicle_lockUnlock;};

To auto-save vehicle:

after:

_veh setFuel _fuel;

add this:

PVDZE_veh_Update = [_veh, "all"];
publicVariableServer "PVDZE_veh_Update";
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 4 months later...

Where would you put  !="donn_heli_monitor"

//new
5 "" !"PVDZE_" !"norrn" !"usec" !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="norrinRAlie" !="BIS_effects_gepv" !="dayzPlayerLogin" !="dayzPlayerLogin2" !"PVAHR_" !="PVAH_AdminReq" !="PVAH_WriteLogReq" !="currentInvites" !="PVDZE_queryGarageVehicle" !="PVDZE_storeVehicle" !="PVDZE_spawnVehicle" !="currentInvites" !"cad_pvar_s" !="axeLampObjects" !="dayzHeliEvac" !="HCrequest_spawnRCV" !="HCsignalRCV" !="HCsignal" !="HClist" !="HCdo_spawn" !="HCrequest_spawn" !="clothesTaken" !="owner_B1" !="owner_B2" !="owner_B3" !="owner_H1" !="owner_H2" !="owner_H3" !="owner_SG" !="owner_LG" !="owner_KING" !="owner_SH" !="OriginsLockUnlock" !="Detain" !="PVDZ_ply_Arrst"
5 "norrn" !="norrnRACarUp" !="norrnRAPicUp" !="norrnRaDrag" !="norrnR180" !="norrnRalie" !="norrnRLact" !="norrnRALW" !="norrnRDead"
5 "usec" !="usecMorphine" !="usecBandage" !="usecBleed"
5 "PVDZE_" !"PVDZE_player" !="PVDZE_send" !="PVDZE_log_lockUnlock" !="PVDZE_Server_Simulation" !="PVDZE_veh_Update" !="PVDZE_plr_GutBody" !="PVDZE_plr_GutBodyZ" !="PVDZE_veh_Lock" !="PVDZE_plr_DeathB" !="PVDZE_maintainArea" !="PVDZE_obj_Publish" !="PVDZE_obj_Swap" !="PVDZE_plr_Save" !="PVDZE_obj_Delete" !="PVDZE_obj_Trade" !="PVDZE_veh_Publish2" !="PVDZE_zed_Spawn" !="PVDZE_plr_Died" !="PVDZE_plr_TradeMenu" !="PVDZE_veh_Upgrade" !="PVDZE_atp" !="PVDZE_plr_Login" !="PVDZE_plr_Login2" !="PVDZE_plr_LoginRecord" !="PVDZE_plr_DeathBResult" !="PVDZE_veh_SFix" !="PVDZE_plr_Hit" !="PVDZE_plr_HitV" !="PVDZE_veh_SFuel" !="PVDZE_plr_HideBody" !="PVDZE_plr_Morph" !="PVDZE_veh_Publish" !="PVDZE_plr_Characters" !="PVDZE_lockVault" !="PVDZE_obj_setlocalVars" !="PVDZE_obj_getlocalVars" !="PVDZE_EvacChopperFieldsUpdate" !="PVDZE_bank_Save" !="PVDZE_account_Doublecheck" !="PVDZE_veh_Colour" !="PVDZE_veh_store" !="PVDZE_veh_spawn"
5 "PVAHR_" !"PVAHR_0_"
1 "PVAH"
5 "remExFP" !="\"remExFP\" = \[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !"\[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]"
5="player"
5="server"
5 "fnc_plyrHit"
5 "AntiHack"
1 "Delete"

Link to comment
Share on other sites

13 hours ago, Thug said:

Where would you put  !="donn_heli_monitor"

//new
5 "" !"PVDZE_" !"norrn" !"usec" !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="norrinRAlie" !="BIS_effects_gepv" !="dayzPlayerLogin" !="dayzPlayerLogin2" !"PVAHR_" !="PVAH_AdminReq" !="PVAH_WriteLogReq" !="currentInvites" !="PVDZE_queryGarageVehicle" !="PVDZE_storeVehicle" !="PVDZE_spawnVehicle" !="currentInvites" !"cad_pvar_s" !="axeLampObjects" !="dayzHeliEvac" !="HCrequest_spawnRCV" !="HCsignalRCV" !="HCsignal" !="HClist" !="HCdo_spawn" !="HCrequest_spawn" !="clothesTaken" !="owner_B1" !="owner_B2" !="owner_B3" !="owner_H1" !="owner_H2" !="owner_H3" !="owner_SG" !="owner_LG" !="owner_KING" !="owner_SH" !="OriginsLockUnlock" !="Detain" !="PVDZ_ply_Arrst"
5 "norrn" !="norrnRACarUp" !="norrnRAPicUp" !="norrnRaDrag" !="norrnR180" !="norrnRalie" !="norrnRLact" !="norrnRALW" !="norrnRDead"
5 "usec" !="usecMorphine" !="usecBandage" !="usecBleed"
5 "PVDZE_" !"PVDZE_player" !="PVDZE_send" !="PVDZE_log_lockUnlock" !="PVDZE_Server_Simulation" !="PVDZE_veh_Update" !="PVDZE_plr_GutBody" !="PVDZE_plr_GutBodyZ" !="PVDZE_veh_Lock" !="PVDZE_plr_DeathB" !="PVDZE_maintainArea" !="PVDZE_obj_Publish" !="PVDZE_obj_Swap" !="PVDZE_plr_Save" !="PVDZE_obj_Delete" !="PVDZE_obj_Trade" !="PVDZE_veh_Publish2" !="PVDZE_zed_Spawn" !="PVDZE_plr_Died" !="PVDZE_plr_TradeMenu" !="PVDZE_veh_Upgrade" !="PVDZE_atp" !="PVDZE_plr_Login" !="PVDZE_plr_Login2" !="PVDZE_plr_LoginRecord" !="PVDZE_plr_DeathBResult" !="PVDZE_veh_SFix" !="PVDZE_plr_Hit" !="PVDZE_plr_HitV" !="PVDZE_veh_SFuel" !="PVDZE_plr_HideBody" !="PVDZE_plr_Morph" !="PVDZE_veh_Publish" !="PVDZE_plr_Characters" !="PVDZE_lockVault" !="PVDZE_obj_setlocalVars" !="PVDZE_obj_getlocalVars" !="PVDZE_EvacChopperFieldsUpdate" !="PVDZE_bank_Save" !="PVDZE_account_Doublecheck" !="PVDZE_veh_Colour" !="PVDZE_veh_store" !="PVDZE_veh_spawn"
5 "PVAHR_" !"PVAHR_0_"
1 "PVAH"
5 "remExFP" !="\"remExFP\" = \[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]" !"\[,,\"per\",\"execVM\",\"ca\\Modules\\Functions\\init.sqf\"\]"
5="player"
5="server"
5 "fnc_plyrHit"
5 "AntiHack"
1 "Delete"

it Goes in this line

5 "" !="donn_heli_monitor" !"PVDZE_" !"norrn" !"usec" !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs"..........

Link to comment
Share on other sites

18 minutes ago, Donnovan said:

Thankyou!

How often this happens? You remember if there was players on the ground and the heli was on low altitude?

It hasn't happened recently, it was only happening when we were testing the script near the ocean (Lingor map) . Each time there was another player on the ground within a few hundred meters of the helictoper at least. The last time it happened, I was slowly flying towards a heli crash site (animated heli crash with loot) , there was a player just in front of me near the crash site . When I disconnected on purpose to test the script, apparently the helicopter just fell out of the sky right onto the other players head :)  .. I was over land , but near a large expansion of water too.

Link to comment
Share on other sites

1 hour ago, MatthewK said:

It hasn't happened recently, it was only happening when we were testing the script near the ocean (Lingor map) . Each time there was another player on the ground within a few hundred meters of the helictoper at least. The last time it happened, I was slowly flying towards a heli crash site (animated heli crash with loot) , there was a player just in front of me near the crash site . When I disconnected on purpose to test the script, apparently the helicopter just fell out of the sky right onto the other players head :)  .. I was over land , but near a large expansion of water too.

i've noticed that the script doesn't always work...but for the most part it does. and its random.  I havn't figured why yet, but it honestly doesn't bother me.  Its like i told the community, with the script not there, if you DC, you lose it regardless.  This way, someone scripted this script (Thank you donnovan), to help players with User issues. like DC.  Its not a servers fault that it happens.  Its the client side.  I don't allow players to complain about it lol, because if they do ill just remove it and see what they say LOL

Although you might be on to something.  because the heli will not land if someone else is in the heli, could be a proximity check issue...but thats above my knowledge...

Link to comment
Share on other sites

  • 1 year later...

this work version for 1.0.6.x

Spoiler

//===========================================
// DDOS Heli Guard by Donnovan from Brazil.
//===========================================
// Don't remove credits.
//===========================================
// Changed for Epoch 1.0.6.1 by !_RedLink_! from Russia
//===========================================
private ["_message"];

//CHECK PILOT STATE AND IGNITE PROTECTION
if (hasInterface) then 
{
	while {true} do 
	{
		while {vehicle player != player} do 
		{
			_veh = vehicle player;
			if (_veh isKindOf "Air" && !(_veh isKindOf "ParachuteBase")) then 
			{
				if (driver _veh == player) then 
				{
					_vehProtected = _veh getVariable ["donn_protect",false];
					if (!_vehProtected) then 
					{
						_veh setVariable ["donn_protect",true,true];
						donn_heli_monitor = _veh;
						publicVariableServer "donn_heli_monitor";
						//_message = format ["%1 (%2) lost connection %3 landed @%4", dayz_playerName, dayz_playerUID, _veh, mapGridPosition (getPosATL _veh)];
					};
					uiSleep 5;
				} else 
				{
					uiSleep 5;
				};
			} else 
			{
				uiSleep 5;
			};
			uiSleep 3;
		};
		uiSleep 5;
	};
};
//PROTECT THE HELI
if (isServer) then 
{
	"donn_heli_monitor" addPublicVariableEventHandler 
	{
		_veh = _this select 1;
		_veh spawn 
		{
			_veh = _this;
			_crew = crew _veh;_crewOk = [];
			waitUntil {uiSleep 1.5;_crewOk = _crew;_crew = crew _veh;count _crew == 0};
		// changed !_RedLink_! start
			_abort=false;
			if((fuel _veh)<0.01)then{_abort=true;};
			{
				if (([_veh,_x] call object_getHit)>0.7)then
					{
						if(["Engine",_x,false] call fnc_inString)exitWith{_abort=true;};
						if(["VRotor",_x,false] call fnc_inString)exitWith{_abort=true;};
						if(["HRotor",_x,false] call fnc_inString)exitWith{_abort=true;};
						if(["HitHull",_x,false] call fnc_inString)exitWith{_abort=true;};
					};
			}forEach(_veh call vehicle_getHitpoints);
			if(_abort)exitWith
			{
				_veh setVariable ["donn_protect",false,true];
				diag_log (format["DDOS_HELI_GUARD: Техника: %1 в плохом состоянии, уничтожена.",_veh]);
				PVDZ_sec_atp = toArray (format ["DDOS_HELI_GUARD: Техника: %1 в плохом состоянии, уничтожена @%2.",_veh, mapGridPosition (getPosATL _veh)]);
				publicVariableServer "PVDZ_sec_atp";
			};
		// changed !_RedLink_! end
			_mans = nearestObjects [getPosATL _veh,["CAManBase"],100];
			_air = (getPosATL _veh) nearEntities ["Air",100];
			_DDOS = true;
			{if (_x in _mans) exitwith {_DDOS = false;};} forEach _crewOk;
			{_passenger = _x;{if (_passenger in crew _x) exitwith {_DDOS = false;};} forEach _air;} forEach _crewOk;
			if (_DDOS && ((getPosATL _veh) select 2) > 1.5) then 
			{
				private ["_vPosNew"];
				_vPos = getPosATL _veh;_mapCenter = getMarkerPos "center";_vehSafeRadius = (sizeOf typeOf _veh)/2 + 4;
				for "_k" from 1 to 100 do 
				{
					_vPosNew = [[_vPos select 0,_vPos select 1,0],(18+(_k-1)*2)*(_k-1),(18+_k*2)*_k,_vehSafeRadius,0,15,0,[],[_mapCenter,[0,0,0]]] call BIS_fnc_findSafePos;
					_x1 = round (_mapCenter select 0);_y1 = round (_mapCenter select 1);
					_x2 = round (_vPosNew select 0);_y2 = round (_vPosNew select 1);
					if !(_x1 == _x2 && _y1 == _y2) exitWith {};
				};
			// changed !_RedLink_! start
				if ((parseNumber(_veh getVariable ["CharacterID","0"])) !=0) then
				{[_veh,true] call local_lockUnlock;};
				//PVDZE_veh_Lock = [_veh,true];
				//publicVariable "PVDZE_veh_Lock";
				//};
			// changed !_RedLink_! end
				_vPosNew = [_vPosNew select 0,_vPosNew select 1,0.5];
				_veh setPosATL _vPosNew;
				_veh setVectorUp surfaceNormal _vPosNew;
				_veh setVelocity [0,0,0];
				_fuel = fuel _veh;
				_veh setFuel 0;
				uiSleep 2.5;
				_veh setFuel _fuel;
			// changed !_RedLink_! start
				PVDZ_veh_Save = [_veh, "all"];
				publicVariableServer "PVDZ_veh_Save";
			// changed !_RedLink_! end
				//_message = format ["%1 (%2) lost connection %3 landed @%4", dayz_playerName, dayz_playerUID, _veh, mapGridPosition (getPosATL _veh)];
			};
			_veh setVariable ["donn_protect",false,true];
		};
	};
};

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...