diff --git a/Addons/len_backpacks.pbo b/Addons/len_backpacks.pbo new file mode 100644 index 000000000..5cdf43b54 Binary files /dev/null and b/Addons/len_backpacks.pbo differ diff --git a/dayz_code/actions/trade_items.sqf b/dayz_code/actions/trade_items.sqf index 31c2be5fb..8e830a31a 100644 --- a/dayz_code/actions/trade_items.sqf +++ b/dayz_code/actions/trade_items.sqf @@ -17,22 +17,26 @@ _bulkqty = 0; if(_buy_o_sell == "sell") then { - // SELL ONLY check if item if bulk - _bulkItem = call compile format["bulk_%1;",_part_in]; + // SELL ONLY check if item is bulk + _bulkItem = "bulk_" + _part_in; _bulkqty = {_x == _bulkItem} count magazines player; + diag_log format["DEBUG bulk: %1", _bulkItem]; + _bos = 1; }; if (_bulkqty >= 1) then { + // TODO: optimize for one db call only - - // Find qty of box and - _bulkqty = getNumber (configFile >> "CfgMagazines" >> _bulkItem >> "count"); + + _part_in = "bulk_" + _part_in; + player removeMagazine _part_in; + diag_log format["DEBUG remove magazine %1", _part_in]; // increment trader for each - for "_x" from 1 to _bulkqty do { + for "_x" from 1 to 12 do { ["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; waitUntil {!isNil "dayzTradeResult"}; @@ -42,10 +46,60 @@ if (_bulkqty >= 1) then { }; }; - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; + + + _qty_out = _qty_out * 12; + + // gold = 36 copper + // gold = 6 silver + // + + if (_part_out == "ItemSilverBar") then { + + if (_qty_out >= 6) then { + + // find number of gold + _gold_out = _qty_out / 6; + + // 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; + }; + }; + + } else { + + for "_x" from 1 to _qty_out do { + player addMagazine _part_out; + }; }; + + + + + cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; dayzTradeResult = nil; diff --git a/dayz_code/cfgLoot.hpp b/dayz_code/cfgLoot.hpp index b03654217..ab0400e84 100644 --- a/dayz_code/cfgLoot.hpp +++ b/dayz_code/cfgLoot.hpp @@ -302,8 +302,8 @@ class CfgLoot { "FoodCanPasta", "ItemBandage", "ItemPainkiller", - "ItemToolbox", - "ItemEtool" + "ItemWire", + "ItemTankTrap", }, { 0.09, diff --git a/dayz_code/cfgVehicles.hpp b/dayz_code/cfgVehicles.hpp index 66aad6485..4b6de2b1a 100644 --- a/dayz_code/cfgVehicles.hpp +++ b/dayz_code/cfgVehicles.hpp @@ -678,6 +678,80 @@ class Citizen1; // External class reference nameSound = "fuelstation"; }; + class Ship: AllVehicles + { + displayName = "Ship"; + transportMaxMagazines = 2000; + transportMaxWeapons = 200; + transportMaxBackpacks = 40; + }; + class SmallShip: Ship + { + displayName = "Small Ship"; + transportMaxMagazines = 100; + transportMaxWeapons = 20; + }; + class BigShip: Ship + { + displayName = "Big Ship"; + transportMaxMagazines = 500; + transportMaxWeapons = 200; + }; + class Fishing_Boat: Ship + { + displayName = "Fishing boat"; + maxSpeed = 40; + transportMaxMagazines = 400; + transportMaxWeapons = 40; + transportMaxBackpacks = 8; + }; + class Smallboat_1: Ship + { + displayName = "Small boat"; + maxSpeed = 30; + transportMaxMagazines = 200; + transportMaxWeapons = 20; + transportMaxBackpacks = 4; + }; + class smallboat_2: Smallboat_1 + { + displayName = "Small boat II"; + }; + class Boat: Ship + { + transportMaxMagazines = 100; + transportMaxWeapons = 10; + transportMaxBackpacks = 2; + }; + class RHIB: Boat + { + displayName = "RHIB"; + }; + class RHIB2Turret: RHIB + { + displayName = "RHIB (Mk19)"; + }; + class RubberBoat: Boat + { + transportMaxMagazines = 50; + transportMaxWeapons = 5; + transportMaxBackpacks = 1; + }; + class Zodiac: RubberBoat + { + displayName = "CRRC"; + }; + class PBX: RubberBoat + { + displayName = "PBX"; + }; + class PBX_ACR: Ship + { + displayName = "PBX"; + transportMaxMagazines = 50; + transportMaxWeapons = 5; + transportMaxBackpacks = 1; + }; // Lingor hangars //class land_ibr_hangar: land_ibr_hangar diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index e83c53fcb..5591c55e3 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -28,12 +28,12 @@ class CfgMods class DayZ { dir = "DayZ"; - name = "DayZ"; + name = "DayZ Epoch"; picture = "z\addons\dayz_code\gui\dayz_logo_ca.paa"; hidePicture = 0; hideName = 0; action = "http://www.dayepoch.com"; - version = "0.82"; + version = "0.84"; hiveVersion = 0.96; //0.93 }; }; diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index c3277a634..79404be2b 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 0.82 (1.7.5.M1D25)"; + text = "DayZ Epoch 0.84 (1.7.5.M1D25)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; class CA_TitleMainMenu; diff --git a/dayz_equip/models/supply_crate.p3d b/dayz_equip/models/supply_crate.p3d index c4dd919ba..0fa8f92cf 100644 Binary files a/dayz_equip/models/supply_crate.p3d and b/dayz_equip/models/supply_crate.p3d differ diff --git a/dayz_equip/textures/safe1.rvmat b/dayz_equip/textures/safe1.rvmat index 0abedb927..37e510940 100644 --- a/dayz_equip/textures/safe1.rvmat +++ b/dayz_equip/textures/safe1.rvmat @@ -8,7 +8,7 @@ PixelShaderID="Normal"; VertexShaderID="Basic"; class Stage1 { - texture="D:\GitHub Personal\DayZ-Epoch\dayz_equip\textures\safe1_NOHQ.paa"; + texture="dayz_equip\textures\safe1_NOHQ.paa"; uvSource="tex"; class uvTransform { @@ -44,7 +44,7 @@ class Stage3 }; class Stage4 { - texture="D:\GitHub Personal\DayZ-Epoch\dayz_equip\textures\safe1_SMDI.paa"; + texture="dayz_equip\textures\safe1_SMDI.paa"; uvSource="tex"; class uvTransform { diff --git a/dayz_server/init/server_functions.sqf b/dayz_server/init/server_functions.sqf index 4f6ce6fbb..6e617e65b 100644 --- a/dayz_server/init/server_functions.sqf +++ b/dayz_server/init/server_functions.sqf @@ -258,7 +258,7 @@ spawn_vehicles = { spawn_roadblocks = { private["_position","_veh","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_isRoad","_roadlist","_istoomany"]; - _WreckList = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1"]; + _WreckList = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; _WreckLoot = ["DynamicDebris"]; waitUntil{!isNil "BIS_fnc_selectRandom"}; if (isDedicated) then {