diff --git a/AI/QRF/CTRGsupport.sqf b/AI/QRF/CTRGsupport.sqf
new file mode 100644
index 00000000..880e84b0
--- /dev/null
+++ b/AI/QRF/CTRGsupport.sqf
@@ -0,0 +1,119 @@
+private ["_group","_population","_posTown","_vehs","_soldier","_vehtype","_pos","_wp","_numgroups","_attackpos","_count","_tgroup","_ao"];
+
+_posTown = _this;
+
+_vehs = [];
+_soldiers = [];
+_groups = [];
+
+_count = 0;
+_pos = AIT_NATO_HQPos;
+
+_dir = [_pos,_posTown] call BIS_fnc_dirTo;
+
+_attackpos = [_posTown,[0,150]] call SHK_pos;
+
+//Determine direction to attack from (preferrably away from water)
+_attackdir = random 360;
+if(surfaceIsWater ([_posTown,150,_attackDir] call BIS_fnc_relPos)) then {
+ _attackdir = _attackdir + 180;
+ if(_attackdir > 359) then {_attackdir = _attackdir - 359};
+ if(surfaceIsWater ([_posTown,150,_attackDir] call BIS_fnc_relPos)) then {
+ _attackdir = _attackdir + 90;
+ if(_attackdir > 359) then {_attackdir = _attackdir - 359};
+ if(surfaceIsWater ([_posTown,150,_attackDir] call BIS_fnc_relPos)) then {
+ _attackdir = _attackdir + 180;
+ if(_attackdir > 359) then {_attackdir = _attackdir - 359};
+ };
+ };
+};
+_attackdir = _attackdir - 45;
+
+
+_ao = [_posTown,[350,500],_attackdir + (random 90)] call SHK_pos;
+_group = createGroup blufor;
+
+
+{
+ _type = _x;
+ _civ = _group createUnit [_type, AIT_NATO_HQPos, [],0, "NONE"];
+ _civ setRank "CAPTAIN";
+}foreach(AIT_NATO_Units_CTRGSupport);
+
+sleep 0.2;
+
+//Transport
+_tgroup = creategroup blufor;
+_pos = [_pos,60,80,false,[0,0],[100,AIT_NATO_Vehicle_CTRGTransport]] call SHK_pos;
+sleep 0.1;
+_veh = createVehicle [AIT_NATO_Vehicle_CTRGTransport, _pos, [], 0,""];
+_vehs pushback _veh;
+
+
+_veh setDir (_dir);
+_tgroup addVehicle _veh;
+createVehicleCrew _veh;
+{
+ [_x] joinSilent _tgroup;
+ _x setVariable ["NOAI",true,false];
+ _x setVariable ["garrison","HQ",false];
+}foreach(crew _veh);
+
+{
+ _x moveInCargo _veh;
+ _soldiers pushback _x;
+ _x setVariable ["garrison","HQ",false];
+}foreach(units _group);
+
+sleep 1;
+
+_moveto = [AIT_NATO_HQPos,500,_dir] call SHK_pos;
+_wp = _tgroup addWaypoint [_moveto,0];
+_wp setWaypointType "MOVE";
+_wp setWaypointBehaviour "COMBAT";
+_wp setWaypointSpeed "FULL";
+_wp setWaypointCompletionRadius 150;
+_wp setWaypointStatements ["true","(vehicle this) flyInHeight 100;"];
+
+_wp = _tgroup addWaypoint [_ao,0];
+_wp setWaypointType "MOVE";
+_wp setWaypointBehaviour "COMBAT";
+_wp setWaypointStatements ["true","(vehicle this) AnimateDoor ['Door_rear_source', 1, false];"];
+wp setWaypointCompletionRadius 50;
+_wp setWaypointSpeed "FULL";
+
+_wp = _tgroup addWaypoint [_ao,0];
+_wp setWaypointType "SCRIPTED";
+_wp setWaypointStatements ["true","[vehicle this,50] execVM 'funcs\addons\eject.sqf'"];
+_wp setWaypointTimeout [10,10,10];
+
+_wp = _tgroup addWaypoint [_ao,0];
+_wp setWaypointType "SCRIPTED";
+_wp setWaypointStatements ["true","(vehicle this) AnimateDoor ['Door_rear_source', 0, false];"];
+_wp setWaypointTimeout [15,15,15];
+
+_moveto = [AIT_NATO_HQPos,200,_dir] call SHK_pos;
+
+_wp = _tgroup addWaypoint [_moveto,0];
+_wp setWaypointType "LOITER";
+_wp setWaypointBehaviour "SAFE";
+_wp setWaypointSpeed "FULL";
+_wp setWaypointCompletionRadius 100;
+
+_wp = _tgroup addWaypoint [_moveto,0];
+_wp setWaypointType "SCRIPTED";
+_wp setWaypointStatements ["true","[vehicle this] execVM 'funcs\cleanup.sqf'"];
+
+_wp = _group addWaypoint [_attackpos,20];
+_wp setWaypointType "MOVE";
+_wp setWaypointBehaviour "COMBAT";
+
+_wp = _group addWaypoint [_attackpos,0];
+_wp setWaypointType "GUARD";
+_wp setWaypointBehaviour "COMBAT";
+
+{
+ _x addCuratorEditableObjects [_vehs+_soldiers,true];
+} forEach allCurators;
+
+
diff --git a/AI/QRF/NATOattack.sqf b/AI/QRF/NATOattack.sqf
index 91892804..5a1cd4be 100644
--- a/AI/QRF/NATOattack.sqf
+++ b/AI/QRF/NATOattack.sqf
@@ -131,7 +131,7 @@ while {_count < _numgroups} do {
_wp = _tgroup addWaypoint [_moveto,0];
_wp setWaypointType "LOITER";
- _wp setWaypointBehaviour "SAFE";
+ _wp setWaypointBehaviour "CARELESS";
_wp setWaypointSpeed "FULL";
_wp setWaypointCompletionRadius 100;
@@ -139,9 +139,13 @@ while {_count < _numgroups} do {
_wp setWaypointType "SCRIPTED";
_wp setWaypointStatements ["true","[vehicle this] execVM 'funcs\cleanup.sqf'"];
- _wp = _group addWaypoint [_attackpos,0];
+ _wp = _group addWaypoint [_attackpos,20];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "COMBAT";
+
+ _wp = _group addWaypoint [_attackpos,0];
+ _wp setWaypointType "GUARD";
+ _wp setWaypointBehaviour "COMBAT";
{
_x addCuratorEditableObjects [_vehs+_soldiers,true];
diff --git a/AI/QRF/NATOcounter.sqf b/AI/QRF/NATOcounter.sqf
new file mode 100644
index 00000000..406ee149
--- /dev/null
+++ b/AI/QRF/NATOcounter.sqf
@@ -0,0 +1,264 @@
+private ["_group","_population","_posTown","_vehs","_soldier","_vehtype","_pos","_wp","_numgroups","_attackpos","_count","_tgroup","_ao"];
+
+_objective = _this;
+_posTown = getMarkerPos _objective;
+
+
+
+_tskid = [resistance,[format["counter%1",_objective]],[format["NATO is sending forces to %1 from Tuvanaka Airbase. This is our chance to capture it if we can hold the field.",_objective],format["Capture %1",_objective],format["counter%1",_objective]],_posTown,1,2,true,"Target",true] call BIS_fnc_taskCreate;
+
+_vehs = [];
+_soldiers = [];
+_groups = [];
+
+//Drones
+
+{
+ _group = createGroup blufor;
+ _vehtype = _x;
+ _pos = [getMarkerPos AIT_NATO_AirSpawn,0,0,false,[0,0],[100,_vehtype]] call SHK_pos;
+ _veh = createVehicle [_vehtype, _pos, [], 0,""];
+ _veh setDir 50;
+ _vehs pushback _veh;
+ _group addVehicle _veh;
+ createVehicleCrew _veh;
+ {
+ [_x] joinSilent _group;
+ }foreach(crew _veh);
+
+ _wp = _group addWaypoint [_posTown,0];
+ _wp setWaypointType "SAD";
+ _wp setWaypointBehaviour "COMBAT";
+ _wp setWaypointSpeed "FULL";
+
+ sleep 0.1;
+}foreach(AIT_NATO_Vehicles_AirDrones);
+
+{
+ _x addCuratorEditableObjects [_vehs+_soldiers,true];
+} forEach allCurators;
+sleep 25;
+
+_numgroups = 2;
+if(_objective in AIT_NATO_Priority) then {
+ _numgroups = 4;
+};
+
+_count = 0;
+_pos = AIT_NATO_HQPos;
+
+_dir = [_pos,_posTown] call BIS_fnc_dirTo;
+
+_attackpos = [_posTown,[0,150]] call SHK_pos;
+
+//Determine direction to attack from (preferrably away from water)
+_attackdir = random 360;
+if(surfaceIsWater ([_posTown,150,_attackDir] call BIS_fnc_relPos)) then {
+ _attackdir = _attackdir + 180;
+ if(_attackdir > 359) then {_attackdir = _attackdir - 359};
+ if(surfaceIsWater ([_posTown,150,_attackDir] call BIS_fnc_relPos)) then {
+ _attackdir = _attackdir + 90;
+ if(_attackdir > 359) then {_attackdir = _attackdir - 359};
+ if(surfaceIsWater ([_posTown,150,_attackDir] call BIS_fnc_relPos)) then {
+ _attackdir = _attackdir + 180;
+ if(_attackdir > 359) then {_attackdir = _attackdir - 359};
+ };
+ };
+};
+_attackdir = _attackdir - 45;
+
+while {_count < _numgroups} do {
+ _ao = [_posTown,[350,500],_attackdir + (random 90)] call SHK_pos;
+ _group = [AIT_NATO_HQPos, blufor, (configFile >> "CfgGroups" >> "West" >> "BLU_T_F" >> "Infantry" >> "B_T_InfSquad_Weapons")] call BIS_fnc_spawnGroup;
+ _count = _count + 1;
+ sleep 0.2;
+
+ //Transport
+ _tgroup = creategroup blufor;
+ _pos = [_pos,60,80,false,[0,0],[100,AIT_NATO_Vehicle_AirTransport]] call SHK_pos;
+ sleep 0.1;
+ _veh = createVehicle [AIT_NATO_Vehicle_AirTransport, _pos, [], 0,""];
+ _vehs pushback _veh;
+
+
+ _veh setDir (_dir);
+ _tgroup addVehicle _veh;
+ createVehicleCrew _veh;
+ {
+ [_x] joinSilent _tgroup;
+ _x setVariable ["NOAI",true,false];
+ _x setVariable ["garrison","HQ",false];
+ }foreach(crew _veh);
+
+ {
+ _x moveInCargo _veh;
+ _soldiers pushback _x;
+ _x setVariable ["garrison","HQ",false];
+ }foreach(units _group);
+
+ sleep 1;
+
+ _moveto = [AIT_NATO_HQPos,500,_dir] call SHK_pos;
+ _wp = _tgroup addWaypoint [_moveto,0];
+ _wp setWaypointType "MOVE";
+ _wp setWaypointBehaviour "COMBAT";
+ _wp setWaypointSpeed "FULL";
+ _wp setWaypointCompletionRadius 150;
+ _wp setWaypointStatements ["true","(vehicle this) flyInHeight 150;"];
+
+ _wp = _tgroup addWaypoint [_ao,0];
+ _wp setWaypointType "MOVE";
+ _wp setWaypointBehaviour "COMBAT";
+ _wp setWaypointStatements ["true","(vehicle this) AnimateDoor ['Door_rear_source', 1, false];"];
+ wp setWaypointCompletionRadius 50;
+ _wp setWaypointSpeed "FULL";
+
+ _wp = _tgroup addWaypoint [_ao,0];
+ _wp setWaypointType "SCRIPTED";
+ _wp setWaypointStatements ["true","[vehicle this,75] execVM 'funcs\addons\eject.sqf'"];
+ _wp setWaypointTimeout [10,10,10];
+
+ _wp = _tgroup addWaypoint [_ao,0];
+ _wp setWaypointType "SCRIPTED";
+ _wp setWaypointStatements ["true","(vehicle this) AnimateDoor ['Door_rear_source', 0, false];"];
+ _wp setWaypointTimeout [15,15,15];
+
+ _moveto = [AIT_NATO_HQPos,200,_dir] call SHK_pos;
+
+ _wp = _tgroup addWaypoint [_moveto,0];
+ _wp setWaypointType "LOITER";
+ _wp setWaypointBehaviour "SAFE";
+ _wp setWaypointSpeed "FULL";
+ _wp setWaypointCompletionRadius 100;
+
+ _wp = _tgroup addWaypoint [_moveto,0];
+ _wp setWaypointType "SCRIPTED";
+ _wp setWaypointStatements ["true","[vehicle this] execVM 'funcs\cleanup.sqf'"];
+
+ _wp = _group addWaypoint [_attackpos,20];
+ _wp setWaypointType "MOVE";
+ _wp setWaypointBehaviour "COMBAT";
+
+ _wp = _group addWaypoint [_attackpos,0];
+ _wp setWaypointType "GUARD";
+ _wp setWaypointBehaviour "COMBAT";
+
+ {
+ _x addCuratorEditableObjects [_vehs+_soldiers,true];
+ } forEach allCurators;
+ sleep 20;
+};
+
+[_soldiers,_attackpos,_objective,_tskid] spawn {
+ _soldiers = _this select 0;
+ _attackpos = _this select 1;
+ _objective = _this select 2;
+ _tskid = _this select 3;
+
+ private ["_size","_active","_alive"];
+ sleep 20;
+ _size = count _soldiers;
+ _lostat = round(_size * 0.2);
+ _active = true;
+
+
+ while {_active} do {
+ _alive = [];
+ _inrange = [];
+ {
+ if(alive _x and !(_x call hasOwner)) then {
+ _alive pushback _x;
+ if(_x distance _attackpos < 150) then {
+ _inrange pushback _x;
+ };
+ };
+ }foreach(_soldiers);
+ if(count _alive <= _lostat) then {
+ [_tskid, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
+ _active = false;
+ _objective setMarkerType "flag_Tanoa";
+ }else{
+ if(((count _inrange) / (count _alive)) > 0.7) then {
+ //check for any alive enemies
+ _enemies = [];
+ {
+ if(side _x == resistance || side _x == east) then {
+ _enemies pushback _x;
+ };
+ }foreach(_attackpos nearentities ["Man",400]);
+ if((count _inrange) > (count _enemies)) then {
+ //NATO has won
+ [_tskid, "FAILED",true] spawn BIS_fnc_taskSetState;
+ _active = false;
+ _abandoned = server getVariable "NATOabandoned";
+ _abandoned deleteAt (_abandoned find _objective);
+ server setVariable ["NATOabandoned",_abandoned,true];
+ server setVariable [format["garrison%1",_objective],8 + random 12,true];
+ };
+ };
+ };
+ sleep 10;
+ };
+
+};
+
+_pos = AIT_NATO_HQPos;
+//Air support (Heli)
+{
+ _group = createGroup blufor;
+ _vehtype = _x;
+ _pos = [_pos,40 + random 60,50 + random 180,false,[0,0],[100,_vehtype]] call SHK_pos;
+ _veh = createVehicle [_vehtype, _pos, [], 0,""];
+ _vehs pushback _veh;
+ _veh setDir 50;
+ _group addVehicle _veh;
+
+ createVehicleCrew _veh;
+ {
+ [_x] joinSilent _group;
+ _x setVariable ["garrison","HQ",false];
+ }foreach(crew _veh);
+ _wp = _group addWaypoint [_posTown,50];
+ _wp setWaypointType "MOVE";
+ _wp setWaypointBehaviour "COMBAT";
+ _wp setWaypointSpeed "FULL";
+ sleep 10;
+}foreach(AIT_NATO_Vehicles_AirSupport);
+
+{
+ _x addCuratorEditableObjects [_vehs+_soldiers,true];
+} forEach allCurators;
+
+
+if(_objective in AIT_NATO_Priority) then {
+ sleep 20;
+ //Air support (Winged)
+ {
+ _group = createGroup blufor;
+ _vehtype = _x;
+ _pos = [getMarkerPos AIT_NATO_AirSpawn,0,0,false,[0,0],[100,_vehtype]] call SHK_pos;
+ _veh = createVehicle [_vehtype, _pos, [], 0,""];
+ _vehs pushback _veh;
+ _veh setDir 50;
+ _group addVehicle _veh;
+ createVehicleCrew _veh;
+ {
+ [_x] joinSilent _group;
+ _x setVariable ["garrison","HQ",false];
+ }foreach(crew _veh);
+
+ {
+ _x addCuratorEditableObjects [[_veh],true];
+ } forEach allCurators;
+
+ _wp = _group addWaypoint [_posTown,0];
+ _wp setWaypointType "SAD";
+ _wp setWaypointBehaviour "COMBAT";
+ _wp setWaypointSpeed "FULL";
+
+ sleep 5;
+ }foreach(AIT_NATO_Vehicles_AirWingedSupport);
+};
+
+
+
diff --git a/actions/loadGame.sqf b/actions/loadGame.sqf
index a1ca62b7..861c1b4f 100644
--- a/actions/loadGame.sqf
+++ b/actions/loadGame.sqf
@@ -5,9 +5,8 @@ private ["_data"];
_data = profileNameSpace getVariable ("Overthrow.save.001");
if(isNil "_data") exitWith {
- AIT_startupType = "NEW";
+ server setVariable ["StartupType","NEW",true];
hint "No save found, starting new game";
- publicVariable "AIT_StartupType";
};
{
_key = _x select 0;
@@ -51,6 +50,4 @@ if(isNil "_data") exitWith {
};
}foreach(_data);
-
-AIT_StartupType = "LOAD";
-publicVariable "AIT_StartupType";
\ No newline at end of file
+server setVariable ["StartupType","LOAD",true];
\ No newline at end of file
diff --git a/description.ext b/description.ext
index 46bcfc1c..50eed7ee 100644
--- a/description.ext
+++ b/description.ext
@@ -5,7 +5,7 @@
author="ARMAzac";
OnLoadName = "Overthrow.Tanoa";
-OnLoadMission = "v0.2.3 20160812";
+OnLoadMission = "v0.3.0 (20160813)";
loadScreen = "pic.jpg";
class Header
diff --git a/factions/CRIM.sqf b/factions/CRIM.sqf
index 3491560b..a360e86f 100644
--- a/factions/CRIM.sqf
+++ b/factions/CRIM.sqf
@@ -1,7 +1,7 @@
if (!isServer) exitwith {};
_leaderpos = objNULL;
-if(AIT_StartupType == "NEW") then {
+if((server getVariable "StartupType") == "NEW") then {
{
_town = _x;
_posTown = server getVariable _town;
diff --git a/factions/NATO.sqf b/factions/NATO.sqf
index d39a5331..6f0710b2 100644
--- a/factions/NATO.sqf
+++ b/factions/NATO.sqf
@@ -7,7 +7,7 @@ _airports = [];
_NATObusy = false;
_abandoned = [];
-if(AIT_StartupType == "NEW") then {
+if((server getVariable "StartupType") == "NEW") then {
{
_stability = server getVariable format ["stability%1",_x];
if(_stability < 11) then {
@@ -30,12 +30,6 @@ if(AIT_StartupType == "NEW") then {
AIT_NATOobjectives pushBack [_pos,_name];
- _mrk = createMarker [_name,_pos];
- _mrk setMarkerShape "ICON";
- _mrk setMarkerType "hd_objective";
- _mrk setMarkerColor "ColorBlue";
- _mrk setMarkerAlpha 0;
-
_garrison = floor(4 + random(8));
if(_name in AIT_NATO_priority) then {
_garrison = floor(16 + random(8));
@@ -50,6 +44,8 @@ if(AIT_StartupType == "NEW") then {
sleep 0.05;
}foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["NameLocal","Airport"], 50000]);
+
+ server setVariable ["NATOobjectives",AIT_NATOobjectives];
//Randomly distribute NATO's vehicles
{
@@ -109,10 +105,23 @@ if(AIT_StartupType == "NEW") then {
sleep 0.05;
}foreach (AIT_allTowns);
};
-publicVariable "AIT_NATOobjectives";
+AIT_NATOobjectives = server getVariable "NATOobjectives";
+
AIT_NATOInitDone = true;
publicVariable "AIT_NATOInitDone";
-sleep 10;
+sleep 5;
+{
+ _name = _x select 1;
+ _mrk = createMarker [_name,_pos];
+ _mrk setMarkerShape "ICON";
+ if(_name in (server getVariable "NATOabandoned")) then {
+ _mrk setMarkerType "flag_Tanoa";
+ _mrk setMarkerAlpha 1;
+ }else{
+ _mrk setMarkerType "Faction_CUP_NATO";
+ _mrk setMarkerAlpha 0;
+ };
+}foreach(AIT_NATOobjectives);
while {true} do {
_abandoned = server getVariable "NATOabandoned";
@@ -145,6 +154,23 @@ while {true} do {
};
sleep 0.1;
}foreach (AIT_allTowns);
+
+ {
+ _pos = _x select 0;
+ _name = _x select 1;
+ if !(_name in _abandoned) then {
+ _garrison = server getvariable format["garrison%1",_name];
+ _vehgarrison = server getvariable format["vehgarrison%1",_name];
+
+ if(_garrison == 0) then {
+ _name spawn NATOcounter;
+ _abandoned pushback _name;
+ server setVariable ["NATOabandoned",_abandoned,false];
+ _name setMarkerAlpha 1;
+ };
+ }
+ }foreach(AIT_NATOobjectives);
+
sleep AIT_NATOwait + round(random AIT_NATOwait);
};
diff --git a/init.sqf b/init.sqf
index 81d31b99..6a9645bd 100644
--- a/init.sqf
+++ b/init.sqf
@@ -21,7 +21,7 @@ if(!isMultiplayer) then {
call compile preprocessFileLineNumbers "initVar.sqf";
//SINGLE PLAYER init
- waitUntil {!isNil "AIT_StartupType"};
+ waitUntil {sleep 1;server getVariable ["StartupType",""] != ""};
[] execVM "initEconomyLoad.sqf";
//Init factions
diff --git a/initEconomy.sqf b/initEconomy.sqf
index 694e0554..a72e229e 100644
--- a/initEconomy.sqf
+++ b/initEconomy.sqf
@@ -5,15 +5,13 @@ private ["_mSize","_name","_low","_med","_hi","_huge","_shops","_allshops","_pos
//For each city and/or town
{
- _name = text _x;// Get name
-
- server setVariable [_name,getpos _x,true];
+ _name = _x;// Get name
_mSize = 350;
if(_name in AIT_capitals + AIT_sprawling) then {//larger search radius
_mSize = 1000;
};
- _pos=getpos _x;
+ _pos= server getVariable _x;
_info = [_name,_pos];
@@ -68,7 +66,7 @@ private ["_mSize","_name","_low","_med","_hi","_huge","_shops","_allshops","_pos
{
if([_pos,_x] call fnc_isInMarker) exitWith {server setVariable [format["region_%1",_name],_x,true]};
}foreach(AIT_regions);
-}foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["NameCityCapital","NameCity","NameVillage","CityCenter"], 50000]);
+}foreach (AIT_allTowns);
server setVariable ["spawntown",AIT_spawnTowns call BIS_fnc_selectrandom,true];
{
diff --git a/initEconomyLoad.sqf b/initEconomyLoad.sqf
index 42407593..b4c126ce 100644
--- a/initEconomyLoad.sqf
+++ b/initEconomyLoad.sqf
@@ -1,28 +1,6 @@
{_x setMarkerAlpha 0} foreach AIT_regions;
-//Temporary place for stuff that isnt saved in the persistent save
-//Shops
-{
- //spawn any main shops
- if((random 100 > 20)) then {
- AIT_activeShops pushback _x;
- };
- _town = (getpos _x) call nearestTown;
- _key = format["shopsin%1",_town];
- server setVariable [_key,(server getVariable [_key,0])+1,true];
- sleep 0.1;
-}foreach(nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), AIT_shops, 50000]);
-sleep 0.5;
-//Distribution
-_count = 0;
-{
- if((random 100) > 40) then {
- _pos = getpos _x;
- AIT_activeDistribution pushBack _x;
- };
- sleep 0.1;
-}foreach(nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), AIT_warehouses, 50000]);
-sleep 0.5;
+//Stability markers
{
_stability = server getVariable format["stability%1",_x];
_pos = server getVariable _x;
@@ -42,6 +20,32 @@ sleep 0.5;
}else{
_mrk setMarkerAlpha 0;
};
+}foreach(AIT_allTowns);
+
+//Temporary place for stuff that isnt saved in the persistent save
+//Shops
+{
+ _posTown = server getVariable _x;
+ _town = _x;
+ {
+ if !(_x call hasOwner) then {
+ //spawn any main shops
+ if((random 100 > 20)) then {
+ AIT_activeShops pushback _x;
+ };
+ _key = format["shopsin%1",_town];
+ server setVariable [_key,(server getVariable [_key,0])+1,true];
+ };
+ }foreach(nearestObjects [_posTown, AIT_shops, 700]);
+
+ {
+ if !(_x call hasOwner) then {
+ if((random 100) > 60) then {
+ _pos = getpos _x;
+ AIT_activeDistribution pushBack _x;
+ };
+ };
+ }foreach(nearestObjects [_posTown, AIT_warehouses, 700]);
sleep 0.1;
}foreach(AIT_allTowns);
diff --git a/initFuncs.sqf b/initFuncs.sqf
index 7d3259fb..0192c2fd 100644
--- a/initFuncs.sqf
+++ b/initFuncs.sqf
@@ -1,4 +1,6 @@
-
+if(isServer) then {
+ server setVariable ["StartupType","",true];
+};
//Helper functions
townsInRegion = compileFinal preProcessFileLineNumbers "funcs\townsInRegion.sqf";
randomPosition = compileFinal preProcessFileLineNumbers "funcs\randomPosition.sqf";
@@ -36,6 +38,8 @@ civilianGroup = compileFinal preProcessFileLineNumbers "AI\civilianGroup.sqf";
//QRF
NATOattack = compileFinal preProcessFileLineNumbers "AI\QRF\NATOattack.sqf";
+NATOcounter = compileFinal preProcessFileLineNumbers "AI\QRF\NATOcounter.sqf";
+CTRGSupport = compileFinal preProcessFileLineNumbers "AI\QRF\CTRGSupport.sqf";
template_playerDesk = [] call compileFinal preProcessFileLineNumbers "templates\playerdesk.sqf";
template_checkpoint = [] call compileFinal preProcessFileLineNumbers "templates\NATOcheckpoint.sqf";
@@ -99,8 +103,7 @@ newGame = {
"Please wait.. generating economy" remoteExec['blackFaded',0];
[] execVM "initEconomy.sqf";
waitUntil {!isNil "AIT_economyInitDone"};
- AIT_StartupType = "NEW";
- publicVariable "AIT_StartupType";
+ server setVariable["StartupType","NEW",true];
};
setupKeyHandler = {
@@ -152,9 +155,16 @@ stability = {
//update the marker
if(_stability < 50) then {
+ _town setMarkerColor "ColorRed";
_town setMarkerAlpha 1.0 - (_stability / 50);
}else{
- _town setMarkerAlpha 0;
+ _abandoned = server getVariable "NATOabandoned";
+ if(_town in _abandoned) then {
+ _town setMarkerAlpha ((_stability - 50) / 100);
+ _town setMarkerColor "ColorGreen";
+ }else{
+ _town setMarkerAlpha 0;
+ };
}
};
diff --git a/initPlayerLocal.sqf b/initPlayerLocal.sqf
index 4a5a00a9..8843bdd1 100644
--- a/initPlayerLocal.sqf
+++ b/initPlayerLocal.sqf
@@ -21,11 +21,11 @@ if(player == bigboss) then {
waitUntil {!(isnull (findDisplay 46))};
sleep 1;
_nul = createDialog "AIT_dialog_start";
- waitUntil {!isNil "AIT_StartupType"};
}else{
- titleText ["Waiting for host...", "BLACK FADED", 0];
- waitUntil {sleep 2;server getVariable ["spawntown",""] != ""};
+ titleText ["Waiting for host...", "BLACK FADED", 0];
};
+waitUntil {sleep 1;server getVariable ["StartupType",""] != ""};
+
player forceAddUniform (AIT_clothes_locals call BIS_fnc_selectRandom);
@@ -35,7 +35,7 @@ _town = "";
_pos = [];
_housepos = [];
-if(isMultiplayer || AIT_StartupType == "LOAD") then {
+if(isMultiplayer || (server getVariable "StartupType") == "LOAD") then {
_data = server getvariable (getplayeruid player);
if !(isNil "_data") then {
_newplayer = false;
diff --git a/initServer.sqf b/initServer.sqf
index aae87697..5401e52b 100644
--- a/initServer.sqf
+++ b/initServer.sqf
@@ -9,7 +9,7 @@ if (!isMultiplayer) exitWith {};
call compile preprocessFileLineNumbers "initFuncs.sqf";
call compile preprocessFileLineNumbers "initVar.sqf";
-waitUntil {!isNil "AIT_StartupType"};
+waitUntil {sleep 1;server getVariable ["StartupType",""] != ""};
[] execVM "initEconomyLoad.sqf";
[] execVM "factions\NATO.sqf";
diff --git a/initVar.sqf b/initVar.sqf
index 827913b6..7608adbe 100644
--- a/initVar.sqf
+++ b/initVar.sqf
@@ -19,7 +19,7 @@ AIT_saving = false;
AIT_spawnTowns = ["Balavu","Rautake","Tavu","Yanukka","Tobakoro","Bua Bua","Saioko","Doodstil","Harcourt","Lijnhaven","Katkoula","Moddergat"]; //Towns where new players will spawn
AIT_spawnHouses = ["Land_Slum_01_F","Land_Slum_02_F","Land_House_Native_02_F"]; //Houses where new players will spawn
-AIT_NATOwait = 20; //Half the Average time between NATO orders
+AIT_NATOwait = 300; //Half the Average time between NATO orders
AIT_CRIMwait = 200; //Half the Average time between crim changes
AIT_civTypes_gunDealers = ["CUP_C_C_Profiteer_01","CUP_C_C_Profiteer_02","CUP_C_C_Profiteer_03","CUP_C_C_Profiteer_04"];
@@ -43,7 +43,7 @@ if(AIT_hasAce) then {
}else{
AIT_consumableItems = ["FirstAidKit","Medikit"];
};
-AIT_illegalHeadgear = ["H_MilCap_gen_F","H_Beret_gen_F"];
+AIT_illegalHeadgear = ["H_MilCap_gen_F","H_Beret_gen_F","H_HelmetB_TI_tna_F"];
AIT_illegalVests = ["V_TacVest_gen_F"];
if(AIT_hasAce) then {
@@ -123,6 +123,9 @@ AIT_NATO_Unit_LevelOneLeader = "B_T_Soldier_TL_F";
AIT_NATO_Units_LevelOne = ["B_T_Medic_F","B_T_Soldier_F","B_T_Soldier_LAT_F","B_T_Soldier_AAT_F","B_T_Soldier_AT_F","B_T_soldier_M_F","B_T_Soldier_GL_F","B_T_Soldier_AR_F"];
AIT_NATO_Units_LevelTwo = AIT_NATO_Units_LevelOne + ["B_T_Soldier_AA_F","B_T_Soldier_AAR_F","B_T_Soldier_AAA_F","B_T_Sniper_F","B_T_Spotter_F"];
+AIT_NATO_Units_CTRGSupport = ["B_CTRG_Soldier_TL_tna_F","B_CTRG_Soldier_tna_F","B_CTRG_Soldier_M_tna_F","B_CTRG_Soldier_Medic_tna_F"];
+AIT_NATO_Vehicle_CTRGTransport = "B_CTRG_Heli_Transport_01_tropic_F";
+
AIT_NATO_weapons_Police = ["hgun_PDW2000_F","SMG_05_F","SMG_01_F","SMG_02_F","arifle_SPAR_01_blk_F","CUP_arifle_M4A1_black","arifle_MXC_Black_F"];
AIT_NATO_weapons_Pistols = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F","hgun_P07_F","hgun_Rook40_F"];
@@ -144,14 +147,15 @@ AIT_vehTypes_crim = ["I_G_Offroad_01_F","I_C_Offroad_02_unarmed_F","C_Offroad_02
AIT_items = [];
if(AIT_hasAce) then {
[AIT_items,[
- ["ACE_fieldDressing",1,0,0,0.1],
- ["ACE_elasticBandage",2,0,0,0.2],
+ ["ACE_fieldDressing",2,0,0,0.1],
+ ["ACE_elasticBandage",3,0,0,0.2],
["ACE_SpraypaintBlue",20,0,0,0.2],
["ACE_SpraypaintRed",20,0,0,0.2],
["ACE_SpraypaintBlack",20,0,0,0.2],
["ACE_EarPlugs",5,0,0,0.2],
- ["ACE_Sandbag_empty",1,0,0,0],
- ["ACE_Altimeter",110,0,0,1]
+ ["ACE_Sandbag_empty",2,0,0,0],
+ ["ACE_Altimeter",110,0,0,1],
+ ["ACE_Banana",1,0,0,0]
]] call BIS_fnc_arrayPushStack;
}else{
[AIT_items,[
@@ -343,4 +347,7 @@ AIT_allTowns = [];
{
AIT_allTowns pushBack (text _x);
+ if(isServer) then {
+ server setVariable [text _x,getpos _x,true];
+ };
}foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["NameCityCapital","NameCity","NameVillage","CityCenter"], 50000]);
\ No newline at end of file
diff --git a/mission.sqm b/mission.sqm
index c48a8f2b..9c9a4a78 100644
--- a/mission.sqm
+++ b/mission.sqm
@@ -5,25 +5,25 @@ class EditorData
angleGridStep=0.2617994;
scaleGridStep=1;
autoGroupingDist=10;
- toggles=522;
+ toggles=10;
class ItemIDProvider
{
- nextID=1294;
+ nextID=1317;
};
class MarkerIDProvider
{
- nextID=20;
+ nextID=24;
};
class LayerIndexProvider
{
- nextID=43;
+ nextID=47;
};
class Camera
{
- pos[]={11507.595,43.542778,3276.5371};
- dir[]={0.11697119,-0.55990064,-0.82031977};
- up[]={0.079038985,0.82854897,-0.5543021};
- aside[]={-0.99004006,5.181646e-007,-0.14117198};
+ pos[]={1942.1526,76.834404,11276.432};
+ dir[]={0.24238978,-0.73848498,-0.62927949};
+ up[]={0.26544672,0.67426068,-0.68913722};
+ aside[]={-0.93321294,-1.3727695e-006,-0.35946509};
};
};
binarizationWanted=0;
@@ -36,9 +36,9 @@ addons[]=
"A3_Characters_F",
"A3_Weapons_F_Items",
"ace_medical",
- "A3_Modules_F_Curator_Curator",
"A3_Characters_F_Exp_Civil",
- "A3_Boat_F_Exp_Boat_Transport_02"
+ "A3_Boat_F_Exp_Boat_Transport_02",
+ "CUP_WaterVehicles_Fregata"
};
class AddonsMetaData
{
@@ -86,26 +86,24 @@ class AddonsMetaData
url="http://ace3mod.com/";
};
class Item6
- {
- className="A3_Modules_F_Curator";
- name="Arma 3 Zeus Update - Scripted Modules";
- author="Bohemia Interactive";
- url="http://www.arma3.com";
- };
- class Item7
{
className="A3_Characters_F_Exp";
name="Arma 3 Apex - Characters and Clothing";
author="Bohemia Interactive";
url="http://www.arma3.com";
};
- class Item8
+ class Item7
{
className="A3_Boat_F_Exp";
name="Arma 3 Apex - Boats and Submersibles";
author="Bohemia Interactive";
url="http://www.arma3.com";
};
+ class Item8
+ {
+ className="CUP_WaterVehicles_Fregata";
+ name="CUP_WaterVehicles_Fregata";
+ };
};
};
randomSeed=2938931;
@@ -569,7 +567,7 @@ class Mission
};
class Entities
{
- items=27;
+ items=28;
class Item0
{
dataType="Logic";
@@ -690,7 +688,7 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={12433.778,143.218,1923.8456};
+ position[]={12432.932,143.27414,1924.8445};
angles[]={0,5.6556692,0};
};
side="Independent";
@@ -730,7 +728,7 @@ class Mission
};
id=974;
type="CUP_I_GUE_Commander";
- atlOffset=-0.0032806396;
+ atlOffset=0.022125244;
class CustomAttributes
{
class Attribute0
@@ -874,7 +872,7 @@ class Mission
{
};
id=49;
- atlOffset=-0.0032806396;
+ atlOffset=0.022125244;
};
class Item9
{
@@ -912,8 +910,8 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6821.832,2.661351,4267.1797};
- angles[]={0,5.2751179,0};
+ position[]={12439.316,141.10861,1921.5017};
+ angles[]={0,5.7074423,0};
};
side="Independent";
flags=6;
@@ -953,7 +951,7 @@ class Mission
};
id=975;
type="CUP_I_GUE_Commander";
- atlOffset=-56.985508;
+ atlOffset=-0.49603271;
class CustomAttributes
{
class Attribute0
@@ -1097,7 +1095,7 @@ class Mission
{
};
id=582;
- atlOffset=-56.985508;
+ atlOffset=-0.49603271;
class CustomAttributes
{
class Attribute0
@@ -1134,11 +1132,11 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6822.665,2.661351,4264.0996};
- angles[]={0,5.2751179,0};
+ position[]={12438.782,141.10861,1918.356};
+ angles[]={0,5.7074423,0};
};
side="Independent";
- flags=6;
+ flags=2;
class Attributes
{
init="this setCaptive true;";
@@ -1175,7 +1173,7 @@ class Mission
};
id=976;
type="CUP_I_GUE_Commander";
- atlOffset=-57.050571;
+ atlOffset=0.52081299;
class CustomAttributes
{
class Attribute0
@@ -1319,7 +1317,7 @@ class Mission
{
};
id=584;
- atlOffset=-57.050571;
+ atlOffset=0.52081299;
};
class Item13
{
@@ -1333,8 +1331,8 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6821.4346,2.661351,4265.5747};
- angles[]={0,5.2751179,0};
+ position[]={12438.283,141.10861,1920.2109};
+ angles[]={0,5.7074423,0};
};
side="Independent";
flags=6;
@@ -1373,7 +1371,7 @@ class Mission
};
id=977;
type="CUP_I_GUE_Commander";
- atlOffset=-57.047325;
+ atlOffset=-0.20800781;
class CustomAttributes
{
class Attribute0
@@ -1517,7 +1515,7 @@ class Mission
{
};
id=586;
- atlOffset=-57.047325;
+ atlOffset=-0.20800781;
};
class Item14
{
@@ -1531,11 +1529,11 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6822.0029,2.661351,4262.8169};
- angles[]={0,5.2751179,0};
+ position[]={12437.644,141.10861,1917.4686};
+ angles[]={0,5.7074423,0};
};
side="Independent";
- flags=6;
+ flags=2;
class Attributes
{
init="this setCaptive true;";
@@ -1571,7 +1569,7 @@ class Mission
};
id=978;
type="CUP_I_GUE_Commander";
- atlOffset=-57.031075;
+ atlOffset=0.66769409;
class CustomAttributes
{
class Attribute0
@@ -1715,7 +1713,7 @@ class Mission
{
};
id=588;
- atlOffset=-57.031075;
+ atlOffset=0.66769409;
class CustomAttributes
{
class Attribute0
@@ -1752,8 +1750,8 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6820.7666,2.661351,4264.457};
- angles[]={0,5.2751179,0};
+ position[]={12437.208,141.10861,1919.476};
+ angles[]={0,5.7074423,0};
};
side="Independent";
flags=6;
@@ -1792,7 +1790,7 @@ class Mission
};
id=980;
type="CUP_I_GUE_Commander";
- atlOffset=-56.97953;
+ atlOffset=-0.10510254;
class CustomAttributes
{
class Attribute0
@@ -1936,7 +1934,7 @@ class Mission
{
};
id=590;
- atlOffset=-56.97953;
+ atlOffset=-0.10510254;
class CustomAttributes
{
class Attribute0
@@ -1973,11 +1971,11 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6820.9087,2.661351,4261.6426};
- angles[]={0,5.2751179,0};
+ position[]={12436.158,141.10861,1916.8606};
+ angles[]={0,5.7074423,0};
};
side="Independent";
- flags=6;
+ flags=2;
class Attributes
{
init="this setCaptive true;";
@@ -2013,7 +2011,7 @@ class Mission
};
id=979;
type="CUP_I_GUE_Commander";
- atlOffset=-56.957695;
+ atlOffset=0.86174011;
class CustomAttributes
{
class Attribute0
@@ -2157,7 +2155,7 @@ class Mission
{
};
id=592;
- atlOffset=-56.957695;
+ atlOffset=0.86174011;
};
class Item17
{
@@ -2171,11 +2169,11 @@ class Mission
dataType="Object";
class PositionInfo
{
- position[]={6818.4541,3.7990463,4261.3193};
- angles[]={0,5.2751179,0};
+ position[]={12433.793,142.24631,1917.5957};
+ angles[]={0,5.7074423,0};
};
side="Independent";
- flags=6;
+ flags=2;
class Attributes
{
init="this setCaptive true;";
@@ -2211,7 +2209,7 @@ class Mission
};
id=981;
type="CUP_I_GUE_Commander";
- atlOffset=-55.354992;
+ atlOffset=1.5978241;
class CustomAttributes
{
class Attribute0
@@ -2355,7 +2353,7 @@ class Mission
{
};
id=594;
- atlOffset=-55.354992;
+ atlOffset=1.5978241;
class CustomAttributes
{
class Attribute0
@@ -2600,115 +2598,6 @@ class Mission
atlOffset=-35.100716;
};
class Item21
- {
- dataType="Logic";
- class PositionInfo
- {
- position[]={6679.0972,-11.13437,5871.5259};
- };
- id=1151;
- type="ModuleCurator_F";
- class CustomAttributes
- {
- class Attribute0
- {
- property="ModuleCurator_F_Owner";
- expression="_this setVariable ['Owner',_value,true];";
- class Value
- {
- class data
- {
- class type
- {
- type[]=
- {
- "STRING"
- };
- };
- value="bigboss";
- };
- };
- };
- class Attribute1
- {
- property="ModuleCurator_F_Forced";
- expression="_this setVariable ['Forced',_value,true];";
- class Value
- {
- class data
- {
- class type
- {
- type[]=
- {
- "SCALAR"
- };
- };
- value=0;
- };
- };
- };
- class Attribute2
- {
- property="ModuleCurator_F_Name";
- expression="_this setVariable ['Name',_value,true];";
- class Value
- {
- class data
- {
- class type
- {
- type[]=
- {
- "STRING"
- };
- };
- value="";
- };
- };
- };
- class Attribute3
- {
- property="ModuleInfo";
- expression="false";
- class Value
- {
- class data
- {
- class type
- {
- type[]=
- {
- "BOOL"
- };
- };
- value=1;
- };
- };
- };
- class Attribute4
- {
- property="ModuleCurator_F_Addons";
- expression="_this setVariable ['Addons',_value,true];";
- class Value
- {
- class data
- {
- class type
- {
- type[]=
- {
- "SCALAR"
- };
- };
- value=2;
- };
- };
- };
- nAttributes=5;
- };
- };
- class Item22
{
dataType="Marker";
position[]={1839.431,-2.1247401e-014,12996.61};
@@ -2718,7 +2607,7 @@ class Mission
id=1196;
atlOffset=-13.45;
};
- class Item23
+ class Item22
{
dataType="Group";
side="Civilian";
@@ -3035,7 +2924,7 @@ class Mission
id=1209;
atlOffset=19.462999;
};
- class Item24
+ class Item23
{
dataType="Object";
class PositionInfo
@@ -3076,7 +2965,7 @@ class Mission
nAttributes=1;
};
};
- class Item25
+ class Item24
{
dataType="Group";
side="Civilian";
@@ -3369,7 +3258,7 @@ class Mission
id=1228;
atlOffset=10.867999;
};
- class Item26
+ class Item25
{
dataType="Object";
class PositionInfo
@@ -3410,5 +3299,273 @@ class Mission
nAttributes=1;
};
};
+ class Item26
+ {
+ dataType="Group";
+ side="West";
+ class Entities
+ {
+ items=12;
+ class Item0
+ {
+ dataType="Object";
+ class PositionInfo
+ {
+ position[]={1167.2899,-8.8520765,12241.205};
+ angles[]={0,2.9241531,0};
+ };
+ side="West";
+ class Attributes
+ {
+ };
+ id=1297;
+ type="B_crew_F";
+ atlOffset=11.208818;
+ };
+ class Item1
+ {
+ dataType="Object";
+ class PositionInfo
+ {
+ position[]={1167.2899,-8.8520765,12241.205};
+ angles[]={0,2.9241531,0};
+ };
+ side="West";
+ flags=2;
+ class Attributes
+ {
+ };
+ id=1298;
+ type="B_crew_F";
+ atlOffset=11.208818;
+ };
+ class Item2
+ {
+ dataType="Object";
+ class PositionInfo
+ {
+ position[]={1167.2899,-8.8520765,12241.205};
+ angles[]={0,2.9241531,0};
+ };
+ side="West";
+ class Attributes
+ {
+ };
+ id=1299;
+ type="B_crew_F";
+ atlOffset=11.208818;
+ };
+ class Item3
+ {
+ dataType="Object";
+ class PositionInfo
+ {
+ position[]={1167.2899,-8.8520765,12241.205};
+ angles[]={0,2.9241531,0};
+ };
+ side="West";
+ class Attributes
+ {
+ };
+ id=1300;
+ type="B_crew_F";
+ atlOffset=11.208818;
+ };
+ class Item4
+ {
+ dataType="Object";
+ class PositionInfo
+ {
+ position[]={1167.2899,-8.8520765,12241.205};
+ angles[]={0,2.9241531,0};
+ };
+ side="West";
+ class Attributes
+ {
+ };
+ id=1301;
+ type="B_crew_F";
+ atlOffset=11.208818;
+ };
+ class Item5
+ {
+ dataType="Waypoint";
+ position[]={1540.0808,-0.00036621094,9364.1758};
+ speed="LIMITED";
+ combat="CARELESS";
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1302;
+ type="Move";
+ atlOffset=30.741728;
+ };
+ class Item6
+ {
+ dataType="Waypoint";
+ position[]={4327.917,-30.796753,10636.529};
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1303;
+ type="Move";
+ atlOffset=-11.241631;
+ };
+ class Item7
+ {
+ dataType="Waypoint";
+ position[]={4855.3691,-28.955563,12259.9};
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1304;
+ type="Move";
+ atlOffset=1.9073486e-006;
+ };
+ class Item8
+ {
+ dataType="Waypoint";
+ position[]={4725.0215,-27.095093,14712.929};
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1305;
+ type="Move";
+ atlOffset=6.5335693;
+ };
+ class Item9
+ {
+ dataType="Waypoint";
+ position[]={3558.0203,-22.608154,14907.43};
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1306;
+ type="Move";
+ atlOffset=14.685711;
+ };
+ class Item10
+ {
+ dataType="Waypoint";
+ position[]={1094.3525,-24.307007,13853.886};
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1307;
+ type="Move";
+ atlOffset=20.12505;
+ };
+ class Item11
+ {
+ dataType="Waypoint";
+ position[]={1167.2899,-8.3535156,12241.155};
+ type="Cycle";
+ class Effects
+ {
+ };
+ showWP="NEVER";
+ id=1308;
+ atlOffset=11.708818;
+ class AttachedTo
+ {
+ id=1296;
+ offset[]={0,0.5,0};
+ };
+ };
+ };
+ class Attributes
+ {
+ };
+ class CrewLinks
+ {
+ class LinkIDProvider
+ {
+ nextID=5;
+ };
+ class Links
+ {
+ items=5;
+ class Item0
+ {
+ linkID=0;
+ item0=1297;
+ item1=1296;
+ class CustomData
+ {
+ role=1;
+ };
+ };
+ class Item1
+ {
+ linkID=1;
+ item0=1298;
+ item1=1296;
+ class CustomData
+ {
+ role=2;
+ turretPath[]={1};
+ };
+ };
+ class Item2
+ {
+ linkID=2;
+ item0=1299;
+ item1=1296;
+ class CustomData
+ {
+ role=2;
+ turretPath[]={0};
+ };
+ };
+ class Item3
+ {
+ linkID=3;
+ item0=1300;
+ item1=1296;
+ class CustomData
+ {
+ role=2;
+ turretPath[]={2};
+ };
+ };
+ class Item4
+ {
+ linkID=4;
+ item0=1301;
+ item1=1296;
+ class CustomData
+ {
+ role=2;
+ turretPath[]={3};
+ };
+ };
+ };
+ };
+ id=1295;
+ atlOffset=11.208818;
+ };
+ class Item27
+ {
+ dataType="Object";
+ class PositionInfo
+ {
+ position[]={1167.2899,7.7908001,12241.155};
+ angles[]={0,2.9241531,0};
+ };
+ side="West";
+ flags=2;
+ class Attributes
+ {
+ };
+ id=1296;
+ type="CUP_B_Frigate_ANZAC";
+ atlOffset=11.208818;
+ };
};
};
diff --git a/spawners/criminal.sqf b/spawners/criminal.sqf
index c0b3ace7..cb24e4a9 100644
--- a/spawners/criminal.sqf
+++ b/spawners/criminal.sqf
@@ -21,7 +21,7 @@ while{true} do {
if (spawner getVariable _id) then {
_active = true;
- _numCRIM = server getVariable format ["numcrims%1",_town];
+ _numCRIM = server getVariable [format ["numcrims%1",_town],0];
if(_numCRIM > 0) then {
_time = server getVariable format ["timecrims%1",_town];
diff --git a/spawners/insertion/reGarrisonTown.sqf b/spawners/insertion/reGarrisonTown.sqf
index 9d887cf7..cd577445 100644
--- a/spawners/insertion/reGarrisonTown.sqf
+++ b/spawners/insertion/reGarrisonTown.sqf
@@ -50,7 +50,7 @@ _vehtype = AIT_NATO_Vehicle_PoliceHeli;
_drop = [_townPos,[350,500],_attackdir + (random 90)] call SHK_pos;
_spawnpos = AIT_NATO_HQPos;
-if(_stability < 20) then {
+if(_stability < 25) then {
//last ditch efforts to save this town
//send in the big guns
_vehtype = AIT_NATO_Vehicle_AirTransport;
@@ -65,10 +65,11 @@ if(_stability < 20) then {
[_civ,_town] call initPolice;
_count = _count + 1;
sleep 0.1;
+ _townPos spawn CTRGsupport;
};
}else{
if(_stability < 40 and (random 100) > 50) then {
- //Shit's getting real, send more dudes
+ //Shit's getting real, send more dudes
_num = 2;
_count = 0;
while {_count < _num} do {
@@ -81,7 +82,11 @@ if(_stability < 20) then {
_count = _count + 1;
sleep 0.1;
};
- };
+ };
+};
+
+if(_stability < 40 and (random 100) > 90) then {
+ _townPos spawn CTRGsupport;
};
_veh = _vehtype createVehicle _spawnpos;
@@ -89,11 +94,6 @@ _dir = [_spawnpos,_townPos] call BIS_fnc_dirTo;
_veh setDir _dir;
_tgroup addVehicle _veh;
-{
- _x moveInCargo _veh;
-}foreach(_police);
-
-
createVehicleCrew _veh;
sleep 0.1;
{
@@ -102,6 +102,10 @@ sleep 0.1;
_x setVariable ["garrison","HQ",false];
}foreach(crew _veh);
+{
+ _x moveInCargo _veh;
+}foreach(_police);
+
_police pushBack _veh;
_start = [_spawnpos,[10,29],random 360] call SHK_pos;
@@ -161,7 +165,7 @@ _moveto = [AIT_NATO_HQPos,200,_dir] call SHK_pos;
_wp = _tgroup addWaypoint [_moveto,0];
_wp setWaypointType "LOITER";
-_wp setWaypointBehaviour "SAFE";
+_wp setWaypointBehaviour "CARELESS";
_wp setWaypointSpeed "FULL";
_wp setWaypointCompletionRadius 100;
diff --git a/stats.sqf b/stats.sqf
index 4fa76bf0..bff0e87f 100644
--- a/stats.sqf
+++ b/stats.sqf
@@ -24,12 +24,29 @@ while {alive player} do {
_wanted = "WANTED";
};
};
- _knows = (blufor knowsabout player);
+ _standing = "";
+ _rep = player getVariable "rep";
+ if(_rep > -1) then {
+ _standing = format["+%1",_rep];
+ }else{
+ _standing = format["%1",_rep];
+ };
+
_seen = "";
- if(player call unitSeen) then {
- _seen = "o_o";
- };
- _txt = format ["$%1
%2
%3", [player getVariable "money", 1, 0, true] call CBA_fnc_formatNumber,_seen,_wanted];
+ if(player call unitSeenNATO) then {
+ _seen = "o_o";
+ if(_rep < -50) then {
+ _seen = "O_O";
+ };
+ }else{
+ if(player call unitSeenCRIM) then {
+ _seen = "o_o";
+ if((abs _rep) > 50) then {
+ _seen = "O_O";
+ };
+ };
+ };
+ _txt = format ["$%1
%2
%3
%4", [player getVariable "money", 1, 0, true] call CBA_fnc_formatNumber,_standing,_seen,_wanted];
if (_txt != _currentTxt) then {
_setText ctrlSetStructuredText (parseText format ["%1", _txt]);
_setText ctrlCommit 0;