Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ["_atLeastOnce","_ambpos","_diir","_xx","_yy","_start","_end","_class","_tank","_posPl","_st","_wp"];
- //INIT
- Pgroups = [];
- VarAlarm = false;
- _nul = [1] execVM "Music.sqf";
- sleep 5;
- while {true} do {
- //PATROLS
- _atLeastOnce = 1;
- while {{_x knowsabout vehicle player > 0.1} count (Pgroups + HeliGroups+ CampGroups + VehicleGroups + AirGroups) == 0 || _atLeastOnce > 0} do {
- _atLeastOnce = _atLeastOnce - 1;
- if (!isNil"debugi") then {hint "State - Patrol";};
- _ambpos = [(getposATL (vehicle player) select 0) + random (800) - random (800),(getposATL (vehicle player) select 1) + random (800) - random (800),0];
- if (count Pgroups < VarPG) then {_nul = [_ambpos,800,VarPGSize] SPAWN FUNKTIO_AmbientPatrol;};
- VarAlarm = false;
- if (random 1 < 0.3) then {
- if (random 1 < 0.5) then {
- _diir= random 360;
- _xx = random (1000);
- _yy = 1000 - _xx;
- if (random 1 < 0.5) then {_xx = _xx*(-1)};
- //if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_start nearRoads 300) > 0) then {_start = getposATL ((_start nearRoads 300) select 0);};
- while {surfaceIsWater [_start select 0, _start select 1]} do {
- sleep 0.5;
- _xx = random (1000);
- _yy = 1000 - _xx;
- if (random 1 < 0.5) then {_xx = _xx*(-1)};
- //if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_start nearRoads 300) > 0) then {_start =getposATL ((_start nearRoads 300) select 0);};
- };
- _xx = random (2000);
- _yy = 2000 - _xx;
- if (_start select 0 > 0) then {_xx = _xx*(-1)};
- if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _end = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_end nearRoads 300) > 0) then {_end = getposATL ((_end nearRoads 300) select 0);};
- while {surfaceIsWater [_end select 0, _end select 1]} do {
- sleep 0.5;
- _xx = random (2000);
- _yy = 2000 - _xx;
- if (_start select 0 > 0) then {_xx = _xx*(-1)};
- if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _end = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_end nearRoads 300) > 0) then {_end = getposATL ((_end nearRoads 300) select 0);};
- };
- if (count Pgroups < VarPG) then {
- _class = [["V3S_TK_EP1",["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"]],["UAZ_Unarmed_TK_EP1",["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_EP1","TK_Soldier_EP1"]]];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_class = [["Ural_TK_2035",["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier"]],["UAZ_Unarmed_TK_2035",["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier","TK_Soldier_MG"]]];};
- _class = _class call BIS_fnc_selectRandom;
- _nul = [_class select 0,_start,_end,EAST,_diir,_class select 1, 0] execVM "AmbientScoutCar.sqf";
- };
- if (random 1 < 0.1 && count Pgroups < VarPG) then {
- _class = [["V3S_TK_EP1",["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"]],["UAZ_Unarmed_TK_EP1",["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_EP1","TK_Soldier_EP1"]]];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_class = [["Ural_TK_2035",["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier"]],["UAZ_Unarmed_TK_2035",["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier","TK_Soldier_MG"]]];};
- _class = _class call BIS_fnc_selectRandom;
- _nul = [_class select 0,_start,_end,EAST,_diir,_class select 1, 0] execVM "AmbientScoutCar.sqf";
- };
- if (random 1 < 0.1 && count VehicleGroups < EVEHMAX) then {
- _class = VarVEH call BIS_fnc_selectRandom;
- _nul = [_class,_start,_end,EAST,_diir,[], 1] execVM "AmbientScoutCar.sqf";
- };
- } else {
- _diir= random 360;
- _xx = random (1000);
- _yy = 1000 - _xx;
- if (random 1 < 0.5) then {_xx = _xx*(-1)};
- //if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_start nearRoads 300) > 0) then {_start = getposATL ((_start nearRoads 300) select 0);};
- while {surfaceIsWater [_start select 0, _start select 1]} do {
- sleep 0.5;
- _xx = random (1000);
- _yy = 1000 - _xx;
- if (random 1 < 0.5) then {_xx = _xx*(-1)};
- //if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_start nearRoads 300) > 0) then {_start = getposATL ((_start nearRoads 300) select 0);};
- };
- _xx = random (2000);
- _yy = 2000 - _xx;
- if (_start select 0 > 0) then {_xx = _xx*(-1)};
- if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _end = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_end nearRoads 300) > 0) then {_end = getposATL ((_end nearRoads 300) select 0);};
- while {surfaceIsWater [_end select 0, _end select 1]} do {
- sleep 0.5;
- _xx = random (2000);
- _yy = 2000 - _xx;
- if (_start select 0 > 0) then {_xx = _xx*(-1)};
- if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _end = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- if (count (_end nearRoads 300) > 0) then {_end = getposATL ((_end nearRoads 300) select 0);};
- };
- if (count VehicleGroups < EVEHMAX) then {
- _class = VarVEH call BIS_fnc_selectRandom;
- _nul = [_class,_start,_end,EAST,_diir,[], 1] execVM "AmbientScoutCar.sqf";
- };
- if (random 1 < 0.1 && count VehicleGroups < EVEHMAX) then {
- sleep 5;
- _class = VarVEH call BIS_fnc_selectRandom;
- _nul = [_class,_start,_end,EAST,_diir,[], 1] execVM "AmbientScoutCar.sqf";
- };
- if (random 1 < 0.05 && count VehicleGroups < EVEHMAX) then {
- sleep 5;
- _class = VarVEH call BIS_fnc_selectRandom;
- _nul = [_class,_start,_end,EAST,_diir,[], 1] execVM "AmbientScoutCar.sqf";
- };
- if (random 1 < 0.05 && count VehicleGroups < EVEHMAX) then {
- sleep 5;
- _class = VarVEH call BIS_fnc_selectRandom;
- _nul = [_class,_start,_end,EAST,_diir,[], 1] execVM "AmbientScoutCar.sqf";
- };
- };
- };
- while {count Pgroups > VarPG && {_x knowsabout vehicle player > 0.1} count (Pgroups + HeliGroups+ CampGroups + VehicleGroups + AirGroups) == 0} do {sleep 10;};
- };
- //FAST REINFORCEMENTS
- _nul = [2] execVM "Music.sqf";
- if (!isNil"debugi") then {hint "State - Fast Reinf";};
- VarAlarm = true;
- {if (behaviour leader _x != "COMBAT") then {_x setbehaviour "AWARE";};} foreach Pgroups;
- _posPl=getposATL vehicle player;
- {
- while {(count (waypoints _x)) > 0} do
- {
- deleteWaypoint ((waypoints _x) select 0);
- };
- _wp = _x addWaypoint [[(_posPl select 0) + random (300) - random (300),(_posPl select 1) + random (300) - random (300),0], 0];
- } foreach Pgroups;
- if (VARCoLoop) then {_nul = [] SPAWN FUNKTIO_CL;};
- if (random 1 < 0.3) then {
- if (VarTRChop && VarRes > 0.3 && count Pgroups < (VarPG + 1)) then {
- _tank = ["Mi17_TK_EP1","Mi17_TK_EP1","UH1H_TK_EP1","UH1H_TK_EP1","UH1H_TK_EP1","Mi24_D_TK_EP1","An2_TK_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_tank = ["Mi17_TK_2035","Mi24_P_TK_2035","Mi24_V_TK_2035"];};
- _tank = _tank call BIS_fnc_selectRandom;
- _inf = ["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_inf = ["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier","TK_Soldier"];};
- _nul = [[8135.96,1927.03,0], [(getposATL (vehicle player) select 0)+((random 500)-(random 500)),(getposATL (vehicle player) select 1)+((random 500)-(random 500)),0], [(getposATL (vehicle player) select 0)+((random 500)-(random 500))*0.5,(getposATL (vehicle player) select 1)+((random 500)-(random 500))*0.5,0], EAST, 290, _tank, 50,_inf,[0.6,0.7],0] execFSM "ChopperTransport.fsm";
- if (random 1 < 0.1 && count Pgroups < VarPG) then {
- _tank = ["Mi17_TK_EP1","Mi17_TK_EP1","UH1H_TK_EP1","UH1H_TK_EP1","UH1H_TK_EP1","Mi24_D_TK_EP1","An2_TK_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_tank = ["Mi17_TK_2035","Mi24_P_TK_2035","Mi24_V_TK_2035"];};
- _tank = _tank call BIS_fnc_selectRandom;
- _inf = ["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_inf = ["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier","TK_Soldier"];};
- _nul = [[8135.96,1927.03,0], [(getposATL (vehicle player) select 0)+((random 500)-(random 500)),(getposATL (vehicle player) select 1)+((random 500)-(random 500)),0], [(getposATL (vehicle player) select 0)+((random 500)-(random 500))*0.5,(getposATL (vehicle player) select 1)+((random 500)-(random 500))*0.5,0], EAST, 290, _tank, 50,_inf,[0.6,0.7],0] execFSM "ChopperTransport.fsm";
- };
- if (random 1 < 0.1 && count Pgroups < VarPG) then {
- _tank = ["Mi17_TK_EP1","Mi17_TK_EP1","UH1H_TK_EP1","UH1H_TK_EP1","UH1H_TK_EP1","Mi24_D_TK_EP1","An2_TK_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_tank = ["Mi17_TK_2035","Mi24_P_TK_2035","Mi24_V_TK_2035"];};
- _tank = _tank call BIS_fnc_selectRandom;
- _inf = ["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_inf = ["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier","TK_Soldier"];};
- _nul = [[8135.96,1927.03,0], [(getposATL (vehicle player) select 0)+((random 500)-(random 500)),(getposATL (vehicle player) select 1)+((random 500)-(random 500)),0], [(getposATL (vehicle player) select 0)+((random 500)-(random 500))*0.5,(getposATL (vehicle player) select 1)+((random 500)-(random 500))*0.5,0], EAST, 290, _tank, 50,_inf,[0.6,0.7],0] execFSM "ChopperTransport.fsm";
- };
- };
- } else {
- _xx = random (1100);
- _yy = 1100 - _xx;
- if (random 1 < 0.5) then {_xx = _xx*(-1)};
- if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
- _start = (_st select 0) select 0;
- while {surfaceIsWater [_start select 0, _start select 1]} do {
- sleep 0.5;
- _xx = random (1100);
- _yy = 1100 - _xx;
- if (random 1 < 0.5) then {_xx = _xx*(-1)};
- if (random 1 < 0.5) then {_yy = _yy*(-1)};
- _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
- _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
- _start = (_st select 0) select 0;
- };
- _nul = [_start,_posPl] SPAWN {
- private ["_start","_posPl"];
- _start = _this select 0;
- _posPl = _this select 1;
- sleep (20+(random 20));
- _tank = ["M113_TK_EP1","M113_TK_EP1","BTR60_TK_EP1","BMP2_TK_EP1","V3S_Open_TK_EP1","V3S_Open_TK_EP1","V3S_TK_EP1","V3S_TK_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_tank = ["Ural_Open_TK_2035","Ural_TK_2035","BTR90_TK_2035","BMP3_TK_2035","BMP2_TK_2035"];};
- if (count Pgroups < (VarPG + 1)) then {
- _tank = _tank call BIS_fnc_selectRandom;
- _inf = ["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_inf = ["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier","TK_Soldier"];};
- _nul = [_start, _posPl, _posPl, EAST, 90, _tank,_inf,[0.6,0.7],0] execFSM "LandTransport.fsm";
- };
- if (random 1 < 0.1 && count Pgroups < VarPG) then {
- sleep 10;
- _tank = ["M113_TK_EP1","M113_TK_EP1","BTR60_TK_EP1","BMP2_TK_EP1","V3S_Open_TK_EP1","V3S_Open_TK_EP1","V3S_TK_EP1","V3S_TK_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_tank = ["Ural_Open_TK_2035","Ural_TK_2035","BTR90_TK_2035","BMP3_TK_2035","BMP2_TK_2035"];};
- _tank = _tank call BIS_fnc_selectRandom;
- _inf = ["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_inf = ["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier","TK_Soldier"];};
- _nul = [_start, _posPl, _posPl, EAST, 90, _tank,_inf,[0.6,0.7],0] execFSM "LandTransport.fsm";
- };
- if (random 1 < 0.1 && count Pgroups < VarPG) then {
- sleep 10;
- _tank = ["M113_TK_EP1","M113_TK_EP1","BTR60_TK_EP1","BMP2_TK_EP1","V3S_Open_TK_EP1","V3S_Open_TK_EP1","V3S_TK_EP1","V3S_TK_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_tank = ["Ural_Open_TK_2035","Ural_TK_2035","BTR90_TK_2035","BMP3_TK_2035","BMP2_TK_2035"];};
- _tank = _tank call BIS_fnc_selectRandom;
- _inf = ["TK_Soldier_SL_EP1","TK_Soldier_B_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Medic_EP1","TK_Soldier_EP1","TK_Soldier_EP1","TK_Soldier_EP1"];
- if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_inf = ["TK_Soldier_SL","TK_Soldier_Medic","TK_Soldier_AR","TK_Soldier_MG","TK_Soldier","TK_Soldier","TK_Soldier"];};
- _nul = [_start, _posPl, _posPl, EAST, 90, _tank,_inf,[0.6,0.7],0] execFSM "LandTransport.fsm";
- };
- };
- };
- sleep (110 + (random 70));
- //SLOW REINFORCEMENTS
- _nul = [3] execVM "Music.sqf";
- if (!isNil"debugi") then {hint "State - Slow Reinf";};
- if (random 1 < VarArty) then {_nul = [_posPl] execVM "AIUseArty.sqf";};
- _nul = [_posPl] execVM "EnemySupport.sqf";
- _nul = [] execVM "FriendlySupport.sqf";
- if (random 1 < 0.1) then {_nul = [_posPl] execVM "EnemySupport.sqf";};
- if (random 1 < 0.1) then {_nul = [] execVM "FriendlySupport.sqf";};
- sleep 400;
- //ALIVE GROUPS TO PATROL
- {
- while {(count (waypoints _x)) > 0} do
- {
- deleteWaypoint ((waypoints _x) select 0);
- };
- [_x, [(_posPl select 0) + random (1100) - random (1100),(_posPl select 1) + random (1100) - random (1100),0],600] call bis_fnc_taskPatrol;
- } foreach Pgroups;
- _nul = [1] execVM "Music.sqf";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement