mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
@@ -49,22 +49,6 @@ while {_isOk} do {
|
||||
_sledgeChance = [((_values select 1) / _limit)] call fn_chance;
|
||||
_crowBarChance = [((_values select 2) / _limit)] call fn_chance;
|
||||
|
||||
//Check if we have the tools to start
|
||||
_hasSledgeHammer = "ItemSledge" in items player;
|
||||
_hasCrowbar = "ItemCrowbar" in items player;
|
||||
|
||||
if (!_hasSledgeHammer) exitWith {
|
||||
_proceed = nil;
|
||||
localize "STR_BLD_BREAKIN_NEED_SLEDGE" call dayz_rollingMessages;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
if (!_hasCrowbar) exitWith {
|
||||
_proceed = nil;
|
||||
localize "STR_BLD_BREAKIN_NEED_CROWBAR" call dayz_rollingMessages;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
//Run SFX
|
||||
_dis=20;
|
||||
_sfx = "repair";
|
||||
@@ -74,8 +58,12 @@ while {_isOk} do {
|
||||
//Run animation loop
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
|
||||
//Make sure player did not drop sledge or crowbar
|
||||
_hasSledgeHammer = "ItemSledge" in items player;
|
||||
_hasCrowbar = "ItemCrowbar" in items player;
|
||||
|
||||
//Everything happened as it should
|
||||
if(_finished) then {
|
||||
if (_finished && _hasSledgeHammer && _hasCrowbar) then {
|
||||
//Add to Counter
|
||||
_counter = _counter + 1;
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_dis","_sfx","_breaking","_countOut","_counter","_isOk","_proceed","_finished","_itemOut","_tree","_distance2d","_chanceResult"];
|
||||
private ["_dis","_sfx","_breaking","_countOut","_counter","_isOk","_proceed","_finished","_itemOut","_tree","_distance2d","_chanceResult","_weapons"];
|
||||
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
@@ -17,8 +19,6 @@ _tree = objNull;
|
||||
if (!isNull _tree) then {
|
||||
_distance2d = [player, _tree] call BIS_fnc_distance2D;
|
||||
if (_distance2d > 5) exitWith {localize "str_player_23" call dayz_rollingMessages;};
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
|
||||
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing"];
|
||||
|
||||
// Start chop tree loop
|
||||
_counter = 0;
|
||||
@@ -29,7 +29,6 @@ if (!isNull _tree) then {
|
||||
_chanceResult = dayz_HarvestingChance call fn_chance;
|
||||
|
||||
while {_isOk} do {
|
||||
//setup alert and speak
|
||||
_dis=20;
|
||||
_sfx = "chopwood";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
@@ -37,8 +36,11 @@ if (!isNull _tree) then {
|
||||
|
||||
//play action
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
_weapons = weapons player;
|
||||
_weapons set [count _weapons,dayz_onBack];
|
||||
|
||||
if(!_finished) exitWith {
|
||||
//Make sure player did not drop hatchet
|
||||
if (!_finished or !("MeleeHatchet" in _weapons or ("ItemHatchet" in _weapons))) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = false;
|
||||
};
|
||||
@@ -56,6 +58,7 @@ if (!isNull _tree) then {
|
||||
} else {
|
||||
if (dayz_onBack == "MeleeHatchet") then {
|
||||
dayz_onBack = "";
|
||||
if (!isNull findDisplay 106) then {findDisplay 106 displayCtrl 1209 ctrlSetText "";};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -97,13 +100,8 @@ if (!isNull _tree) then {
|
||||
if !(_proceed) then {
|
||||
localize "str_player_24_Stoped" call dayz_rollingMessages;
|
||||
};
|
||||
//adding melee mags back if needed
|
||||
switch (primaryWeapon player) do {
|
||||
case "MeleeHatchet": {player addMagazine 'Hatchet_Swing';};
|
||||
case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
|
||||
case "MeleeMachete": {player addMagazine 'Machete_Swing';};
|
||||
case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
|
||||
};
|
||||
} else {
|
||||
localize "str_player_23" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_mineChance","_item","_dis","_sfx","_breaking","_counter","_rocks","_findNearestRock","_objName","_countOut","_isOk","_proceed","_finished","_itemOut"];
|
||||
private ["_mineChance","_item","_dis","_sfx","_breaking","_counter","_rocks","_findNearestRock","_objName","_countOut","_isOk","_proceed","_finished","_itemOut","_weapons"];
|
||||
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
@@ -30,20 +30,22 @@ if (!isNull _findNearestRock) then {
|
||||
_mineChance = dayz_HarvestingChance call fn_chance;
|
||||
|
||||
while {_isOk} do {
|
||||
//setup alert and speak
|
||||
_dis=20;
|
||||
_sfx = "minestone";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
_weapons = weapons player;
|
||||
_weapons set [count _weapons,dayz_onBack];
|
||||
|
||||
if(!_finished) exitWith {
|
||||
//Make sure player did not drop pickaxe
|
||||
if (!_finished or !("MeleePickaxe" in _weapons or ("ItemPickaxe" in _weapons))) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = false;
|
||||
};
|
||||
|
||||
if(_finished) then {
|
||||
if (_finished) then {
|
||||
["Working",0,[100,15,10,0]] call dayz_NutritionSystem;
|
||||
|
||||
_breaking = false;
|
||||
@@ -57,6 +59,7 @@ if (!isNull _findNearestRock) then {
|
||||
} else {
|
||||
if (dayz_onBack == "MeleePickaxe") then {
|
||||
dayz_onBack = "";
|
||||
if (!isNull findDisplay 106) then {findDisplay 106 displayCtrl 1209 ctrlSetText "";};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//new2
|
||||
5 addAction !raddAction !"\"addAction\", " !", \"\\z\\addons\\dayz_code\\" !"],DZE_build_vector_file,[vectorActionState,"
|
||||
5 addBackpack !"addBackpackCargoGlobal [_x,(_objWpnQty select _counter)];\n_counter = _counter + 1;\n} count _objWpnTypes;" !"addBackpack _item;\n};\n};\nformat[localize \"str_c" !"case 3: {_holder addBackpackCargoGlobal [_item,_amount];};\n};\n\n\n" !"}) then {\n_newUnit addBackpack _newBackpackType;\n\nd" !"(_this select 0)) then\n{\n(_this select 0) addBackpack (_x select 1);\n};\n};" !"(_this select 0) addBackpackCargoGlobal [_x select 1, 1];\n};\n};\n} cou" !"addBackpack _backpackType; \ndayz_myBackpack = unitBackpack player;\n\n\n\n_backpackWpnT" !"};\n} count _wpns;\n\nif (_bcpk != \"\") then {\nplayer addBackpack" !"1 == \"trade_backpacks\") then {\nDZE_myVehicle addBackpack" !"7 addBackpackCargoGlobal [_create,_qty];\n};\nif (surfaceIsWater" !"case 5: {_item addBackpackCargoGlobal [_itemOut,_countOut]};\n};\n} else"
|
||||
5 addMagazine !raddMagazine !"\"addMagazine\", " !"if (isClass (configfile >> \"cfgmagazines\" >> (_item))) then {_unit addMagazine _item;};\n};\n};\n};\n};" !"_vehicle addMagazineTurret [_ammo,_turret];\nplayer removeMagazine" !"if (dayz_actionInProgress) exitWith {" !"addMagazine _x;\n};\n} foreach _items;\nformat[loc" !"addMagazine 'Hatchet_Swing'" !"addMagazine \"ItemAntibiotic\" + str(_remain" !"sumeDrop\") == 0) then\n{\nplayer addMagazine" !"ion) do {\ncase \"CfgWeapons\":\n{\nplayer addWeapon _item;\n};\ncase \"CfgMagazines\":\n{\nplayer addMagazine" !"addMagazine [\"12Rnd_Quiver_Wood\",_qty_quiv" !" >> \"containerEmpty\")" !"plant) select 1;\n{\n_item addMagazine" !"addMagazineCargoGlobal [_itemtodrop,1];\n\nformat[localize \"str_f" !"addMagazine _attachment;\n\n\n(findDisplay 10" !"addMagazine getText (configFile >> \"CfgMagazines\" >> _x >> _water" !"};\n};\n\n\nswitch _type do {\ncase 1: {_holder addMagazine" !"do {\n_animalbody addMagazine _rawfoodtype" !"addMagazine _item;\n};\n};\n_idc = _idc" !"_newUnit addMagazine [_x select 0,_x select 1]" !"addMagazine _x } count MeleeMagazines;\n} e" !"_meleeNum < 1) then {\nplayer addMagazine" !"addMagazine _qtyRemaining;\n};\n};\ntrue" !"bag\";\n};\n};\n(_this select 0) addMagazine" !"addMagazineCargoGlobal [_item, 1];\nif (surfaceIsWater (_this s" !"addMagazine \"wholeBloodBagBNEG\";\n};\n};" !"_qty > 0) then {\n_firePlace addMagazine" !"ONEG\" }; \n};\ndayz_myBackpack addMagazine" !"addMagazine _x;\n_countmags = _countmags +1;\n};\n} count _gmag" !"E\"];\n_lootpile addMagazineCargoGlobal [\"TrapBear\", 1]" !"With\n{\nplayer addMagazine (_this select 1" !"lder addMagazineCargoGlobal [_x,(_objWpnQty select _counter)];\n_counter = _counter + 1;\n};\n} co" !"soldItem\"];\n{\n_object addMagazine" !"systemChat localize \"STR_EPOCH_TRADE_" !"if (_silver_1oz > 0) then {\nif (_silver_1oz == 1) then {\nplayer addMagazine"
|
||||
5 addMagazine !raddMagazine !"\"addMagazine\", " !"if (isClass (configfile >> \"cfgmagazines\" >> (_item))) then {_unit addMagazine _item;};\n};\n};\n};\n};" !"_vehicle addMagazineTurret [_ammo,_turret];\nplayer removeMagazine" !"if (dayz_actionInProgress) exitWith {" !"addMagazine _x;\n};\n} foreach _items;\nformat[loc" !"addMagazine \"ItemAntibiotic\" + str(_remain" !"sumeDrop\") == 0) then\n{\nplayer addMagazine" !"ion) do {\ncase \"CfgWeapons\":\n{\nplayer addWeapon _item;\n};\ncase \"CfgMagazines\":\n{\nplayer addMagazine" !"addMagazine [\"12Rnd_Quiver_Wood\",_qty_quiv" !" >> \"containerEmpty\")" !"plant) select 1;\n{\n_item addMagazine" !"addMagazineCargoGlobal [_itemtodrop,1];\n\nformat[localize \"str_f" !"addMagazine _attachment;\n\n\n(findDisplay 10" !"addMagazine getText (configFile >> \"CfgMagazines\" >> _x >> _water" !"};\n};\n\n\nswitch _type do {\ncase 1: {_holder addMagazine" !"do {\n_animalbody addMagazine _rawfoodtype" !"addMagazine _item;\n};\n};\n_idc = _idc" !"_newUnit addMagazine [_x select 0,_x select 1]" !"addMagazine _x } count MeleeMagazines;\n} e" !"_meleeNum < 1) then {\nplayer addMagazine" !"addMagazine _qtyRemaining;\n};\n};\ntrue" !"bag\";\n};\n};\n(_this select 0) addMagazine" !"addMagazineCargoGlobal [_item, 1];\nif (surfaceIsWater (_this s" !"addMagazine \"wholeBloodBagBNEG\";\n};\n};" !"_qty > 0) then {\n_firePlace addMagazine" !"ONEG\" }; \n};\ndayz_myBackpack addMagazine" !"addMagazine _x;\n_countmags = _countmags +1;\n};\n} count _gmag" !"E\"];\n_lootpile addMagazineCargoGlobal [\"TrapBear\", 1]" !"With\n{\nplayer addMagazine (_this select 1" !"lder addMagazineCargoGlobal [_x,(_objWpnQty select _counter)];\n_counter = _counter + 1;\n};\n} co" !"soldItem\"];\n{\n_object addMagazine" !"systemChat localize \"STR_EPOCH_TRADE_" !"if (_silver_1oz > 0) then {\nif (_silver_1oz == 1) then {\nplayer addMagazine"
|
||||
5 addWeapon !raddWeapon !"\"addWeapon\", " !"if (isClass (configfile >> \"cfgweapons\" >> (_item))) then {_unit addWeapon _item;}\nelse" !",0]] call dayz_NutritionSystem;\n" !"Remove) == 1}) then {\nplayer addWeapon _create;" !"Display 0;\n\n\nif (_weaponInUse) then\n{\n_muz" !"failChance) then {\nswitch (_selection) do {\ncase \"CfgWeapons\":\n{\nplayer addWeapon" !"addWeapon _fixedItem;\nformat[localize \"str_f" !"_wepcounts = (getWeaponCargo _plant) select 1;\n{\n_item addWeapon" !"addWeapon _repair;\n} else {\n\n[_repair" !"player addWeapon dayz_onBack\n] select 0;\n};\n\n" !"player addWeapon _addWeapon;\n\nif (vehicle player != player) then {\n_display = find" !"};\n};\n\n\nswitch _type do {\ncase 1: {_holder addMagazineCargoGlobal [_item,_amount];};\ncase 2: {_holder addWeapon" !"l fn_chance) then {\nplayer removeWeapon _x;\nplayer addWeapon _rem" !"else {\n_body addWeapon dayz_onBack;\n};\n};\n\n\n_infect" !"\" >> _x)) then {\nplayer addWeapon _x;\n};\n} count _wpns;\n};" !"lder addWeaponCargoGlobal [_x,(_objWpnQty select _counter)];\n_counter = _counter + 1;\n} co" !"WpnQtys = [];\nif (count _backpackWpn > 0) then {\n_backpackWpnTypes = _backpackWpn sel" !"addWeapon (\"Item\"+str(_remain)+\"Matchbox" !"{\nswitch (_x select 0) do\n{\ncase 2:\n{\n(_this select 0) addWeapon" !"E\"];\n_vehicle addWeaponCargoGlobal [_lootInfo select 1, 1" !"addWeaponCargoGlobal [_bcpkWpn, 1];\n};\n};\n};\n};" !"s;\n};\n\n\nplayer addWeapon \"Loot" !"With\n{\nplayer addWeapon (_this select 1" !"\") then {\n_newUnit addWeapon _secweapon;\n};\n\n" !"soldItem\"];\n{\n_object addWeapon" !"then {\nsystemChat format[localize \"STR_EPOCH_" !"DuplicateTool;\n} else {\nplayer addWeapon"
|
||||
5 allDead !"} count allDead;\n\n\nif (dayz_oldBodyCount > _bodyCount) then {"
|
||||
5 allGroups !"publicVariableServer \"PVDZ_Server_UpdateGroup\";\n};\n} count allGroups;"
|
||||
|
||||
Reference in New Issue
Block a user