diff --git a/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf b/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf index ab41d1d89..9d3310d2e 100644 --- a/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf +++ b/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf @@ -18,7 +18,6 @@ player setVariable ["BIS_noCoreConversations", true]; //disable radio messages to be heard and shown in the left lower corner of the screen enableRadio false; - // DayZ Epoch config spawnShoremode = 1; // Default = 1 (on shore) spawnArea= 1500; // Default = 1500 @@ -30,14 +29,19 @@ dayz_maxLocalZombies = 40; // Default = 40 // DayZ Epoch TRADERS weapon_trader = 'CIV_EuroMan01_EP1'; +weapon_trader_2 = 'Rocker4'; parts_trader = 'Woodlander3'; -can_trader = 'RU_WorkWoman5'; +parts_trader_2 = 'Woodlander1'; +can_trader = 'RU_WorkWoman1'; +can_trader_2 = 'RU_WorkWoman5'; ammo_trader = 'CIV_EuroMan02_EP1'; +ammo_trader_2 = 'RU_Citizen3'; auto_trader = 'Worker3'; auto_trader_2 = 'Profiteer4'; mad_sci = 'Dr_Hladik_EP1'; +mad_sci_2 = 'Doctor'; metals_trader = 'RU_Functionary1'; -boat_trader = 'RU_Villager3'; +boat_trader = 'RU_Villager3'; //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early) diff --git a/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqf b/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqf index 8ea02010d..9f2530f20 100644 --- a/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqf +++ b/MPMissions/DayZ_Epoch_11.Chernarus/mission.sqf @@ -221,57 +221,13 @@ _center_1 = _this; _group_1 = createGroup _center_1; -_unit_2 = objNull; -if (true) then -{ - _this = _group_1 createUnit ["CIV_EuroMan01_EP1", [11455.97, 11359.461, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; - _unit_2 = _this; - _this setDir -36.831402; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; - _this setUnitAbility 0.60000002; - if (true) then {_group_1 selectLeader _this;}; -}; - -_unit_4 = objNull; -if (true) then -{ - _this = _group_1 createUnit ["RU_WorkWoman5", [11454.423, 11355.335, 0.95015752], [], 0, "CAN_COLLIDE"]; - _unit_4 = _this; - _this setDir -45.235744; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; - _this setUnitAbility 0.60000002; - if (false) then {_group_1 selectLeader _this;}; -}; - -_unit_6 = objNull; -if (true) then -{ - _this = _group_1 createUnit ["Woodlander3", [11450.471, 11353.678, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; - _unit_6 = _this; - _this setDir -52.951427; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; - _this setUnitAbility 0.60000002; - if (false) then {_group_1 selectLeader _this;}; -}; - -_unit_9 = objNull; -if (true) then -{ - _this = _group_1 createUnit ["Dr_Hladik_EP1", [11455.754, 11376.51], [], 0, "CAN_COLLIDE"]; - _unit_9 = _this; - _this setDir 123.76955; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; - _this setUnitAbility 0.60000002; - if (false) then {_group_1 selectLeader _this;}; -}; - _unit_12 = objNull; if (true) then { _this = _group_1 createUnit ["RU_Functionary1", [11453.513, 11372.992, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _unit_12 = _this; _this setDir 135.79054; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -282,18 +238,7 @@ if (true) then _this = _group_1 createUnit ["Profiteer4", [11462.399, 11365.393, -9.1552734e-005], [], 0, "CAN_COLLIDE"]; _unit_13 = _this; _this setDir -104.7984; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; - _this setUnitAbility 0.60000002; - if (false) then {_group_1 selectLeader _this;}; -}; - -_unit_14 = objNull; -if (true) then -{ - _this = _group_1 createUnit ["CIV_EuroMan02_EP1", [11450.914, 11370.678, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; - _unit_14 = _this; - _this setDir 125.58413; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -304,7 +249,7 @@ if (true) then _this = _group_1 createUnit ["RU_Villager3", [9761.8506, 1751.7081, 8.1777573e-005], [], 0, "CAN_COLLIDE"]; _unit_17 = _this; _this setDir 13.985736; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -405,7 +350,7 @@ if (true) then _this = _group_1 createUnit ["Worker3", [4063.0964, 11682.222, 0.22387695], [], 0, "CAN_COLLIDE"]; _unit_56 = _this; _this setDir 189.45943; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -416,7 +361,7 @@ if (true) then _this = _group_1 createUnit ["CIV_EuroMan01_EP1", [4075.0955, 11679.541, -0.038146973], [], 0, "CAN_COLLIDE"]; _unit_57 = _this; _this setDir 181.09763; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (true) then {_group_1 selectLeader _this;}; }; @@ -427,7 +372,7 @@ if (true) then _this = _group_1 createUnit ["RU_WorkWoman5", [4083.6765, 11677.628, 0.54440308], [], 0, "CAN_COLLIDE"]; _unit_58 = _this; _this setDir 202.8716; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -438,7 +383,7 @@ if (true) then _this = _group_1 createUnit ["Woodlander3", [4055.772, 11665.541, -0.51617432], [], 0, "CAN_COLLIDE"]; _unit_59 = _this; _this setDir 394.84546; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -449,7 +394,7 @@ if (true) then _this = _group_1 createUnit ["CIV_EuroMan02_EP1", [4071.2229, 11678.851, 0.33944702], [], 0, "CAN_COLLIDE"]; _unit_60 = _this; _this setDir 172.56062; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -460,7 +405,7 @@ if (true) then _this = _group_1 createUnit ["RU_Functionary1", [4051.1519, 11671.435, 0.38604736], [], 0, "CAN_COLLIDE"]; _unit_61 = _this; _this setDir 452.00577; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -471,7 +416,7 @@ if (true) then _this = _group_1 createUnit ["Dr_Hladik_EP1", [4047.479, 11676.521, 0.4241333], [], 0, "CAN_COLLIDE"]; _unit_62 = _this; _this setDir 504.14603; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; @@ -1326,23 +1271,11 @@ if (true) then _this = _group_1 createUnit ["RU_Functionary1", [9761.8955, 1759.4219, 2.0980835e-005], [], 0, "CAN_COLLIDE"]; _unit_73 = _this; _this setDir 92.75209; - _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setUnitAbility 0.60000002; if (false) then {_group_1 selectLeader _this;}; }; -_vehicle_410 = objNull; -if (true) then -{ - _this = createVehicle ["Fishing_Boat", [9767.4473, 1759.0052, 0.21176842], [], 0, "CAN_COLLIDE"]; - _vehicle_410 = _this; - _this setDir 130.63431; - _this setFuel 0; - _this setVehicleAmmo 0; - _this setVehicleLock "LOCKED"; - _this setPos [9767.4473, 1759.0052, 0.21176842]; -}; - _vehicle_412 = objNull; if (true) then { @@ -1351,4 +1284,59 @@ if (true) then _this setPos [9759.3662, 1760.9692, -0.00019788742]; }; -processInitCommands; +_unit_74 = objNull; +if (true) then +{ + _this = _group_1 createUnit ["Woodlander1", [11450.503, 11353.635, -9.1552734e-005], [], 0, "CAN_COLLIDE"]; + _unit_74 = _this; + _this setDir -48.52689; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setUnitAbility 0.60000002; + if (false) then {_group_1 selectLeader _this;}; +}; + +_unit_75 = objNull; +if (true) then +{ + _this = _group_1 createUnit ["RU_WorkWoman1", [11454.922, 11355.044, 0.94462103], [], 0, "CAN_COLLIDE"]; + _unit_75 = _this; + _this setDir -47.533646; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setUnitAbility 0.60000002; + if (false) then {_group_1 selectLeader _this;}; +}; + +_unit_78 = objNull; +if (true) then +{ + _this = _group_1 createUnit ["Rocker4", [11456.184, 11359.277], [], 0, "CAN_COLLIDE"]; + _unit_78 = _this; + _this setDir -52.978313; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setUnitAbility 0.60000002; + if (false) then {_group_1 selectLeader _this;}; +}; + +_unit_79 = objNull; +if (true) then +{ + _this = _group_1 createUnit ["RU_Citizen3", [11451.024, 11370.598, 3.0517578e-005], [], 0, "CAN_COLLIDE"]; + _unit_79 = _this; + _this setDir 125.74001; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setUnitAbility 0.60000002; + if (false) then {_group_1 selectLeader _this;}; +}; + +_unit_82 = objNull; +if (true) then +{ + _this = _group_1 createUnit ["Doctor", [11455.903, 11376.358], [], 0, "CAN_COLLIDE"]; + _unit_82 = _this; + _this setDir 107.12319; + _this setVehicleInit "this allowDammage false;"; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; + _this setUnitAbility 0.60000002; + if (false) then {_group_1 selectLeader _this;}; +}; + +processInitCommands; \ No newline at end of file diff --git a/dayz_code/CfgMagazines.hpp b/dayz_code/CfgMagazines.hpp index 617f540b1..0bc0b5f33 100644 --- a/dayz_code/CfgMagazines.hpp +++ b/dayz_code/CfgMagazines.hpp @@ -99,8 +99,10 @@ class CfgMagazines { count = 1; type = 256; displayName = $STR_FOOD_EQIP_CODE_NAME_1; - model = "\z\addons\dayz_communityassets\models\boar_raw.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_raw_ca.paa"; + //model = "\z\addons\dayz_communityassets\models\boar_raw.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_raw_ca.paa"; + model = "\dayz_equip\models\food_steak_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_ca.paa"; descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_1; }; @@ -109,8 +111,10 @@ class CfgMagazines { count = 1; type = 256; displayName = $STR_FOOD_EQIP_CODE_NAME_2; - model = "\z\addons\dayz_communityassets\models\chicken_raw.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\icon_chicken_raw_ca.paa"; + //model = "\z\addons\dayz_communityassets\models\chicken_raw.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\icon_chicken_raw_ca.paa"; + model = "\dayz_equip\models\food_steak_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_ca.paa"; descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_2; }; @@ -119,8 +123,10 @@ class CfgMagazines { count = 1; type = 256; displayName = $STR_FOOD_EQIP_CODE_NAME_3; - model = "\z\addons\dayz_communityassets\models\rabbit_raw.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\i_rabbit_raw_co.paa"; + //model = "\z\addons\dayz_communityassets\models\rabbit_raw.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\i_rabbit_raw_co.paa"; + model = "\dayz_equip\models\food_steak_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_ca.paa"; descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_3; }; @@ -129,8 +135,10 @@ class CfgMagazines { count = 1; type = 256; displayName = $STR_FOOD_EQIP_CODE_NAME_4; - model = "\z\addons\dayz_communityassets\models\bacon_raw.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\i_bacon_raw.paa"; + //model = "\z\addons\dayz_communityassets\models\bacon_raw.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\i_bacon_raw.paa"; + model = "\dayz_equip\models\food_steak_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_ca.paa"; descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_4; }; @@ -151,8 +159,10 @@ class CfgMagazines { scope = public; count = 1; displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_1; - model = "\z\addons\dayz_communityassets\models\boar_geo.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_cooked_ca.paa"; + //model = "\z\addons\dayz_communityassets\models\boar_cooked.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_cooked_ca.paa"; + model = "\dayz_equip\models\food_steak_cooked_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa"; descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_1; bloodRegen = 200; }; @@ -161,8 +171,10 @@ class CfgMagazines { scope = public; count = 1; displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_2; //$STR_EQUIP_NAME_25 - model = "\z\addons\dayz_communityassets\models\chicken_cooked.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\icon_chicken_cooked_ca.paa"; + //model = "\z\addons\dayz_communityassets\models\chicken_cooked.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\icon_chicken_cooked_ca.paa"; + model = "\dayz_equip\models\food_steak_cooked_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa"; descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_2; bloodRegen = 400; }; @@ -171,8 +183,10 @@ class CfgMagazines { scope = public; count = 1; displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_4; - model = "\z\addons\dayz_communityassets\models\bacon_cooked.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\i_bacon_cooked.paa"; + //model = "\z\addons\dayz_communityassets\models\bacon_cooked.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\i_bacon_cooked.paa"; + model = "\dayz_equip\models\food_steak_cooked_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa"; descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_4; bloodRegen = 800; }; @@ -180,8 +194,10 @@ class CfgMagazines { scope = public; count = 1; displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_3; - model = "\z\addons\dayz_communityassets\models\rabbit_cooked.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\i_rabbit_cooked_co.paa"; + //model = "\z\addons\dayz_communityassets\models\rabbit_cooked.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\i_rabbit_cooked_co.paa"; + model = "\dayz_equip\models\food_steak_cooked_gear.p3d"; + picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa"; descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_3; bloodRegen = 100; }; @@ -190,7 +206,7 @@ class CfgMagazines { count = 1; displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_5; model = "\z\addons\dayz_communityassets\models\buiscits_box.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\i_buiscit_cai_buiscit_ca.paa"; + picture = "\z\addons\dayz_communityassets\pictures\i_buiscit_ca.paa"; descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_5; bloodRegen = 100; }; diff --git a/dayz_code/CfgWeapons.hpp b/dayz_code/CfgWeapons.hpp index 1d7ec964b..85655f5de 100644 --- a/dayz_code/CfgWeapons.hpp +++ b/dayz_code/CfgWeapons.hpp @@ -34,15 +34,19 @@ class CfgWeapons { class ItemMatchboxWet : ItemCore { scope = public; displayName = $STR_EQUIP_CODE_NAME_3; + //model = "\dayz_equip\models\matchbox_gear.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\equip_matchbox_wet_CA.paa"; model = "\dayz_equip\models\matchbox_gear.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\equip_matchbox_wet_CA.paa"; + picture = "\dayz_equip\textures\equip_matchbox_ca.paa"; descriptionShort = $STR_EQUIP_CODE_DESC_3; }; class ItemMatchboxEmpty : ItemCore { scope = public; displayName = "Empty Match Box"; + //model = "\dayz_equip\models\matchbox_gear.p3d"; + //picture = "\z\addons\dayz_communityassets\pictures\equip_matchbox_Empty_CA.paa"; model = "\dayz_equip\models\matchbox_gear.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\equip_matchbox_wet_CA.paa"; + picture = "\dayz_equip\textures\equip_matchbox_ca.paa"; descriptionShort = $STR_EQUIP_CODE_DESC_3; }; diff --git a/dayz_code/actions/buy_db.sqf b/dayz_code/actions/buy_db.sqf index 878a997b3..9a3772173 100644 --- a/dayz_code/actions/buy_db.sqf +++ b/dayz_code/actions/buy_db.sqf @@ -92,9 +92,9 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult]; // trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency]; if(_qty <= 0) then { - _Display = format["Buy %1 (Out of Stock: %2)", _textPart, _qty]; + //_Display = format["Buy %1 (Out of Stock: %2)", _textPart, _qty]; //_part = player addAction [_Display, "\z\addons\dayz_code\actions\trade_cancel.sqf",[], 0, true, false, "",""]; - _part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""]; + //_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""]; } else { _Display = format["Buy %1 for %2 %3 (Available: %4)", _textPart, _in, _textCurrency, _qty]; _part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""]; diff --git a/dayz_code/actions/cook.sqf b/dayz_code/actions/cook.sqf index 4fb6b467d..9244eceaf 100644 --- a/dayz_code/actions/cook.sqf +++ b/dayz_code/actions/cook.sqf @@ -21,6 +21,70 @@ if ("FoodSteakRaw" in magazines player) then { cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; }; +//FoodmuttonRaw > FoodmuttonCooked +if ("FoodmuttonRaw" in magazines player) then { + player playActionNow "Medic"; + [player,"cook",0,false] call dayz_zombieSpeak; + _id = [player,70,true,(getPosATL player)] spawn player_alertZombies; + sleep _wait; + for "_x" from 1 to _qty do { + _hasFoodMeat = "FoodmuttonRaw" in magazines player; + if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]}; + player removeMagazine "FoodmuttonRaw"; + player addMagazine "FoodmuttonCooked"; + sleep 1; + }; + cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; +}; + +//FoodchickenRaw > FoodchickenCooked +if ("FoodchickenRaw" in magazines player) then { + player playActionNow "Medic"; + [player,"cook",0,false] call dayz_zombieSpeak; + _id = [player,70,true,(getPosATL player)] spawn player_alertZombies; + sleep _wait; + for "_x" from 1 to _qty do { + _hasFoodMeat = "FoodchickenRaw" in magazines player; + if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]}; + player removeMagazine "FoodchickenRaw"; + player addMagazine "FoodchickenCooked"; + sleep 1; + }; + cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; +}; + +//FoodrabbitRaw > FoodBaconCooked +if ("FoodrabbitRaw" in magazines player) then { + player playActionNow "Medic"; + [player,"cook",0,false] call dayz_zombieSpeak; + _id = [player,70,true,(getPosATL player)] spawn player_alertZombies; + sleep _wait; + for "_x" from 1 to _qty do { + _hasFoodMeat = "FoodrabbitRaw" in magazines player; + if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]}; + player removeMagazine "FoodrabbitRaw"; + player addMagazine "FoodBaconCooked"; + sleep 1; + }; + cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; +}; + +//FoodbaconRaw > FoodRabbitCooked +if ("FoodbaconRaw" in magazines player) then { + player playActionNow "Medic"; + [player,"cook",0,false] call dayz_zombieSpeak; + _id = [player,70,true,(getPosATL player)] spawn player_alertZombies; + sleep _wait; + for "_x" from 1 to _qty do { + _hasFoodMeat = "FoodbaconRaw" in magazines player; + if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]}; + player removeMagazine "FoodbaconRaw"; + player addMagazine "FoodRabbitCooked"; + sleep 1; + }; + cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; +}; + /* _hasFoodMeat = "FoodSteakRaw" in magazines player; _qty = {_x == "ItemWaterbottleUnfilled"} count magazines player; diff --git a/dayz_code/actions/player_eat.sqf b/dayz_code/actions/player_eat.sqf index 98bc084d3..0add630c6 100644 --- a/dayz_code/actions/player_eat.sqf +++ b/dayz_code/actions/player_eat.sqf @@ -34,7 +34,11 @@ player playActionNow "PutDown"; player removeMagazine _item; sleep 1; -_regen = round(random _regen); +if (dayz_lastMeal < 3600) then { + if (_item == "FoodSteakCooked") then { + //_regen = _regen * (10 - (10 max ((time - _Cookedtime) / 3600))); + }; +}; r_player_blood = r_player_blood + _regen; if (r_player_blood > r_player_bloodTotal) then { diff --git a/dayz_code/actions/playerstats.sqf b/dayz_code/actions/playerstats.sqf index 6fbedb90f..ea83cabaa 100644 --- a/dayz_code/actions/playerstats.sqf +++ b/dayz_code/actions/playerstats.sqf @@ -1,10 +1,3 @@ -//Remove action menu -player removeAction s_player_stats; -s_player_stats = -1; - -//set stats enabled later use -player setVariable ["StatsEnabled",true,false]; - //Let Zeds know _id = [player,4,true,(getPosATL player)] spawn player_alertZombies; @@ -12,6 +5,7 @@ _id = [player,4,true,(getPosATL player)] spawn player_alertZombies; hintSilent parseText format [" %1

