mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
0.971
+ added color coding of backpack when selling fixes #112 + fixed silver to gold conversion rates on bulk selling weapons and backpacks. Fixes #114 + add more missing weights for R3F realism. Fixes #110 + added random direction to purchased vehicles makes it harder to get duplicate uid not fixed 100%
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
{
|
||||
|
||||
@@ -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 <br /> total: %3 ",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
|
||||
//hintSilent format["Spawning %1 / %2 <br /> 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 <br /> total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
|
||||
//hintSilent format["Waiting %1 / %2 <br /> total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
|
||||
dayz_spawnWait = time;
|
||||
dayz_spawnZombies = 0;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user