This commit is contained in:
vbawol
2013-01-27 21:27:51 -06:00
parent bae5ba2d72
commit 3636566f45
6 changed files with 194 additions and 407 deletions

View File

@@ -28,20 +28,134 @@ dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 40; // Default = 40
// DayZ Epoch TRADERS
weapon_trader = 'CIV_EuroMan01_EP1';
weapon_trader_2 = 'Rocker4';
parts_trader = 'Woodlander3';
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';
serverTraders = [
"TK_CIV_Takistani04_EP1",
"CIV_EuroMan01_EP1",
"Rocker4",
"Woodlander3",
"Woodlander1",
"RU_WorkWoman1",
"RU_WorkWoman5",
"CIV_EuroMan02_EP1",
"RU_Citizen3",
"Worker3",
"Profiteer4",
"Dr_Hladik_EP1",
"Doctor",
"RU_Functionary1",
"RU_Villager3"
];
// Weapons Traders
menu_CIV_EuroMan01_EP1 = [
[["Sidearm",11],["Rifle",12],["Shotgun",13],["Assault Rifle",14],["Machine Gun",15],["Sniper Rifle",16]],
[],
"friendly"
];
menu_Rocker4 = [
[["Sidearm",1111],["Rifle",1212],["Shotgun",1313],["Assault Rifle",1414],["Machine Gun",1515],["Sniper Rifle",1616]],
[],
"friendly"
];
// Parts Traders
menu_Woodlander3 = [
[["Car Parts",21],["Building Supplies",22]],
[],
"friendly"
];
menu_Woodlander1 = [
[["Car Parts",2121],["Building Supplies",2222]],
[],
"friendly"
];
// Can Traders
menu_RU_WorkWoman1 = [
[["Food and Drinks",51],["Backpacks",52],["Toolbelt",53],["Clothes",54]],
[
["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar",103],
["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar",102],
["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar",101]
],
"friendly"
];
menu_RU_WorkWoman5 = [
[["Food and Drinks",5151],["Backpacks",5252],["Toolbelt",5353],["Clothes",5454]],
[
["ItemCopperBar","ItemSodaEmpty",1,3,"buy","Empty Soda Cans","Copper Bar",103],
["ItemCopperBar","TrashTinCan",1,3,"buy","Empty Tin Cans","Copper Bar",102],
["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar",101]
],
"friendly"
];
// Ammo Traders
menu_CIV_EuroMan02_EP1 = [
[["Sidearm Ammo",1],["Rifle Ammo",2],["Shotgun and Crossbow Ammo",3],["Assault Rifle Ammo",4],["Machine Gun Ammo",5],["Sniper Rifle Ammo",6]],
[],
"friendly"
];
menu_RU_Citizen3 = [
[["Sidearm Ammo",1001],["Rifle Ammo",2002],["Shotgun and Crossbow Ammo",3003],["Assault Rifle Ammo",4004],["Machine Gun Ammo",5005],["Sniper Rifle Ammo",6006]],
[],
"friendly"
];
// Auto Traders
menu_CIV_Worker3 = [
[["Cars",41],["Trucks Unarmed",42],["SUV",466],["Buses and Vans",467],["Offroad",43],["Helicopter Unarmed",44],["Military Unarmed",45]],
[],
"friendly"
];
menu_Profiteer4 = [
[["Trucks Armed",422],["Utility",46],["Helicopter Armed",444],["Military Armed",455],["Fuel Trucks",47],["Heavy Armor Unarmed",48]],
[],
"friendly"
];
// Doctors
menu_Dr_Hladik_EP1 = [
[["Medical Supplies",31],["Chem-lites/Flares",32],["Smoke Grenades",33]],
[["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],
"friendly"
];
menu_Doctor = [
[["Medical Supplies",3131],["Chem-lites/Flares",3232],["Smoke Grenades",3333]],
[["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],
"friendly"
];
// Metals Traders
menu_RU_Functionary1 = [
[["Vaults",411]],
[
["ItemSilverBar","ItemCopperBar",1,6,"buy","Copper","Silver",99],
["ItemCopperBar","ItemSilverBar",6,1,"buy","Silver","Copper",98],
["ItemGoldBar","ItemSilverBar",1,6,"buy","Silver","Gold",97],
["ItemSilverBar","ItemGoldBar",6,1,"buy","Gold","Silver",96]
],
"neutral"
];
// Boat Traders
menu_RU_Villager3 = [
[["Boats Unarmed",49],["Boats Armed",499]],
[
["ItemJerrycanEmpty","ItemCopperBar",1,1,"buy","Copper Bar","Empty Jerrycan",101],
["ItemGenerator","ItemGoldBar",1,3,"buy","Gold Bars","Portable Generator",100]
],
"neutral"
];
menu_TK_CIV_Takistani04_EP1 = [
[["Explosives",23]],
[],
"hostile"
];
// ["friendly"] must have more than -2000 humanity,
// ["neutral"] can have any ammount of humanity
// ["hostile"] must have lower than -2000
// OLD ["Wholesale",999]
//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)

View File

@@ -536,10 +536,10 @@ if (true) then
_vehicle_121 = objNull;
if (true) then
{
_this = createVehicle ["UAZWreck", [4015.2021, 11640.825, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_this = createVehicle ["UAZWreck", [3967.6763, 11614.6, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_121 = _this;
_this setDir 47.001991;
_this setPos [4015.2021, 11640.825, -3.0517578e-005];
_this setDir 4.973218;
_this setPos [3967.6763, 11614.6, -3.0517578e-005];
};
_vehicle_123 = objNull;
@@ -657,10 +657,10 @@ if (true) then
_vehicle_161 = objNull;
if (true) then
{
_this = createVehicle ["UAZWreck", [4022.2068, 11646.929, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_this = createVehicle ["UAZWreck", [3926.9609, 11653.108, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_161 = _this;
_this setDir 113.7531;
_this setPos [4022.2068, 11646.929, -3.0517578e-005];
_this setPos [3926.9609, 11653.108, -3.0517578e-005];
};
_vehicle_164 = objNull;
@@ -745,10 +745,10 @@ if (true) then
_vehicle_178 = objNull;
if (true) then
{
_this = createVehicle ["UralWreck", [4007.2324, 11647.196, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_this = createVehicle ["UralWreck", [3960.4729, 11634.942, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_178 = _this;
_this setDir 51.630379;
_this setPos [4007.2324, 11647.196, -3.0517578e-005];
_this setPos [3960.4729, 11634.942, -3.0517578e-005];
};
_vehicle_184 = objNull;
@@ -1339,4 +1339,15 @@ if (true) then
if (false) then {_group_1 selectLeader _this;};
};
_unit_84 = objNull;
if (true) then
{
_this = _group_1 createUnit ["TK_CIV_Takistani04_EP1", [6912.1919, 11428.12, 11.354488], [], 0, "CAN_COLLIDE"];
_unit_84 = _this;
_this setDir 377.50549;
_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;

View File

@@ -293,413 +293,73 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_humanity = player getVariable ["humanity",0];
// Parts Trader #1
if (_isMan and !_isPZombie and _traderType == parts_trader) then {
// All Traders
if (_isMan and !_isPZombie and _traderType in serverTraders) then {
if(!isNil "s_last_trader" and s_player_parts_crtl == 1) then {
if(s_last_trader != _traderType) then {
s_player_parts_crtl -1;
};
};
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
//diag_log ("TRADER = " + str(serverTraders));
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
_traderMenu = call compile format["menu_%1;",_traderType];
diag_log ("TRADER = " + str(_traderMenu));
_humanity_logic = false;
if((_traderMenu select 2) == "friendly") then {
_low_high = "low";
if (_humanity < -2000) then {
_humanity_logic = true;
};
};
if((_traderMenu select 2) == "neutral") then {
_humanity_logic = true;
};
if((_traderMenu select 2) == "hostile") then {
_low_high = "high";
if (_humanity > -2000) then {
_humanity_logic = true;
};
};
if(_humanity_logic) then {
_cancel = player addAction ["Your humanity is too " + _low_high + " this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_parts_trader_menu = [["Car Parts",21],["Building Supplies",22],["Explosives",23]];
// Static Menu
{
diag_log format["DEBUG TRADER: %1", _x];
_buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 6),(_x select 2),(_x select 5)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true, "",""];
s_player_parts set [count s_player_parts,_buy];
} forEach (_traderMenu select 1);
// Database menu
{
// _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;
} forEach (_traderMenu select 0);
};
s_player_parts_crtl = 1;
s_last_trader = _traderType;
};
};
// Parts Trader #2
if (_isMan and !_isPZombie and _traderType == parts_trader_2) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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 {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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;
};
};
//weapon_trader #2
if (_isMan and !_isPZombie and _traderType == weapon_trader_2) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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 {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
// [_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, "",""];
_cantrader2 = player addAction ["Trade 1 Empty Wiskey Bottle for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar"], 99, true, true, "",""];
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,_cantrader2];
_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)], 98, true, false, "",""];
s_player_parts set [count s_player_parts,_buy];
} forEach _can_trader_menu;
};
s_player_parts_crtl = 1;
};
};
// can_trader #2
if (_isMan and !_isPZombie and _traderType == can_trader_2) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
// [_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, "",""];
_cantrader2 = player addAction ["Trade 1 Empty Wiskey Bottle for 1 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Wiskey Bottle","Copper Bar"], 99, true, true, "",""];
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,_cantrader2];
_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)], 98, 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 {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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 {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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;
};
} else {
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
s_player_parts_crtl = -1;
};
//boat_trader_1
if (_isMan and !_isPZombie and _traderType == boat_trader) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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;
};
};
//auto_trader_1
if (_isMan and !_isPZombie and _traderType == auto_trader) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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;
};
};
//auto_trader_2
if (_isMan and !_isPZombie and _traderType == auto_trader_2) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
_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;
};
};
// mad_sci
if (_isMan and !_isPZombie and _traderType == mad_sci) then {
if (s_player_parts_crtl < 0) then {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
// [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_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 {
if(_humanity < -2000) then {
_cancel = player addAction ["Your humanity is too low this trader refuses to talk to you.", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
} else {
// [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;
};
};
// metals_trader
if (_isMan and !_isPZombie and _traderType == metals_trader) then {
if (s_player_parts_crtl < 0) then {
// [part_out, part_in, qty_out, qty_in,];
_metals1 = player addAction ["Trade 6 Copper for 1 Silver", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemSilverBar","ItemCopperBar",1,6,"buy","Copper","Silver"], 99, true, true, "",""];
_metals2 = player addAction ["Trade 1 Silver for 6 Copper", "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",["ItemCopperBar","ItemSilverBar",6,1,"buy","Silver","Copper"], 98, true, true, "",""];
_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;
};
};
if (_isMan and !_isAlive and !_isZombie) then {
if (s_player_studybody < 0) then {
@@ -771,11 +431,12 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
{player removeAction _x} forEach s_player_madsci;s_player_madsci = [];
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
{player removeAction _x} forEach s_player_bank;s_player_bank = [];
//{player removeAction _x} forEach s_player_bank;s_player_bank = [];
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_madsci_crtl = -1;
s_player_parts_crtl = -1;
s_last_trader = -1;
// lock unlock vehicles
s_player_lockUnlock_crtl = -1;

View File

@@ -33,7 +33,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.dayepoch.com";
version = "0.792";
version = "0.795";
hiveVersion = 0.96; //0.93
};
};

View File

@@ -104,6 +104,7 @@ dayz_resetSelfActions = {
s_player_barkdog = -1;
s_player_warndog = -1;
s_player_followdog = -1;
s_last_trader = -1;
};
call dayz_resetSelfActions;

View File

@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ Epoch 0.792 (1.7.5.M1D25)";
text = "DayZ Epoch 0.795 (1.7.5.M1D25)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu;