mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
increase chances to catch fish from boat and add fish to boat
This commit is contained in:
@@ -36,13 +36,32 @@ while {_isOk} do {
|
||||
|
||||
sleep 2;
|
||||
|
||||
// TODO: increase chance the deaper the water.
|
||||
_rnd = 100;
|
||||
|
||||
// check if player is in boat
|
||||
_vehicle = vehicle player;
|
||||
_inVehicle = (_vehicle != player);
|
||||
if(_inVehicle) then {
|
||||
if(_vehicle isKindOf "Ship") then {
|
||||
_rnd = 50;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// 1% chance to catch anything
|
||||
if((random 100) <= 1) then {
|
||||
if((random _rnd) <= 1) then {
|
||||
// Just the one fish for now
|
||||
_itemOut = ["ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemSeaBass","ItemSeaBass","ItemTuna"] call BIS_fnc_selectRandom;
|
||||
player addMagazine _itemOut;
|
||||
|
||||
if(_inVehicle) then {
|
||||
_item = _vehicle;
|
||||
_itemtodrop = _itemOut;
|
||||
_item addMagazineCargoGlobal [_itemtodrop,1];
|
||||
} else {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
cutText ["You caught a fish.", "PLAIN DOWN"];
|
||||
_isOk = false;
|
||||
} else {
|
||||
|
||||
@@ -21,7 +21,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = {"dayz_equip","dayz_weapons","dayz_sfx","CAMisc3","CABuildingParts","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT","asc_eu_lights","vilas_pl_cars"};
|
||||
requiredAddons[] = {"dayz_equip","dayz_weapons","dayz_sfx","CAMisc3","CABuildingParts","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT","asc_eu_lights","vilas_pl_cars","gnt_c185"};
|
||||
};
|
||||
class DZ_DebriefingRemoved
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user