0.7 + 1.7.5.M1D19

This commit is contained in:
vbawol
2013-01-20 09:36:43 -06:00
parent e84cbbd2ef
commit 1cb4388089
24 changed files with 571 additions and 396 deletions

View File

@@ -9,19 +9,19 @@ _maxWildZombies = 3;
_age = -1;
_nearbyBuildings = [];
_radius = 200;
_maxZombies = 10;
_radius = 300;
_position = getPosATL player;
//_maxZombies = 10;
diag_log ("Type: " +str(_type));
//diag_log ("Type: " +str(_type));
//diag_log("SPAWN CHECKING: Starting");
_locationstypes = ["NameCityCapital","NameCity","NameVillage"];
_nearestCity = nearestLocations [getPos player, _locationstypes, _radius];
_townname = text (_nearestCity select 0);
_position = getPosATL player;
_nearbytype = type (_nearestCity select 0);
//_locationstypes = ["NameCityCapital","NameCity","NameVillage"];
//_nearestCity = nearestLocations [getPos player, _locationstypes, _radius/2];
//_townname = text (_nearestCity select 0);
//_nearbytype = type (_nearestCity select 0);
/*
switch (_nearbytype) do {
case "NameVillage": {
//_radius = 250;
@@ -36,54 +36,69 @@ switch (_nearbytype) do {
_maxZombies = 50;
};
};
*/
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
if ("ItemMap_Debug" in items player) then {
deleteMarkerLocal "MaxZeds";
deleteMarkerLocal "Counter";
deleteMarkerLocal "Loot30";
deleteMarkerLocal "Loot120";
_markerstr = createMarkerLocal ["MaxZeds", _position];
_markerstr setMarkerColorLocal "ColorRed";
_markerstr setMarkerColorLocal "ColorYellow";
_markerstr setMarkerShapeLocal "ELLIPSE";
_markerstr setMarkerBrushLocal "Border";
_markerstr setMarkerSizeLocal [_radius, _radius];
_markerstr1 = createMarkerLocal ["Counter", _position];
_markerstr1 setMarkerColorLocal "ColorYellow";
_markerstr1 setMarkerColorLocal "ColorRed";
_markerstr1 setMarkerShapeLocal "ELLIPSE";
_markerstr1 setMarkerBrushLocal "Border";
_markerstr1 setMarkerSizeLocal [_radius+100, _radius+100];
_markerstr2 = createMarkerLocal ["Loot30", _position];
_markerstr2 setMarkerColorLocal "ColorRed";
_markerstr2 setMarkerShapeLocal "ELLIPSE";
_markerstr2 setMarkerBrushLocal "Border";
_markerstr2 setMarkerSizeLocal [30, 30];
_markerstr3 = createMarkerLocal ["Loot120", _position];
_markerstr3 setMarkerColorLocal "ColorBlue";
_markerstr3 setMarkerShapeLocal "ELLIPSE";
_markerstr3 setMarkerBrushLocal "Border";
_markerstr3 setMarkerSizeLocal [120, 120];
};
/*
switch (_type) do {
case "Zeds": {
if (_spawnZombies) then {
//_nearbyBuildings = nearestObjects [_position, ["building"], _radius];
_nearbyBuildings = nearestObjects [_position, dayz_LootBuildings, _radius];
_nearbyCount = count _nearbyBuildings;
if (_nearbyCount > 0) then {
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies, _nearbyBuildings] call player_spawnzedCheck;
};
};
_nearby = nearestObjects [_position, dayz_ZombieBuildings, _radius];
};
case "both": {
//[_position, _maxZombies] call wild_spawnZombies;
_nearbyBuildings = nearestObjects [_position, dayz_ZombieBuildings, _radius];
_nearbyCount = count _nearbyBuildings;
if (_nearbyCount > 0) then {
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings] call player_spawnlootCheck;
if (_spawnZombies) then {
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies, _nearbyBuildings] call player_spawnzedCheck;
};
};
_nearby = nearestObjects [_position, ["building"], _radius];
};
case "Loot": {
//_nearbyBuildings = nearestObjects [_position, ["building"], _radius];
_nearbyBuildings = nearestObjects [_position, dayz_ZombieBuildings, _radius];
_nearbyCount = count _nearbyBuildings;
if (_nearbyCount > 0) then {
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings] call player_spawnlootCheck;
_nearby = nearestObjects [_position, dayz_LootBuildings, _radius];
};
};
};
*/
_nearby = nearestObjects [_position, ["building"], _radius];
_nearbyCount = count _nearby;
if (_nearbyCount < 1) exitwith {};
{
_type = typeOf _x;
_config = configFile >> "CfgBuildingLoot" >> _type;
_canLoot = isClass (_config);
_dis = _x distance player;
if ((_dis < 120) and (_dis > 30) and _canLoot and !_inVehicle) then {
//diag_log ("Loot System Running");
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity] call player_spawnlootCheck;
};
if (_spawnZombies) then {
//diag_log ("Zed System Running");
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
};
} forEach _nearby;