mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
updates
This commit is contained in:
@@ -44,12 +44,12 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
_out = 1;
|
||||
_in = _cost;
|
||||
|
||||
_textCurrency = getText(configFile >> "CfgMagazines" >> _part_in >> "displayName");
|
||||
_textCurrency = getText(configFile >> _stype >> _part_in >> "displayName");
|
||||
|
||||
_Display = "Buy " + _textPart + " for " + str(_cost) + " " + _textCurrency;
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in], _order, true, true, "",""];
|
||||
_Display = format["Buy %1 for %2 %3", _textPart, _cost, _textCurrency];
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in,"buy",_textPart,_textCurrency], _order, true, true, "",""];
|
||||
diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
|
||||
6
dayz_code/actions/lock_veh.sqf
Normal file
6
dayz_code/actions/lock_veh.sqf
Normal file
@@ -0,0 +1,6 @@
|
||||
private["_vehicle"];
|
||||
_vehicle = _this select 3;
|
||||
|
||||
_vehicle setVehicleInit "this lock true";
|
||||
_vehicle setVehicleInit "this lockCargo true";
|
||||
processInitCommands;
|
||||
@@ -45,20 +45,11 @@ switch (_item) do {
|
||||
};
|
||||
case "Skin_Survivor2_DZ": {
|
||||
_model = "Survivor2_DZ";
|
||||
if (_isFemale) then {
|
||||
_model = "SurvivorW2_DZ";
|
||||
};
|
||||
if (_isBandit) then {
|
||||
_model = "Bandit1_DZ";
|
||||
if (_isFemale) then {
|
||||
_model = "BanditW1_DZ";
|
||||
};
|
||||
};
|
||||
if (_isHero) then {
|
||||
_model = "Survivor3_DZ";
|
||||
if (_isFemale) then {
|
||||
_model = "SurvivorW2_DZ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ diag_log format["DEBUG Sell: %1", dayzTraderMenuResult];
|
||||
_tid = _x select 12;
|
||||
_actionFile = _x select 13;
|
||||
|
||||
_textPart = getText(configFile >> _stype >> _name >> "displayName");
|
||||
_textPart = getText(configFile >> _stype >> _scurrency >> "displayName");
|
||||
|
||||
_File = "\z\addons\dayz_code\actions\" + _actionFile + ".sqf";
|
||||
|
||||
@@ -44,12 +44,12 @@ diag_log format["DEBUG Sell: %1", dayzTraderMenuResult];
|
||||
_out = _sell;
|
||||
_in = 1;
|
||||
|
||||
_textCurrency = getText(configFile >> "CfgMagazines" >> _part_out >> "displayName");
|
||||
_textCurrency = getText(configFile >> _btype >> _part_in >> "displayName");
|
||||
|
||||
_Display = "Sell " + _textPart + " for " + str(_sell) + " " + _textCurrency;
|
||||
_Display = format["Sell %1 for %2 %3", _textPart, _sell, _textCurrency];
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in], _order, true, true, "",""];
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,"buy",_textPart,_textCurrency];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in,"sell",_textPart,_textCurrency], _order, true, true, "",""];
|
||||
//diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
|
||||
79
dayz_code/actions/trade_any_vehicle.sqf
Normal file
79
dayz_code/actions/trade_any_vehicle.sqf
Normal file
@@ -0,0 +1,79 @@
|
||||
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
_part_out = (_this select 3) select 0;
|
||||
_part_in = (_this select 3) select 1;
|
||||
_qty_out = (_this select 3) select 2;
|
||||
_qty_in = (_this select 3) select 3;
|
||||
_buy_o_sell = (_this select 3) select 4;
|
||||
_textPartIn = (_this select 3) select 5;
|
||||
_textPartOut = (_this select 3) select 6;
|
||||
|
||||
if(_buy_o_sell == "buy") then {
|
||||
_qty = {_x == _part_in} count magazines player;
|
||||
} else {
|
||||
_obj = nearestObjects [(getPosATL player), [_part_in], 10];
|
||||
_qty = count _obj;
|
||||
};
|
||||
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
if(_buy_o_sell == "buy") then {
|
||||
for "_x" from 1 to _qty_in do {
|
||||
player removeMagazine _part_in;
|
||||
};
|
||||
|
||||
_dir = 90;
|
||||
|
||||
_location = [(position player),0,20,1,0,20,0] call BIS_fnc_findSafePos;
|
||||
|
||||
//place tent (local)
|
||||
_veh = createVehicle [_part_out, _location, [], 0, "CAN_COLLIDE"];
|
||||
_veh setdir _dir;
|
||||
_veh setpos _location;
|
||||
|
||||
//_veh setPosATL _position;
|
||||
|
||||
player reveal _veh;
|
||||
_location = getPosATL _veh;
|
||||
|
||||
_veh setVariable ["characterID",dayz_characterID,true];
|
||||
|
||||
// server_publishVeh [_veh,[_dir,_objPosition],_vehicle,true,dayz_characterID]
|
||||
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_characterID];
|
||||
|
||||
publicVariable "dayzPublishVeh";
|
||||
if (isServer) then {
|
||||
dayzPublishVeh spawn server_publishVeh;
|
||||
};
|
||||
|
||||
cutText [format[("Bought %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
} else {
|
||||
// Sell Vehicle
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
_obj = _obj select 0;
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_deleteObj;
|
||||
};
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
} else {
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
private["none"];
|
||||
private["_none"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
//{player removeAction _x} forEach s_player_bank;s_player_bank = [];
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty"];
|
||||
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
_part_out = (_this select 3) select 0;
|
||||
_part_in = (_this select 3) select 1;
|
||||
_qty_out = (_this select 3) select 2;
|
||||
_qty_in = (_this select 3) select 3;
|
||||
|
||||
|
||||
_textPartIn = getText(configFile >> "CfgMagazines" >> _part_in >> "displayName");
|
||||
_textPartOut = getText(configFile >> "CfgMagazines" >> _part_out >> "displayName");
|
||||
|
||||
|
||||
// not portable yet
|
||||
//{player removeAction _x} forEach s_player_metals;s_player_metals = [];
|
||||
//s_player_metal_crtl = -1;
|
||||
_buy_o_sell = (_this select 3) select 4;
|
||||
_textPartIn = (_this select 3) select 5;
|
||||
_textPartOut = (_this select 3) select 6;
|
||||
|
||||
_qty = {_x == _part_in} count magazines player;
|
||||
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
for "_x" from 1 to _qty_in do {
|
||||
@@ -28,8 +21,11 @@ if (_qty >= _qty_in) then {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
|
||||
47
dayz_code/actions/trade_weapons.sqf
Normal file
47
dayz_code/actions/trade_weapons.sqf
Normal file
@@ -0,0 +1,47 @@
|
||||
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell"];
|
||||
// [part_out,part_in, qty_out, qty_in,"buy"];
|
||||
|
||||
_part_out = (_this select 3) select 0;
|
||||
_part_in = (_this select 3) select 1;
|
||||
_qty_out = (_this select 3) select 2;
|
||||
_qty_in = (_this select 3) select 3;
|
||||
_buy_o_sell = (_this select 3) select 4;
|
||||
_textPartIn = (_this select 3) select 5;
|
||||
_textPartOut = (_this select 3) select 6;
|
||||
|
||||
if(_buy_o_sell == "buy") then {
|
||||
_qty = {_x == _part_in} count magazines player;
|
||||
} else {
|
||||
_qty = {_x == _part_in} count weapons player;
|
||||
};
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
for "_x" from 1 to _qty_in do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player removeMagazine _part_in;
|
||||
} else {
|
||||
player removeWeapon _part_in;
|
||||
};
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player addWeapon _part_out;
|
||||
} else {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
};
|
||||
6
dayz_code/actions/unlock_veh.sqf
Normal file
6
dayz_code/actions/unlock_veh.sqf
Normal file
@@ -0,0 +1,6 @@
|
||||
private["_vehicle"];
|
||||
_vehicle = _this select 3;
|
||||
|
||||
_vehicle setVehicleInit "this lock false";
|
||||
_vehicle setVehicleInit "this lockCargo false";
|
||||
processInitCommands;
|
||||
@@ -194,12 +194,9 @@ class CfgVehicles {
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
//HMMWV_Ambulance_CZ_DES_EP1
|
||||
class HMMWV_Ambulance;
|
||||
class HMMWV_Ambulance_DZ: HMMWV_Ambulance
|
||||
//Mi17_TK_EP1
|
||||
class Mi17_TK_EP1
|
||||
{
|
||||
radartype = 0;
|
||||
displayName = "HMMWV_Ambulance_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
@@ -210,29 +207,17 @@ class CfgVehicles {
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
//Mi17_Civilian
|
||||
class Mi17_Civilian;
|
||||
class Mi17_DZ: Mi17_Civilian
|
||||
class Mi17_DZ: Mi17_TK_EP1
|
||||
{
|
||||
radartype = 0;
|
||||
displayName = "Mi17_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
};
|
||||
//An2_TK_EP1
|
||||
class An2_TK_EP1;
|
||||
class AN2_DZ: An2_TK_EP1 {
|
||||
radartype = 0;
|
||||
displayName = "AN2_DZ";
|
||||
class An2_TK_EP1
|
||||
{
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
@@ -243,28 +228,17 @@ class CfgVehicles {
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
//UH60M_MEV_EP1
|
||||
class UH60M_MEV_EP1;
|
||||
class UH60M_DZ: UH60M_MEV_EP1 {
|
||||
radartype = 0;
|
||||
displayName = "UH60M_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
class AN2_DZ: An2_TK_EP1
|
||||
{
|
||||
displayName = "AN2_DZ";
|
||||
};
|
||||
//AH6X_EP1
|
||||
class AH6X_EP1;
|
||||
class AH6X_DZ: AH6X_EP1 {
|
||||
radartype = 0;
|
||||
displayName = "AH6X_DZ";
|
||||
class AH6X_EP1
|
||||
{
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
@@ -275,6 +249,13 @@ class CfgVehicles {
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
class AH6X_DZ: AH6X_EP1
|
||||
{
|
||||
displayName = "AH6X_DZ";
|
||||
};
|
||||
class House {
|
||||
class DestructionEffects;
|
||||
|
||||
@@ -19,7 +19,7 @@ _itemChance = [] + getArray (_config >> "itemChance");
|
||||
{
|
||||
private["_iPos2"];
|
||||
_iPos2 = _obj modelToWorld _x;
|
||||
_rnd = random 3;
|
||||
_rnd = random 1;
|
||||
//Place something at each position
|
||||
if (player distance _iPos2 > 5) then {
|
||||
if (_rnd < _lootChance) then {
|
||||
|
||||
@@ -46,6 +46,10 @@ if (_isPlayer) then {
|
||||
if (_unit == player) then {
|
||||
if (_hit == "") then {
|
||||
if ((_source != player) and _isPlayer) then {
|
||||
//Enable aggressor Actions
|
||||
if (_source isKindOf "CAManBase") then {
|
||||
_source setVariable["startcombattimer",1];
|
||||
};
|
||||
_canHitFree = player getVariable ["freeTarget",false];
|
||||
_isBandit = (typeOf player) == "Bandit1_DZ";
|
||||
if (!_canHitFree and !_isBandit) then {
|
||||
|
||||
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
private["_menClose","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_vehicle","_inVehicle","_color","_part"];
|
||||
private["_menClose","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_vehicle","_inVehicle","_color","_part","_traderType"];
|
||||
|
||||
_vehicle = vehicle player;
|
||||
_inVehicle = (_vehicle != player);
|
||||
@@ -46,6 +46,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
_isHarvested = cursorTarget getVariable["meatHarvested",false];
|
||||
_isVehicle = cursorTarget isKindOf "AllVehicles";
|
||||
_isMan = cursorTarget isKindOf "Man";
|
||||
_traderType = typeOf cursorTarget;
|
||||
_ownerID = cursorTarget getVariable ["characterID","0"];
|
||||
_isAnimal = cursorTarget isKindOf "Animal";
|
||||
_isZombie = cursorTarget isKindOf "zZombie_base";
|
||||
@@ -70,7 +71,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
// Bank Vault Code Misc_cargo_cont_tiny
|
||||
if (!_isMan and _type == "Misc_cargo_cont_tiny") then {
|
||||
if (!_isMan and _traderType == bank_atm) then {
|
||||
|
||||
if (s_player_bankvault_crtl < 0) then {
|
||||
|
||||
@@ -226,11 +227,6 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
_string = format["<t %2>Repair%1</t>",_cmpt,_color]; //Repair - Part
|
||||
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
|
||||
s_player_repairActions set [count s_player_repairActions,_handle];
|
||||
} else {
|
||||
_color = "color='#70bf44'"; //green
|
||||
_string = format["<t %2>Take%1</t>",_cmpt,_color]; //Take - Part
|
||||
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
|
||||
s_player_repairActions set [count s_player_repairActions,_handle];
|
||||
};
|
||||
|
||||
} forEach _hitpoints;
|
||||
@@ -240,7 +236,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
// Parts Trader Worker3
|
||||
if (_isMan and cursorTarget == parts_trader_1) then {
|
||||
if (_isMan and _traderType == parts_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
@@ -256,16 +252,90 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
|
||||
};
|
||||
|
||||
// Dr_Hladik_EP1
|
||||
if (_isMan and cursorTarget == mad_sci) then {
|
||||
// hintSilent format["DEBUG TRADER TARGET: %1 %2", cursorTarget,weapon_trader_1];
|
||||
|
||||
//weapon_trader_1
|
||||
if (_isMan and _traderType == weapon_trader) then {
|
||||
|
||||
if (s_player_madsci_crtl < 0) then {
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Weapons", "\z\addons\dayz_code\actions\buy_db.sqf",[4,"Weapons"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Weapons", "\z\addons\dayz_code\actions\sell_db.sqf",[4,"Weapons"], 98, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// can_trader_1
|
||||
if (_isMan and _traderType == can_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Food", "\z\addons\dayz_code\actions\buy_db.sqf",[5,"Food"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Food", "\z\addons\dayz_code\actions\sell_db.sqf",[5,"Food"], 98, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
//ammo_trader_1
|
||||
if (_isMan and _traderType == ammo_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Ammo", "\z\addons\dayz_code\actions\buy_db.sqf",[2,"Ammo"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Ammo", "\z\addons\dayz_code\actions\sell_db.sqf",[2,"Ammo"], 98, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
//auto_trader_1
|
||||
if (_isMan and _traderType == auto_trader) then {
|
||||
|
||||
if (s_player_parts_crtl < 0) then {
|
||||
|
||||
// [_trader_id, _category, ];
|
||||
_buy = player addAction ["Buy Vehicle", "\z\addons\dayz_code\actions\buy_db.sqf",[6,"Vehicle"], 99, true, false, "",""];
|
||||
_sell = player addAction ["Sell Vehicle", "\z\addons\dayz_code\actions\sell_db.sqf",[6,"Vehicle"], 98, true, false, "",""];
|
||||
|
||||
s_player_parts set [count s_player_parts,_buy];
|
||||
s_player_parts set [count s_player_parts,_sell];
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// mad_sci
|
||||
if (_isMan and _traderType == mad_sci) 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.sqf",["FoodBioMeat","ItemZombieParts",2,1], 99, true, true, "",""];
|
||||
_zparts1 = player addAction ["Trade Zombie Parts for Bio Meat", "\z\addons\dayz_code\actions\trade_items.sqf",["FoodBioMeat","ItemZombieParts",1,1], 99, true, true, "",""];
|
||||
_zparts2 = player addAction ["Buy Medical", "\z\addons\dayz_code\actions\buy_db.sqf",[3,"Medical"], 97, true, false, "",""];
|
||||
_zparts3 = player addAction ["Sell Medical", "\z\addons\dayz_code\actions\sell_db.sqf",[3,"Medical"], 96, true, false, "",""];
|
||||
|
||||
s_player_madsci set [count s_player_madsci,_zparts1];
|
||||
s_player_madsci_crtl = 1;
|
||||
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_crtl = 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,13 +4,30 @@ _list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
||||
|
||||
if (count _list < dayz_maxAnimals) then {
|
||||
//Find where animal likes
|
||||
_animalssupported = ["hen","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","DZ_Fin","DZ_Pastor"];
|
||||
//_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||
_animalssupported = ["Chicken","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Dog"];
|
||||
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
if (_type == "Cow") then {
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04"];
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04","Cow01_EP1"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
};
|
||||
if (_type == "Goat") then {
|
||||
_animalssupported = ["Goat01_EP1","Goat02_EP1","Goat"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
};
|
||||
if (_type == "Sheep") then {
|
||||
_animalssupported = ["Sheep","Sheep02_EP1","Sheep01_EP1"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
};
|
||||
if (_type == "Chicken") then {
|
||||
_animalssupported = ["Hen","Cock"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
};
|
||||
if (_type == "Dog") then {
|
||||
_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
};
|
||||
|
||||
_root = configFile >> "CfgVehicles" >> _type;
|
||||
_favouritezones = getText ( _root >> "favouritezones");
|
||||
|
||||
|
||||
@@ -5,46 +5,9 @@ _objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle",
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
} foreach _objects;
|
||||
|
||||
private ["_backpackWpnQtys","_backpackWpnTypes","_backpackWpn","_backpackMag","_countr"];
|
||||
dayz_myBackpack = unitBackpack player;
|
||||
_backpackWpn = getWeaponCargo unitBackpack player;
|
||||
_backpackMag = getMagazineCargo unitBackpack player;
|
||||
|
||||
clearWeaponCargoGlobal unitBackpack player;
|
||||
clearMagazineCargoGlobal unitBackpack player;
|
||||
|
||||
//Fill backpack contents
|
||||
//Weapons
|
||||
_backpackWpnTypes = [];
|
||||
_backpackWpnQtys = [];
|
||||
if (count _backpackWpn > 0) then {
|
||||
_backpackWpnTypes = _backpackWpn select 0;
|
||||
_backpackWpnQtys = _backpackWpn select 1;
|
||||
};
|
||||
_countr = 0;
|
||||
{
|
||||
dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _backpackWpnTypes;
|
||||
//magazines
|
||||
_backpackmagTypes = [];
|
||||
_backpackmagQtys = [];
|
||||
if (count _backpackmag > 0) then {
|
||||
_backpackmagTypes = _backpackMag select 0;
|
||||
_backpackmagQtys = _backpackMag select 1;
|
||||
};
|
||||
_countr = 0;
|
||||
{
|
||||
dayz_myBackpack addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _backpackmagTypes;
|
||||
|
||||
private["_dialog","_magazineArray","_control","_item","_val","_max"];
|
||||
diag_log ("REQUESTING GEAR SYNC");
|
||||
disableSerialization;
|
||||
//if (!dayzGearSave) exitWith {};
|
||||
|
||||
diag_log ("CONDUCTING GEAR SYNC");
|
||||
disableSerialization;
|
||||
_dialog = _this select 0;
|
||||
_magazineArray = [];
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
|
||||
_evType = "";
|
||||
_recordable = false;
|
||||
|
||||
// Both the firer and those nearby (<=15m) go into "combat" to prevent ALT-F4
|
||||
// Both the firer and those nearby (<=8m) go into "combat" to prevent ALT-F4
|
||||
_firer setVariable["startcombattimer", 1, true];
|
||||
|
||||
if (_distance <= 15) then {
|
||||
if (_distance <= 8) then {
|
||||
_unit setVariable["startcombattimer", 1, true];
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzmod.com";
|
||||
version = "1.7.4";
|
||||
version = "1.7.4-D8";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
@@ -755,7 +755,7 @@ class CfgBuildingLoot {
|
||||
}; //Qty: 2
|
||||
class Land_A_TVTower_Base: Industrial {
|
||||
lootPos[] = {{-0.982422,-1.92627,-2.21573},{-2.01782,-4.2417,-2.21918},{-0.759277,1.42139,-2.21573}};
|
||||
}
|
||||
};
|
||||
class Land_Mil_House: Military {
|
||||
vehPos[] = {{13.439,3.25244,-5.71244,84}};
|
||||
lootPos[] = {{12.457,1.4248,-5.81439},{11.0391,4.85278,-5.81439},{13.667,4.42139,-5.81439}};
|
||||
|
||||
@@ -98,7 +98,7 @@ if (!isDedicated) then {
|
||||
[] spawn {
|
||||
private["_timeOut"];
|
||||
_timeOut = 0;
|
||||
while { _timeOut < 90 } do {
|
||||
while { _timeOut < 60 } do {
|
||||
_timeOut = _timeOut + 1;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
@@ -27,8 +27,9 @@ if (isServer) then {
|
||||
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
|
||||
"dayzPlayerSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};
|
||||
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
|
||||
"dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) call server_publishVeh}; // for vehicle traders
|
||||
// "dayzPublishBank" addPublicVariableEventHandler {(_this select 1) call server_publishBank};
|
||||
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders};
|
||||
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders}; // for all traders
|
||||
"dayzUpdateVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
|
||||
"dayzDeleteObj" addPublicVariableEventHandler {_id = (_this select 1) spawn local_deleteObj};
|
||||
"dayzLogin" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerLogin};
|
||||
|
||||
@@ -170,7 +170,7 @@ dayz_zombieTargetList = [
|
||||
dayzHit = [];
|
||||
dayzPublishObj = []; //used for eventhandler to spawn a mirror of players tent
|
||||
dayzHideBody = objNull;
|
||||
|
||||
dayzPublishVeh = []; // for vehicle traders
|
||||
// dayzPublishBank = [];
|
||||
dayzTraderMenu = [];
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ 1.7.4";
|
||||
text = "DayZ 1.7.4-D8";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
Reference in New Issue
Block a user