+ Survived %7 Days

Zombies Killed: %2
Headshots: %3
Murders: %4
@@ -22,7 +16,8 @@ hintSilent parseText format [" (player getVariable['headShots', 0]), (player getVariable['humanKills', 0]), (player getVariable['banditKills', 0]), - (player getVariable['humanity', 0]) + (player getVariable['humanity', 0]), + (dayz_skilllevel) ]; /* @@ -33,6 +28,3 @@ player createDiaryRecord ["MyDiary",["Stats", "Murders: "]]; player createDiaryRecord ["MyDiary",["Stats", "Humanity: "]]; */ - -//Remove variable -player setVariable ["StatsEnabled",false,false]; diff --git a/dayz_code/cfgLoot.hpp b/dayz_code/cfgLoot.hpp index ea98584b1..101d0fdfb 100644 --- a/dayz_code/cfgLoot.hpp +++ b/dayz_code/cfgLoot.hpp @@ -3,16 +3,22 @@ class CfgLoot { { "TrashTinCan", "TrashJackDaniels", - "ItemSodaEmpty" + "ItemSodaEmpty", + "ItemMatchboxEmpty", + "ItemMatchboxWet" }, { 1, 0.1, - 0.5 + 0.5, + 0.2, + 0.2 } }; civilian[] = { { + "ItemMatchboxEmpty", + "ItemMatchboxWet", "TrashTinCan", "TrashJackDaniels", "ItemSodaEmpty", @@ -31,6 +37,8 @@ class CfgLoot { "FoodBioMeat" }, { + 0.05, + 0.05, 0.09, 0.09, 0.09, @@ -77,6 +85,10 @@ class CfgLoot { }; generic[] = { { + "ItemMatchboxEmpty", + "ItemMatchboxWet", + "ItemKnifeBlunt", + "ItemBrokeHatchet", "TrashTinCan", "ItemSodaEmpty", "ItemSodaCoke", @@ -106,6 +118,10 @@ class CfgLoot { "ItemHeatPack" }, { + 0.06, + 0.06, + 0.06, + 0.06, 0.06, 0.06, 0.06, diff --git a/dayz_code/compile/fn_damageActions.sqf b/dayz_code/compile/fn_damageActions.sqf index 23924cdbc..b940f4489 100644 --- a/dayz_code/compile/fn_damageActions.sqf +++ b/dayz_code/compile/fn_damageActions.sqf @@ -50,7 +50,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco _inPain = _unit getVariable ["USEC_inPain", false]; _legsBroke = _unit getVariable ["hit_legs", 0] >= 1; _armsBroke = _unit getVariable ["hit_hands", 0] >= 1; - _charID = _unit getVariable ["characterID", "0"]; + _charID = _unit getVariable ["characterID", 0]; _friendlies = player getVariable ["friendlies", []]; _hasBandage = "ItemBandage" in magazines player; _hasEpi = "ItemEpinephrine" in magazines player; @@ -182,7 +182,8 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco if ((isPlayer _unit) and !(_charID in _friendlies)) then { r_action = true; - _action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", "vehicle _unit == _unit"]; + // TODO: prevent menu on vehicle, first attempt did not work "vehicle _unit == _unit" + _action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", ""]; r_player_actions set [count r_player_actions,_action]; }; diff --git a/dayz_code/compile/fn_selfActions.sqf b/dayz_code/compile/fn_selfActions.sqf index a6e0dc318..cb5d99972 100644 --- a/dayz_code/compile/fn_selfActions.sqf +++ b/dayz_code/compile/fn_selfActions.sqf @@ -16,7 +16,6 @@ _hasFuelE = "ItemJerrycanEmpty" in magazines player; _hasRawMeat = "FoodSteakRaw" in magazines player; _hasKnife = "ItemKnife" in items player; _hasToolbox = "ItemToolbox" in items player; -_hasstatsenabled = player getVariable ["StatsEnabled",false]; //_hasTent = "ItemTent" in items player; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _nearLight = nearestObject [player,"LitObject"]; @@ -29,14 +28,6 @@ if (!isNull _nearLight) then { }; _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); -if (!_hasstatsenabled) then { - if (s_player_stats < 0) then { -// s_player_stats = player addAction [format[localize "str_actions_stats",_text], "\z\addons\dayz_code\actions\playerstats.sqf"]; - (findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_onKeyDown"]; - s_player_stats = 1; - }; -}; - //Grab Flare if (_canPickLight and !dayz_hasLight) then { if (s_player_grabflare < 0) then { @@ -294,52 +285,79 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) }; }; - // Parts Trader Worker3 + // Parts Trader #1 if (_isMan and !_isPZombie and _traderType == parts_trader) then { if (s_player_parts_crtl < 0) then { - // [_trader_id, _category, ]; - _buy = player addAction ["Car Parts", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[21,"Car Parts"], 99, true, false, "",""]; - _buy2 = player addAction ["Building Supplies", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[22,"Building Supplies"], 98, true, false, "",""]; - _buy3 = player addAction ["Explosives", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[23,"Explosives"], 97, true, false, "",""]; - - // - s_player_parts set [count s_player_parts,_buy]; - s_player_parts set [count s_player_parts,_buy2]; - s_player_parts set [count s_player_parts,_buy3]; - + _parts_trader_menu = [["Car Parts",21],["Building Supplies",22],["Explosives",23]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _parts_trader_menu; s_player_parts_crtl = 1; }; - }; - //weapon_trader_1 + // Parts Trader #2 + if (_isMan and !_isPZombie and _traderType == parts_trader_2) then { + + if (s_player_parts_crtl < 0) then { + + _parts_trader_2_menu = [["Car Parts",2121],["Building Supplies",2222],["Explosives",2323]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _parts_trader_2_menu; + s_player_parts_crtl = 1; + }; + }; + + //weapon_trader #1 if (_isMan and !_isPZombie and _traderType == weapon_trader) then { if (s_player_parts_crtl < 0) then { - // [_trader_id, _category, ]; - _buy = player addAction ["Sidearm", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[11,"Sidearm"], 99, true, false, "",""]; - _buy1 = player addAction ["Rifle", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[12,"Rifle"], 97, true, false, "",""]; - _buy2 = player addAction ["Shotgun and Crossbow", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[13,"Shotgun"], 95, true, false, "",""]; - _buy3 = player addAction ["Assault Rifle", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[14,"Assault Rifle"], 93, true, false, "",""]; - _buy4 = player addAction ["Machine Gun", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[15,"Machine Gun"], 91, true, false, "",""]; - _buy5 = player addAction ["Sniper Rifle", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[16,"Sniper Rifle"], 89, true, false, "",""]; - - s_player_parts set [count s_player_parts,_buy]; - s_player_parts set [count s_player_parts,_buy1]; - s_player_parts set [count s_player_parts,_buy2]; - s_player_parts set [count s_player_parts,_buy3]; - s_player_parts set [count s_player_parts,_buy4]; - s_player_parts set [count s_player_parts,_buy5]; - + _weapon_trader_menu = [["Sidearm",11],["Rifle",12],["Shotgun",13],["Assault Rifle",14],["Machine Gun",15],["Sniper Rifle",16]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _weapon_trader_menu; s_player_parts_crtl = 1; }; - }; - // can_trader_1 + //weapon_trader #2 + if (_isMan and !_isPZombie and _traderType == weapon_trader_2) then { + + if (s_player_parts_crtl < 0) then { + + _weapon_trader_2_menu = [["Sidearm",1111],["Rifle",1212],["Shotgun",1313],["Assault Rifle",1414],["Machine Gun",1515],["Sniper Rifle",1616]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _weapon_trader_2_menu; + s_player_parts_crtl = 1; + }; + }; + + // can_trader #1 if (_isMan and !_isPZombie and _traderType == can_trader) then { if (s_player_parts_crtl < 0) then { @@ -347,45 +365,81 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) // [_trader_id, _category, ]; _cantrader = player addAction ["Trade 3 Empty Soda Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar"], 99, true, true, "",""]; _cantrader1 = player addAction ["Trade 3 Empty Tin Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar"], 99, true, true, "",""]; - - _buy = player addAction ["Food and Drinks", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[51,"Food and Drinks"], 99, true, false, "",""]; - _buy2 = player addAction ["Backpacks", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[52,"Backpacks"], 97, true, false, "",""]; - _buy3 = player addAction ["Toolbelt", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[53,"Toolbelt"], 95, true, false, "",""]; - _buy4 = player addAction ["Clothes", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[54,"Clothes"], 93, true, false, "",""]; - s_player_parts set [count s_player_parts,_cantrader]; s_player_parts set [count s_player_parts,_cantrader1]; - - s_player_parts set [count s_player_parts,_buy]; - s_player_parts set [count s_player_parts,_buy2]; - s_player_parts set [count s_player_parts,_buy3]; - s_player_parts set [count s_player_parts,_buy4]; - + + _can_trader_menu = [["Food and Drinks",51],["Backpacks",52],["Toolbelt",53],["Clothes",54]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _can_trader_menu; s_player_parts_crtl = 1; }; }; - //ammo_trader_1 - if (_isMan and !_isPZombie and _traderType == ammo_trader) then { + // can_trader #2 + if (_isMan and !_isPZombie and _traderType == can_trader_2) then { if (s_player_parts_crtl < 0) then { // [_trader_id, _category, ]; - _buy1 = player addAction ["Sidearm Ammo", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[1,"Sidearm Ammo"], 99, true, false, "",""]; - _buy = player addAction ["Rifle Ammo", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[2,"Rifle Ammo"], 98, true, false, "",""]; - _buy2 = player addAction ["Shotgun and Crossbow Ammo", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[3,"Shotgun Ammo"], 97, true, false, "",""]; - _buy3 = player addAction ["Assault Rifle Ammo", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[4,"Assault Rifle Ammo"], 96, true, false, "",""]; - _buy4 = player addAction ["Machine Gun Ammo", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[5,"Machine Gun Ammo"], 95, true, false, "",""]; - _buy5 = player addAction ["Sniper Rifle Ammo", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[6,"Sniper Rifle Ammo"], 94, true, false, "",""]; - - s_player_parts set [count s_player_parts,_buy1]; - s_player_parts set [count s_player_parts,_buy]; - s_player_parts set [count s_player_parts,_buy2]; - s_player_parts set [count s_player_parts,_buy3]; - s_player_parts set [count s_player_parts,_buy4]; - s_player_parts set [count s_player_parts,_buy5]; - + _cantrader = player addAction ["Trade 3 Empty Soda Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar"], 99, true, true, "",""]; + _cantrader1 = player addAction ["Trade 3 Empty Tin Cans for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar"], 99, true, true, "",""]; + s_player_parts set [count s_player_parts,_cantrader]; + s_player_parts set [count s_player_parts,_cantrader1]; + + _can_trader_2_menu = [["Food and Drinks",5151],["Backpacks",5252],["Toolbelt",5353],["Clothes",5454]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _can_trader_2_menu; + s_player_parts_crtl = 1; + }; + + }; + + //ammo_trader #1 + if (_isMan and !_isPZombie and _traderType == ammo_trader) then { + + if (s_player_parts_crtl < 0) then { + + _ammo_trader_menu = [["Sidearm Ammo",1],["Rifle Ammo",2],["Shotgun and Crossbow Ammo",3],["Assault Rifle Ammo",4],["Machine Gun Ammo",5],["Sniper Rifle Ammo",6]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _ammo_trader_menu; + s_player_parts_crtl = 1; + }; + + }; + + //ammo_trader #2 + if (_isMan and !_isPZombie and _traderType == ammo_trader_2) then { + + if (s_player_parts_crtl < 0) then { + + _ammo_trader_2_menu = [["Sidearm Ammo",1001],["Rifle Ammo",2002],["Shotgun and Crossbow Ammo",3003],["Assault Rifle Ammo",4004],["Machine Gun Ammo",5005],["Sniper Rifle Ammo",6006]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _ammo_trader_2_menu; s_player_parts_crtl = 1; }; @@ -397,15 +451,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - // [_trader_id, _category, ]; - _buy = player addAction ["Boats Unarmed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[49,"Boats Unarmed"], 97, true, false, "",""]; - _buy1 = player addAction ["Boats Armed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[499,"Boats Armed"], 96, true, false, "",""]; - _buy2 = player addAction ["Wholesale", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[999,"Wholesale"], 95, true, false, "",""]; - - s_player_parts set [count s_player_parts,_buy]; - s_player_parts set [count s_player_parts,_buy1]; - s_player_parts set [count s_player_parts,_buy2]; - + _boat_trader_menu = [["Boats Unarmed",49],["Boats Armed",499],["Wholesale",999]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _boat_trader_menu; s_player_parts_crtl = 1; }; @@ -417,23 +471,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - // [_trader_id, _category, ]; - _buy = player addAction ["Cars", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[41,"Cars"], 99, true, false, "",""]; - _buy1 = player addAction ["Trucks Unarmed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[42,"Truck Unarmed"], 97, true, false, "",""]; - _buy2 = player addAction ["SUV", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[466,"SUV"], 95, true, false, "",""]; - _buy3 = player addAction ["Buses and Vans", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[467,"Buses and Vans"], 95, true, false, "",""]; - _buy4 = player addAction ["Offroad", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[43,"Offroad"], 93, true, false, "",""]; - _buy5 = player addAction ["Helicopter Unarmed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[44,"Helicopter"], 91, true, false, "",""]; - _buy6 = player addAction ["Military Unarmed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[45,"Military Unarmed"], 89, true, false, "",""]; - - s_player_parts set [count s_player_parts,_buy]; - s_player_parts set [count s_player_parts,_buy1]; - s_player_parts set [count s_player_parts,_buy2]; - s_player_parts set [count s_player_parts,_buy3]; - s_player_parts set [count s_player_parts,_buy4]; - s_player_parts set [count s_player_parts,_buy5]; - s_player_parts set [count s_player_parts,_buy6]; - + _auto_trader_menu = [["Cars",41],["Trucks Unarmed",42],["SUV",466],["Buses and Vans",467],["Offroad",43],["Helicopter Unarmed",44],["Military Unarmed",45]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _auto_trader_menu; s_player_parts_crtl = 1; }; @@ -445,24 +491,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) if (s_player_parts_crtl < 0) then { - // [_trader_id, _category, ]; - - _buy1 = player addAction ["Trucks Armed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[422,"Truck Armed"], 97, true, false, "",""]; - _buy2 = player addAction ["Utility", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[46,"Utility"], 95, true, false, "",""]; - _buy3 = player addAction ["Helicopter Armed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[444,"Helicopter"], 91, true, false, "",""]; - _buy4 = player addAction ["Military Armed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[455,"Military Armed"], 89, true, false, "",""]; - _buy5 = player addAction ["Fuel Trucks", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[47,"Fuel Trucks"], 88, true, false, "",""]; - _buy6 = player addAction ["Heavy Armor Unarmed", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[48,"Heavy Armor Unarmed"], 88, true, false, "",""]; - - - - s_player_parts set [count s_player_parts,_buy1]; - s_player_parts set [count s_player_parts,_buy2]; - s_player_parts set [count s_player_parts,_buy3]; - s_player_parts set [count s_player_parts,_buy4]; - s_player_parts set [count s_player_parts,_buy5]; - s_player_parts set [count s_player_parts,_buy6]; + _auto_trader_2_menu = [["Trucks Armed",422],["Utility",46],["Helicopter Armed",444],["Military Armed",455],["Fuel Trucks",47],["Heavy Armor Unarmed",48]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + } forEach _auto_trader_2_menu; s_player_parts_crtl = 1; }; @@ -475,15 +512,39 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) // [part_out, part_in, qty_out, qty_in,]; _zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""]; - _zparts2 = player addAction ["Medical Supplies", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[31,"Medical Supplies"], 97, true, false, "",""]; - _zparts3 = player addAction ["Chem-lites/Flares", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[32,"Chem-lites/Flares"], 95, true, false, "",""]; - _zparts4 = player addAction ["Smoke Grenades", "\z\addons\dayz_code\actions\buy_or_sell.sqf",[33,"Smoke Grenades"], 93, true, false, "",""]; - s_player_parts set [count s_player_parts,_zparts1]; - s_player_parts set [count s_player_parts,_zparts2]; - s_player_parts set [count s_player_parts,_zparts3]; - s_player_parts set [count s_player_parts,_zparts4]; + + _mad_sci_menu = [["Medical Supplies",31],["Chem-lites/Flares",32],["Smoke Grenades",33]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _mad_sci_menu; + s_player_parts_crtl = 1; + }; + }; + + // mad_sci #2 + if (_isMan and !_isPZombie and _traderType == mad_sci_2) then { + + if (s_player_parts_crtl < 0) then { + // [part_out, part_in, qty_out, qty_in,]; + _zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat"], 99, true, true, "",""]; + s_player_parts set [count s_player_parts,_zparts1]; + + _mad_sci_2_menu = [["Medical Supplies",3131],["Chem-lites/Flares",3232],["Smoke Grenades",3333]]; + { + // _title = _x select 0; + // _traderid = _x select 1; + // buy_or_sell.sqf [_trader_id, _category, ]; + _buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""]; + s_player_parts set [count s_player_parts,_buy]; + + } forEach _mad_sci_2_menu; s_player_parts_crtl = 1; }; }; @@ -499,13 +560,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) _metals4 = player addAction ["Trade 6 Silver for 1 Gold", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemGoldBar","ItemSilverBar",1,6,"buy","Silver","Gold"], 97, true, true, "",""]; _metals3 = player addAction ["Trade 1 Gold for 6 Silver", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemSilverBar","ItemGoldBar",6,1,"buy","Gold","Silver"], 97, true, true, "",""]; _metals5 = player addAction ["Buy Vault for 12 Gold", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemVault","ItemGoldBar",1,12,"buy","Gold","Vault"], 96, true, true, "",""]; + _metals6 = player addAction ["Sell Vault for 6 Gold", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemGoldBar","ItemVault",6,1,"sell","Vault","Gold"], 95, true, true, "",""]; s_player_parts set [count s_player_parts,_metals1]; s_player_parts set [count s_player_parts,_metals2]; s_player_parts set [count s_player_parts,_metals3]; s_player_parts set [count s_player_parts,_metals4]; s_player_parts set [count s_player_parts,_metals5]; - + s_player_parts set [count s_player_parts,_metals6]; + s_player_parts_crtl = 1; }; }; diff --git a/dayz_code/compile/player_spawnCheck.sqf b/dayz_code/compile/player_spawnCheck.sqf index c1b8c1ff1..743ce2443 100644 --- a/dayz_code/compile/player_spawnCheck.sqf +++ b/dayz_code/compile/player_spawnCheck.sqf @@ -9,19 +9,19 @@ _maxWildZombies = 3; _age = -1; _nearbyBuildings = []; -_radius = 200; -_maxZombies = 10; +_radius = 300; +_position = getPosATL player; +//_maxZombies = 10; -diag_log ("Type: " +str(_type)); +//diag_log ("Type: " +str(_type)); //diag_log("SPAWN CHECKING: Starting"); - _locationstypes = ["NameCityCapital","NameCity","NameVillage"]; - _nearestCity = nearestLocations [getPos player, _locationstypes, _radius]; - _townname = text (_nearestCity select 0); - _position = getPosATL player; - _nearbytype = type (_nearestCity select 0); - + //_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; @@ -36,54 +36,69 @@ switch (_nearbytype) do { _maxZombies = 50; }; }; +*/ _spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies; if ("ItemMap_Debug" in items player) then { deleteMarkerLocal "MaxZeds"; deleteMarkerLocal "Counter"; + deleteMarkerLocal "Loot30"; + deleteMarkerLocal "Loot120"; _markerstr = createMarkerLocal ["MaxZeds", _position]; - _markerstr setMarkerColorLocal "ColorRed"; + _markerstr setMarkerColorLocal "ColorYellow"; _markerstr setMarkerShapeLocal "ELLIPSE"; _markerstr setMarkerBrushLocal "Border"; _markerstr setMarkerSizeLocal [_radius, _radius]; _markerstr1 = createMarkerLocal ["Counter", _position]; - _markerstr1 setMarkerColorLocal "ColorYellow"; + _markerstr1 setMarkerColorLocal "ColorRed"; _markerstr1 setMarkerShapeLocal "ELLIPSE"; _markerstr1 setMarkerBrushLocal "Border"; _markerstr1 setMarkerSizeLocal [_radius+100, _radius+100]; + + _markerstr2 = createMarkerLocal ["Loot30", _position]; + _markerstr2 setMarkerColorLocal "ColorRed"; + _markerstr2 setMarkerShapeLocal "ELLIPSE"; + _markerstr2 setMarkerBrushLocal "Border"; + _markerstr2 setMarkerSizeLocal [30, 30]; + + _markerstr3 = createMarkerLocal ["Loot120", _position]; + _markerstr3 setMarkerColorLocal "ColorBlue"; + _markerstr3 setMarkerShapeLocal "ELLIPSE"; + _markerstr3 setMarkerBrushLocal "Border"; + _markerstr3 setMarkerSizeLocal [120, 120]; }; - +/* switch (_type) do { case "Zeds": { - if (_spawnZombies) then { - //_nearbyBuildings = nearestObjects [_position, ["building"], _radius]; - _nearbyBuildings = nearestObjects [_position, dayz_LootBuildings, _radius]; - _nearbyCount = count _nearbyBuildings; - if (_nearbyCount > 0) then { - [_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies, _nearbyBuildings] call player_spawnzedCheck; - }; - }; + _nearby = nearestObjects [_position, dayz_ZombieBuildings, _radius]; }; case "both": { - //[_position, _maxZombies] call wild_spawnZombies; - _nearbyBuildings = nearestObjects [_position, dayz_ZombieBuildings, _radius]; - _nearbyCount = count _nearbyBuildings; - if (_nearbyCount > 0) then { - [_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings] call player_spawnlootCheck; - if (_spawnZombies) then { - [_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies, _nearbyBuildings] call player_spawnzedCheck; - }; - }; + _nearby = nearestObjects [_position, ["building"], _radius]; }; case "Loot": { - //_nearbyBuildings = nearestObjects [_position, ["building"], _radius]; - _nearbyBuildings = nearestObjects [_position, dayz_ZombieBuildings, _radius]; - _nearbyCount = count _nearbyBuildings; - if (_nearbyCount > 0) then { - [_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings] call player_spawnlootCheck; + _nearby = nearestObjects [_position, dayz_LootBuildings, _radius]; }; }; -}; \ No newline at end of file +*/ + +_nearby = nearestObjects [_position, ["building"], _radius]; +_nearbyCount = count _nearby; +if (_nearbyCount < 1) exitwith {}; + +{ + _type = typeOf _x; + _config = configFile >> "CfgBuildingLoot" >> _type; + _canLoot = isClass (_config); + _dis = _x distance player; + if ((_dis < 120) and (_dis > 30) and _canLoot and !_inVehicle) then { + //diag_log ("Loot System Running"); + [_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity] call player_spawnlootCheck; + }; + if (_spawnZombies) then { + //diag_log ("Zed System Running"); + [_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck; +}; +} forEach _nearby; \ No newline at end of file diff --git a/dayz_code/compile/player_spawnlootCheck.sqf b/dayz_code/compile/player_spawnlootCheck.sqf index 9f464c3b5..3af651896 100644 --- a/dayz_code/compile/player_spawnlootCheck.sqf +++ b/dayz_code/compile/player_spawnlootCheck.sqf @@ -7,22 +7,22 @@ _dateNow = _this select 3; _age = _this select 4; _locationstypes = _this select 5; _nearestCity = _this select 6; -_nearby = _this select 7; - -diag_log ("Loot Started"); - -{ - if (!_inVehicle) then { - _looted = (_x getVariable ["looted",-0.1]); - _dateNow = (DateToNumber date); - _age = (_dateNow - _looted) * 525948; - if (_age > 8) then { - _keepAwayDist = ((sizeOf _type) + 5); - _noPlayerNear = (count ((getPosATL _x) nearEntities ["CAManBase",_keepAwayDist])) == 0; - if (_noPlayerNear) then { - _x setVariable ["looted",_dateNow,true]; - [_x] call building_spawnLoot; - }; - }; - }; -} forEach _nearby; \ No newline at end of file + +_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}; +}; \ No newline at end of file diff --git a/dayz_code/compile/player_spawnzedCheck.sqf b/dayz_code/compile/player_spawnzedCheck.sqf index cf963c8a1..9370645bf 100644 --- a/dayz_code/compile/player_spawnzedCheck.sqf +++ b/dayz_code/compile/player_spawnzedCheck.sqf @@ -1,4 +1,5 @@ private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_maxZombies","_nearby","_maxWildZombies","_tooManyZs","_tooManyWildZs","_type","_config","_canZombie","_dis","_zombied","_bPos","_zombiesNum","_withinRange","_spawnWildZs"]; + _radius = _this select 0; _position = _this select 1; _inVehicle = _this select 2; @@ -7,35 +8,15 @@ _age = _this select 4; _locationstypes = _this select 5; _nearestCity = _this select 6; _maxZombies = _this select 7; -_nearby = _this select 8; - -diag_log ("Zed Started"); - -// If they just got out of a vehicle, boost their per-player zombie limit by 5 in hopes of allowing insta-spawn zombies -if (dayz_inVehicle and !_inVehicle) then { - dayz_spawnWait = -300; - //_maxZombies = _maxZombies + 2; -}; -dayz_inVehicle = _inVehicle; - if (_inVehicle) then { _maxZombies = _maxZombies / 2; }; -// _spawnZombies = count (_position nearEntities ["zZombie_Base",_radius]) < _maxZombies; -// _tooManyZs = count (_position nearEntities ["zZombie_Base",_radius]) > _maxZombies; - { -// if (dayz_spawnZombies > _maxZombies) exitwith {}; - _zombied = (_x getVariable ["zombieSpawn",-0.1]); - _dateNow = (DateToNumber date); - _age = (_dateNow - _zombied) * 525948; - //diag_log(format["Date: %1 | ZombieSpawn: %2 | age: %3 | building: %4 (%5)", _dateNow, _zombied, _age, str(_x), _dis]); - if (_age > 1) then { - //_withinRange = _x distance player < 200; - //if (_withinRange) then { - _x setVariable ["zombieSpawn",_dateNow,true]; - [_x] call building_spawnZombies; - //}; - }; - } forEach _nearby; \ No newline at end of file +_zombied = (_x getVariable ["zombieSpawn",-0.1]); +_dateNow = (DateToNumber date); +_age = (_dateNow - _zombied) * 525948; +if (_age > 1) then { + _x setVariable ["zombieSpawn",_dateNow,true]; + [_x] call building_spawnZombies; +}; \ No newline at end of file diff --git a/dayz_code/compile/player_zombieCheck.sqf b/dayz_code/compile/player_zombieCheck.sqf index 4f2f4c37f..4eee53e26 100644 --- a/dayz_code/compile/player_zombieCheck.sqf +++ b/dayz_code/compile/player_zombieCheck.sqf @@ -1,6 +1,6 @@ private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_continue","_type","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"]; _refObj = vehicle player; -_listTalk = (position _refObj) nearEntities [["zZombie_Base"],80]; +_listTalk = (position _refObj) nearEntities ["zZombie_Base",200]; _pHeight = (getPosATL _refObj) select 2; _attacked = false; _multiplier = 1; @@ -80,7 +80,7 @@ _multiplier = 1; _zPos = (getPosASL _x); //_eyeDir = _x call dayz_eyeDir; _eyeDir = direction _x; - _inAngle = [_zPos,_eyeDir,(30 * _multiplier),_tPos] call fnc_inAngleSector; + _inAngle = [_zPos,_eyeDir,30,_tPos] call fnc_inAngleSector; if (_inAngle) then { //diag_log ("In Angle"); //LOS check diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index 5ef2fbfe1..c055ed5f6 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -58,6 +58,78 @@ class CfgInGameUI { cueColor[] = {0,0,0,0}; }; + + + class MPTable + { + color[] = {0,0,0,0}; //{0.7,0.7,0.7,1}; + colorTitleBg[] = {0,0,0,0}; //{0.1,0.15,0.15,1}; + colorBg[] = {0,0,0,0}; //{0.1,0.15,0.1,0.9}; + colorSelected[] = {0,0,0,0}; //{0.7,0.7,0.7,0.4}; + colorWest[] = {0,0,0,0}; //{0.7,0.95,0.7,1}; + colorEast[] = {0,0,0,0}; //{0.95,0.7,0.7,1}; + colorCiv[] = {0,0,0,0}; //{0.8,0.8,0.8,1}; + colorRes[] = {0,0,0,0}; //{0.7,0.7,0.95,1}; + font = "EtelkaNarrowMediumPro"; + size = "0"; //"( 21 / 408 )"; + class Columns + { + class Order + { + width = 0; //0.046; + colorBg[] = {0,0,0,0}; //{0.1,0.27,0.1,0.8}; + doubleLine = 0; + }; + class Player + { + width = 0; //0.25; + colorBg[] = {0,0,0,0}; //{0.1,0.23,0.1,0.8}; + doubleLine = 0; + }; + class KillsInfantry + { + width = 0; //0.11; + doubleLine = 0; + colorBg[] = {0,0,0,0}; //{0.1,0.15,0.1,0.8}; + picture = ""; //"\ca\ui\data\stats_infantry_ca.paa"; + }; + class KillsSoft + { + width = 0; //0.1; + doubleLine = 0; + colorBg[] = {0,0,0,0}; //{0.1,0.15,0.1,0.8}; + picture = ""; //"\ca\ui\data\stats_soft_ca.paa"; + }; + class KillsArmor + { + width = 0; //0.11; + doubleLine = 0; + colorBg[] = {0,0,0,0}; //{0.1,0.15,0.1,0.8}; + picture = ""; //"\ca\ui\data\stats_armored_ca.paa"; + }; + class KillsAir + { + width = 0; //0.1; + doubleLine = 0; + colorBg[] = {0,0,0,0}; //{0.1,0.15,0.1,0.8}; + picture = ""; //"\ca\ui\data\stats_air_ca.paa"; + }; + class Killed + { + width = 0; //0.1; + doubleLine = 0; + colorBg[] = {0,0,0,0}; //{0.1,0.15,0.1,0.8}; + picture = ""; //"\ca\ui\data\stats_killed_ca.paa"; + }; + class KillsTotal + { + width = 0; //0.1; + doubleLine = 0; + colorBg[] = {0,0,0,0}; //{0.1,0.35,0.1,0.9}; + picture = ""; //"\ca\ui\data\stats_total_ca.paa"; + }; + }; + }; }; class RscPictureGUI diff --git a/dayz_code/init/compiles.sqf b/dayz_code/init/compiles.sqf index 7471c7745..8bdf3a113 100644 --- a/dayz_code/init/compiles.sqf +++ b/dayz_code/init/compiles.sqf @@ -298,6 +298,17 @@ if (!isDedicated) then { }; //if (_dikCode == 57) then {_handled = true}; // space //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true}; + if ("ItemMap_Debug" in items player) then { + if (_dikCode == 88) then //SCROLL LOCK + { + _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; + }; + } else { + if (_dikCode == 70) then //SCROLL LOCK + { + _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; + }; + }; if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true}; if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true}; if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true}; @@ -394,18 +405,6 @@ if (!isDedicated) then { _vdir }; - fnc_onKeyDown = - { - private["_key"]; - _key = _this select 1; - if (_key == 70) then //SCROLL LOCK - { - _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; - _shift = nil; - }; - _return - }; - dayz_lowHumanity = { private["_unit","_humanity","_delay"]; _unit = _this; diff --git a/dayz_code/system/player_monitor.fsm b/dayz_code/system/player_monitor.fsm index d30e842e4..b4531b50f 100644 --- a/dayz_code/system/player_monitor.fsm +++ b/dayz_code/system/player_monitor.fsm @@ -748,6 +748,7 @@ class FSM "dayz_lastMeal = (_lastAte * 60);" \n "dayz_lastDrink = (_lastDrank * 60);" \n "dayz_zombiesLocal = 0; //Used to record how many local zombies being tracked" \n + "dayz_skilllevel = _days; //total alive dayz" \n "" \n "//load in medical details" \n "r_player_dead = player getVariable[""USEC_isDead"",false];" \n diff --git a/dayz_code/system/zombie_agent.fsm b/dayz_code/system/zombie_agent.fsm index 1e85f2b66..7564b392b 100644 --- a/dayz_code/system/zombie_agent.fsm +++ b/dayz_code/system/zombie_agent.fsm @@ -99,8 +99,8 @@ link51[] = {39,22}; link52[] = {40,28}; link53[] = {41,5}; link54[] = {42,1}; -globals[] = {25.000000,1,0,0,0,640,480,1,101,6316128,1,-671.713867,363.212036,746.075562,-126.281273,713,601,1}; -window[] = {2,-1,-1,-1,-1,777,66,1274,66,3,730}; +globals[] = {25.000000,1,0,0,0,640,480,1,101,6316128,1,-671.713867,363.212036,788.169373,-84.187515,713,601,1}; +window[] = {2,-1,-1,-32000,-32000,865,154,1362,154,3,730}; *//*%FSM*/ class FSM { @@ -340,24 +340,20 @@ class FSM "_targetPos = getPosATL _target;" \n "" \n "//Move to target" \n - "if (vehicle player == player) then {" \n - " _agent moveTo _targetPos;" \n - " _agent forceSpeed 6;" \n - "} else {" \n - " _agent moveTo _vehicle;" \n - " _agent forceSpeed 6;" \n - "};" \n + "" \n + "_agent moveTo _targetPos;" \n + "_agent forceSpeed 6;" \n "" \n "" \n - "if (_agent distance player > 15) then {" \n - " _cantSee = [_agent,_target] call dayz_losCheck;" \n - "};" \n + "//if (_agent distance player > 15) then {" \n + "// _cantSee = [_agent,_target] call dayz_losCheck;" \n + "//};" \n "" \n "//Check if LOS" \n - "//if (_losCheck == 2) then {" \n - "// _losCheck = 0;" \n - "//_cantSee = [_agent,_target] call dayz_losCheck;" \n - "//};" \n + "if (_losCheck == 2) then {" \n + " _losCheck = 0;" \n + "_cantSee = [_agent,_target] call dayz_losCheck;" \n + "};" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links diff --git a/dayz_server/compile/server_gutObject.sqf b/dayz_server/compile/server_gutObject.sqf index d6707d65e..b6e9012a6 100644 --- a/dayz_server/compile/server_gutObject.sqf +++ b/dayz_server/compile/server_gutObject.sqf @@ -4,29 +4,11 @@ _qty = _this select 1; _type = typeOf _item; _meat = 0; _loop = true; +_rawfoodtype = configFile >> "CfgSurvival" >> "Meat" >> _type >> "rawfoodtype"; + if (local _item) then { for "_x" from 1 to _qty do { - diag_log ("Item Type: " +str(_item)); - switch (_type) do { - case "Cow": { - _item addMagazine "FoodSteakRaw"; - }; - case "Goat": { - _item addMagazine "FoodSteakRaw"; - }; - case "Sheep": { - _item addMagazine "FoodSteakRaw"; - }; - case "WildBoar": { - _item addMagazine "FoodboarRaw"; - }; - case "hen": { - _item addMagazine "FoodSteakRaw"; - }; - case "Rabbit": { - _item addMagazine "FoodSteakRaw"; - }; - }; + _item addMagazine _rawfoodtype; }; sleep 2; _timer = time; diff --git a/dayz_server/compile/server_playerDied.sqf b/dayz_server/compile/server_playerDied.sqf index a2f0ac38f..b0be4beae 100644 --- a/dayz_server/compile/server_playerDied.sqf +++ b/dayz_server/compile/server_playerDied.sqf @@ -34,7 +34,6 @@ else }; diag_log ("PDEATH: Player Died " + _playerID); - /* _eh = [_newObject] spawn { _body = _this select 0; diff --git a/dayz_server/compile/server_publishVehicle.sqf b/dayz_server/compile/server_publishVehicle.sqf index ae593769c..a0dfb542e 100644 --- a/dayz_server/compile/server_publishVehicle.sqf +++ b/dayz_server/compile/server_publishVehicle.sqf @@ -82,7 +82,7 @@ while {_retry < 15} do { // GET DB ID _key = format["CHILD:388:%1:",_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); - _result = [_key] call server_hiveReadWrite; + _result = _key call server_hiveReadWrite; _outcome = _result select 0; if (_outcome == "PASS") then { _oid = _result select 1; diff --git a/dayz_server/init/server_functions.sqf b/dayz_server/init/server_functions.sqf index 9b1e89dca..611f20e68 100644 --- a/dayz_server/init/server_functions.sqf +++ b/dayz_server/init/server_functions.sqf @@ -96,7 +96,7 @@ server_hiveWrite = { private["_data"]; //diag_log ("ATTEMPT WRITE: " + _this); _data = "HiveExt" callExtension _this; - diag_log ("WRITE: " + _data); + diag_log ("WRITE: " +str(_data)); }; server_hiveReadWrite = { @@ -104,7 +104,7 @@ server_hiveReadWrite = { _key = _this; //diag_log ("ATTEMPT READ/WRITE: " + _key); _data = "HiveExt" callExtension _key; - diag_log ("READ/WRITE: " + _data); + diag_log ("READ/WRITE: " +str(_data)); _resultArray = call compile format ["%1",_data]; _resultArray }; diff --git a/dayz_weapons/config.cpp b/dayz_weapons/config.cpp index 6702c1f77..85af27215 100644 --- a/dayz_weapons/config.cpp +++ b/dayz_weapons/config.cpp @@ -473,7 +473,7 @@ class cfgWeapons recoil = "recoil_single_primary_4outof10"; recoilProne = "recoil_single_primary_prone_4outof10"; }; - magazines[] = {"BoltSteel", "BoltSteel4pack", "BoltSteel8pack"}; + magazines[] = {"BoltSteel", "BoltSteel4pack"}; bullet1[] = {"dayz_weapons\sounds\crossbow_bolt",0.177828,1,15}; soundBullet[] = {"bullet1",1}; }; @@ -730,28 +730,6 @@ class cfgMagazines initSpeed = 150; descriptionShort = "$STR_MAG_DESC_3"; displayNameShort = "$STR_MAG_ACTION_3"; - class ItemActions - { - class ReloadMag - { - text = "Combine to 8 pack"; - script = "spawn player_reloadMag;"; - use[] = {"BoltSteel4pack","BoltSteel4pack"}; - output[] = {"BoltSteel8pack"}; - }; - }; - }; - class BoltSteel8pack: CA_Magazine - { - scope = 2; - displayName = "Steel Bolt 8 Pack"; - model = "\dayz_weapons\models\bolt_gear"; - picture = "\dayz_weapons\textures\equip_bolt_ca.paa"; - ammo = "BoltSteel"; - count = 8; - initSpeed = 150; - descriptionShort = "$STR_MAG_DESC_3"; - displayNameShort = "$STR_MAG_ACTION_3"; }; }; class CfgCloudlets