mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
1.0.1.6 Developer Build
This commit is contained in:
@@ -1090,7 +1090,6 @@ class CfgMagazines {
|
||||
script = "spawn player_build;";
|
||||
require[] = {"ItemToolbox"};
|
||||
create = "WorkBench_DZ";
|
||||
needNearby[] = {"none"};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1513,7 +1512,6 @@ class CfgMagazines {
|
||||
script = "spawn player_build;";
|
||||
require[] = {"ItemToolbox"};
|
||||
create = "Generator_DZ";
|
||||
needNearby[] = {"dayz_fuelpumparray"};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1534,7 +1532,6 @@ class CfgMagazines {
|
||||
script = "spawn player_build;";
|
||||
require[] = {"ItemToolbox"};
|
||||
create = "FuelPump_DZ";
|
||||
needNearby[] = {"dayz_fuelsources"};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1618,7 +1615,7 @@ class CfgMagazines {
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"stick_fence_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"PartWoodPile",6}};
|
||||
input[] = {{"PartWoodPile",6}};
|
||||
|
||||
};
|
||||
|
||||
@@ -1705,24 +1702,6 @@ class CfgMagazines {
|
||||
|
||||
};
|
||||
};
|
||||
class PartWoodShed: CA_Magazine
|
||||
{
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = "Wooden Shack";
|
||||
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
|
||||
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
|
||||
descriptionShort = "Wooden Shack: A crafted object that holds some items/weapons/backpacks.";
|
||||
class ItemActions {
|
||||
class Build {
|
||||
text = "Build Wood Shack";
|
||||
script = "spawn player_build;";
|
||||
require[] = {"ItemToolbox"};
|
||||
create = "WoodShack_DZ";
|
||||
};
|
||||
};
|
||||
};
|
||||
class PartVRotor: CA_Magazine
|
||||
{
|
||||
scope = 2;
|
||||
@@ -1771,7 +1750,7 @@ class CfgMagazines {
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"ItemCanvas",1}};
|
||||
input[] = {{"SkinBase",4}};
|
||||
input[] = {{"SkinBase",2}};
|
||||
};
|
||||
class Crafting1
|
||||
{
|
||||
@@ -1780,7 +1759,7 @@ class CfgMagazines {
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"ItemBandage",2}};
|
||||
input[] = {{"SkinBase",1}};
|
||||
input[] = {{"SkinBase",1},{"ItemTrashToiletpaper",1}};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -2062,7 +2041,7 @@ class CfgMagazines {
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"desert_net_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",4},{"ItemPole",4}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",2},{"ItemPole",2}};
|
||||
};
|
||||
class Crafting1
|
||||
{
|
||||
@@ -2071,7 +2050,7 @@ class CfgMagazines {
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"forest_net_kit",1}};
|
||||
input[] = {{"ItemTent",4},{"ItemPole",4}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",2},{"ItemPole",2}};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -2097,7 +2076,7 @@ class CfgMagazines {
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"desert_net_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",4},{"ItemPole",4}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",2},{"ItemPole",2}};
|
||||
};
|
||||
class Crafting1
|
||||
{
|
||||
@@ -2106,7 +2085,7 @@ class CfgMagazines {
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"forest_net_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",4},{"ItemPole",4}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",2},{"ItemPole",2}};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -2131,7 +2110,7 @@ class CfgMagazines {
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"desert_net_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",4},{"ItemPole",4}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",2},{"ItemPole",2}};
|
||||
};
|
||||
class Crafting1
|
||||
{
|
||||
@@ -2140,7 +2119,7 @@ class CfgMagazines {
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"};
|
||||
output[] = {{"forest_net_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",4},{"ItemPole",4}};
|
||||
input[] = {{"bulk_empty",1},{"ItemTent",2},{"ItemPole",2}};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -2174,7 +2153,7 @@ class CfgMagazines {
|
||||
{
|
||||
text = "Craft Sandbag Nest";
|
||||
script = "spawn player_craftItem1;";
|
||||
neednearby[] = {};
|
||||
neednearby[] = {"workshop"};
|
||||
requiretools[] = {"ItemEtool","ItemToolbox"};
|
||||
output[] = {{"sandbag_nest_kit",1}};
|
||||
input[] = {{"bulk_empty",1},{"ItemSandbag",4},{"PartWoodPlywood",2},{"PartWoodLumber",4}};
|
||||
@@ -2200,7 +2179,7 @@ class CfgMagazines {
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = "H-barrier cube";
|
||||
model = "\dayz_equip\models\sandbags.p3d";
|
||||
model = "\dayz_equip\models\sandbags.p3d"; // TODO model
|
||||
picture = "\dayz_equip\textures\equip_sandbag_ca.paa";
|
||||
descriptionShort = "Hesco berrier: A buildable object that is used for fortification purposes.";
|
||||
|
||||
@@ -2211,6 +2190,35 @@ class CfgMagazines {
|
||||
require[] = {"ItemEtool"};
|
||||
create = "Land_HBarrier1_DZ";
|
||||
};
|
||||
class Crafting
|
||||
{
|
||||
text = "Craft Triple H-barrier";
|
||||
script = "spawn player_craftItem;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemEtool","ItemToolbox"};
|
||||
output[] = {{"ItemSandbagExLarge",1}};
|
||||
input[] = {{"ItemSandbagLarge",3}};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class ItemSandbagExLarge : CA_Magazine {
|
||||
scope = public;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = "3 x H-barrier cube";
|
||||
model = "\dayz_equip\models\sandbags.p3d"; // TODO model
|
||||
picture = "\dayz_equip\textures\equip_sandbag_ca.paa";
|
||||
descriptionShort = "Hesco berrier: A buildable object that is used for fortification purposes.";
|
||||
|
||||
class ItemActions {
|
||||
class Build {
|
||||
text = "Build Triple H-barrier";
|
||||
script = "spawn player_build;";
|
||||
require[] = {"ItemEtool"};
|
||||
create = "Land_HBarrier3_DZ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -58,8 +58,6 @@ _cookedmeat = meatcooked;
|
||||
if (_finished) then {
|
||||
|
||||
_removed = _removed + ([player,_meat,_qty] call BIS_fnc_invRemove);
|
||||
|
||||
// Add only number of items removed
|
||||
for "_x" from 1 to _removed do {
|
||||
player addMagazine _meatcooked;
|
||||
};
|
||||
|
||||
@@ -27,8 +27,9 @@ switch (_type) do {
|
||||
|
||||
};
|
||||
case 1: {
|
||||
player removeMagazine "ItemWaterbottle";
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
if(([player,"ItemWaterbottle"] call BIS_fnc_invRemove) == 1) then {
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
};
|
||||
_handle setFSMVariable ["_thirst",0];
|
||||
player removeAction s_player_waterdog;
|
||||
s_player_waterdog = -1;
|
||||
|
||||
@@ -54,7 +54,6 @@ if (_finished) then {
|
||||
if(!(_vehicle getVariable ["GeneratorFilled", false]) and ("ItemJerrycan" in magazines player)) then {
|
||||
|
||||
if(([player,"ItemJerrycan"] call BIS_fnc_invRemove) == 1) then {
|
||||
|
||||
player addMagazine "ItemJerrycanEmpty";
|
||||
|
||||
// mark as once filled
|
||||
|
||||
@@ -3,6 +3,9 @@ private ["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_s
|
||||
if(TradeInprogress) exitWith { cutText ["Gutting animal already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = 1;
|
||||
|
||||
_item = _this select 3;
|
||||
_hasKnife = "ItemKnife" in items player;
|
||||
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
|
||||
@@ -10,9 +13,6 @@ _type = typeOf _item;
|
||||
_hasHarvested = _item getVariable["meatHarvested",false];
|
||||
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
||||
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = 1;
|
||||
|
||||
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
//Get Animal Type
|
||||
_isListed = isClass (_config);
|
||||
@@ -73,14 +73,9 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
|
||||
if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
|
||||
|
||||
_array = [_item,_qty];
|
||||
|
||||
if (local _item) then {
|
||||
_array spawn local_gutObject;
|
||||
} else {
|
||||
dayzGutBody = _array;
|
||||
publicVariable "dayzGutBody";
|
||||
};
|
||||
dayzGutBody = [_item,_qty];
|
||||
dayzGutBody spawn local_gutObject;
|
||||
publicVariable "dayzGutBody";
|
||||
|
||||
_string = format[localize "str_success_gutted_animal",_text,_qty];
|
||||
cutText [_string, "PLAIN DOWN"];
|
||||
|
||||
@@ -3,6 +3,9 @@ private ["_hasKnife","_qty","_item","_text","_string","_type","_started","_finis
|
||||
if(TradeInprogress) exitWith { cutText ["Gutting zombie already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = 1;
|
||||
|
||||
_item = _this select 3;
|
||||
_hasKnife = "ItemKnife" in items player;
|
||||
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
|
||||
@@ -10,9 +13,6 @@ _type = typeOf _item;
|
||||
_hasHarvested = _item getVariable["meatHarvested",false];
|
||||
//_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
||||
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = 1;
|
||||
|
||||
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
//Get Animal Type
|
||||
//_loop = true;
|
||||
@@ -69,14 +69,9 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
|
||||
_qty = 1;
|
||||
|
||||
_array = [_item,_qty];
|
||||
|
||||
if (local _item) then {
|
||||
_array spawn local_gutObjectZ;
|
||||
} else {
|
||||
dayzGutBody = _array;
|
||||
publicVariable "dayzGutBodyZ";
|
||||
};
|
||||
dayzGutBody = [_item,_qty];
|
||||
dayzGutBody spawn local_gutObjectZ;
|
||||
publicVariable "dayzGutBodyZ";
|
||||
|
||||
// Reduce humanity for gutting zeds
|
||||
_humanity = player getVariable["humanity",0];
|
||||
|
||||
@@ -3,12 +3,12 @@ private ["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_
|
||||
// Exit if player zombie
|
||||
if(player isKindOf "PZombie_VB") exitWith {};
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Take item already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
|
||||
if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot take item while another player is nearby." , "PLAIN DOWN"]; };
|
||||
// _playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
|
||||
// if(_playerNear) exitWith {cutText ["Cannot take item while another player is nearby." , "PLAIN DOWN"]; };
|
||||
|
||||
if (!DZE_CanPickup) exitWith { cutText ["Take item already in progress." , "PLAIN DOWN"]; };
|
||||
DZE_CanPickup = false;
|
||||
|
||||
_array = _this select 3;
|
||||
_type = _array select 0;
|
||||
@@ -29,9 +29,10 @@ if (_claimedBy == "0" or !_playerNear) then {
|
||||
_holder setVariable["claimed",_playerID,true];
|
||||
};
|
||||
|
||||
if(_classname isKindOf "TrapBear") exitwith {TradeInprogress = false; deleteVehicle _holder;};
|
||||
if(_classname isKindOf "TrapBear") exitwith {DZE_CanPickup = true; deleteVehicle _holder;};
|
||||
|
||||
player playActionNow "PutDown";
|
||||
|
||||
if (_classname == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
@@ -45,26 +46,18 @@ if (_classname == "MeleeFishingPole") then {
|
||||
player addMagazine 'Fishing_Swing';
|
||||
};
|
||||
|
||||
_broken = false;
|
||||
if(_classname == "WoodenArrow") then {
|
||||
if (20 > random 100) then {
|
||||
_broken = true;
|
||||
};
|
||||
};
|
||||
if (_broken) exitWith { deleteVehicle _holder; TradeInprogress = false; cutText [localize "str_broken_arrow", "PLAIN DOWN"] };
|
||||
|
||||
sleep 1;
|
||||
|
||||
_claimedBy = _holder getVariable["claimed","0"];
|
||||
|
||||
if (_claimedBy != _playerID) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
|
||||
if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
|
||||
|
||||
if(_classname isKindOf "Bag_Base_EP1") then {
|
||||
diag_log("Picked up a bag: " + _classname);
|
||||
};
|
||||
|
||||
// test to see if item still exists just before adding and removing
|
||||
if(isNull _holder) exitWith { TradeInprogress = false; };
|
||||
if(isNull _holder) exitWith { sleep 1; DZE_CanPickup = true; };
|
||||
|
||||
_obj = nearestObjects [(getPosATL player), [(typeOf _holder)], 5];
|
||||
_qty = count _obj;
|
||||
@@ -105,4 +98,6 @@ if(_qty >= 1) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
TradeInprogress = false;
|
||||
|
||||
sleep 1;
|
||||
DZE_CanPickup = true;
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
DayZ Base Building
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_isBuilding","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_buildings","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
@@ -18,14 +22,11 @@ if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = f
|
||||
_item = _this;
|
||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||
_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
|
||||
|
||||
_needNearby = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "needNearby");
|
||||
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
|
||||
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
||||
|
||||
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
||||
_isWorkBench = (_classname == "WorkBench_DZ");
|
||||
|
||||
_distance = 30;
|
||||
_needText = "Plot Pole";
|
||||
@@ -34,36 +35,24 @@ if(_isPole) then {
|
||||
_distance = 45;
|
||||
};
|
||||
|
||||
if((count _needNearby) == 0) then {
|
||||
_needNearby = ["Plastic_Pole_EP1_DZ"];
|
||||
} else {
|
||||
if("dayz_fuelpumparray" in _needNearby) then {
|
||||
_needNearby = dayz_fuelpumparray;
|
||||
_needText = "Fuel Pump";
|
||||
};
|
||||
if("dayz_fuelsources" in _needNearby) then {
|
||||
_needNearby = dayz_fuelsources;
|
||||
_needText = "Fuel Tanks";
|
||||
};
|
||||
};
|
||||
|
||||
// check for near plot
|
||||
_findNearestPoles = nearestObjects [(vehicle player), _needNearby, _distance];
|
||||
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
|
||||
_findNearestPole = [];
|
||||
|
||||
{if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} foreach _findNearestPoles;
|
||||
{
|
||||
if (alive _x) then {
|
||||
_findNearestPole set [(count _findNearestPole),_x];
|
||||
};
|
||||
} foreach _findNearestPoles;
|
||||
|
||||
_IsNearPlot = count (_findNearestPole);
|
||||
|
||||
// If item is plot pole and another one exists within 45m
|
||||
if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["Cannot build plot pole within 45m of an existing plot." , "PLAIN DOWN"]; };
|
||||
|
||||
if(_IsNearPlot == 0) then {
|
||||
|
||||
// Allow building of plot
|
||||
if(_isPole or _isWorkBench) then {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
|
||||
_canBuildOnPlot = true;
|
||||
} else {
|
||||
// Since there are plots nearby we check for ownership and then for friend status
|
||||
|
||||
@@ -121,7 +110,22 @@ if (_hasrequireditem) then {
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), 0];
|
||||
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
if(isText (configFile >> "CfgVehicles" >> _classname >> "GhostPreview")) then {
|
||||
_ghost = getText(configFile >> "CfgVehicles" >> _classname >> "GhostPreview");
|
||||
};
|
||||
|
||||
// if ghost preview available use that instead
|
||||
if(_ghost != "") then {
|
||||
|
||||
_classnametmp = _classname;
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_classname = _classnametmp;
|
||||
|
||||
} else {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
_object setDir _dir;
|
||||
|
||||
|
||||
@@ -39,9 +39,10 @@ if ( (isClass(_config >> _itemNew)) ) then {
|
||||
// Get model name from config
|
||||
_model = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "playerModel");
|
||||
if (_model != _myModel) then {
|
||||
player removeMagazine _item;
|
||||
player addMagazine _itemNew;
|
||||
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
|
||||
if(([player,_item] call BIS_fnc_invRemove) == 1) then {
|
||||
player addMagazine _itemNew;
|
||||
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
@@ -106,17 +106,12 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"];
|
||||
if(([player,_canName] call BIS_fnc_invRemove) == 1) then {
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
};
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
publicVariable "dayzSetFuel";
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// Add filled can
|
||||
player addMagazine _canName+"Empty";
|
||||
|
||||
cutText [format[localize "str_player_05",_nameText,_canSize], "PLAIN DOWN"];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
|
||||
@@ -119,10 +119,7 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// Add filled can
|
||||
player addMagazine _canName;
|
||||
|
||||
cutText [format["%1 has been drained for %2 litres of Fuel",_nameText,_canSize], "PLAIN DOWN"];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
|
||||
@@ -147,7 +147,6 @@ if (_qty >= _qty_in) then {
|
||||
_okToSell = true;
|
||||
if(_okToSell and !isNull _obj and alive _obj) then {
|
||||
|
||||
// Sell Vehicle
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
@@ -172,7 +172,7 @@ if (_qty >= _qty_in) then {
|
||||
if(_okToSell) then {
|
||||
|
||||
if(!isNull _obj and alive _obj) then {
|
||||
// Sell Vehicle
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
DayZ Safe
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_tent","_location","_isOk","_cancel","_location3","_location4","_location1","_location2","_counter","_pondPos","_isPond","_ppos","_hastentitem","_dir","_building","_isBuilding","_playerPos","_item","_offset_x","_offset_y","_offset_z","_offset_z_attach","_config","_text","_tmpvault","_vault_location","_objectsPond","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_removed"];
|
||||
//check if can pitch here
|
||||
|
||||
|
||||
@@ -51,8 +51,9 @@ if (_canFill) then {
|
||||
|
||||
if ("ItemWaterbottleUnfilled" in magazines player) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
player removeMagazine "ItemWaterbottleUnfilled";
|
||||
player addMagazine "ItemWaterbottle";
|
||||
if(([player,"ItemWaterbottleUnfilled"] call BIS_fnc_invRemove) == 1) then {
|
||||
player addMagazine "ItemWaterbottle";
|
||||
};
|
||||
};
|
||||
|
||||
_dis=5;
|
||||
|
||||
@@ -2179,6 +2179,56 @@ class Citizen1; // External class reference
|
||||
constructioncount = 4;
|
||||
removeoutput[] = {{"ItemSandbagLarge",1}};
|
||||
};
|
||||
class Land_HBarrier3_DZ : BuiltItems {
|
||||
model = "\ca\misc2\HBarrier3.p3d";
|
||||
icon = "\Ca\misc2\data\Icons\icon_hescoBarrier3_ca.paa";
|
||||
mapSize = 3.5;
|
||||
displayName = "H-barrier (short)";
|
||||
GhostPreview = "Land_HBarrier3ePreview";
|
||||
scope = 2;
|
||||
animated = 0;
|
||||
vehicleClass = "Fortifications";
|
||||
typicalCargo[] = {};
|
||||
irTarget = 0;
|
||||
accuracy = 0.3;
|
||||
transportAmmo = 0;
|
||||
transportRepair = 0;
|
||||
transportFuel = 0;
|
||||
destrType = "DestructBuilding";
|
||||
armor = 500;
|
||||
coefInside = 0.5;
|
||||
coefInsideHeur = 0.8;
|
||||
cost = 0;
|
||||
picture = "\CA\ui\data\icon_wf_barriers_ca.paa";
|
||||
offset[] = {0,2.5,0};
|
||||
constructioncount = 8;
|
||||
removeoutput[] = {{"ItemSandbagExLarge",1}};
|
||||
};
|
||||
|
||||
class SandNest_DZ : BuiltItems {
|
||||
scope = 2;
|
||||
model = "\ca\Misc_E\fortified_nest_small_ep1";
|
||||
displayName = "Sandbag Nest";
|
||||
expansion = 1;
|
||||
icon = "\Ca\misc3\data\Icons\icon_fortNestSmall_ca.paa";
|
||||
mapSize = 5;
|
||||
armor = 500;
|
||||
irTarget = 0;
|
||||
vehicleClass = "Fortifications";
|
||||
GhostPreview = "Land_fortified_nest_smallPreview";
|
||||
animated = 0;
|
||||
simulation = "house";
|
||||
accuracy = 0.2;
|
||||
cost = 0;
|
||||
ladders[] = {};
|
||||
TextPlural = "Houses";
|
||||
TextSingular = "House";
|
||||
nameSound = "obj_house";
|
||||
offset[] = {0,3,1};
|
||||
removeoutput[] = {{"sandbag_nest_kit",1}};
|
||||
};
|
||||
|
||||
|
||||
|
||||
// PLAYER BUILDINGS
|
||||
// class Plastic_Pole_EP1;
|
||||
@@ -2282,16 +2332,6 @@ class Citizen1; // External class reference
|
||||
removeoutput[] = {{"forest_large_net_kit",1}};
|
||||
};
|
||||
|
||||
class Land_fortified_nest_small_EP1;
|
||||
class SandNest_DZ: Land_fortified_nest_small_EP1
|
||||
{
|
||||
armor = 400;
|
||||
scope = 2;
|
||||
offset[] = {0,3,1};
|
||||
displayName = "Sandbag Nest";
|
||||
vehicleClass = "Fortifications";
|
||||
removeoutput[] = {{"sandbag_nest_kit",1}};
|
||||
};
|
||||
class Land_Wall_Gate_Ind1_L;
|
||||
class MetalGate_DZ: Land_Wall_Gate_Ind1_L
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private ["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_lootChance","_weights","_cntWeights","_index"];
|
||||
//_t1 = diag_tickTime;
|
||||
|
||||
_obj = _this select 0;
|
||||
|
||||
@@ -10,10 +11,12 @@ _config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_positions = [] + getArray (_config >> "lootPos");
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_lootChance = getNumber (_config >> "lootChance");
|
||||
_positionsSmall = [] + getArray (_config >> "lootPosSmall");
|
||||
|
||||
{
|
||||
if ((random 1) < _lootChance) then {
|
||||
_iPos = _obj modelToWorld _x;
|
||||
_nearBy = nearestObjects [_iPos, ["WeaponHolder","WeaponHolderBase"], 1];
|
||||
_nearBy = nearestObjects [_iPos, ["ReammoBox","WeaponHolder","WeaponHolderBase"], 1];
|
||||
if (count _nearBy == 0) then {
|
||||
_index = dayz_CBLBase find _type;
|
||||
//diag_log format["Found %2 at index: %1", _index,_type];
|
||||
@@ -27,3 +30,22 @@ _lootChance = getNumber (_config >> "lootChance");
|
||||
};
|
||||
};
|
||||
} forEach _positions;
|
||||
|
||||
{
|
||||
if ((random 1) < _lootChance) then {
|
||||
_iPos = _obj modelToWorld _x;
|
||||
_nearBy = nearestObjects [_iPos, ["ReammoBox","WeaponHolder","WeaponHolderBase"], 1];
|
||||
if (count _nearBy == 0) then {
|
||||
_index = dayz_CBLBase find _type;
|
||||
//diag_log format["Found %2 at index: %1", _index,_type];
|
||||
_weights = dayz_CBLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
_index = floor(random _cntWeights);
|
||||
_index = _weights select _index;
|
||||
_itemType = _itemTypes select _index;
|
||||
[_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot_small;
|
||||
_obj setVariable ["created",(DateToNumber date),true];
|
||||
};
|
||||
};
|
||||
} forEach _positionsSmall;
|
||||
//["building_spawnLoot.sqf",(diag_tickTime - _t1)] call fnc_dump;
|
||||
@@ -1,65 +1,60 @@
|
||||
private["_obj","_type","_config","_canLoot","_unitTypes","_min","_max","_num","_zombieChance","_rnd","_noPlayerNear","_position","_clean","_positions","_iPos","_nearBy","_nearByPlayer"];
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_canLoot = isClass (_config);
|
||||
private["_t1","_obj","_type","_config","_canLoot","_unitTypes","_min","_max","_num","_zombieChance","_rnd","_noPlayerNear","_position","_clean","_positions","_iPos","_nearBy","_nearByPlayer"];
|
||||
//_t1 = diag_tickTime;
|
||||
|
||||
if (dayz_maxCurrentZeds > dayz_maxZeds) exitwith {};
|
||||
if (dayz_CurrentZombies > dayz_maxGlobalZombies) exitwith {};
|
||||
if (dayz_spawnZombies > dayz_maxLocalZombies) exitwith {};
|
||||
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_canLoot = isClass (_config);
|
||||
|
||||
if (_canLoot) then {
|
||||
//Get zombie class
|
||||
_unitTypes = getArray (_config >> "zombieClass");
|
||||
_min = getNumber (_config >> "minRoaming");
|
||||
_max = getNumber (_config >> "maxRoaming");
|
||||
//Walking Zombies
|
||||
//_num = round(random _max) min _min;
|
||||
_num = (round(random _max)) max _min;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
|
||||
//Get zombie class
|
||||
_zombieChance = getNumber (_config >> "zombieChance");
|
||||
_rnd = random 1;
|
||||
|
||||
//if (_rnd < _zombieChance) then {
|
||||
//Get zombie class
|
||||
_unitTypes = getArray (_config >> "zombieClass");
|
||||
_min = getNumber (_config >> "minRoaming");
|
||||
_max = getNumber (_config >> "maxRoaming");
|
||||
|
||||
_noPlayerNear = (count ((getPosATL _obj) nearEntities ["CAManBase",30])) == 0;
|
||||
//Walking Zombies
|
||||
_num = (round(random _max)) max _min;
|
||||
|
||||
if (_noPlayerNear) then {
|
||||
_position = getPosATL _obj;
|
||||
|
||||
//_position = _obj buildingExit 0;
|
||||
//if ((_position select 0) == 0) then {
|
||||
_position = getPosATL _obj;
|
||||
//};
|
||||
_noOneNear = (count (_position nearEntities ["CAManBase",30])) == 0;
|
||||
|
||||
if (_noOneNear) then {
|
||||
|
||||
_positions = getArray (_config >> "lootPos");
|
||||
|
||||
if (count _positions > 0) then {
|
||||
|
||||
{
|
||||
if (random 1 < _zombieChance) then {
|
||||
_iPos = _obj modelToWorld _x;
|
||||
_nearBy = count (_iPos nearEntities ["zZombie_Base",1]) > 0;
|
||||
if (!_nearBy) then {
|
||||
[_iPos,true,_unitTypes] call zombie_generate;
|
||||
};
|
||||
};
|
||||
} forEach _positions;
|
||||
|
||||
} else {
|
||||
|
||||
//diag_log ("Class: " + _type + " / Zombies: " + str(_unitTypes) + " / Walking: " + str(_num));
|
||||
for "_i" from 1 to _num do
|
||||
{
|
||||
[_position,true,_unitTypes] call zombie_generate;
|
||||
};
|
||||
|
||||
};
|
||||
//};
|
||||
|
||||
|
||||
//Add Internal Zombies
|
||||
_clean = {alive _x} count ((getPosATL _obj) nearEntities ["zZombie_Base",(sizeOf _type)]) == 0;
|
||||
if (_clean) then {
|
||||
_positions = getArray (_config >> "lootPos");
|
||||
_zombieChance = getNumber (_config >> "zombieChance");
|
||||
//diag_log format["Building: %1 / Positions: %2 / Chance: %3",_type,_positions,_zombieChance];
|
||||
{
|
||||
_rnd = random 1;
|
||||
if (_rnd < _zombieChance) then {
|
||||
_iPos = _obj modelToWorld _x;
|
||||
_nearBy = {alive _x} count nearestObjects [_iPos, ["zZombie_Base"],1] > 0;
|
||||
_nearByPlayer = ({isPlayer _x} count (_iPos nearEntities ["CAManBase",30])) > 0;
|
||||
//diag_log ("BUILDING: " + _type + " / " + str(_nearBy) + " / " + str(_nearByPlayer));
|
||||
if (!_nearByPlayer and !_nearBy) then {
|
||||
[_iPos,true,_unitTypes] call zombie_generate;
|
||||
if (random 1 < _zombieChance) then {
|
||||
[_position,true,_unitTypes] call zombie_generate;
|
||||
};
|
||||
};
|
||||
} forEach _positions;
|
||||
};
|
||||
};
|
||||
|
||||
dayz_buildingMonitor set [count dayz_buildingMonitor,_obj];
|
||||
};
|
||||
//["building_spawnZombies.sqf",(diag_tickTime - _t1)] call fnc_dump;
|
||||
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild"];
|
||||
private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil"];
|
||||
|
||||
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
|
||||
|
||||
@@ -37,7 +37,7 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
|
||||
s_player_removeflare = -1;
|
||||
};
|
||||
|
||||
if(DZEdebug) then {
|
||||
if(dayz_playerUID == "4560582") then {
|
||||
hint str(typeOf cursorTarget);
|
||||
if (s_player_debuglootpos < 0) then {
|
||||
s_player_debuglootpos = player addAction ["Save to arma2.rpt", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["start"], 99, false, true, "",""];
|
||||
@@ -49,6 +49,7 @@ if(DZEdebug) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if(_isPZombie) then {
|
||||
if (s_player_callzombies < 0) then {
|
||||
s_player_callzombies = player addAction ["Raise Horde", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false, "",""];
|
||||
@@ -141,7 +142,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
_isTent = _cursorTarget isKindOf "TentStorage";
|
||||
|
||||
_isAlive = alive _cursorTarget;
|
||||
_canmove = canmove _cursorTarget;
|
||||
|
||||
_text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName");
|
||||
|
||||
_rawmeat = meatraw;
|
||||
@@ -161,14 +162,39 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
// diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID));
|
||||
|
||||
//Allow player to delete objects
|
||||
// logic vars
|
||||
_player_flipveh = false;
|
||||
_player_deleteBuild = false;
|
||||
_player_lockUnlock_crtl = false;
|
||||
|
||||
// CURSOR TARGET ALIVE
|
||||
if(_isAlive) then {
|
||||
|
||||
//Allow player to delete objects
|
||||
if(_isDestructable or _isWreck or _isRemovable) then {
|
||||
if(_hasToolbox and "ItemCrowbar" in _itemsPlayer) then {
|
||||
_player_deleteBuild = true;
|
||||
};
|
||||
};
|
||||
|
||||
// CURSOR TARGET VEHICLE
|
||||
if(_isVehicle) then {
|
||||
|
||||
//flip vehicle small vehicles by your self and all other vehicles with help nearby
|
||||
if (!(canmove _cursorTarget) and (player distance _cursorTarget >= 2) and (count (crew _cursorTarget))== 0 and ((vectorUp _cursorTarget) select 2) < 0.5) then {
|
||||
_playersNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]);
|
||||
if(_isVehicletype or (_playersNear >= 2)) then {
|
||||
_player_flipveh = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if(!_isMan and _ownerID != "0") then {
|
||||
_player_lockUnlock_crtl = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if(_player_deleteBuild) then {
|
||||
@@ -182,7 +208,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
|
||||
// Allow Owner to lock and unlock vehicle
|
||||
if(_isVehicle and _isAlive and !_isMan and _ownerID != "0") then {
|
||||
if(_player_lockUnlock_crtl) then {
|
||||
if (s_player_lockUnlock_crtl < 0) then {
|
||||
_hasKey = _ownerID in _temp_keys;
|
||||
_oldOwner = (_ownerID == dayz_playerUID);
|
||||
@@ -235,12 +261,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
|
||||
//flip vehicle small vehicles by your self and all other vehicles with help nearby
|
||||
if (_isVehicle and !_canmove and _isAlive and (player distance _cursorTarget >= 2) and (count (crew _cursorTarget))== 0 and ((vectorUp _cursorTarget) select 2) < 0.5) then {
|
||||
_playersNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]);
|
||||
if(_isVehicletype or (_playersNear >= 2)) then {
|
||||
if (s_player_flipveh < 0) then {
|
||||
s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",_cursorTarget, 1, true, true, "", ""];
|
||||
};
|
||||
if(_player_flipveh) then {
|
||||
if (s_player_flipveh < 0) then {
|
||||
s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",_cursorTarget, 1, true, true, "", ""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_flipveh;
|
||||
@@ -257,24 +280,72 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_fillfuel = -1;
|
||||
};
|
||||
|
||||
// logic vars for addactions
|
||||
_player_butcher = false;
|
||||
_player_studybody = false;
|
||||
|
||||
// CURSOR TARGET NOT ALIVE
|
||||
if (!_isAlive) then {
|
||||
|
||||
// Gut animal/zed
|
||||
if((_isAnimal or _isZombie) and _hasKnife) then {
|
||||
_isHarvested = _cursorTarget getVariable["meatHarvested",false];
|
||||
if (!_isHarvested) then {
|
||||
_player_butcher = true;
|
||||
};
|
||||
};
|
||||
|
||||
// Study body
|
||||
if (_isMan and !_isZombie) then {
|
||||
_player_studybody = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Human Gut animal or zombie
|
||||
if (!alive _cursorTarget and (_isAnimal or _isZombie) and _hasKnife) then {
|
||||
_isHarvested = _cursorTarget getVariable["meatHarvested",false];
|
||||
if (s_player_butcher < 0 and !_isHarvested) then {
|
||||
if (_player_butcher) 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;
|
||||
};
|
||||
|
||||
// Study Body
|
||||
if (_player_studybody) then {
|
||||
if (s_player_studybody < 0) then {
|
||||
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_studybody;
|
||||
s_player_studybody = -1;
|
||||
};
|
||||
|
||||
// logic vars
|
||||
_player_cook = false;
|
||||
_player_boil = false;
|
||||
|
||||
// CURSOR TARGET IS FIRE
|
||||
if (inflamed _cursorTarget) then {
|
||||
|
||||
//Fireplace Actions check
|
||||
if (_hasRawMeat) then {
|
||||
_player_cook = true;
|
||||
};
|
||||
|
||||
// Boil water
|
||||
if (_hasbottleitem and _hastinitem) then {
|
||||
_player_boil = true;
|
||||
};
|
||||
};
|
||||
|
||||
//Fireplace Actions check
|
||||
if (inflamed _cursorTarget and _hasRawMeat) then {
|
||||
if (_player_cook) then {
|
||||
if (s_player_cook < 0) then {
|
||||
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",_cursorTarget, 3, true, true, "", ""];
|
||||
};
|
||||
@@ -282,7 +353,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
player removeAction s_player_cook;
|
||||
s_player_cook = -1;
|
||||
};
|
||||
if (inflamed _cursorTarget and (_hasbottleitem and _hastinitem)) then {
|
||||
|
||||
// Boil water
|
||||
if (_player_boil) then {
|
||||
if (s_player_boil < 0) then {
|
||||
s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",_cursorTarget, 3, true, true, "", ""];
|
||||
};
|
||||
@@ -301,7 +374,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
|
||||
//Packing my tent
|
||||
if(_cursorTarget isKindOf "TentStorage" and _ownerID == dayz_characterID) then {
|
||||
if(_isTent and _ownerID == dayz_characterID) then {
|
||||
if ((s_player_packtent < 0) and (player distance _cursorTarget < 3)) then {
|
||||
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
@@ -356,7 +429,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
//Player Deaths
|
||||
if(_typeOfCursorTarget == "Info_Board_EP1") then {
|
||||
if ((s_player_information < 0) and (player distance _cursorTarget < 3)) then {
|
||||
if (s_player_information < 0) then {
|
||||
s_player_information = player addAction ["Recent Deaths", "\z\addons\dayz_code\actions\list_playerDeaths.sqf",[], 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
@@ -366,7 +439,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
//Fuel Pump
|
||||
if(_typeOfCursorTarget in dayz_fuelpumparray) then {
|
||||
if ((s_player_fuelauto < 0) and (player distance _cursorTarget < 3)) then {
|
||||
if (s_player_fuelauto < 0) then {
|
||||
|
||||
// check if Generator_DZ is running within 30 meters
|
||||
_findNearestGens = nearestObjects [player, ["Generator_DZ"], 30];
|
||||
@@ -392,7 +465,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
//Start Generator
|
||||
if(_cursorTarget isKindOf "Generator_DZ") then {
|
||||
if ((s_player_fillgen < 0) and (player distance _cursorTarget < 3)) then {
|
||||
if (s_player_fillgen < 0) then {
|
||||
|
||||
// check if not running
|
||||
if((_cursorTarget getVariable ["GeneratorRunning", false])) then {
|
||||
@@ -414,7 +487,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
|
||||
//Sleep
|
||||
if(_cursorTarget isKindOf "TentStorage" and _ownerID == dayz_characterID) then {
|
||||
if(_isTent and _ownerID == dayz_characterID) then {
|
||||
if ((s_player_sleep < 0) and (player distance _cursorTarget < 3)) then {
|
||||
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
@@ -492,14 +565,6 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_parts_crtl = -1;
|
||||
};
|
||||
|
||||
if (_isMan and !_isAlive and !_isZombie) then {
|
||||
if (s_player_studybody < 0) then {
|
||||
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_studybody;
|
||||
s_player_studybody = -1;
|
||||
};
|
||||
|
||||
if(dayz_tameDogs) then {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ if (local _zed) then {
|
||||
_killer setVariable[_type,(_kills + 1),true];
|
||||
|
||||
//increase players humanity when zed killed
|
||||
_humanity = player getVariable["humanity",0];
|
||||
_humanity = _killer getVariable["humanity",0];
|
||||
_humanity = _humanity + 5;
|
||||
player setVariable["humanity",_humanity,true];
|
||||
_killer setVariable["humanity",_humanity,true];
|
||||
};
|
||||
@@ -1,9 +1,10 @@
|
||||
private["_animalbody","_qty","_rawfoodtype","_ehLoc"];
|
||||
_animalbody = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> typeOf _animalbody >> "rawfoodtype");
|
||||
|
||||
if (local _animalbody) then {
|
||||
_qty = _this select 1;
|
||||
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> typeOf _animalbody >> "rawfoodtype");
|
||||
|
||||
for "_x" from 1 to _qty do {
|
||||
_animalbody addMagazine _rawfoodtype;
|
||||
};
|
||||
@@ -23,9 +24,4 @@ if (local _animalbody) then {
|
||||
deleteVehicle _body;
|
||||
true;
|
||||
};
|
||||
|
||||
} else {
|
||||
_ehLoc = "client";
|
||||
if (isServer) then { _ehLoc = "server"; };
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_animalbody)];
|
||||
};
|
||||
@@ -21,8 +21,4 @@ if (local _zombiebody) then {
|
||||
true;
|
||||
};
|
||||
|
||||
} else {
|
||||
_ehLoc = "client";
|
||||
if (isServer) then { _ehLoc = "server"; };
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_zombiebody)];
|
||||
};
|
||||
@@ -1,71 +1,32 @@
|
||||
private ["_type","_isAir","_inVehicle","_dateNow","_maxZombies","_maxWildZombies","_age","_radius","_position","_markerstr","_markerstr1","_markerstr2","_markerstr3","_nearByObj","_handle","_looted","_cleared","_zombied","_config","_canLoot","_dis","_players","_spawnZombies","_nearby","_nearbyCount"];
|
||||
private ["_t1","_type","_isAir","_inVehicle","_dateNow","_maxZombies","_maxWildZombies","_age","_radius","_position","_markerstr","_markerstr1","_markerstr2","_markerstr3","_nearByObj","_handle","_looted","_cleared","_zombied","_config","_canLoot","_dis","_players","_spawnZombies","_nearby","_nearbyCount"];
|
||||
_t1 = diag_tickTime;
|
||||
|
||||
_type = _this select 0;
|
||||
//_Keepspawning = _this select 1;
|
||||
_isAir = vehicle player iskindof "Air";
|
||||
//_inVehicle = (vehicle player != player);
|
||||
_inVehicle = ((vehicle player != player) AND ((speed player > 10) OR _isAir));
|
||||
_inVehicle = (vehicle player != player);
|
||||
_onTheMove = (speed (vehicle player) > 10);
|
||||
_dateNow = (DateToNumber date);
|
||||
_maxZombies = dayz_maxLocalZombies;
|
||||
_maxWildZombies = 3;
|
||||
_age = -1;
|
||||
|
||||
//_nearbyBuildings = [];
|
||||
_radius = 200;
|
||||
_position = getPosATL player;
|
||||
|
||||
if (_inVehicle) then {
|
||||
_maxZombies = dayz_zedSpawnVehCount;
|
||||
};
|
||||
if (_isAir) then {
|
||||
_maxZombies = dayz_spawnAirCount;
|
||||
};
|
||||
|
||||
|
||||
//diag_log ("Type: " +str(_type));
|
||||
|
||||
|
||||
//diag_log("SPAWN CHECKING: Starting");
|
||||
//_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;
|
||||
_maxZombies = 30;
|
||||
};
|
||||
case "NameCity": {
|
||||
//_radius = 300;
|
||||
_maxZombies = 40;
|
||||
};
|
||||
case "NameCityCapital": {
|
||||
//_radius = 400;
|
||||
_maxZombies = 40;
|
||||
};
|
||||
};
|
||||
*/
|
||||
dayz_spawnZombies = 0;
|
||||
dayz_CurrentZombies = 0;
|
||||
|
||||
_players = _position nearEntities ["CAManBase",_radius+200];
|
||||
dayz_maxGlobalZombies = dayz_maxGlobalZombiesInit;
|
||||
{
|
||||
if(isPlayer _x) then {
|
||||
dayz_maxGlobalZombies = dayz_maxGlobalZombies + dayz_maxGlobalZombiesIncrease;
|
||||
} else {
|
||||
if (local _x) then {
|
||||
dayz_spawnZombies = dayz_spawnZombies + 1;
|
||||
};
|
||||
dayz_CurrentZombies = dayz_CurrentZombies + 1;
|
||||
};
|
||||
} foreach _players;
|
||||
|
||||
_spawnZombies = _position nearEntities ["zZombie_Base",_radius+100];
|
||||
dayz_spawnZombies = 0;
|
||||
{
|
||||
if (local _x) then
|
||||
{
|
||||
//diag_log ("Local");
|
||||
dayz_spawnZombies = dayz_spawnZombies + 1;
|
||||
};
|
||||
} foreach _spawnZombies;
|
||||
|
||||
dayz_CurrentZombies = count (_position nearEntities ["zZombie_Base",_radius+200]);
|
||||
|
||||
if ("ItemMap_Debug" in items player) then {
|
||||
deleteMarkerLocal "MaxZeds";
|
||||
deleteMarkerLocal "Counter";
|
||||
@@ -110,6 +71,7 @@ diag_log ("dayz_maxCurrentZeds: " +str(dayz_maxCurrentZeds) + "/" +str(dayz_maxZ
|
||||
|
||||
};
|
||||
|
||||
|
||||
_nearby = _position nearObjects ["building",_radius];
|
||||
_nearbyCount = count _nearby;
|
||||
if (_nearbyCount < 1) exitwith
|
||||
@@ -119,50 +81,60 @@ if (_nearbyCount < 1) exitwith
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
_type = typeOf _x;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_canLoot = isClass (_config);
|
||||
_dis = _x distance player;
|
||||
|
||||
//Loot
|
||||
if ((_dis < 120) and (_dis > 30) and _canLoot and !_inVehicle) then {
|
||||
_looted = (_x getVariable ["looted",-0.1]);
|
||||
_cleared = (_x getVariable ["cleared",true]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _looted) * 525948;
|
||||
//diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
|
||||
if ((_age > 10) and (!_cleared)) then {
|
||||
_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
|
||||
{deleteVehicle _x} forEach _nearByObj;
|
||||
_x setVariable ["cleared",true,true];
|
||||
_x setVariable ["looted",_dateNow,true];
|
||||
if(_canLoot) then {
|
||||
|
||||
_dis = _x distance player;
|
||||
|
||||
//Loot
|
||||
if ((_dis < 120) and (_dis > 30) and !_inVehicle) then {
|
||||
_looted = (_x getVariable ["looted",-0.1]);
|
||||
_cleared = (_x getVariable ["cleared",true]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _looted) * 525948;
|
||||
//diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
|
||||
if ((_age > 10) and (!_cleared)) then {
|
||||
_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
|
||||
{deleteVehicle _x} forEach _nearByObj;
|
||||
_x setVariable ["cleared",true,true];
|
||||
_x setVariable ["looted",_dateNow,true];
|
||||
};
|
||||
if ((_age > 10) and (_cleared)) then {
|
||||
//Register
|
||||
_x setVariable ["looted",_dateNow,true];
|
||||
//cleanup
|
||||
_handle = [_x] spawn building_spawnLoot;
|
||||
waitUntil{scriptDone _handle};
|
||||
};
|
||||
};
|
||||
if ((_age > 10) and (_cleared)) then {
|
||||
//Register
|
||||
_x setVariable ["looted",_dateNow,true];
|
||||
//cleanup
|
||||
_handle = [_x] spawn building_spawnLoot;
|
||||
waitUntil{scriptDone _handle};
|
||||
};
|
||||
};
|
||||
//Zeds
|
||||
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
|
||||
if (dayz_maxCurrentZeds < dayz_maxZeds) then {
|
||||
if (dayz_CurrentZombies < dayz_maxGlobalZombies) then {
|
||||
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
|
||||
//[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
|
||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _zombied) * 525948;
|
||||
if (_age > 3) then {
|
||||
_x setVariable ["zombieSpawn",_dateNow,true];
|
||||
[_x] call building_spawnZombies;
|
||||
|
||||
// do not spawn zeds if player is moving faster then 10kmh
|
||||
if (!_onTheMove) then {
|
||||
//Zeds
|
||||
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
|
||||
if (dayz_maxCurrentZeds < dayz_maxZeds) then {
|
||||
if (dayz_CurrentZombies < dayz_maxGlobalZombies) then {
|
||||
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
|
||||
//[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
|
||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _zombied) * 525948;
|
||||
if (_age > 3) then {
|
||||
_x setVariable ["zombieSpawn",_dateNow,true];
|
||||
[_x] call building_spawnZombies;
|
||||
};
|
||||
} else {
|
||||
dayz_spawnWait = time;
|
||||
};
|
||||
} else {
|
||||
dayz_spawnWait = time;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _nearby;
|
||||
["player_spawnCheck.sqf",(diag_tickTime - _t1)] call fnc_dump;
|
||||
@@ -87,11 +87,11 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
_newUnit setPosATL _position;
|
||||
_newUnit setDir _dir;
|
||||
|
||||
//Clear New Character
|
||||
//Clear New Character
|
||||
{_newUnit removeMagazine _x;} forEach magazines _newUnit;
|
||||
removeAllWeapons _newUnit;
|
||||
|
||||
//Equip New Charactar
|
||||
//Equip New Charactar
|
||||
{
|
||||
if (typeName _x == "ARRAY") then {_newUnit addMagazine [_x select 0,_x select 1] } else { _newUnit addMagazine _x };
|
||||
//sleep 0.05;
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
private ["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow","_mags"];
|
||||
|
||||
private ["_iItem","_iClass","_iPos","_radius","_item","_itemTypes","_index","_weights","_cntWeights","_qty","_max","_tQty","_canType","_mags"];
|
||||
|
||||
_iItem = _this select 0;
|
||||
_iClass = _this select 1;
|
||||
diag_log format["DEBUG spawn loot class: %1", _iClass];
|
||||
_iPos = _this select 2;
|
||||
_radius = _this select 3;
|
||||
|
||||
//_iPosZ = _iPos select 2;
|
||||
//if( _iPosZ < 0 ) then { _iPos = [_iPos select 0,_iPos select 1,0]; };
|
||||
|
||||
switch (_iClass) do {
|
||||
default {
|
||||
switch (_iClass) do
|
||||
{
|
||||
default
|
||||
{
|
||||
//Item is food, add random quantity of cans along with an item (if exists)
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
|
||||
@@ -17,42 +19,63 @@ switch (_iClass) do {
|
||||
_weights = dayz_CLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
_qty = 0;
|
||||
|
||||
// If clothing just spawn one bag of clothes
|
||||
if(_iClass == "clothes" or _iClass == "militaryclothes" or _iClass == "specialclothes") then {
|
||||
_max = 1;
|
||||
} else {
|
||||
_max = (ceil(random 2)) + 1;
|
||||
};
|
||||
|
||||
while {_qty < _max} do {
|
||||
_tQty = (round(random 1)) + 1;
|
||||
_index = floor(random _cntWeights);
|
||||
_index = _weights select _index;
|
||||
_canType = _itemTypes select _index;
|
||||
_max = 1 + ceil(random 2);
|
||||
while {_qty < _max} do
|
||||
{
|
||||
_tQty = 1 + round(random 1);
|
||||
_index = floor(random _cntWeights);
|
||||
_index = _weights select _index;
|
||||
_canType = _itemTypes select _index;
|
||||
_item addMagazineCargoGlobal [_canType,_tQty];
|
||||
_qty = _qty + _tQty;
|
||||
};
|
||||
if (_iItem != "") then {
|
||||
if (_iItem != "") then
|
||||
{
|
||||
_item addWeaponCargoGlobal [_iItem,1];
|
||||
};
|
||||
};
|
||||
case "weapon": {
|
||||
case "single":
|
||||
{
|
||||
//Item is sigle, add 1 item from cfgloot
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
|
||||
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
|
||||
_index = dayz_CLBase find _iItem;
|
||||
_weights = dayz_CLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
|
||||
_index = floor(random _cntWeights);
|
||||
_index = _weights select _index;
|
||||
_canType = _itemTypes select _index;
|
||||
_item addMagazineCargoGlobal [_canType,1];
|
||||
};
|
||||
|
||||
case "weapon":
|
||||
{
|
||||
//Item is a weapon, add it and a random quantity of magazines
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
_item addWeaponCargoGlobal [_iItem,1];
|
||||
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
|
||||
if ((count _mags) > 0) then {
|
||||
if ((count _mags) > 0) then
|
||||
{
|
||||
if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver
|
||||
_item addMagazineCargoGlobal [(_mags select 0), (round(random 2))];
|
||||
};
|
||||
};
|
||||
case "magazine": {
|
||||
case "weaponnomags":
|
||||
{
|
||||
//Item is a weapon, and spawns no mags
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
_item addWeaponCargoGlobal [_iItem,1];
|
||||
};
|
||||
case "magazine":
|
||||
{
|
||||
//Item is one magazine
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
_item addMagazineCargoGlobal [_iItem,1];
|
||||
};
|
||||
case "object": {
|
||||
case "object":
|
||||
{
|
||||
//Item is one magazine
|
||||
_item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
};
|
||||
@@ -62,6 +85,7 @@ switch (_iClass) do {
|
||||
_dateNow = (DateToNumber date);
|
||||
_item setVariable ["looted",_dateNow,true];
|
||||
|
||||
if ((count _iPos) > 2) then {
|
||||
if ((count _iPos) > 2) then
|
||||
{
|
||||
_item setPosATL _iPos;
|
||||
};
|
||||
52
SQF/dayz_code/compile/spawn_loot_small.sqf
Normal file
52
SQF/dayz_code/compile/spawn_loot_small.sqf
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
private ["_iItem","_iClass","_iPos","_radius","_item","_itemTypes","_index","_weights","_cntWeights","_qty","_max","_tQty","_canType","_mags"];
|
||||
|
||||
_iItem = _this select 0;
|
||||
_iClass = _this select 1;
|
||||
diag_log format["DEBUG spawn loot class: %1", _iClass];
|
||||
_iPos = _this select 2;
|
||||
_radius = _this select 3;
|
||||
|
||||
switch (_iClass) do
|
||||
{
|
||||
default
|
||||
{
|
||||
//Item is sigle, add 1 item from cfgloot
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
|
||||
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
|
||||
_index = dayz_CLBase find _iClass;
|
||||
_weights = dayz_CLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
|
||||
_index = floor(random _cntWeights);
|
||||
_index = _weights select _index;
|
||||
_canType = _itemTypes select _index;
|
||||
_item addMagazineCargoGlobal [_canType,1];
|
||||
};
|
||||
case "weapon":
|
||||
{
|
||||
//Item is a weapon, and spawns no mags
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
_item addWeaponCargoGlobal [_iItem,1];
|
||||
};
|
||||
case "magazine":
|
||||
{
|
||||
//Item is one magazine
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
_item addMagazineCargoGlobal [_iItem,1];
|
||||
};
|
||||
case "object":
|
||||
{
|
||||
//do nothing for now
|
||||
};
|
||||
};
|
||||
|
||||
// timestamp for later clearing
|
||||
_dateNow = (DateToNumber date);
|
||||
_item setVariable ["looted",_dateNow,true];
|
||||
|
||||
if ((count _iPos) > 2) then
|
||||
{
|
||||
_item setPosATL _iPos;
|
||||
};
|
||||
@@ -41,7 +41,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "1.0.1.5";
|
||||
version = "1.0.1.6";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
@@ -493,6 +493,7 @@ class CfgBuildingLoot {
|
||||
zombieClass[] = {"zZombie_Base","z_hunter","z_teacher","z_suit1","z_suit2","z_worker1","z_worker2","z_worker3","z_villager1","z_villager2","z_villager3"};
|
||||
lootChance = 0;
|
||||
lootPos[] = {};
|
||||
lootPosSmall[] = {};
|
||||
itemType[] = {};
|
||||
itemChance[] = {};
|
||||
hangPos[] = {};
|
||||
@@ -544,8 +545,8 @@ class CfgBuildingLoot {
|
||||
{"Crossbow_DZ","weapon"},
|
||||
{ "Binocular","weapon" },
|
||||
{ "PartWoodPile","magazine" },
|
||||
{ "","clothes" },
|
||||
{ "","specialclothes" },
|
||||
{ "clothes","single" },
|
||||
{ "specialclothes","single" },
|
||||
{ "WeaponHolder_MeleeCrowbar","object" },
|
||||
{"MR43","weapon"},
|
||||
};
|
||||
@@ -623,8 +624,8 @@ class CfgBuildingLoot {
|
||||
{"Crossbow_DZ","weapon"},
|
||||
{ "Binocular","weapon" },
|
||||
{ "PartWoodPile","magazine" },
|
||||
{ "","clothes" },
|
||||
{ "","specialclothes" },
|
||||
{ "clothes","single" },
|
||||
{ "specialclothes","single" },
|
||||
{ "WeaponHolder_MeleeCrowbar","object" },
|
||||
{ "ItemBriefcaseEmpty","magazine" },
|
||||
};
|
||||
@@ -898,7 +899,7 @@ class CfgBuildingLoot {
|
||||
{ "NVGoggles","weapon" },
|
||||
{ "AmmoBoxSmall_556","object" },
|
||||
{ "AmmoBoxSmall_762","object" },
|
||||
{ "","militaryclothes" },
|
||||
{ "militaryclothes","single" },
|
||||
{"G36C","weapon"},
|
||||
{"G36C_camo","weapon"},
|
||||
//{"G36_C_SD_camo","weapon"},
|
||||
@@ -953,7 +954,7 @@ class HeliCrash_No50s: Default {
|
||||
{"NVGoggles","weapon"},
|
||||
{"AmmoBoxSmall_556","object"},
|
||||
{"AmmoBoxSmall_762","object"},
|
||||
{ "","militaryclothes" },
|
||||
{ "militaryclothes","single" },
|
||||
{"G36C","weapon"},
|
||||
{"G36C_camo","weapon"},
|
||||
//{"G36_C_SD_camo","weapon"},
|
||||
@@ -1263,7 +1264,7 @@ class HeliCrash_No50s: Default {
|
||||
{"G36_C_SD_camo","weapon"},
|
||||
{"M40A3","weapon"},
|
||||
{"100Rnd_762x54_PK","magazine"},
|
||||
{ "","militaryclothes" },
|
||||
{ "militaryclothes","single" },
|
||||
};
|
||||
itemChance[] = {
|
||||
0.011,
|
||||
@@ -1449,9 +1450,6 @@ class HeliCrash_No50s: Default {
|
||||
class Land_Shed_wooden: Residential {
|
||||
lootPos[] = {{1.26807,-0.361328,-1.29153},{-0.342773,1.0293,-1.29153}};
|
||||
};
|
||||
class Land_Misc_PowerStation: Industrial {
|
||||
lootPos[] = {{4.09888,4.89746,-1.26743},{4.22827,-1.19873,-1.2681}};
|
||||
};
|
||||
class Land_HouseBlock_A1_1: Residential {
|
||||
lootPos[] = {{-3.52881,0.158936,-4.74365},{-3.56152,-2.33484,-4.73106}};
|
||||
};
|
||||
@@ -1584,10 +1582,7 @@ class HeliCrash_No50s: Default {
|
||||
maxRoaming = 3;
|
||||
lootPos[] = {};
|
||||
}; // Qty: 103
|
||||
class Land_HouseV_1L2: Residential {
|
||||
maxRoaming = 3;
|
||||
lootPos[] = {};
|
||||
}; // Qty: 101
|
||||
|
||||
class Land_HouseV_1T: Residential {
|
||||
maxRoaming = 3;
|
||||
lootPos[] = {};
|
||||
@@ -1679,7 +1674,7 @@ class HeliCrash_No50s: Default {
|
||||
class Land_HouseV_2T1: HouseRoaming{};
|
||||
class Land_houseV_2T2: HouseRoaming{};
|
||||
class Land_HouseV_3I2: HouseRoaming{};
|
||||
class Land_HouseV_3I3: HouseRoaming{};
|
||||
|
||||
class Land_HouseBlock_A1: HouseRoaming{};
|
||||
class Land_HouseBlock_A1_2: HouseRoaming{};
|
||||
class Land_HouseBlock_A2: HouseRoaming{};
|
||||
@@ -1720,7 +1715,20 @@ class HeliCrash_No50s: Default {
|
||||
maxRoaming = 4;
|
||||
};
|
||||
|
||||
class Land_HouseV_1L2: Residential {
|
||||
maxRoaming = 3;
|
||||
lootPos[] = {};
|
||||
}; // Qty: 101
|
||||
|
||||
class Land_Misc_PowerStation: Industrial {
|
||||
lootPos[] = {{4.09888,4.89746,-1.26743},{4.22827,-1.19873,-1.2681}};
|
||||
};
|
||||
|
||||
class Land_HouseV_3I3: HouseRoaming{};
|
||||
|
||||
class Land_Mil_Guardhouse: Military {
|
||||
lootPos[] = {{-2.53271,3.17871,-1.66939},{-2.39014,0.878906,-1.66939}};
|
||||
};
|
||||
|
||||
// DAYZ AMP More buildings
|
||||
class Mass_grave_DZ: HouseRoaming {
|
||||
@@ -3207,9 +3215,7 @@ class HeliCrash_No50s: Default {
|
||||
class land_st_vez: MilitarySpecial {
|
||||
lootPos[] = {{-5.56445,4.23975,-3.31476},{-5.05566,-3.17627,-3.31476},{4.12109,3.92822,2.42732},{-1.73389,2.68896,6.40834},{-4.23584,1.29736,6.40834},{-3.80322,-1.09277,6.40834},{0.430664,1.31787,6.40834},{-2.45166,-2.16748,6.40834},{-0.608398,-0.57666,-11.095},{-2.08691,1.10303,-11.0649},{0.259277,-3.89697,-3.31476},{3.9375,3.30957,-8.50825}};
|
||||
};
|
||||
class Land_Mil_Guardhouse: Military {
|
||||
lootPos[] = {{-2.53271,3.17871,-1.66939},{-2.39014,0.878906,-1.66939}};
|
||||
};
|
||||
|
||||
class Land_dulni_bs: Residential {
|
||||
lootPos[] = {{2.76758,2.70068,-1.75205},{2.34668,-1.28564,-1.75205},{-0.478516,-2.64844,-1.75205},{-0.53418,3.11133,-1.75205}};
|
||||
};
|
||||
|
||||
@@ -124,7 +124,7 @@ if (!isDedicated) then {
|
||||
_control1 = _display displayctrl 8400;
|
||||
_control2 = _display displayctrl 102;
|
||||
// 120 sec timeout
|
||||
while { _timeOut < 500 && !dayz_clientPreload && !dayz_authed } do {
|
||||
while { _timeOut < 3000 && !dayz_clientPreload && !dayz_authed } do {
|
||||
|
||||
if ( isNull _display ) then {
|
||||
waitUntil { !dialog; };
|
||||
@@ -133,15 +133,16 @@ if (!isDedicated) then {
|
||||
_control1 = _display displayctrl 8400;
|
||||
_control2 = _display displayctrl 102;
|
||||
};
|
||||
|
||||
if ( dayz_loadScreenMsg != "" ) then {
|
||||
_control1 ctrlSetText dayz_loadScreenMsg;
|
||||
dayz_loadScreenMsg = "";
|
||||
};
|
||||
_control2 ctrlSetText format["%1",round(_timeOut*0.1)];
|
||||
_control2 ctrlSetText format["%1",round(_timeOut*0.01)];
|
||||
_timeOut = _timeOut + 1;
|
||||
sleep 0.1;
|
||||
sleep 0.01;
|
||||
};
|
||||
endLoadingScreen;
|
||||
endLoadingScreen;
|
||||
/*
|
||||
if ( !dayz_clientPreload && !dayz_authed ) then {
|
||||
diag_log "DEBUG: loadscreen guard ended with timeout.";
|
||||
@@ -151,6 +152,22 @@ if (!isDedicated) then {
|
||||
} else { diag_log "DEBUG: loadscreen guard ended."; };
|
||||
*/
|
||||
};
|
||||
|
||||
//
|
||||
RunTime = 0;
|
||||
TotalRuns = 0;
|
||||
|
||||
fnc_dump = {
|
||||
private["_code","_benchmark","_averageRunTime"];
|
||||
_code = _this select 0;
|
||||
_benchmark = _this select 1;
|
||||
|
||||
RunTime = RunTime + _benchmark;
|
||||
TotalRuns = TotalRuns + 1;
|
||||
_averageRunTime = RunTime/TotalRuns;
|
||||
|
||||
diag_log format["%1 - %2 (%3 / %4)",_code,_benchmark,_averageRunTime,TotalRuns];
|
||||
};
|
||||
dayz_losChance = {
|
||||
private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
|
||||
_agent = _this select 0;
|
||||
@@ -195,8 +212,8 @@ if (!isDedicated) then {
|
||||
_agent = _this select 1;
|
||||
_cantSee = true;
|
||||
if (!isNull _target) then {
|
||||
_tPos = eyePos _target;
|
||||
_zPos = eyePos _agent;
|
||||
_tPos = aimPos _target;
|
||||
_zPos = aimPos _agent;
|
||||
if ((count _tPos > 0) and (count _zPos > 0)) then {
|
||||
_cantSee = terrainIntersectASL [_tPos, _zPos];
|
||||
if (!_cantSee) then {
|
||||
@@ -383,36 +400,6 @@ if (!isDedicated) then {
|
||||
_vdir
|
||||
};
|
||||
|
||||
dayz_lowHumanity = {
|
||||
private["_unit","_humanity","_delay"];
|
||||
_unit = _this;
|
||||
if ((_unit distance player) < 15) then {
|
||||
_humanity = _unit getVariable["humanity",0];
|
||||
dayz_heartBeat = true;
|
||||
if (_humanity < -3000) then {
|
||||
_delay = ((10000 + _humanity) / 5500) + 0.3;
|
||||
playSound "heartbeat_1";
|
||||
sleep _delay;
|
||||
};
|
||||
dayz_heartBeat = false;
|
||||
};
|
||||
};
|
||||
/*
|
||||
dayz_meleeMagazineCheck = {
|
||||
private["_meleeNum","_magType","_wpnType"];
|
||||
_wpnType = _this;
|
||||
_magType = ([] + getArray (configFile >> "CfgWeapons" >> _wpnType >> "magazines")) select 0;
|
||||
_meleeNum = ({_x == _magType} count magazines player);
|
||||
if (_meleeNum > 1) then {
|
||||
if (player hasWeapon _wpnType) then {
|
||||
_meleeNum = _meleeNum - 1;
|
||||
};
|
||||
for "_i" from 1 to _meleeNum do {
|
||||
player removeMagazine _magType;
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
dayz_originalPlayer = player;
|
||||
};
|
||||
|
||||
@@ -459,6 +446,7 @@ if (!isDedicated) then {
|
||||
world_isDay = {if ((daytime < (24 - dayz_sunRise)) and (daytime > dayz_sunRise)) then {true} else {false}};
|
||||
player_humanityChange = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityChange.sqf";
|
||||
spawn_loot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
|
||||
spawn_loot_small = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot_small.sqf";
|
||||
// player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
|
||||
|
||||
player_sumMedical = {
|
||||
|
||||
@@ -6,7 +6,8 @@ _config = configFile >> "CfgBuildingLoot";
|
||||
for "_i" from 0 to ((count _config) - 1) do {
|
||||
_classname = toLower(configName (_config select _i));
|
||||
_itemChances = [] + getArray (_config >> _classname >> "ItemChance");
|
||||
_itemCount = count _itemChances;
|
||||
_itemChancesSmall = [] + getArray (_config >> _classname >> "ItemChanceSmall");
|
||||
_itemCount = count _itemChances;
|
||||
if (_itemCount > 0) then {
|
||||
if (dayz_CBLBase find _classname < 0) then {
|
||||
_weighted = [];
|
||||
@@ -19,7 +20,7 @@ for "_i" from 0 to ((count _config) - 1) do {
|
||||
_j = _j + _weight;
|
||||
};
|
||||
dayz_CBLChances set [count dayz_CBLChances, _weighted];
|
||||
dayz_CBLBase set [count dayz_CBLBase, _classname];
|
||||
dayz_CBLBase set [count dayz_CBLBase, _classname];
|
||||
};
|
||||
} else {
|
||||
dayz_CBLChances set [count dayz_CBLChances, [0]];
|
||||
|
||||
@@ -57,6 +57,6 @@ actionMonitor = {
|
||||
if (_classname == "WoodenArrow") then {
|
||||
[_holder,_type,_classname,_name] spawn actionMonitor;
|
||||
} else {
|
||||
null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
|
||||
_holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true, "", "DZE_CanPickup"];
|
||||
player reveal _holder;
|
||||
};
|
||||
@@ -441,10 +441,10 @@ if(isNil "dayz_zedsAttackVehicles") then {
|
||||
dayz_updateObjects = ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","M240Nest_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
|
||||
dayz_disallowedVault = ["TentStorage", "BuiltItems"];
|
||||
dayz_reveal = ["AllVehicles","WeaponHolder","TentStorage","VaultStorage","VaultStorageLocked","BuiltItems"];
|
||||
dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ"];
|
||||
dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ"];
|
||||
|
||||
// List of removable items that require crowbar
|
||||
DZE_isRemovable = ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","SandNest_DZ","Plastic_Pole_EP1_DZ"];
|
||||
DZE_isRemovable = ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","Plastic_Pole_EP1_DZ"];
|
||||
DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
|
||||
DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
|
||||
|
||||
@@ -578,4 +578,6 @@ if(!isDedicated) then {
|
||||
DZE_AllowCargoCheck = true;
|
||||
};
|
||||
|
||||
DZE_CanPickup = true;
|
||||
|
||||
};
|
||||
@@ -254,6 +254,7 @@ fnc_usec_recoverUncons = {
|
||||
sleep 1;
|
||||
r_player_cardiac = false;
|
||||
r_player_handler1 = false;
|
||||
|
||||
player switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||
if(animationState player != "AmovPpneMstpSnonWnonDnon_healed") then {
|
||||
player switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||
};
|
||||
};
|
||||
@@ -149,7 +149,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 1.0.1.5 (1.7.6.1+)";
|
||||
text = "DayZ Epoch 1.0.1.6";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
delete CA_TitleMainMenu;
|
||||
|
||||
@@ -1103,11 +1103,6 @@ class FSM
|
||||
"" \n
|
||||
" call player_checkStealth;" \n
|
||||
" dayz_statusArray = [] call player_updateGui;" \n
|
||||
" if (!isNull cursorTarget and !dayz_heartBeat) then {" \n
|
||||
" if (alive cursorTarget) then {" \n
|
||||
" _id = cursorTarget spawn dayz_lowHumanity;" \n
|
||||
" };" \n
|
||||
" };" \n
|
||||
" sleep 0.2;" \n
|
||||
" };" \n
|
||||
"};" \n
|
||||
|
||||
@@ -12,9 +12,6 @@ player setVariable ["temperature",dayz_temperatur,true];
|
||||
|
||||
dayz_myLoad = (((count dayz_myBackpackMags) * 0.2) + (count dayz_myBackpackWpns)) + (((count dayz_myMagazines) * 0.1) + (count dayz_myWeapons * 0.5));
|
||||
|
||||
//player addMagazine "Hatchet_Swing";
|
||||
//player addWeapon "MeleeHatchet";
|
||||
|
||||
while {true} do {
|
||||
//Initialize
|
||||
_refObj = vehicle player;
|
||||
|
||||
@@ -22,31 +22,54 @@ epoch_eventIsAny = {
|
||||
_boolReturn
|
||||
};
|
||||
|
||||
zero_cleanDead = diag_tickTime;
|
||||
zero_cleanLoot = diag_tickTime;
|
||||
|
||||
while {true} do {
|
||||
|
||||
// Find current time from server
|
||||
_key = "CHILD:307:";
|
||||
_result = _key call server_hiveReadWrite;
|
||||
_outcome = _result select 0;
|
||||
if(_outcome == "PASS") then {
|
||||
_date = _result select 1;
|
||||
if (EventSchedulerLastTime != str(_date)) then {
|
||||
EventSchedulerLastTime = str(_date);
|
||||
_datestr = str(_date);
|
||||
if (EventSchedulerLastTime != _datestr) then {
|
||||
|
||||
// This is only ran every minute.
|
||||
EventSchedulerLastTime = _datestr;
|
||||
|
||||
// diag_log ("EVENTS: Local Time is: " + str(_date));
|
||||
{
|
||||
|
||||
_proceed = false;
|
||||
for "_i" from 0 to 4 do {
|
||||
_proceed = [(_x select _i),(date select _i)] call epoch_eventIsAny;
|
||||
if([(_x select 0),(date select 0)] call epoch_eventIsAny) then {
|
||||
if([(_x select 1),(date select 1)] call epoch_eventIsAny) then {
|
||||
if([(_x select 2),(date select 2)] call epoch_eventIsAny) then {
|
||||
if([(_x select 3),(date select 3)] call epoch_eventIsAny) then {
|
||||
if([(_x select 4),(date select 4)] call epoch_eventIsAny) then {
|
||||
// EXECUTE SCRIPT
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + EventSchedulerLastTime);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if(_proceed) then {
|
||||
_xaction = _x select 5;
|
||||
// EXECUTE SCRIPT
|
||||
diag_log ("RUNNING EVENT: " + _xaction + " on " + EventSchedulerLastTime);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + _xaction + ".sqf";
|
||||
};
|
||||
sleep 0.03;
|
||||
|
||||
} forEach EpochEvents;
|
||||
|
||||
_time = diag_tickTime;
|
||||
|
||||
// perform cleanup here
|
||||
if ((_time - zero_cleanDead) > 600) then
|
||||
{
|
||||
call server_cleanDead;
|
||||
zero_cleanDead = _time;
|
||||
};
|
||||
|
||||
if ((_time - zero_cleanLoot) > 1800) then
|
||||
{
|
||||
call server_cleanLoot;
|
||||
zero_cleanLoot = _time;
|
||||
};
|
||||
};
|
||||
};
|
||||
sleep 5;
|
||||
|
||||
@@ -158,7 +158,14 @@ if(isnil "DynamicVehicleArea") then {
|
||||
// Get all buildings and roads only once TODO: set variables to nil after done if nessicary
|
||||
MarkerPosition = getMarkerPos "center";
|
||||
RoadList = MarkerPosition nearRoads DynamicVehicleArea;
|
||||
BuildingList = MarkerPosition nearObjects ["House",DynamicVehicleArea];
|
||||
|
||||
BuildingList = [];
|
||||
{
|
||||
if (isClass (configFile >> "CfgBuildingLoot" >> (typeOf _x))) then
|
||||
{
|
||||
BuildingList set [count BuildingList,_x];
|
||||
};
|
||||
} forEach (MarkerPosition nearObjects ["building",DynamicVehicleArea]);
|
||||
|
||||
spawn_vehicles = {
|
||||
private ["_weights","_isOverLimit","_isAbort","_counter","_index","_vehicle","_velimit","_qty","_isAir","_isShip","_position","_dir","_istoomany","_veh","_objPosition","_marker","_iClass","_itemTypes","_cntWeights","_itemType","_num","_allCfgLoots"];
|
||||
@@ -477,3 +484,128 @@ dayz_recordLogin = {
|
||||
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
|
||||
///////////////
|
||||
// from dayzero
|
||||
///////////////
|
||||
server_Delete =
|
||||
{
|
||||
private["_body","_bodyGroup","_pos","_sfx"];
|
||||
|
||||
_body = _this select 0;
|
||||
_bodyGroup = group _body;
|
||||
_pos = getPosATL _body;
|
||||
_sfx = nearestObject [_pos,"Sound_Flies"];
|
||||
|
||||
_body removeAllEventHandlers "HandleDamage";
|
||||
_body removeAllEventHandlers "Killed";
|
||||
_body removeAllEventHandlers "Fired";
|
||||
_body removeAllEventHandlers "FiredNear";
|
||||
|
||||
deleteVehicle _body;
|
||||
deleteGroup _bodyGroup;
|
||||
|
||||
if ((!isNull _sfx) and ((_sfx distance _pos) < 10)) then
|
||||
{
|
||||
deleteVehicle _sfx;
|
||||
};
|
||||
};
|
||||
|
||||
server_cleanDead =
|
||||
{
|
||||
private ["_deletedZombies","_deletedBodies","_timeStamp","_backpack","_magazines","_backpackMagazines"];
|
||||
|
||||
_deletedZombies = 0;
|
||||
_deletedBodies = 0;
|
||||
|
||||
{
|
||||
if (_x isKindOf "zZombie_Base") then
|
||||
{
|
||||
deleteVehicle _x;
|
||||
_deletedZombies = _deletedZombies + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_timeStamp = _x getVariable ["timeStamp",0];
|
||||
//diag_log (format["CLEANUP: TIMESTAMP ON BODY: %1, VALUE: %2",(typeOf _x),_timeStamp]);
|
||||
if (_timeStamp == 0) then
|
||||
{
|
||||
_x enableSimulation false;
|
||||
_backpack = unitBackpack _x;
|
||||
|
||||
if (!isNull _backpack) then
|
||||
{
|
||||
_magazines = magazines _x;
|
||||
_backpackMagazines = getMagazineCargo _backpack;
|
||||
//diag_log (format["CLEANUP: UNIT HAS BACKPACK, MAG COUNT: %1 PACK COUNT: %2",(count _magazines),(count _backpackMagazines)]);
|
||||
if ((count _magazines < 4) and (count _backpackMagazines < 3)) then
|
||||
{
|
||||
[_x] call server_Delete;
|
||||
_deletedBodies = _deletedBodies + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_x setVariable ["timeStamp",diag_tickTime];
|
||||
//diag_log (format["CLEANUP: TIMESTAMPED BODY WITH BACKPACK: %1",_x]);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_magazines = magazines _x;
|
||||
//diag_log (format["CLEANUP: UNIT HAS NO BACKPACK, MAG COUNT: %1",(count _magazines)]);
|
||||
if (count _magazines < 4) then
|
||||
{
|
||||
[_x] call server_Delete;
|
||||
_deletedBodies = _deletedBodies + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_x setVariable ["timeStamp",diag_tickTime];
|
||||
//diag_log (format["CLEANUP: TIMESTAMPED BODY WITHOUT BACKPACK: %1",_x]);
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((diag_tickTime - _timeStamp) > 2400) then
|
||||
{
|
||||
[_x] call server_Delete;
|
||||
_deletedBodies = _deletedBodies + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach allDead;
|
||||
|
||||
diag_log (format["CLEANUP: DELETED %1 PLAYERS AND %2 ZOMBIES",_deletedBodies,_deletedZombies]);
|
||||
};
|
||||
|
||||
server_cleanLoot =
|
||||
{
|
||||
private ["_deletedLoot","_startTime","_looted","_objectPos","_noPlayerNear","_nearObj"];
|
||||
|
||||
_deletedLoot = 0;
|
||||
_startTime = diag_tickTime;
|
||||
|
||||
{
|
||||
_looted = (_x getVariable ["looted",-0.1]);
|
||||
if (_looted != -0.1) then
|
||||
{
|
||||
_objectPos = getPosATL _x;
|
||||
_noPlayerNear = {isPlayer _x} count (_objectPos nearEntities ["CAManBase",35]) == 0;
|
||||
|
||||
if (_noPlayerNear) then
|
||||
{
|
||||
_nearObj = nearestObjects [_objectPos,["ReammoBox","WeaponHolder","WeaponHolderBase"],((sizeOf (typeOf _x)) + 5)];
|
||||
{
|
||||
deleteVehicle _x;
|
||||
_deletedLoot = _deletedLoot + 1;
|
||||
} forEach _nearObj;
|
||||
_x setVariable ["looted",-0.1,true];
|
||||
};
|
||||
};
|
||||
} forEach BuildingList;
|
||||
|
||||
_endTime = diag_tickTime;
|
||||
|
||||
diag_log (format["CLEANUP: DELETED %1 ITEMS, RUNTIME: %2",_deletedLoot,(_endTime - _startTime)]);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1 "" !="VaultStorageLocked" !="Hedgehog_DZ" !="Sandbag1_DZ" !="Fort_RazorWire" !="WoodGate_DZ" !="Land_HBarrier1_DZ"
|
||||
1 "" !="VaultStorageLocked" !="Hedgehog_DZ" !="Sandbag1_DZ" !="Fort_RazorWire" !="WoodGate_DZ" !="Land_HBarrier1_DZ" !="Land_HBarrier3_DZ"
|
||||
5 "Offroad_DSHKM_Gue"
|
||||
5 "Old_moto_TK_Civ_EP1"
|
||||
5 "MMT_Civ"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
1 "M_" !="G_40mm_HE" //!="40mm_" //keep monitoring to catch obvious abuse
|
||||
5 "Parachute" !="ParachuteWest" //under monitoring
|
||||
1 "dog" //until released not welcome
|
||||
5 "Land_" !="Land_Fire_DZ" !="Land_HBarrier1_DZ"
|
||||
5 "Land_" !="Land_Fire_DZ" !="Land_HBarrier1_DZ" !="Land_HBarrier3_DZ"
|
||||
5 "BBarracks"
|
||||
1 "_ep1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="CZ_VestPouch_EP1" !="DZ_ALICE_Pack_EP1" !="DZ_Backpack_EP1" !="DZ_Assault_Pack_EP1" !="DZ_TK_Assault_Pack_EP1"
|
||||
1 "_baf"
|
||||
|
||||
@@ -1149,9 +1149,9 @@ _group_2 = createGroup _center_2;
|
||||
_unit_108 = objNull;
|
||||
if (true) then
|
||||
{
|
||||
_this = _group_2 createUnit ["GUE_Soldier_MG", [1606.5773, 7806.395, 0.25734121], [], 0, "CAN_COLLIDE"];
|
||||
_this = _group_2 createUnit ["GUE_Soldier_MG", [1623.1722, 7797.7886, 0.25734121], [], 0, "CAN_COLLIDE"];
|
||||
_unit_108 = _this;
|
||||
_this setDir 187.47844;
|
||||
_this setDir 274.59872;
|
||||
_this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; ";
|
||||
_this setUnitAbility 0.60000002;
|
||||
_this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;
|
||||
@@ -1267,9 +1267,9 @@ if (true) then
|
||||
_vehicle_662 = objNull;
|
||||
if (true) then
|
||||
{
|
||||
_this = createVehicle ["HeliHCivil", [12986.608, 12767.673, -210.79434], [], 0, "CAN_COLLIDE"];
|
||||
_this = createVehicle ["HeliHCivil", [12915.168, 12770.989, -210.79434], [], 0, "CAN_COLLIDE"];
|
||||
_vehicle_662 = _this;
|
||||
_this setPos [12986.608, 12767.673, -210.79434];
|
||||
_this setPos [12915.168, 12770.989, -210.79434];
|
||||
};
|
||||
|
||||
_vehicle_663 = objNull;
|
||||
@@ -1593,4 +1593,28 @@ if (true) then
|
||||
_this setPos [11455.539, 11341.255];
|
||||
};
|
||||
|
||||
_vehicle_786 = objNull;
|
||||
if (true) then
|
||||
{
|
||||
_this = createVehicle ["RoadCone", [12919.824, 12771.057, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
|
||||
_vehicle_786 = _this;
|
||||
_this setPos [12919.824, 12771.057, -6.1035156e-005];
|
||||
};
|
||||
|
||||
_vehicle_788 = objNull;
|
||||
if (true) then
|
||||
{
|
||||
_this = createVehicle ["RoadCone", [12910.383, 12770.92, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
|
||||
_vehicle_788 = _this;
|
||||
_this setPos [12910.383, 12770.92, -9.1552734e-005];
|
||||
};
|
||||
|
||||
_vehicle_790 = objNull;
|
||||
if (true) then
|
||||
{
|
||||
_this = createVehicle ["RoadCone", [1617.5127, 7773.2793], [], 0, "CAN_COLLIDE"];
|
||||
_vehicle_790 = _this;
|
||||
_this setPos [1617.5127, 7773.2793];
|
||||
};
|
||||
|
||||
processInitCommands;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
DayZ Epoch 1.0.1.5
|
||||
DayZ Epoch 1.0.1.6
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
@@ -1446,10 +1446,10 @@ class _unit_108
|
||||
objectType="unit";
|
||||
class Arguments
|
||||
{
|
||||
POSITION="[1606.5773, 7806.395, 0.25734121]";
|
||||
POSITION="[1623.1722, 7797.7886, 0.25734121]";
|
||||
GROUP="_group_2";
|
||||
TYPE="GUE_Soldier_MG";
|
||||
AZIMUT="187.47844";
|
||||
AZIMUT="274.59872";
|
||||
INIT="this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; ";
|
||||
SKILL="0.60000002";
|
||||
LEADER="true";
|
||||
@@ -1618,7 +1618,7 @@ class _vehicle_662
|
||||
objectType="vehicle";
|
||||
class Arguments
|
||||
{
|
||||
POSITION="[12986.608, 12767.673, -210.79434]";
|
||||
POSITION="[12915.168, 12770.989, -210.79434]";
|
||||
TYPE="HeliHCivil";
|
||||
PARENT="";
|
||||
};
|
||||
@@ -2014,6 +2014,36 @@ class _vehicle_784
|
||||
PARENT="";
|
||||
};
|
||||
};
|
||||
class _vehicle_786
|
||||
{
|
||||
objectType="vehicle";
|
||||
class Arguments
|
||||
{
|
||||
POSITION="[12919.824, 12771.057, -6.1035156e-005]";
|
||||
TYPE="RoadCone";
|
||||
PARENT="";
|
||||
};
|
||||
};
|
||||
class _vehicle_788
|
||||
{
|
||||
objectType="vehicle";
|
||||
class Arguments
|
||||
{
|
||||
POSITION="[12910.383, 12770.92, -9.1552734e-005]";
|
||||
TYPE="RoadCone";
|
||||
PARENT="";
|
||||
};
|
||||
};
|
||||
class _vehicle_790
|
||||
{
|
||||
objectType="vehicle";
|
||||
class Arguments
|
||||
{
|
||||
POSITION="[1617.5127, 7773.2793]";
|
||||
TYPE="RoadCone";
|
||||
PARENT="";
|
||||
};
|
||||
};
|
||||
class _postfix_0
|
||||
{
|
||||
objectType="postfix";
|
||||
|
||||
Reference in New Issue
Block a user