This commit is contained in:
[VB]AWOL
2013-10-21 21:58:58 -05:00
parent d73e1b656c
commit e303e033b6
6 changed files with 26 additions and 14 deletions

View File

@@ -163,7 +163,7 @@ _missing = "";
_hasrequireditem = true; _hasrequireditem = true;
{ {
_hastoolweapon = _x in weapons player; _hastoolweapon = _x in weapons player;
if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = _x; } if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }
} forEach _require; } forEach _require;
_hasbuilditem = _this in magazines player; _hasbuilditem = _this in magazines player;

View File

@@ -140,7 +140,7 @@ if ((count _upgrade) > 0) then {
player reveal _object; player reveal _object;
} else { } else {
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_itemOut], "PLAIN DOWN"]; cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,(getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"))], "PLAIN DOWN"];
{ {
[player,(_x select 0),(_x select 1)] call BIS_fnc_invRemove; [player,(_x select 0),(_x select 1)] call BIS_fnc_invRemove;
} forEach _addedItems; } forEach _addedItems;

View File

@@ -45,11 +45,17 @@ while {_isOk} do {
_inVehicle = (_vehicle != player); _inVehicle = (_vehicle != player);
if(_inVehicle) then { if(_inVehicle) then {
if(_vehicle isKindOf "Ship") then { if(_vehicle isKindOf "Ship") then {
// higher chance to catch if water is deeper than 25m
if(((getPosATL _vehicle) select 2) > 25) then {
_rnd = 12;
} else {
_rnd = 25; _rnd = 25;
}; };
}; };
};
// 1% chance to catch anything
// chance to catch anything
if((random _rnd) <= 1) then { if((random _rnd) <= 1) then {
// Just the one fish for now // Just the one fish for now
_itemOut = ["ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemSeaBass","ItemSeaBass","ItemTuna"] call BIS_fnc_selectRandom; _itemOut = ["ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemSeaBass","ItemSeaBass","ItemTuna"] call BIS_fnc_selectRandom;
@@ -67,7 +73,7 @@ while {_isOk} do {
} else { } else {
cutText ["\n\nNibble... Nibble...", "PLAIN DOWN"]; cutText ["\n\nNibble... Nibble...", "PLAIN DOWN"];
_counter = _counter + 1; _counter = _counter + 1;
if(_counter == 5) then { if(_counter == 10) then {
_isOk = false; _isOk = false;
sleep 2; sleep 2;
cutText ["\n\nYou didn't catch anything.", "PLAIN DOWN"]; cutText ["\n\nYou didn't catch anything.", "PLAIN DOWN"];

View File

@@ -3,7 +3,7 @@
Usage: spawn player_harvestPlant; Usage: spawn player_harvestPlant;
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/ */
private ["_isOk","_i","_objName","_started","_finished","_animState","_isMedic","_proceed","_itemOut","_countOut","_tree","_trees","_findNearestTree","_index","_invResult","_treesOutput"]; private ["_isOk","_i","_objName","_started","_finished","_animState","_isMedic","_proceed","_itemOut","_countOut","_tree","_trees","_findNearestTree","_index","_invResult","_treesOutput","_text"];
if(TradeInprogress) exitWith { cutText ["\n\nHarvest already in progress." , "PLAIN DOWN"]; }; if(TradeInprogress) exitWith { cutText ["\n\nHarvest already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true; TradeInprogress = true;
@@ -102,6 +102,8 @@ if (count(_findNearestTree) >= 1) then {
}; };
}; };
_text = getText (configFile >> "CfgMagazines" >> _itemOut >> "displayName");
if(_i != 0) then { if(_i != 0) then {
// chop down tree // chop down tree
if("" == typeOf _tree) then { if("" == typeOf _tree) then {
@@ -109,9 +111,9 @@ if (count(_findNearestTree) >= 1) then {
}; };
//diag_log format["DEBUG TREE DAMAGE: %1", _tree]; //diag_log format["DEBUG TREE DAMAGE: %1", _tree];
cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _i,_itemOut], "PLAIN DOWN"]; cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _i,_text], "PLAIN DOWN"];
} else { } else {
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_itemOut], "PLAIN DOWN"]; cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_text], "PLAIN DOWN"];
}; };
} else { } else {
r_interrupt = false; r_interrupt = false;

View File

@@ -88,7 +88,7 @@ if(!(alive _item)) then {
_control ctrlShow true; _control ctrlShow true;
cutText [format[(localize "str_player_consumed"),_animalType], "PLAIN DOWN"]; cutText [format[(localize "str_player_consumed"),(getText (configFile >> "CfgVehicles" >> _animalType >> "displayName"))], "PLAIN DOWN"];
player switchmove ""; player switchmove "";
}; };

View File

@@ -2,7 +2,7 @@
delete object from db with extra waiting by [VB]AWOL delete object from db with extra waiting by [VB]AWOL
parameters: _obj parameters: _obj
*/ */
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding"]; private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle"];
if(TradeInprogress) exitWith { cutText ["Remove already in progress." , "PLAIN DOWN"]; }; if(TradeInprogress) exitWith { cutText ["Remove already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true; TradeInprogress = true;
@@ -59,7 +59,9 @@ if(_IsNearPlot >= 1) then {
}; };
}; };
cutText [format["Starting de-construction of %1.",_objType], "PLAIN DOWN"]; _nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName");
cutText [format["Starting de-construction of %1.",_nameVehicle], "PLAIN DOWN"];
// Alert zombies once. // Alert zombies once.
[player,50,true,(getPosATL player)] spawn player_alertZombies; [player,50,true,(getPosATL player)] spawn player_alertZombies;
@@ -125,7 +127,7 @@ while {_isOk} do {
_proceed = false; _proceed = false;
}; };
cutText [format["De-constructing %1 stage %2 of %3 walk away at anytime to cancel.",_objType, _counter,_limit], "PLAIN DOWN"]; cutText [format["De-constructing %1 stage %2 of %3 walk away at anytime to cancel.", _nameVehicle, _counter,_limit], "PLAIN DOWN"];
if(_counter == _limit) exitWith { if(_counter == _limit) exitWith {
_isOk = false; _isOk = false;
@@ -134,6 +136,8 @@ while {_isOk} do {
}; };
if(_brokenTool) then { if(_brokenTool) then {
if(_isWreck) then { if(_isWreck) then {
_removeTool = "ItemToolbox"; _removeTool = "ItemToolbox";
@@ -141,7 +145,7 @@ if(_brokenTool) then {
_removeTool = ["ItemCrowbar","ItemToolbox"] call BIS_fnc_selectRandom; _removeTool = ["ItemCrowbar","ItemToolbox"] call BIS_fnc_selectRandom;
}; };
if(([player,_removeTool,1] call BIS_fnc_invRemove) > 0) then { if(([player,_removeTool,1] call BIS_fnc_invRemove) > 0) then {
cutText [format["Tool (%1) broke cannot remove %2.",_removeTool,_objType], "PLAIN DOWN"]; cutText [format["%1 broke cannot remove %2.",getText(configFile >> "CfgWeapons" >> _removeTool >> "displayName"),_nameVehicle], "PLAIN DOWN"];
}; };
}; };
@@ -158,7 +162,7 @@ if (_proceed) then {
publicVariableServer "PVDZE_obj_Delete"; publicVariableServer "PVDZE_obj_Delete";
}; };
cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"]; cutText [format["De-constructing %1.",_nameVehicle], "PLAIN DOWN"];
_preventRefund = false; _preventRefund = false;