mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 23:32:53 +03:00
+ [FIXED] Player position was saved to [] in certain areas of Taviana forcing random spawn. Override variables added dayz_minpos (default: -20000) and dayz_maxpos (default: 20000). To better support Taviana use dayz_minpos = -26000; dayz_maxpos = 26000; Thanks to dayzforever.com admin for the heads up. + [ADDED] Small Desert Camo Net - desert_net_kit - Recipe: 4 x tent + 4 x metal pole + [ADDED] Large Desert Camo Net - desert_large_net_kit - Recipe: 3 x desert_net_kit + [ADDED] Small Forest Camo Net - forest_net_kit - Recipe: 4 x tent + 4 x metal pole + [ADDED] Large Forest Camo Net - forest_large_net_kit - Recipe: 3 x forest_net_kit + [CHANGED] changed out ItemSodaRbull with ItemSodaR4z0r due to glitching with rbull model. + [ADDED] New Heavy Duty SUV with camo skin (Armor: 50) +25 increase in armor and holds 100 magazines, 10 weapons, 5 backpacks. Camo skin from here: http://www.404games.co.uk/forum/index.php?/topic/1243-camo-suv-skin-code-here/ + [ADDED] Sandbag Nest (sandbag_nest_kit) Required Tools: ItemEtool, ItemToolbox. Recipe: ItemSandbag x 4, PartWoodPlywood x 2, PartWoodLumber x 4. + [CHANGED] When selling multiple magazine items traders should now always give highest denomination back. + [CHANGED] workshop is now required for most crafting. Currently a Nice Wood Shed or a Wooden Shack will work. + [CHANGED] Updated camo female texture thanks to http://www.twitch.tv/miss_alejandria + [ADDED] New vehicle ownership is now tied to vehicle keys. When you purchase a new vehicle you will get a key added to your toolbelt. Do not drop on the ground as they are easy to loose. + [ADDED] Server admins can now change default fresh spawn loadout within mission init.sqf. DefaultMagazines = ["ItemBandage","ItemPainkiller"]; DefaultWeapons = ["ItemFlashlight"]; DefaultBackpack = ""; DefaultBackpackWeapon = ""; + [ADDED] added override variable for to change the distance for selling vehicles. dayz_sellDistance = 20; in the missions init.sqf + [REVERT] Re-enabled old refuel sources and added (TODO: ability to fill 55 gallon barrels off them). + [ADDED] More internal code locks and addaction locks to prevent bugged menus. + [CHANGED] Can no longer drop "MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole" from primary slot, you must add it to your toolbelt first. + [ADDED] Fishing now requires casting and waiting to catch a fish (currently only trout). + [FIXED] Incorrect TradeInprogress message for Open Crate code. + [FIXED] Boat dealers can now use ["HeliHCivil","HeliHempty"] as alternate spawn locations for new vehicles. + [FIXED] Fixed spawning of Skin_TK_INS_Warlord_EP1 needed to be Skin_TK_INS_Warlord_EP1_DZ in loot table instead. + [ADDED] Gain 1 humanity for each zed you gut. only after body is cleared and the body disappears. + [REMOVED] Removed m240 nest crafting for now too many problems still. + [ADDED] You now get a key when purchasing a vehicle, + [ADDED] Have your pen and paper handy for this one... When placing a personal safe you will now get a 4 digit pin code that you will need to use gain access to your safe. + [FIXED] Issues with Arma 2 free and ArmA 2 X users when purchasing vehicles and placing vaults have now been resolved. + [CHANGED] Namalsk Plane vendor moved inside building, Medical vendor moved to adjacent building.
149 lines
4.0 KiB
Plaintext
149 lines
4.0 KiB
Plaintext
private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart","_count"];
|
|
|
|
if(TradeInprogress) exitWith { cutText ["already in progress." , "PLAIN DOWN"]; };
|
|
TradeInprogress = true;
|
|
|
|
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
|
|
|
// [ _trader_id, _category, _action ];
|
|
_activatingPlayer = _this select 1;
|
|
|
|
_trader_id = (_this select 3) select 0;
|
|
_category = (_this select 3) select 1;
|
|
|
|
dayzTraderMenuResult = call compile format["tcacheSell_%1;",_trader_id];
|
|
|
|
if(isNil "dayzTraderMenuResult") then {
|
|
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
|
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
|
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
|
|
publicVariableServer "dayzTraderMenu";
|
|
waitUntil {!isNil "dayzTraderMenuResult"};
|
|
};
|
|
|
|
diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
|
{
|
|
_header = _x select 0; // "TRD"
|
|
|
|
// Trader Item name|type
|
|
_item = _x select 1;
|
|
_name = _item select 0;
|
|
_type = _item select 1;
|
|
switch(true)do{
|
|
case (_type == 1): {
|
|
_type = "CfgMagazines";
|
|
};
|
|
case (_type == 2): {
|
|
_type = "CfgVehicles";
|
|
};
|
|
case (_type == 3): {
|
|
_type = "CfgWeapons";
|
|
};
|
|
};
|
|
// Display Name of item
|
|
_textPart = getText(configFile >> _type >> _name >> "displayName");
|
|
|
|
// Total in stock
|
|
_qty = _x select 2;
|
|
|
|
// Buy Data from array
|
|
_buy = _x select 3;
|
|
_bqty = _buy select 0;
|
|
_bname = _buy select 1;
|
|
_btype = _buy select 2;
|
|
switch(true)do{
|
|
case (_btype == 1): {
|
|
_btype = "CfgMagazines";
|
|
};
|
|
case (_btype == 2): {
|
|
_btype = "CfgVehicles";
|
|
};
|
|
case (_btype == 3): {
|
|
_btype = "CfgWeapons";
|
|
};
|
|
};
|
|
// Display Name of buy item
|
|
_textCurrencyBuy = getText(configFile >> _btype >> _bname >> "displayName");
|
|
|
|
// Sell data from array
|
|
_sell = _x select 4;
|
|
_sqty = _sell select 0;
|
|
_sname = _sell select 1;
|
|
_stype = _sell select 2;
|
|
switch(true)do{
|
|
case (_stype == 1): {
|
|
_stype = "CfgMagazines";
|
|
};
|
|
case (_stype == 2): {
|
|
_stype = "CfgVehicles";
|
|
};
|
|
case (_stype == 3): {
|
|
_stype = "CfgWeapons";
|
|
};
|
|
};
|
|
// Display Name of sell item
|
|
_textCurrency = getText(configFile >> _stype >> _sname >> "displayName");
|
|
|
|
// Menu sort order
|
|
_order = _x select 5;
|
|
|
|
// Trader Menu ID
|
|
_tid = _x select 6;
|
|
|
|
// Action file to use for trade
|
|
_afile = _x select 7;
|
|
_File = "\z\addons\dayz_code\actions\" + _afile + ".sqf";
|
|
|
|
// Allways 1 for now
|
|
_out = _sqty;
|
|
// qty consumed of bname
|
|
_in = 1;
|
|
|
|
_count = 0;
|
|
if(_type == "CfgVehicles") then {
|
|
if (_afile == "trade_backpacks") then {
|
|
_bag = unitBackpack player;
|
|
_bagclass = typeOf _bag;
|
|
if(_name == _bagclass) then {
|
|
_count = 1;
|
|
};
|
|
} else {
|
|
_count = {(typeOf _x) == _name} count (nearestObjects [player, [_name], 20]);
|
|
}
|
|
};
|
|
if(_type == "CfgMagazines") then {
|
|
_count = {_x == _name} count magazines player;
|
|
};
|
|
if(_type == "CfgWeapons") then {
|
|
_count = {_x == _name} count weapons player;
|
|
};
|
|
|
|
|
|
if (_count > 0) then {
|
|
_Display = format["Sell %1 for %2 %3 each", _textPart, _sqty, _textCurrency];
|
|
} else {
|
|
_Display = format["<t color='#ffff00'>Sell %1 for %2 %3 each</t>", _textPart, _sqty, _textCurrency];
|
|
};
|
|
|
|
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
|
_part = player addAction [_Display, _File,[_sname,_name,_sqty,_in,"sell",_textPart,_textCurrency,_header], _order, true, true, "",""];
|
|
|
|
|
|
// diag_log format["DEBUG TRADER: %1", _part];
|
|
s_player_parts set [count s_player_parts,_part];
|
|
|
|
} forEach dayzTraderMenuResult;
|
|
|
|
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 0, true, false, "",""];
|
|
s_player_parts set [count s_player_parts,_cancel];
|
|
|
|
// Cache data in client side global variable
|
|
call compile format["tcacheSell_%1 = %2;",_tid,dayzTraderMenuResult];
|
|
|
|
|
|
// Clear Data
|
|
dayzTraderMenuResult = nil;
|
|
|
|
|
|
s_player_parts_crtl = 1;
|
|
TradeInprogress = false; |