diff --git a/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_CfgWeight.h b/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_CfgWeight.h
index 272fc3776..6f1dbc60f 100644
--- a/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_CfgWeight.h
+++ b/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_CfgWeight.h
@@ -702,6 +702,10 @@ class CfgWeight
{
weight = 0.5;
};
+ class 15Rnd_W1866_Slug
+ {
+ weight = 0.5;
+ };
class 30Rnd_9x19_MP5
{
weight = 0.4;
@@ -801,6 +805,10 @@ class CfgWeight
class 20Rnd_762x51_DMR
{
weight = 0.5;
+ };
+ class 8Rnd_B_Beneli_Pellets
+ {
+ weight = 0.3;
};
class 20Rnd_556x45_Stanag
{
@@ -1054,6 +1062,10 @@ class CfgWeight
{
weight = 0.5;
};
+ class ItemWaterbottleBoiled
+ {
+ weight = 0.5;
+ };
class ItemSodaMdew
{
weight = 0.2;
@@ -1078,6 +1090,10 @@ class CfgWeight
{
weight = 0.2;
};
+ class FoodBioMeat
+ {
+ weight = 0.2;
+ };
class FoodCanPasta
{
weight = 0.2;
@@ -1352,6 +1368,19 @@ class CfgWeight
{
weight = 50;
};
+ class ItemWaterbottleUnfilled
+ {
+ weight = 0.05;
+ };
+ class ItemSodaEmpty
+ {
+ weight = 0.002;
+ };
+ class TrashJackDaniels
+ {
+ weight = 0.02;
+ };
+
diff --git a/dayz_code/actions/player_build.sqf b/dayz_code/actions/player_build.sqf
index 5c71a3160..9a54d2659 100644
--- a/dayz_code/actions/player_build.sqf
+++ b/dayz_code/actions/player_build.sqf
@@ -1,6 +1,6 @@
private["_location","_isOk","_dir","_classname","_item"];
_location = player modeltoworld [0,1,0];
-_location set [2,0];
+// _location set [2,0];
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
_bypass = false;
diff --git a/dayz_code/actions/sell_db.sqf b/dayz_code/actions/sell_db.sqf
index a496fdad8..a79855a06 100644
--- a/dayz_code/actions/sell_db.sqf
+++ b/dayz_code/actions/sell_db.sqf
@@ -91,7 +91,15 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
_count = 0;
if(_type == "CfgVehicles") then {
- _count = {(typeOf _x) == _name} count (nearestObjects [player, [_name], 10]);
+ if (_afile == "trade_backpacks") then {
+ _bag = unitBackpack player;
+ _bagclass = typeOf _bag;
+ if(_name == _bagclass) then {
+ _count = 1;
+ };
+ } else {
+ _count = {(typeOf _x) == _name} count (nearestObjects [player, [_name], 10]);
+ }
};
if(_type == "CfgMagazines") then {
_count = {_x == _name} count magazines player;
diff --git a/dayz_code/actions/trade_any_vehicle.sqf b/dayz_code/actions/trade_any_vehicle.sqf
index 56f19b3d3..6d5fb5832 100644
--- a/dayz_code/actions/trade_any_vehicle.sqf
+++ b/dayz_code/actions/trade_any_vehicle.sqf
@@ -44,10 +44,10 @@ if (_qty >= _qty_in) then {
player removeMagazine _part_in;
};
- _dir = 90;
+ _dir = round(random 180);
- _helipad = nearestObjects [player, ["HeliHCivil"], 200];
+ _helipad = nearestObjects [player, ["HeliHCivil"], 50];
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
diff --git a/dayz_code/actions/trade_backpacks.sqf b/dayz_code/actions/trade_backpacks.sqf
index 7d4b2e220..372ad4477 100644
--- a/dayz_code/actions/trade_backpacks.sqf
+++ b/dayz_code/actions/trade_backpacks.sqf
@@ -62,40 +62,35 @@ if (_bulkqty >= 1) then {
// gold = 6 silver
//
- if (_part_out == "ItemSilverBar") then {
+ if (_part_out == "ItemSilverBar" and _qty_out >= 30) then {
- if (_qty_out >= 6) then {
+
- // find number of gold
- _gold_out = _qty_out / 6;
+ // find number of gold
+ _gold_out = _qty_out / 30;
- // whole number of gold bars
- _gold_qty_out = floor _gold_out;
+ // whole number of gold bars
+ _gold_qty_out = floor _gold_out;
- _part_out = "ItemGoldBar";
- for "_x" from 1 to _gold_qty_out do {
- player addMagazine _part_out;
- };
-
- // Find remainder
- _partial_qty_out = (_gold_out - _gold_qty_out) * 6;
-
- // whole number of gold bars
- _silver_qty_out = floor _partial_qty_out;
-
- _part_out = "ItemSilverBar";
- for "_x" from 1 to _silver_qty_out do {
- player addMagazine _part_out;
- };
-
-
- } else {
-
- for "_x" from 1 to _qty_out do {
- player addMagazine _part_out;
- };
+ _part_out = "ItemGoldBar";
+ for "_x" from 1 to _gold_qty_out do {
+ player addMagazine _part_out;
};
+ // Find remainder
+ _partial_qty_out = (_gold_out - _gold_qty_out) * 30;
+
+ // whole number of silver bars
+ _silver_qty_out = floor _partial_qty_out;
+
+ _part_out = "ItemSilverBar";
+ for "_x" from 1 to _silver_qty_out do {
+ player addMagazine _part_out;
+ };
+
+
+
+
} else {
for "_x" from 1 to _qty_out do {
diff --git a/dayz_code/actions/trade_weapons.sqf b/dayz_code/actions/trade_weapons.sqf
index 4d826c120..e00cb0299 100644
--- a/dayz_code/actions/trade_weapons.sqf
+++ b/dayz_code/actions/trade_weapons.sqf
@@ -58,40 +58,35 @@ if (_bulkqty >= 1) then {
// gold = 6 silver
//
- if (_part_out == "ItemSilverBar") then {
+ if (_part_out == "ItemSilverBar" and _qty_out >= 30) then {
- if (_qty_out >= 6) then {
+
- // find number of gold
- _gold_out = _qty_out / 6;
+ // find number of gold
+ _gold_out = _qty_out / 30;
- // whole number of gold bars
- _gold_qty_out = floor _gold_out;
+ // whole number of gold bars
+ _gold_qty_out = floor _gold_out;
- _part_out = "ItemGoldBar";
- for "_x" from 1 to _gold_qty_out do {
- player addMagazine _part_out;
- };
-
- // Find remainder
- _partial_qty_out = (_gold_out - _gold_qty_out) * 6;
-
- // whole number of gold bars
- _silver_qty_out = floor _partial_qty_out;
-
- _part_out = "ItemSilverBar";
- for "_x" from 1 to _silver_qty_out do {
- player addMagazine _part_out;
- };
-
-
- } else {
-
- for "_x" from 1 to _qty_out do {
- player addMagazine _part_out;
- };
+ _part_out = "ItemGoldBar";
+ for "_x" from 1 to _gold_qty_out do {
+ player addMagazine _part_out;
};
+ // Find remainder
+ _partial_qty_out = (_gold_out - _gold_qty_out) * 30;
+
+ // whole number of silver bars
+ _silver_qty_out = floor _partial_qty_out;
+
+ _part_out = "ItemSilverBar";
+ for "_x" from 1 to _silver_qty_out do {
+ player addMagazine _part_out;
+ };
+
+
+
+
} else {
for "_x" from 1 to _qty_out do {
diff --git a/dayz_code/compile/fn_selfActions.sqf b/dayz_code/compile/fn_selfActions.sqf
index 5a6367868..67d1f10e0 100644
--- a/dayz_code/compile/fn_selfActions.sqf
+++ b/dayz_code/compile/fn_selfActions.sqf
@@ -76,8 +76,6 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
-
-
_rawmeat = meatraw;
_hasRawMeat = false;
{
diff --git a/dayz_code/compile/player_spawnCheck.sqf b/dayz_code/compile/player_spawnCheck.sqf
index 2ebb8456a..e78136447 100644
--- a/dayz_code/compile/player_spawnCheck.sqf
+++ b/dayz_code/compile/player_spawnCheck.sqf
@@ -102,11 +102,11 @@ if (_nearbyCount < 1) exitwith {};
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
if (dayz_spawnZombies < _maxZombies) then {
if (_spawnZombies) then {
- hintSilent format["Spawning %1 / %2
total: %3 ",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
+ //hintSilent format["Spawning %1 / %2
total: %3 ",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
};
} else {
- hintSilent format["Waiting %1 / %2
total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
+ //hintSilent format["Waiting %1 / %2
total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
dayz_spawnWait = time;
dayz_spawnZombies = 0;
};
diff --git a/dayz_code/compile/zombie_generate.sqf b/dayz_code/compile/zombie_generate.sqf
index 42e0fb7e1..9f958f8e2 100644
--- a/dayz_code/compile/zombie_generate.sqf
+++ b/dayz_code/compile/zombie_generate.sqf
@@ -27,10 +27,12 @@ if (_doLoiter) then {
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
_agent = createAgent [_type, _position, [], _radius, _method];
+/*
if(!(_agent == objNull)) then {
dayzSpawnZed = [_agent];
publicVariableServer "dayzSpawnZed";
};
+*/
if (_doLoiter) then {
_agent setPosATL _position;
diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp
index f22244952..4cd07e4df 100644
--- a/dayz_code/config.cpp
+++ b/dayz_code/config.cpp
@@ -27,7 +27,7 @@ class CfgMods
{
class DayZ
{
- dir = "DayZ";
+ dir = "@DayZ_Epoch";
name = "DayZ Epoch";
picture = "z\addons\dayz_code\gui\dayz_logo_ca.paa";
hidePicture = 0;
diff --git a/dayz_equip/config.cpp b/dayz_equip/config.cpp
index 34077db80..7b3a7bdc6 100644
--- a/dayz_equip/config.cpp
+++ b/dayz_equip/config.cpp
@@ -1248,10 +1248,10 @@ class CfgMagazines
descriptionShort = "$STR_EQUIP_DESC_40";
class ItemActions {
class Build {
- text = "Build Branch Fence";
+ text = "Build Wood Gate";
script = "spawn player_build;";
require = "ItemToolbox";
- create = "Wall_FenW2_6_EP1";
+ create = "WoodGate_DZ";
};
};
};
@@ -1796,6 +1796,9 @@ class CfgMagazines
};
};
};
+
+
+
class ItemTankTrap: CA_Magazine
{
scope = 2;
@@ -1964,7 +1967,6 @@ class CfgVehicles
GhostPreview = "Fort_RazorWirePreview";
}
-
class Sandbag1_DZ: BuiltItems
{
scope = 2;
@@ -1977,6 +1979,19 @@ class CfgVehicles
displayName = "Bag Fence";
vehicleClass = "Fortifications";
};
+
+ class WoodGate_DZ: BuiltItems
+ {
+ scope = 2;
+ destrType = "DestructTree";
+ cost = 100;
+ model = "\ca\structures\Wall\Gate_wood2_5";
+ icon = "\ca\data\data\Unknown_object.paa";
+ mapSize = 2;
+ armor = 50;
+ displayName = "Locked Wood Gate";
+ vehicleClass = "Fortifications";
+ };
class BearTrap_DZ: TrapItems
{
scope = 2;
diff --git a/dayz_server/init/server_functions.sqf b/dayz_server/init/server_functions.sqf
index 139ba58e5..97608037e 100644
--- a/dayz_server/init/server_functions.sqf
+++ b/dayz_server/init/server_functions.sqf
@@ -404,7 +404,7 @@ dayz_objectUID = {
_position = getPosATL _object;
_dir = direction _object;
_key = [_dir,_position] call dayz_objectUID2;
- _key
+ _key
};
dayz_objectUID2 = {
@@ -421,6 +421,20 @@ dayz_objectUID2 = {
_key
};
+dayz_objectUID3 = {
+ private["_position","_dir","_key"];
+ _dir = _this select 0;
+ _key = "";
+ _position = _this select 1;
+ {
+ _x = _x * 10;
+ if ( _x < 0 ) then { _x = _x * -10 };
+ _key = _key + str(round(_x));
+ } forEach _position;
+ _key = _key + str(round(_dir));
+ _key
+};
+
dayz_recordLogin = {
private["_key"];
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];