mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 21:29:59 +03:00
0.936
+ removed cracking vaults. + added color coding to sell menu
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
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"];
|
||||
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"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
@@ -89,8 +89,25 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
// qty consumed of bname
|
||||
_in = 1;
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
||||
_count = 0;
|
||||
if(_stype == "CfgVehicles") then {
|
||||
_count = position player nearObjects [_name,10];
|
||||
}
|
||||
if(_stype == "CfgMagazines") then {
|
||||
_count = {_x == _name} count magazines player;
|
||||
}
|
||||
if(_stype == "CfgWeapons") then {
|
||||
_count = {_x == _name} count items 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,_out,_in,"sell",_textPart,_textCurrency,_header], _order, true, true, "",""];
|
||||
|
||||
diag_log format["DEBUG TRADER: %1", _part];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
[_obj] spawn player_unlockVault;
|
||||
*/
|
||||
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_allowunlock","_alreadyPacking","_item","_hasToolbox"];
|
||||
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_allowunlock","_alreadyPacking"];
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
@@ -13,59 +13,7 @@ s_player_unlockvault = 1;
|
||||
|
||||
UnlockInprogress = true;
|
||||
|
||||
_item = "ItemToolbox";
|
||||
_hasToolbox = _item in items player;
|
||||
|
||||
|
||||
_allowunlock = false;
|
||||
if (_ownerID == dayz_playerUID) then {
|
||||
_allowunlock = true;
|
||||
} else {
|
||||
|
||||
// do random roll to try to unlock vault
|
||||
// start low to test figure out what works later
|
||||
if(_hasToolbox) then {
|
||||
|
||||
// days alive modifier
|
||||
_maxRoll = 10000 - (dayz_skilllevel * 250);
|
||||
|
||||
// math check
|
||||
// 0 days x 250 = 0
|
||||
// 1 days x 250 = 250 (10000 - 250) = 9750
|
||||
// 4 days x 250 = 1000 (10000 - 1000) = 9000
|
||||
// 10 days x 250 = 2500 (10000 - 2500) = 7500
|
||||
// 20 days x 250 = 5000 (10000 - 5000) = 5000
|
||||
// 30 days x 250 = 7500 (10000 - 7500) = 2500
|
||||
// 36 days x 250 = 9000 (10000 - 9000) = 1000
|
||||
// 40 days x 250 = 10000 (10000 - 10000) = 0
|
||||
|
||||
if(_maxRoll > 10000) then {
|
||||
_maxRoll = 10000;
|
||||
};
|
||||
|
||||
if(_maxRoll < 1000) then {
|
||||
_maxRoll = 1000;
|
||||
};
|
||||
|
||||
if(floor (random _maxRoll) == 137) then {
|
||||
_allowunlock = true;
|
||||
};
|
||||
|
||||
// lower chance to break tools based on skill = days alive
|
||||
_toolboxRoll = dayz_skilllevel * 10;
|
||||
|
||||
// Chance to break toolbox randomly
|
||||
if(floor (random _toolboxRoll) == 1) then {
|
||||
player removeWeapon _item;
|
||||
titleText ["Your toolbox is now broken, you will need to find another one.", "PLAIN"];
|
||||
};
|
||||
} else {
|
||||
if (!_hasToolbox) exitWith {cutText ["Cannot crack vault, you do not have a Tool Box." , "PLAIN"]};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if(_allowunlock) then {
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
|
||||
if (_alreadyPacking == 1) exitWith {cutText ["That vault is already being unlocked." , "PLAIN DOWN"]};
|
||||
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "0.935";
|
||||
version = "0.936";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 0.935 (1.7.5.1)";
|
||||
text = "DayZ Epoch 0.936 (1.7.5.1)";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
Reference in New Issue
Block a user