mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
v0.1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private ["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_lootChance","_weights","_cntWeights","_index"];
|
||||
private["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_itemChances","_lootChance","_weights","_cntWeights","_index"];
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_positions","_min","_iPos","_max","_obj","_type","_nearBy","_clean","_unitTypes","_config","_num","_originalPos","_zombieChance","_rnd","_nearByPlayer","_canLoot"];
|
||||
private["_serial","_positions","_min","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_clean","_unitTypes","_max","_isNoone","_config","_num","_originalPos","_zombieChance","_rnd","_fastRun"];
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
@@ -29,7 +29,7 @@ if (_canLoot) then {
|
||||
//_iPos = position (_obj);
|
||||
_nearBy = count nearestObjects [_iPos, ["zZombie_Base"],1] > 0;
|
||||
_nearByPlayer = ({isPlayer _x} count (_iPos nearEntities ["CAManBase",30])) > 0;
|
||||
diag_log ("BUILDING: " + _type + " / " + str(_nearBy) + " / " + str(_nearByPlayer));
|
||||
//diag_log ("BUILDING: " + _type + " / " + str(_nearBy) + " / " + str(_nearByPlayer));
|
||||
if (!_nearByPlayer and !_nearBy) then {
|
||||
[_iPos,false,_unitTypes] call zombie_generate;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
private["_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_hasTent","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_allFixed","_hitpoints","_damage","_part","_cmpt","_color","_string","_handle","_trader_id","_category","_buy","_buy2","_buy3","_buy1","_buy4","_buy5","_cantrader","_cantrader1","_buy6","_zparts1","_zparts2","_zparts3","_zparts4","_metals1","_metals2","_metals4","_metals3","_metals5","_dogHandle","_lieDown","_warn"];
|
||||
private["_isPZombie","_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_hasTent","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_allFixed","_hitpoints","_damage","_part","_cmpt","_color","_string","_handle","_trader_id","_category","_buy","_buy2","_buy3","_buy1","_buy4","_buy5","_cantrader","_cantrader1","_buy6","_zparts1","_zparts2","_zparts3","_zparts4","_metals1","_metals2","_metals4","_metals3","_metals5","_dogHandle","_lieDown","_warn"];
|
||||
|
||||
_vehicle = vehicle player;
|
||||
_inVehicle = (_vehicle != player);
|
||||
@@ -42,6 +42,17 @@ if (_canPickLight and !dayz_hasLight) then {
|
||||
s_player_removeflare = -1;
|
||||
};
|
||||
|
||||
_isPZombie = player isKindOf "PZombie_VB";
|
||||
if(_isPZombie) then {
|
||||
//_state = animationState player;
|
||||
//hint str(_state);
|
||||
if (s_player_callzombies < 0) then {
|
||||
s_player_callzombies = player addAction ["Call Zombies", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false, "",""];
|
||||
// s_player_callzombies1 = player addAction ["Zombie Vison", "\z\addons\dayz_code\actions\vison_zombie.sqf",player, 4, true, false, "",""];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) then { //Has some kind of target
|
||||
_isHarvested = cursorTarget getVariable["meatHarvested",false];
|
||||
_isVehicle = cursorTarget isKindOf "AllVehicles";
|
||||
@@ -124,20 +135,33 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
s_player_fillfuel = -1;
|
||||
};
|
||||
|
||||
// Gut animal or zombie
|
||||
if (!alive cursorTarget and (_isAnimal or _isZombie) and _hasKnife and !_isHarvested and _canDo) then {
|
||||
if (s_player_butcher < 0) then {
|
||||
if(_isZombie) then {
|
||||
s_player_butcher = player addAction ["Gut Zombie", "\z\addons\dayz_code\actions\gather_zparts.sqf",cursorTarget, 3, true, true, "", ""];
|
||||
} else {
|
||||
s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",cursorTarget, 3, true, true, "", ""];
|
||||
|
||||
|
||||
if(_isPZombie) then {
|
||||
// Pzombie Gut human corpse or animal
|
||||
if (!alive cursorTarget and (_isAnimal or _isMan) and !_isHarvested and _canDo) then {
|
||||
if (s_player_butcher < 0) then {
|
||||
s_player_butcher = player addAction ["Feed", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",cursorTarget, 3, true, false, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = -1;
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = -1;
|
||||
// Human Gut animal or zombie
|
||||
if (!alive cursorTarget and (_isAnimal or _isZombie) and _hasKnife and !_isHarvested and _canDo) then {
|
||||
if (s_player_butcher < 0) then {
|
||||
if(_isZombie) then {
|
||||
s_player_butcher = player addAction ["Gut Zombie", "\z\addons\dayz_code\actions\gather_zparts.sqf",cursorTarget, 3, true, true, "", ""];
|
||||
} else {
|
||||
s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",cursorTarget, 3, true, true, "", ""];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = -1;
|
||||
};
|
||||
};
|
||||
|
||||
//Fireplace Actions check
|
||||
if(inflamed cursorTarget and _hasRawMeat and _canDo) then {
|
||||
if (s_player_cook < 0) then {
|
||||
@@ -251,7 +275,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
// Parts Trader Worker3
|
||||
if (_isMan and _traderType == parts_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == parts_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -271,7 +295,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
//weapon_trader_1
|
||||
if (_isMan and _traderType == weapon_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == weapon_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -296,7 +320,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
// can_trader_1
|
||||
if (_isMan and _traderType == can_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == can_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -323,7 +347,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
//ammo_trader_1
|
||||
if (_isMan and _traderType == ammo_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == ammo_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -349,7 +373,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
|
||||
|
||||
//boat_trader_1
|
||||
if (_isMan and _traderType == boat_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == boat_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -367,7 +391,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
|
||||
|
||||
//auto_trader_1
|
||||
if (_isMan and _traderType == auto_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == auto_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -395,7 +419,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
|
||||
|
||||
//auto_trader_2
|
||||
if (_isMan and _traderType == auto_trader_2) then {
|
||||
if (_isMan and !_isPZombie and _traderType == auto_trader_2) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -423,7 +447,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
// mad_sci
|
||||
if (_isMan and _traderType == mad_sci) then {
|
||||
if (_isMan and !_isPZombie and _traderType == mad_sci) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -443,7 +467,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
// metals_trader
|
||||
if (_isMan and _traderType == metals_trader) then {
|
||||
if (_isMan and !_isPZombie and _traderType == metals_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -459,7 +483,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
s_player_parts set [count s_player_parts,_metals3];
|
||||
s_player_parts set [count s_player_parts,_metals4];
|
||||
s_player_parts set [count s_player_parts,_metals5];
|
||||
;
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
};
|
||||
@@ -549,6 +573,8 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
//Others
|
||||
player removeAction s_player_forceSave;
|
||||
s_player_forceSave = -1;
|
||||
player removeAction s_player_flipveh;
|
||||
s_player_flipveh = -1;
|
||||
player removeAction s_player_deleteBuild;
|
||||
s_player_deleteBuild = -1;
|
||||
player removeAction s_player_butcher;
|
||||
@@ -563,12 +589,60 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
s_player_fillfuel = -1;
|
||||
player removeAction s_player_studybody;
|
||||
s_player_studybody = -1;
|
||||
|
||||
// vault
|
||||
//Dog
|
||||
player removeAction s_player_tamedog;
|
||||
s_player_tamedog = -1;
|
||||
player removeAction s_player_feeddog;
|
||||
s_player_feeddog = -1;
|
||||
player removeAction s_player_waterdog;
|
||||
s_player_waterdog = -1;
|
||||
player removeAction s_player_staydog;
|
||||
s_player_staydog = -1;
|
||||
player removeAction s_player_trackdog;
|
||||
s_player_trackdog = -1;
|
||||
player removeAction s_player_barkdog;
|
||||
s_player_barkdog = -1;
|
||||
player removeAction s_player_warndog;
|
||||
s_player_warndog = -1;
|
||||
player removeAction s_player_followdog;
|
||||
s_player_followdog = -1;
|
||||
|
||||
// vault
|
||||
player removeAction s_player_unlockvault;
|
||||
s_player_unlockvault = -1;
|
||||
player removeAction s_player_packvault;
|
||||
s_player_packvault = -1;
|
||||
player removeAction s_player_lockvault;
|
||||
s_player_lockvault = -1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//Dog actions on player self
|
||||
_dogHandle = player getVariable ["dogID", 0];
|
||||
if (_dogHandle > 0) then {
|
||||
_dog = _dogHandle getFSMVariable "_dog";
|
||||
_ownerID = "0";
|
||||
if (!isNull cursorTarget) then { _ownerID = cursorTarget getVariable ["characterID","0"]; };
|
||||
if (_canDo and !_inVehicle and alive _dog and _ownerID != dayz_characterID) then {
|
||||
if (s_player_movedog < 0) then {
|
||||
s_player_movedog = player addAction [localize "str_actions_movedog", "\z\addons\dayz_code\actions\dog\move.sqf", player getVariable ["dogID", 0], 1, false, true, "", ""];
|
||||
};
|
||||
if (s_player_speeddog < 0) then {
|
||||
_text = "Walk";
|
||||
_speed = 0;
|
||||
if (_dog getVariable ["currentSpeed",1] == 0) then { _speed = 1; _text = "Run"; };
|
||||
s_player_speeddog = player addAction [format[localize "str_actions_speeddog", _text], "\z\addons\dayz_code\actions\dog\speed.sqf",[player getVariable ["dogID", 0],_speed], 0, false, true, "", ""];
|
||||
};
|
||||
if (s_player_calldog < 0) then {
|
||||
s_player_calldog = player addAction [localize "str_actions_calldog", "\z\addons\dayz_code\actions\dog\follow.sqf", [player getVariable ["dogID", 0], true], 2, false, true, "", ""];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_movedog;
|
||||
s_player_movedog = -1;
|
||||
player removeAction s_player_speeddog;
|
||||
s_player_speeddog = -1;
|
||||
player removeAction s_player_calldog;
|
||||
s_player_calldog = -1;
|
||||
};
|
||||
@@ -58,7 +58,8 @@ if (_scaleLight < 0.9) then {
|
||||
};
|
||||
};
|
||||
_nearLight = nearestObject [(vehicle player),"StreetLamp"];
|
||||
if (!isNull _nearLight && (lightIsOn _nearLight == "ON")) then {
|
||||
//if (!isNull _nearLight && (lightIsOn _nearLight == "ON")) then {
|
||||
if (!isNull _nearLight) then {
|
||||
_scaler = 50 - (_nearLight distance (vehicle player));
|
||||
_scaleLight = ((_scaler / 50) * 2) + _scaleLight;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,61 @@
|
||||
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills"];
|
||||
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_dont_kill","_model"];
|
||||
if (deathHandled) exitWith {};
|
||||
deathHandled = true;
|
||||
//Death
|
||||
_dont_kill = false;
|
||||
|
||||
_body = player;
|
||||
_playerID = getPlayerUID player;
|
||||
|
||||
|
||||
|
||||
// If player was infected resurect as a zombie before death
|
||||
if (r_player_infected) then {
|
||||
if(player isKindOf "PZombie_VB") then {
|
||||
// do nothing kill anyways
|
||||
} else {
|
||||
_model = ["pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"] select floor (random 11);
|
||||
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
|
||||
|
||||
r_player_inpain = false;
|
||||
r_player_dead = false;
|
||||
r_player_injured = false;
|
||||
r_player_cardiac = false;
|
||||
|
||||
//Give Blood
|
||||
r_player_blood = r_player_bloodTotal;
|
||||
player setVariable["USEC_lowBlood",false,true];
|
||||
usecMorphine = [player,player];
|
||||
publicVariable "usecMorphine";
|
||||
player setVariable ["USEC_inPain", false, true];
|
||||
usecBandage = [player,player];
|
||||
publicVariable "usecBandage";
|
||||
player setdamage 0;
|
||||
{player setVariable[_x,false,true];} forEach USEC_woundHit;
|
||||
player setVariable ["USEC_injured",false,true];
|
||||
|
||||
sleep 1;
|
||||
r_player_handler = false;
|
||||
nul = [] spawn fnc_usec_recoverUncons;
|
||||
|
||||
disableUserInput false;
|
||||
|
||||
// player setVariable ["medForceUpdate",true,true];
|
||||
|
||||
if (!(player getVariable ["NORRN_unconscious", true])) then {
|
||||
nul = [] spawn fnc_usec_recoverUncons;
|
||||
};
|
||||
if(animationState player == "AmovPpneMstpSnonWnonDnon_healed") then {
|
||||
nul = [] spawn fnc_usec_recoverUncons;
|
||||
};
|
||||
|
||||
_dont_kill = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if (_dont_kill) exitWith {};
|
||||
|
||||
//Send Death Notice
|
||||
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName];
|
||||
publicVariableServer "dayzDeath";
|
||||
@@ -17,6 +67,7 @@ _id = [player,50,true,getPosATL player] spawn player_alertZombies;
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
|
||||
player setDamage 1;
|
||||
0.1 fadeSound 0;
|
||||
|
||||
|
||||
@@ -15,22 +15,22 @@ dayz_inVehicle = _inVehicle;
|
||||
//if (((time - dayz_spawnWait) < dayz_spawnDelay) or ((time - dayz_lootWait) < dayz_lootDelay)) exitWith {diag_log("Skipping Check since neither loot or zombies are ready");};
|
||||
//if (((time - dayz_spawnWait) < dayz_spawnDelay) and ((time - dayz_lootWait) < dayz_lootDelay)) exitWith {};
|
||||
|
||||
//diag_log("SPAWN CHECKING: Starting");
|
||||
_radius = 300;
|
||||
_locationstypes = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
|
||||
_nearestCity = nearestLocations [getPos player, _locationstypes, _radius];
|
||||
|
||||
//_nearestCity = [_locationstypes,[position player,600],false] call bis_fnc_locations;
|
||||
//diag_log ("0: " +str(_nearestCity));
|
||||
|
||||
_position = getPosATL player;
|
||||
if ((count _nearestCity) > 0) then {
|
||||
_position = position (_nearestCity select 0);
|
||||
};
|
||||
|
||||
_nearbytype = type (_nearestCity select 0);
|
||||
_nearby = _position nearObjects ["Building",_radius];
|
||||
|
||||
diag_log("SPAWN CHECKING: Starting");
|
||||
_radius = 300;
|
||||
_locationstypes = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
|
||||
_nearestCity = nearestLocations [getPos player, _locationstypes, _radius];
|
||||
|
||||
//_nearestCity = [_locationstypes,[position player,600],false] call bis_fnc_locations;
|
||||
//diag_log ("0: " +str(_nearestCity));
|
||||
|
||||
_position = getPosATL player;
|
||||
if ((count _nearestCity) > 0) then {
|
||||
_position = position (_nearestCity select 0);
|
||||
};
|
||||
|
||||
_nearbytype = type (_nearestCity select 0);
|
||||
_nearby = _position nearObjects ["Building",_radius];
|
||||
|
||||
switch (_nearbytype) do {
|
||||
default {
|
||||
_maxZombies = 20;
|
||||
@@ -61,7 +61,7 @@ if (_inVehicle) then {
|
||||
//diag_log(format["SPAWN CHECK: Building count is %1", count _nearby]);
|
||||
_count = ({alive _x} count allMissionObjects "zZombie_Base");
|
||||
//hint "Total Zeds: " +str(_count));
|
||||
hint format["Total Zeds %1",_count];
|
||||
//hint format["Total Zeds %1",_count];
|
||||
diag_log ("Total Zeds: " +str(_count));
|
||||
{
|
||||
//diag_log("SPAWN CHECK: Start of Loop");
|
||||
@@ -95,11 +95,11 @@ if (_inVehicle) then {
|
||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _zombied) * 525948;
|
||||
diag_log(format["Date: %1 | ZombieSpawn: %2 | age: %3 | building: %4 (%5)", _dateNow, _zombied, _age, str(_x), _dis]);
|
||||
//diag_log(format["Date: %1 | ZombieSpawn: %2 | age: %3 | building: %4 (%5)", _dateNow, _zombied, _age, str(_x), _dis]);
|
||||
if (_age > 1) then {
|
||||
_bPos = getPosATL _x;
|
||||
_zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]);
|
||||
diag_log ("ZombiesNum: " +str(_zombiesNum));
|
||||
//diag_log ("ZombiesNum: " +str(_zombiesNum));
|
||||
if (_zombiesNum == 0) then {
|
||||
//Randomize Zombies
|
||||
_x setVariable ["zombieSpawn",_dateNow,true];
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
private["_unit","_vehicle","_targets","_move","_rnd","_wound","_type","_dir","_hpList","_hp","_damage","_chance","_strH","_dam","_total","_result","_tPos","_zPos","_inAngle","_cantSee","_isZombieInside","_building","_isPlayerInside"];
|
||||
private["_isZombie","_unit","_vehicle","_targets","_move","_rnd","_wound","_type","_dir","_hpList","_hp","_damage","_chance","_strH","_dam","_total","_result","_tPos","_zPos","_inAngle","_cantSee","_isZombieInside","_building","_isPlayerInside"];
|
||||
_unit = _this;
|
||||
_vehicle = (vehicle player);
|
||||
|
||||
_isZombie = _unit isKindOf "zZombie_base";
|
||||
if(_isZombie) then {
|
||||
_type = "zombie";
|
||||
} else {
|
||||
_type = "dog";
|
||||
};
|
||||
|
||||
_targets = _unit getVariable ["targets",[]];
|
||||
//if (!(_vehicle in _targets)) exitWith {};
|
||||
|
||||
@@ -15,11 +22,11 @@ if (r_player_unconscious && _vehicle == player) then {
|
||||
_move = "ZombieFeed" + str(_rnd);
|
||||
} else {
|
||||
_unit doMove (getPos player);
|
||||
if (_type == "zombie") then {
|
||||
_rnd = round(random 9) + 1;
|
||||
_move = "ZombieStandingAttack" + str(_rnd);
|
||||
} else {
|
||||
if (_type == "dog") then {
|
||||
_move = "Dog_Attack";
|
||||
} else {
|
||||
_rnd = round(random 9) + 1;
|
||||
_move = "ZombieStandingAttack" + str(_rnd);
|
||||
};
|
||||
};
|
||||
_dir = [_unit,player] call BIS_Fnc_dirTo;
|
||||
@@ -84,12 +91,12 @@ if (_vehicle != player) then {
|
||||
_wound = DAYZ_woundHit_dog call BIS_fnc_selectRandomWeighted;
|
||||
_damage = 0.3 + random (1.0);
|
||||
} else {
|
||||
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
||||
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
|
||||
} else {
|
||||
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
|
||||
};
|
||||
_damage = 0.1 + random (1.2);
|
||||
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
||||
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
|
||||
} else {
|
||||
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
|
||||
};
|
||||
_damage = 0.1 + random (1.2);
|
||||
};
|
||||
|
||||
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
private["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow"];
|
||||
+private["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow"];
|
||||
_iItem = _this select 0;
|
||||
_iClass = _this select 1;
|
||||
_iPos = _this select 2;
|
||||
_radius = _this select 3;
|
||||
|
||||
switch (_iClass) do {
|
||||
default {
|
||||
//Item is food, add random quantity of cans along with an item (if exists)
|
||||
|
||||
@@ -17,7 +17,7 @@ _targets = _lead nearTargets _range;
|
||||
private["_obj","_dis"];
|
||||
_obj = _x select 4;
|
||||
_dis = _obj distance _lead;
|
||||
if (_obj isKindOf "Man") then {
|
||||
if (_obj isKindOf "Man" and !(_obj isKindOf "PZombie_VB")) then {
|
||||
if (!(_obj isKindOf "zZombie_Base") and !(_obj in _targetMen)) then {
|
||||
//process man targets
|
||||
_targetMen set [count _targetMen,_obj];
|
||||
|
||||
@@ -58,7 +58,8 @@ if (!_doLoiter) then {
|
||||
_attempt = 0;
|
||||
while {_nearByPlayer} do {
|
||||
//_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos; Orignal
|
||||
_position = [_position,0,50,20,0,20,0] call BIS_fnc_findSafePos;
|
||||
// _position = [_position,0,50,20,0,20,0] call BIS_fnc_findSafePos; OEM v2
|
||||
_position = [_position,30,60,20,0,20,0] call BIS_fnc_findSafePos;
|
||||
_agent setPos _position;
|
||||
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
|
||||
_attempt = _attempt + 1;
|
||||
|
||||
Reference in New Issue
Block a user