+ 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"];
};

View File

@@ -269,7 +269,18 @@ class Citizen1; // External class reference
transportmaxbackpacks = 2;
class Turrets {};
};
class HMMWV_Base;
class ArmoredSUV_Base_PMC;
class ArmoredSUV_PMC_DZ : ArmoredSUV_Base_PMC {
scope = 2;
side = 2;
faction = "PMC_BAF";
crew = "";
typicalCargo[] = {};
transportMaxWeapons = 20;
transportMaxMagazines = 400;
transportmaxbackpacks = 10;
};
class HMMWV_Base;
class HMMWV_DZ: HMMWV_Base {
accuracy = 0.32;
displayname = "HMMWV_DZ";

View File

@@ -236,7 +236,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
//Allow owner to unlock vault
if(cursorTarget isKindOf "VaultStorageLocked" and _canDo and _ownerID != "0" and _ownerID == dayz_playerUID and !UnlockInprogress) then {
if (s_player_unlockvault < 0 and (player distance cursorTarget < 3)) then {
s_player_unlockvault = player addAction ["Unlock Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
s_player_unlockvault = player addAction ["Unlock Safe", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_unlockvault;
@@ -247,10 +247,10 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
if(cursorTarget isKindOf "VaultStorage" and _canDo and _ownerID != "0" and _ownerID == dayz_playerUID and (player distance cursorTarget < 3)) then {
if (s_player_lockvault < 0) then {
s_player_lockvault = player addAction ["Lock Vault", "\z\addons\dayz_code\actions\vault_lock.sqf",cursorTarget, 0, false, true, "",""];
s_player_lockvault = player addAction ["Lock Safe", "\z\addons\dayz_code\actions\vault_lock.sqf",cursorTarget, 0, false, true, "",""];
};
if (s_player_packvault < 0) then {
s_player_packvault = player addAction ["<t color='#ff0000'>Pack Vault</t>", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
s_player_packvault = player addAction ["<t color='#ff0000'>Pack Safe</t>", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_packvault;
@@ -342,6 +342,12 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
_humanity_logic = true;
};
};
if((_traderMenu select 2) == "hero") then {
_low_high = "low";
if (_humanity < 5000) 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];
@@ -361,7 +367,8 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
} forEach (_traderMenu select 0);
// Add static metals trader options under sub menu
_metals_trader = player addAction ["Trade Metals", "\z\addons\dayz_code\actions\trade_metals.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_metals_trader];
};

View File

@@ -14,7 +14,7 @@ s_player_lockvault = -1;
if(_ownerID == dayz_playerUID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText ["That vault is already being locked." , "PLAIN DOWN"]};
if (_alreadyPacking == 1) exitWith {cutText ["That Safe is already being locked." , "PLAIN DOWN"]};
_obj setVariable["packing",1];
@@ -53,7 +53,7 @@ if(_ownerID == dayz_playerUID) then {
_holder setVariable ["BackpackCargo", _backpacks, true];
};
cutText ["Your vault has been locked", "PLAIN DOWN"];
cutText ["Your Safe has been locked", "PLAIN DOWN"];
} else {
cutText ["You cannot lock this vault, it is not yours", "PLAIN DOWN"];
cutText ["You cannot lock this Safe, it is not yours", "PLAIN DOWN"];
};

View File

@@ -12,17 +12,17 @@ s_player_packvault = 1;
if(_ownerID == dayz_playerUID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText ["That vault is already being packed." , "PLAIN DOWN"]};
if (_alreadyPacking == 1) exitWith {cutText ["That Safe is already being packed." , "PLAIN DOWN"]};
_obj setVariable["packing",1];
cutText ["Packing vault move from this position to cancel within 5 seconds.", "PLAIN DOWN"];
cutText ["Packing Safe move from this position to cancel within 5 seconds.", "PLAIN DOWN"];
sleep 1;
_location1 = getPosATL player;
sleep 5;
_location2 = getPosATL player;
if(_location1 distance _location2 > 0.1) exitWith {
cutText ["Packing vault canceled." , "PLAIN DOWN"]
cutText ["Packing Safe canceled." , "PLAIN DOWN"]
};
player playActionNow "Medic";
@@ -84,9 +84,9 @@ if(_ownerID == dayz_playerUID) then {
*/
cutText ["Your vault has been packed", "PLAIN DOWN"];
cutText ["Your Safe has been packed", "PLAIN DOWN"];
} else {
cutText ["You cannot pack this vault, it is not yours", "PLAIN DOWN"];
cutText ["You cannot pack this Safe, it is not yours", "PLAIN DOWN"];
};
s_player_packvault = -1;

View File

@@ -16,7 +16,7 @@ UnlockInprogress = true;
if (_ownerID == dayz_playerUID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText ["That vault is already being unlocked." , "PLAIN DOWN"]};
if (_alreadyPacking == 1) exitWith {cutText ["That Safe is already being unlocked." , "PLAIN DOWN"]};
_obj setVariable["packing",1];
@@ -79,14 +79,14 @@ if (_ownerID == dayz_playerUID) then {
} forEach _objWpnTypes;
};
cutText ["Vault has been unlocked.", "PLAIN DOWN"];
cutText ["Safe has been unlocked.", "PLAIN DOWN"];
} else {
player playActionNow "Medic";
sleep 3;
[player,"repair",0,false] call dayz_zombieSpeak;
null = [player,25,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
cutText ["Combination incorrect, vault is still locked.", "PLAIN DOWN"];
cutText ["Combination incorrect, Safe is still locked.", "PLAIN DOWN"];
};
s_player_unlockvault = -1;

View File

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

View File

@@ -32,8 +32,6 @@ TK_INS_Warlord_EP1_DZ = "TK_INS_Warlord_EP1_DZ";
AllPlayers = ["SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ"];
AllPlayersVehicles = ["SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","AllVehicles"];
dayz_allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ"];
PZombie_VB = "PZombie_VB";

View File

@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ Epoch 0.976 (1.7.5.1)";
text = "DayZ Epoch 0.977 (1.7.5.1)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu;