+ Added Armored SUV to spawn tables
+ Lowered gear counts on armed suv to 400,20,10
+ Removed boats from takistan DVS table
+ Moved metals trader options to a "trade metals" menu on each trader.
+ Changed old metals trader to new Hero only trader, will have certain
clothes at first. and lower priced items.
+ Add crafting in progress lock to prevent duping.
+ changed wording of vault to safe
+ added Hero traders that only deal with 5000+ humanity
+ Updated to larger 10oz copper, silver, gold equipment icons.
+ Server Side changed allowed buildables to array
This commit is contained in:
vbawol
2013-02-23 08:45:41 -06:00
parent 16cfc75b26
commit 73594cc02c
29 changed files with 1028 additions and 259 deletions

View File

@@ -4,6 +4,9 @@
*/
private["_onLadder","_canDo","_recipe_ItemTinBar","_recipe_ItemAluminumBar","_recipe_ItemBronzeBar","_recipe_ItemGoldBar10oz","_recipe_ItemGoldBar","_recipe_FoodChickenNoodle","_recipe_FoodBeefBakedBeans","_item","_config","_create","_selectedRecipe","_recipe_","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut"];
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
// Recipes
// 6 Tin cans = Tin Bar
@@ -171,11 +174,17 @@ if (inflamed cursorTarget and _canDo) then {
} forEach _selectedRecipeOutput;
// get display name
_textCreate = getText(configFile >> "CfgMagazines" >> _create >> "displayName");
// Add crafted item
cutText [format["Crafted Item: %1",_create], "PLAIN DOWN"];
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
} else {
cutText [format["Missing component: %1 x %2",_missing,_missingQty], "PLAIN DOWN"];
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
cutText [format["Missing component: %1 x %2",_textMissing,_missingQty], "PLAIN DOWN"];
};
} else {
cutText ["Crafting needs a fire", "PLAIN DOWN"];
};
};
TradeInprogress = false;

View File

@@ -16,7 +16,7 @@ _rfriendlies = _target getVariable ["friendlies", []];
if (!(_callerID in _rfriendlies)) then {
// caller
titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept that.",(name _target)], "PLAIN DOWN"];
titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept.",(name _target)], "PLAIN DOWN"];
// target
[_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %1 as friendly.", (name _caller)],"PLAIN DOWN"] call RE;
};

View File

@@ -15,7 +15,7 @@ _textPartIn = (_this select 3) select 5;
_textPartOut = (_this select 3) select 6;
//_traderID = (_this select 3) select 7;
_counter = 0;
_success = false;
_failed = false;
@@ -38,38 +38,39 @@ if (_qty >= _qty_in) then {
for "_x" from 1 to _qty_in do {
player removeMagazine _part_in;
};
_counter = 0;
// check for space if buying and do not check if selling
for "_x" from 1 to _qty_out do {
if(_buy_o_sell == "buy") then {
_isOk = [player,_part_out] call BIS_fnc_invAdd;
if (!_isOk) exitWith { _failed = true; };
_counter = _counter + 1;
if (_isOk) then {
_counter = _counter + 1;
};
if (!_isOk) exitWith { _failed = true; };
} else {
player addMagazine _part_out;
};
};
// revert trade since it failed
if(_failed) then {
// add back currency
if(!_failed) then {
_total_in = _total_in + _qty_in;
_total_out = _total_out + _qty_out;
} else {
// Return currency
for "_x" from 1 to _qty_in do {
player addMagazine _part_in;
};
// remove partial trade
for "_x" from 1 to _counter do {
player removeMagazine _part_out;
};
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
} else {
_total_in = _total_in + _qty_in;
_total_out = _total_out + _qty_out;
_success = true;
};
if (_failed) exitWith {};
};
if(_success) then {
if(_total_out > 0) then {
cutText [format[("Traded %1 %2 for %3 %4"),_total_in,_textPartIn,_total_out,_textPartOut], "PLAIN DOWN"];
};

View File

@@ -0,0 +1,32 @@
private["_none"];
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
s_player_parts_crtl = 1;
_metals_conversion = [
["ItemTinBar","ItemAluminumBar",1,2,"buy","Aluminum","Tin",108],
["ItemAluminumBar","ItemTinBar",2,1,"buy","Tin","Aluminum",107],
["ItemCopperBar","ItemTinBar",1,2,"buy","Tin","Copper",106],
["ItemTinBar","ItemCopperBar",2,1,"buy","Copper","Tin",105],
["ItemSilverBar","ItemCopperBar10oz",1,1,"buy","10oz Copper","Silver",104],
["ItemCopperBar10oz","ItemSilverBar",1,1,"buy","Silver","10oz Copper",103],
["ItemGoldBar","ItemSilverBar10oz",1,3,"buy","10oz Silver","Gold",102],
["ItemSilverBar10oz","ItemGoldBar",3,1,"buy","Gold","10oz Silver",101]
];
// Static Menu
{
diag_log format["DEBUG TRADER: %1", _x];
_buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\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 _metals_conversion;
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];

View File

@@ -135,12 +135,12 @@ if(!_cancel) then {
["dayzPublishObj",[dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
cutText ["You have setup your vault", "PLAIN DOWN"];
cutText ["You have setup your Safe", "PLAIN DOWN"];
} else {
cutText ["You cannot place a Vault here. The area must be flat, and free of other objects", "PLAIN DOWN"];
cutText ["You cannot place a Safe here. The area must be flat, and free of other objects", "PLAIN DOWN"];
};
} else {
cutText ["Canceled construction of vault.", "PLAIN DOWN"];
cutText ["Canceled construction of Safe.", "PLAIN DOWN"];
};