mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Group sounds and zombie calls
dayz_zombieSpeak and player_alertZombies are called often together or should be. fnc_alertZombies groups them together and uses the given parameters. This streamlines and corrects the missing or incorrect calls from dayz_zombieSpeak or player_alertZombies.
This commit is contained in:
@@ -29,10 +29,7 @@ if !(_hastinitem) exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (_qty > 0) then {
|
if (_qty > 0) then {
|
||||||
_dis=10;
|
[player,(getPosATL player),10,"cook"] spawn fnc_alertZombies;
|
||||||
_sfx = "cook";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
private ["_rawmeat","_cookedmeat","_meat","_meatcooked","_text","_qty","_dis","_sfx","_finished"];
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_rawmeat","_cookedmeat","_meat","_meatcooked","_text","_qty","_finished"];
|
||||||
|
|
||||||
//diag_log ("Cook Enabled");
|
//diag_log ("Cook Enabled");
|
||||||
player removeAction s_player_cook;
|
player removeAction s_player_cook;
|
||||||
s_player_cook = -1;
|
s_player_cook = -1;
|
||||||
@@ -16,10 +18,7 @@ _finished = true;
|
|||||||
if (_meat in magazines player) then {
|
if (_meat in magazines player) then {
|
||||||
_text = getText (configFile >> "CfgMagazines" >> _meat >> "displayName");
|
_text = getText (configFile >> "CfgMagazines" >> _meat >> "displayName");
|
||||||
|
|
||||||
_dis=6;
|
[player,(getPosATL player),10,"cook"] spawn fnc_alertZombies;
|
||||||
_sfx = "cook";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {};
|
if (!_finished) exitWith {};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_item","_type","_hasHarvested","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_dis","_sfx","_qty","_string","_isZombie","_humanity","_finished"];
|
private ["_item","_type","_hasHarvested","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_qty","_string","_isZombie","_humanity","_finished"];
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
@@ -37,10 +37,7 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
|
|||||||
_isListed = isClass (configFile >> "CfgSurvival" >> "Meat" >> _type);
|
_isListed = isClass (configFile >> "CfgSurvival" >> "Meat" >> _type);
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
||||||
|
|
||||||
_dis=10;
|
[player,(getPosATL player),10,"gut"] spawn fnc_alertZombies;
|
||||||
_sfx = "gut";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {};
|
if (!_finished) exitWith {};
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
private ["_time","_vehicle","_removed","_vehType","_finished"];
|
|
||||||
_vehicle = _this select 3;
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_32" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_32" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_time","_vehicle","_removed","_vehType","_finished"];
|
||||||
|
_vehicle = _this select 3;
|
||||||
|
|
||||||
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
|
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
|
||||||
s_player_lockUnlock_crtl = 1;
|
s_player_lockUnlock_crtl = 1;
|
||||||
{DZE_myVehicle removeAction _x} count s_player_lockUnlockInside;s_player_lockUnlockInside = [];
|
{DZE_myVehicle removeAction _x} count s_player_lockUnlockInside;s_player_lockUnlockInside = [];
|
||||||
@@ -12,8 +12,7 @@ s_player_lockUnlockInside_ctrl = 1;
|
|||||||
_removed = ([player,"ItemHotwireKit",1] call BIS_fnc_invRemove);
|
_removed = ([player,"ItemHotwireKit",1] call BIS_fnc_invRemove);
|
||||||
|
|
||||||
if (_removed == 1) then {
|
if (_removed == 1) then {
|
||||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),40,"repair"] spawn fnc_alertZombies;
|
||||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {
|
if (!_finished) exitWith {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
private ["_qty","_dis","_sfx","_finished","_qty20","_qty5","_qty210","_magazines","_cursorTarget","_fuelAmount","_fuelNeeded"];
|
|
||||||
|
private ["_qty","_finished","_qty20","_qty5","_qty210","_magazines","_cursorTarget","_fuelAmount","_fuelNeeded"];
|
||||||
|
|
||||||
player removeAction s_player_fillfuel;
|
player removeAction s_player_fillfuel;
|
||||||
//s_player_fillfuel = -1;
|
//s_player_fillfuel = -1;
|
||||||
@@ -29,10 +30,7 @@ if (_fuelAmount < _fuelNeeded) then {format[localize "str_fill_notenough",typeOf
|
|||||||
if (_fuelAmount < 5 or (_fuelAmount < 20 && _qty5 == 0) or (_fuelAmount < 210 && (_qty5 == 0 && _qty20 == 0))) exitWith {dayz_actionInProgress = false;};
|
if (_fuelAmount < 5 or (_fuelAmount < 20 && _qty5 == 0) or (_fuelAmount < 210 && (_qty5 == 0 && _qty20 == 0))) exitWith {dayz_actionInProgress = false;};
|
||||||
|
|
||||||
if (_qty > 0) then {
|
if (_qty > 0) then {
|
||||||
_dis=5;
|
[player,(getPosATL player),20,"refuel"] spawn fnc_alertZombies;
|
||||||
_sfx = "refuel";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {};
|
if (!_finished) exitWith {};
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ _maintain = {
|
|||||||
if (_enoughMoney) then {
|
if (_enoughMoney) then {
|
||||||
|
|
||||||
closeDialog 1;
|
closeDialog 1;
|
||||||
[player,"repair",0,false,20] call dayz_zombieSpeak;
|
[player,(getPosATL player),DZE_maintainRange,"repair"] spawn fnc_alertZombies;
|
||||||
[player,DZE_maintainRange,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if !(_finished) exitWith {};
|
if !(_finished) exitWith {};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_finished","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild","_friendsArr"];
|
private ["_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_finished","_proceed","_counter","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild","_friendsArr"];
|
||||||
|
|
||||||
_pos = [player] call FNC_GetPos;
|
_pos = [player] call FNC_GetPos;
|
||||||
|
|
||||||
@@ -407,10 +407,7 @@ if (_canBuild select 0) then {
|
|||||||
while {_isOk} do {
|
while {_isOk} do {
|
||||||
format[localize "str_epoch_player_139",_text, (_counter + 1),_limit] call dayz_rollingMessages; //report how many steps are done out of total limit
|
format[localize "str_epoch_player_139",_text, (_counter + 1),_limit] call dayz_rollingMessages; //report how many steps are done out of total limit
|
||||||
|
|
||||||
_dis=20;
|
[player,(getPosATL player),40,"repair"] spawn fnc_alertZombies;
|
||||||
_sfx = "repair";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1,{player getVariable["combattimeout",0] >= diag_tickTime or DZE_cancelBuilding}] call fn_loopAction;
|
_finished = ["Medic",1,{player getVariable["combattimeout",0] >= diag_tickTime or DZE_cancelBuilding}] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ if (!isClass(_config) || {!isText(_config >> _attachment)}) exitWith
|
|||||||
_newWeapon = getText (_config >> _attachment);
|
_newWeapon = getText (_config >> _attachment);
|
||||||
_weaponInUse = (currentWeapon player == _weapon);
|
_weaponInUse = (currentWeapon player == _weapon);
|
||||||
|
|
||||||
[player,"attach_weap",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),10,"attach_weap"] spawn fnc_alertZombies;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_location","_pos","_dir","_classname","_item","_cancel","_reason","_finished","_dis","_sfx","_tmpbuilt","_onLadder","_text","_offset","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_distance","_classnametmp","_ghost","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_needNear","_vehicle","_inVehicle","_objHDiff","_isAllowedUnderGround","_canBuild","_friendsArr","_vector"];
|
private ["_location","_pos","_dir","_classname","_item","_cancel","_reason","_finished","_tmpbuilt","_onLadder","_text","_offset","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_distance","_classnametmp","_ghost","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_needNear","_vehicle","_inVehicle","_objHDiff","_isAllowedUnderGround","_canBuild","_friendsArr","_vector"];
|
||||||
|
|
||||||
_pos = [player] call FNC_GetPos;
|
_pos = [player] call FNC_GetPos;
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||||
@@ -326,10 +326,7 @@ if (_canBuild select 0) then {
|
|||||||
while {_isOk} do {
|
while {_isOk} do {
|
||||||
format[localize "str_epoch_player_139",_text, (_counter + 1),_limit] call dayz_rollingMessages;
|
format[localize "str_epoch_player_139",_text, (_counter + 1),_limit] call dayz_rollingMessages;
|
||||||
|
|
||||||
_dis=20;
|
[player,(getPosATL player),40,"repair"] spawn fnc_alertZombies;
|
||||||
_sfx = "repair";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1,{player getVariable["combattimeout",0] >= diag_tickTime or DZE_cancelBuilding}] call fn_loopAction;
|
_finished = ["Medic",1,{player getVariable["combattimeout",0] >= diag_tickTime or DZE_cancelBuilding}] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
DayZ Base Building Upgrades
|
DayZ Base Building Upgrades
|
||||||
Made for DayZ Epoch please ask permission to use/edit/distribute email vbawol@veteranbastards.com.
|
Made for DayZ Epoch please ask permission to use/edit/distribute email vbawol@veteranbastards.com.
|
||||||
*/
|
*/
|
||||||
private ["_location","_dir","_classname","_text","_object","_objectID","_objectUID","_newclassname","_refund","_obj","_upgrade","_objectCharacterID","_ownerID","_i","_invResult","_itemOut","_countOut","_abortInvAdd","_addedItems","_finished","_playerNear"];
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_48" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_48" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_location","_dir","_classname","_text","_object","_objectID","_objectUID","_newclassname","_refund","_obj","_upgrade","_objectCharacterID","_ownerID","_i","_invResult","_itemOut","_countOut","_abortInvAdd","_addedItems","_finished","_playerNear"];
|
||||||
|
|
||||||
player removeAction s_player_downgrade_build;
|
player removeAction s_player_downgrade_build;
|
||||||
s_player_downgrade_build = 1;
|
s_player_downgrade_build = 1;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ if ((count _upgrade) > 0) then {
|
|||||||
_newclassname = _upgrade select 0;
|
_newclassname = _upgrade select 0;
|
||||||
_refund = _upgrade select 1;
|
_refund = _upgrade select 1;
|
||||||
|
|
||||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
[player,(getPosATL player),40,"repair"] spawn fnc_alertZombies;
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {};
|
if (!_finished) exitWith {};
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
DayZ Base Building Maintenance
|
DayZ Base Building Maintenance
|
||||||
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 ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_objectCharacterID","_finished"];
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_classname","_missing","_proceed","_num_removed","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_finished"];
|
||||||
|
|
||||||
player removeAction s_player_maint_build;
|
player removeAction s_player_maint_build;
|
||||||
s_player_maint_build = 1;
|
s_player_maint_build = 1;
|
||||||
|
|
||||||
@@ -24,9 +24,6 @@ if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = fal
|
|||||||
// Get classname
|
// Get classname
|
||||||
_classname = typeOf _obj;
|
_classname = typeOf _obj;
|
||||||
|
|
||||||
// Find display name
|
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
|
||||||
|
|
||||||
// Find next maintain
|
// Find next maintain
|
||||||
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "maintainBuilding");
|
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "maintainBuilding");
|
||||||
|
|
||||||
@@ -48,7 +45,7 @@ _proceed = true;
|
|||||||
} forEach _requirements;
|
} forEach _requirements;
|
||||||
|
|
||||||
if (_proceed) then {
|
if (_proceed) then {
|
||||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
[player,(getPosATL player),40,"repair"] spawn fnc_alertZombies;
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {};
|
if (!_finished) exitWith {};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#define PILE_SEARCH_RADIUS 2
|
#define PILE_SEARCH_RADIUS 2
|
||||||
#define PILE_PLAYER_OFFSET [0,1,0]
|
#define PILE_PLAYER_OFFSET [0,1,0]
|
||||||
|
|
||||||
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output","_hungerCount","_thirstCount","_soundDistance"];
|
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output","_hungerCount","_thirstCount"];
|
||||||
|
|
||||||
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
||||||
|
|
||||||
@@ -108,8 +108,7 @@ if (_sound != "") then
|
|||||||
private ["_soundDistance"];
|
private ["_soundDistance"];
|
||||||
_soundDistance = getNumber (_cfg >> "consumeSoundDistance");
|
_soundDistance = getNumber (_cfg >> "consumeSoundDistance");
|
||||||
|
|
||||||
[player,_sound,0,false,_soundDistance] call dayz_zombieSpeak;
|
[player,(getPosATL player),_soundDistance,_sound] spawn fnc_alertZombies;
|
||||||
[player,_soundDistance,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//If item has a consumeOutput item defined add that to player
|
//If item has a consumeOutput item defined add that to player
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
private ["_item","_config","_pos","_onLadder","_create","_finished","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"];
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_item","_config","_pos","_onLadder","_create","_finished","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"];
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
_config = configFile >> "cfgWeapons" >> _item;
|
_config = configFile >> "cfgWeapons" >> _item;
|
||||||
|
|
||||||
@@ -26,8 +26,7 @@ call gear_ui_init;
|
|||||||
_hasTinBar = "ItemTinBar" in magazines player;
|
_hasTinBar = "ItemTinBar" in magazines player;
|
||||||
if (!_hasTinBar) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_59" call dayz_rollingMessages;};
|
if (!_hasTinBar) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_59" call dayz_rollingMessages;};
|
||||||
|
|
||||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"repair"] spawn fnc_alertZombies;
|
||||||
[player,50,true,_pos] spawn player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -121,8 +121,7 @@ if (_canDo) then {
|
|||||||
if (_proceed) then {
|
if (_proceed) then {
|
||||||
localize "str_epoch_player_62" call dayz_rollingMessages;
|
localize "str_epoch_player_62" call dayz_rollingMessages;
|
||||||
|
|
||||||
[player,_sfx,0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),50,_sfx] spawn fnc_alertZombies;
|
||||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,10 @@
|
|||||||
Foxy
|
Foxy
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output"];
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;};
|
||||||
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private "_cfg";
|
||||||
|
|
||||||
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
|
||||||
|
|
||||||
@@ -33,6 +36,9 @@ if ((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState p
|
|||||||
//player doesn't have the consumable item
|
//player doesn't have the consumable item
|
||||||
if (!(_this in magazines player)) exitWith { localize "str_misplaced_container" call dayz_rollingMessages; };
|
if (!(_this in magazines player)) exitWith { localize "str_misplaced_container" call dayz_rollingMessages; };
|
||||||
|
|
||||||
|
[player,(getPosATL player),5,"refuel"] spawn fnc_alertZombies;
|
||||||
|
player playActionNow "PutDown";
|
||||||
|
|
||||||
//Remove container
|
//Remove container
|
||||||
player removeMagazine _this;
|
player removeMagazine _this;
|
||||||
player addMagazine getText (_cfg >> "containerEmpty");
|
player addMagazine getText (_cfg >> "containerEmpty");
|
||||||
@@ -46,3 +52,5 @@ else
|
|||||||
{
|
{
|
||||||
(findDisplay 106) closeDisplay 0;
|
(findDisplay 106) closeDisplay 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dayz_actionInProgress = false;
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ _originalCount = getNumber (configFile >> "CfgVehicles" >> (typeOf _plant) >> "T
|
|||||||
if !([ [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] , [getMagazineCargo _plant, getWeaponCargo _plant] ] call BIS_fnc_areEqual) then {
|
if !([ [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] , [getMagazineCargo _plant, getWeaponCargo _plant] ] call BIS_fnc_areEqual) then {
|
||||||
//diag_log [ [getMagazineCargo _plant, getWeaponCargo _plant], "!=", [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] ];
|
//diag_log [ [getMagazineCargo _plant, getWeaponCargo _plant], "!=", [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] ];
|
||||||
_plant setVariable["Gathering",true]; // avoid multiple call because the fn_selfActions is called in an infinite loop
|
_plant setVariable["Gathering",true]; // avoid multiple call because the fn_selfActions is called in an infinite loop
|
||||||
[_this] spawn { // in background to be called after fn_selfActions
|
_plant spawn { // in background to be called after fn_selfActions
|
||||||
private ["_mags","_weps","_item","_magcounts","_wepcounts","_dis","_sfx"];
|
private ["_mags","_weps","_item","_magcounts","_wepcounts","_plant"];
|
||||||
_plant = _this select 0;
|
_plant = _this;
|
||||||
_mags = (getMagazineCargo _plant) select 0;
|
_mags = (getMagazineCargo _plant) select 0;
|
||||||
_weps = (getWeaponCargo _plant) select 0;
|
_weps = (getWeaponCargo _plant) select 0;
|
||||||
if (count _mags != 0 OR count _weps != 0) then { // if not empty
|
if (count _mags != 0 OR count _weps != 0) then { // if not empty
|
||||||
@@ -32,9 +32,6 @@ if !([ [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] , [getMagazineCargo _
|
|||||||
deleteVehicle _plant;
|
deleteVehicle _plant;
|
||||||
|
|
||||||
//Make some noise
|
//Make some noise
|
||||||
_dis=2;
|
[player,(getPosATL player),2,"tentpack"] spawn fnc_alertZombies;
|
||||||
_sfx = "tentpack";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -32,8 +32,7 @@ if (count _findNearestPlant >= 1) then {
|
|||||||
_isOk = true;
|
_isOk = true;
|
||||||
_proceed = false;
|
_proceed = false;
|
||||||
while {_isOk} do {
|
while {_isOk} do {
|
||||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
[player,(getPosATL player),20,"chopwood"] spawn fnc_alertZombies;
|
||||||
[player,"chopwood",0,false] call dayz_zombieSpeak;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool","_finished"];
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
_hasTool = "ItemCrowbar" in items player;
|
private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool","_finished"];
|
||||||
|
|
||||||
|
_hasTool = "ItemCrowbar" in items player;
|
||||||
if(!_hasTool) exitWith {
|
if(!_hasTool) exitWith {
|
||||||
localize "str_epoch_player_76" call dayz_rollingMessages;
|
localize "str_epoch_player_76" call dayz_rollingMessages;
|
||||||
dayz_actionInProgress = false;
|
dayz_actionInProgress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
_hasCrate = _item in magazines player;
|
_hasCrate = _item in magazines player;
|
||||||
if (!_hasCrate) exitWith {
|
if (!_hasCrate) exitWith {
|
||||||
localize "str_epoch_player_77" call dayz_rollingMessages;
|
localize "str_epoch_player_77" call dayz_rollingMessages;
|
||||||
dayz_actionInProgress = false;
|
dayz_actionInProgress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
_config = configFile >> "CfgMagazines" >> _item;
|
_config = configFile >> "CfgMagazines" >> _item;
|
||||||
_create_raw = getArray (_config >> "ItemActions" >> "CreateMags" >> "output");
|
_create_raw = getArray (_config >> "ItemActions" >> "CreateMags" >> "output");
|
||||||
_create = _create_raw select 0;
|
_create = _create_raw select 0;
|
||||||
_qty = _create_raw select 1;
|
_qty = _create_raw select 1;
|
||||||
_type = _create_raw select 2;
|
_type = _create_raw select 2;
|
||||||
@@ -27,6 +27,8 @@ if ((_location select 2) < 0) then {
|
|||||||
_location set [2,0];
|
_location set [2,0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[player,(getPosATL player),20,"repair"] spawn fnc_alertZombies;
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished or !(_item in magazines player)) exitWith {
|
if (!_finished or !(_item in magazines player)) exitWith {
|
||||||
dayz_actionInProgress = false;
|
dayz_actionInProgress = false;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_mineChance","_item","_dis","_sfx","_breaking","_counter","_rocks","_findNearestRock","_objName","_countOut","_isOk","_proceed","_finished","_itemOut","_weapons"];
|
private ["_mineChance","_breaking","_counter","_rocks","_findNearestRock","_objName","_countOut","_isOk","_proceed","_finished","_itemOut","_weapons"];
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
@@ -30,10 +30,7 @@ if (!isNull _findNearestRock) then {
|
|||||||
_mineChance = dayz_HarvestingChance call fn_chance;
|
_mineChance = dayz_HarvestingChance call fn_chance;
|
||||||
|
|
||||||
while {_isOk} do {
|
while {_isOk} do {
|
||||||
_dis=20;
|
[player,(getPosATL player),20,"minestone"] spawn fnc_alertZombies;
|
||||||
_sfx = "minestone";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
_weapons = weapons player;
|
_weapons = weapons player;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ if (!isClass(_newWeaponConfig) || {getText(_newWeaponConfig >> _attachment) != _
|
|||||||
|
|
||||||
_weaponInUse = (currentWeapon player == _weapon);
|
_weaponInUse = (currentWeapon player == _weapon);
|
||||||
|
|
||||||
[player,"detach_weap",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),10,"detach_weap"] spawn fnc_alertZombies;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_item","_use","_repair","_waterUsed","_displayName"];
|
private ["_item","_use","_repair","_waterUsed","_displayName","_finished"];
|
||||||
|
|
||||||
//['ItemKnifeBlunt','ItemKnife']
|
//['ItemKnifeBlunt','ItemKnife']
|
||||||
_item = _this select 0; //Item to be sharpened
|
_item = _this select 0; //Item to be sharpened
|
||||||
@@ -30,6 +30,7 @@ if !("equip_brick" IN magazines player) exitWith {
|
|||||||
dayz_actionInProgress = false;
|
dayz_actionInProgress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[player,(getPosATL player),5,"repair"] spawn fnc_alertZombies;
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
if (!_finished) exitWith {
|
if (!_finished) exitWith {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||||
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_result","_finished"];
|
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_result","_finished"];
|
||||||
|
|
||||||
_skin = _this;
|
_skin = _this;
|
||||||
@@ -9,11 +12,8 @@ _rounded = round _rnd;
|
|||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
|
||||||
dayz_actionInProgress = true;
|
|
||||||
|
|
||||||
//Tear the clothes
|
//Tear the clothes
|
||||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),10,"bandage"] spawn fnc_alertZombies;
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {
|
if (!_finished) exitWith {
|
||||||
dayz_actionInProgress = false;
|
dayz_actionInProgress = false;
|
||||||
|
|||||||
@@ -55,9 +55,11 @@ if ((count _upgrade) > 0) then {
|
|||||||
} forEach _requirements;
|
} forEach _requirements;
|
||||||
|
|
||||||
if (_proceed) then {
|
if (_proceed) then {
|
||||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
[player,(getPosATL player),25,"repair"] spawn fnc_alertZombies;
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (!_finished) exitWith {};
|
if (!_finished) exitWith {};
|
||||||
|
|
||||||
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
|
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
|
||||||
|
|
||||||
_temp_removed_array = [];
|
_temp_removed_array = [];
|
||||||
@@ -105,6 +107,7 @@ if ((count _upgrade) > 0) then {
|
|||||||
} forEach _requirements;
|
} forEach _requirements;
|
||||||
|
|
||||||
if (_tobe_removed_total == _removed_total) then {
|
if (_tobe_removed_total == _removed_total) then {
|
||||||
|
call player_forceSave;
|
||||||
_location = _obj getVariable["OEMPos",(getposATL _obj)];
|
_location = _obj getVariable["OEMPos",(getposATL _obj)];
|
||||||
_dir = getDir _obj;
|
_dir = getDir _obj;
|
||||||
_vector = [(vectorDir _obj),(vectorUp _obj)];
|
_vector = [(vectorDir _obj),(vectorUp _obj)];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_array","_cantype",
|
private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_array","_cantype",
|
||||||
"_emptycan","_finished","_type"];
|
"_emptycan","_finished","_type"];
|
||||||
|
|
||||||
_array = _this select 3;
|
_array = _this select 3;
|
||||||
@@ -20,10 +20,7 @@ if (fuel _vehicle == 1 || {!(_canType in magazines player)}) exitWith {dayz_acti
|
|||||||
|
|
||||||
player removeAction s_player_fillfuel + _capacity;
|
player removeAction s_player_fillfuel + _capacity;
|
||||||
|
|
||||||
_dis=5;
|
[player,(getPosATL player),25,"refuel"] spawn fnc_alertZombies;
|
||||||
_sfx = "refuel";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
|
||||||
dayz_actionInProgress = true;
|
|
||||||
/*
|
/*
|
||||||
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 ["_plotcheck","_PlayerNear","_isMine","_obj","_objectID","_objectUID","_finished","_isOk","_proceed","_counter","_limit","_objType","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_isWreckBuilding","_nameVehicle","_isModular","_success","_lootGroupIndex","_output"];
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_type","_plotcheck","_PlayerNear","_isMine","_obj","_objectID","_objectUID","_finished","_isOk","_proceed","_counter","_limit","_objType","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_isWreckBuilding","_nameVehicle","_isModular","_success","_lootGroupIndex","_output"];
|
||||||
|
|
||||||
player removeAction s_player_deleteBuild;
|
player removeAction s_player_deleteBuild;
|
||||||
s_player_deleteBuild = 1;
|
s_player_deleteBuild = 1;
|
||||||
@@ -23,8 +24,8 @@ if (DZE_permanentPlot) then {
|
|||||||
|
|
||||||
if (_obj getVariable ["GeneratorRunning", false]) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
|
if (_obj getVariable ["GeneratorRunning", false]) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
|
||||||
|
|
||||||
_objectID = _obj getVariable ["ObjectID","0"];
|
_objectID = _obj getVariable ["ObjectID","0"];
|
||||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||||
|
|
||||||
_isOk = true;
|
_isOk = true;
|
||||||
_proceed = false;
|
_proceed = false;
|
||||||
@@ -93,7 +94,8 @@ while {_isOk} do {
|
|||||||
|
|
||||||
format[localize "str_epoch_player_163",_nameVehicle,(_counter + 1),_limit] call dayz_rollingMessages;
|
format[localize "str_epoch_player_163",_nameVehicle,(_counter + 1),_limit] call dayz_rollingMessages;
|
||||||
|
|
||||||
[player,"repair",0,false,20] call dayz_zombieSpeak;
|
[player,(getPosATL player),25,"repair"] spawn fnc_alertZombies;
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
if(!_finished) exitWith {
|
if(!_finished) exitWith {
|
||||||
@@ -176,20 +178,20 @@ if (_proceed && _success) then {
|
|||||||
_selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]];
|
_selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]];
|
||||||
} else {
|
} else {
|
||||||
if(_isWreckBuilding) then {
|
if(_isWreckBuilding) then {
|
||||||
switch true do {
|
call {
|
||||||
case (_isMine): {
|
if (_isMine) exitwith {
|
||||||
_lootGroupIndex = dz_loot_groups find _objType;
|
_lootGroupIndex = dz_loot_groups find _objType;
|
||||||
_output = [_lootGroupIndex,3] call dz_fn_loot_select;
|
_output = [_lootGroupIndex,3] call dz_fn_loot_select;
|
||||||
|
|
||||||
{_selectedRemoveOutput set [count _selectedRemoveOutput, [_x select 1,[_x select 2,_x select 3]]]} forEach _output;
|
{_selectedRemoveOutput set [count _selectedRemoveOutput, [_x select 1,[_x select 2,_x select 3]]]} forEach _output;
|
||||||
};
|
};
|
||||||
case (_objType == "Land_ammo_supply_wreck"): {
|
if (_objType == "Land_ammo_supply_wreck") exitwith {
|
||||||
_lootGroupIndex = dz_loot_groups find _objType;
|
_lootGroupIndex = dz_loot_groups find _objType;
|
||||||
_output = [_lootGroupIndex,5] call dz_fn_loot_select;
|
_output = [_lootGroupIndex,5] call dz_fn_loot_select;
|
||||||
|
|
||||||
{_selectedRemoveOutput set [count _selectedRemoveOutput, [_x select 1,1,_x select 0]]} forEach _output;
|
{_selectedRemoveOutput set [count _selectedRemoveOutput, [_x select 1,1,_x select 0]]} forEach _output;
|
||||||
};
|
};
|
||||||
default {_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput")};
|
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if ({_objType in _x} count DZE_modularConfig > 0) then {
|
if ({_objType in _x} count DZE_modularConfig > 0) then {
|
||||||
@@ -249,10 +251,11 @@ if (_proceed && _success) then {
|
|||||||
_countOut = round((random (_countOut select 1)) max (_countOut select 0));
|
_countOut = round((random (_countOut select 1)) max (_countOut select 0));
|
||||||
};
|
};
|
||||||
if (count _x > 2) then {
|
if (count _x > 2) then {
|
||||||
switch (_x select 2) do {
|
_type = _x select 2;
|
||||||
case 2: {_item addWeaponCargoGlobal [_itemOut,_countOut]};
|
call {
|
||||||
case 3: {_item addMagazineCargoGlobal [_itemOut,_countOut]};
|
if (_type == 2) exitwith {_item addWeaponCargoGlobal [_itemOut,_countOut]};
|
||||||
case 5: {_item addBackpackCargoGlobal [_itemOut,_countOut]}; // Needs to make sure object can handle Backpacks or will dump on the ground.
|
if (_type == 3) exitwith {_item addMagazineCargoGlobal [_itemOut,_countOut]};
|
||||||
|
if (_type == 5) exitwith {_item addBackpackCargoGlobal [_itemOut,_countOut]}; // Needs to make sure object can handle Backpacks or will dump on the ground.
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_id","_hits","_array","_vehicle","_part","_hitpoint","_type","_nameType","_namePart","_damage","_selection","_dis","_sfx","_finished"];
|
private ["_id","_hits","_array","_vehicle","_part","_hitpoint","_type","_nameType","_namePart","_damage","_selection","_finished"];
|
||||||
|
|
||||||
_id = _this select 2;
|
_id = _this select 2;
|
||||||
_array = _this select 3;
|
_array = _this select 3;
|
||||||
@@ -20,10 +20,7 @@ _nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
|
|||||||
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
||||||
|
|
||||||
if ("ItemToolbox" in items player && {_part in magazines player}) then {
|
if ("ItemToolbox" in items player && {_part in magazines player}) then {
|
||||||
_dis=20;
|
[player,(getPosATL player),30,"repair"] spawn fnc_alertZombies;
|
||||||
_sfx = "repair";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ dayz_actionInProgress = true;
|
|||||||
private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_finished","_hasToolbox","_nameType","_namePart","_damage","_BreakableParts","_selection","_wpn","_hits","_ismelee"];
|
private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_finished","_hasToolbox","_nameType","_namePart","_damage","_BreakableParts","_selection","_wpn","_hits","_ismelee"];
|
||||||
|
|
||||||
_array = _this select 3;
|
_array = _this select 3;
|
||||||
_vehicle = _array select 0;
|
_vehicle = _array select 0;
|
||||||
_part = _array select 1;
|
_part = _array select 1;
|
||||||
_hitpoint = _array select 2;
|
_hitpoint = _array select 2;
|
||||||
_type = typeOf _vehicle;
|
_type = typeOf _vehicle;
|
||||||
_isOK = false;
|
_isOK = false;
|
||||||
@@ -22,8 +22,7 @@ s_player_repair_crtl = 1;
|
|||||||
if (_hasToolbox) then {
|
if (_hasToolbox) then {
|
||||||
if ([_vehicle] call DZE_SafeZonePosCheck) exitWith {(localize "str_salvage_safezone") call dayz_rollingMessages;};
|
if ([_vehicle] call DZE_SafeZonePosCheck) exitWith {(localize "str_salvage_safezone") call dayz_rollingMessages;};
|
||||||
|
|
||||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),50,"repair"] spawn fnc_alertZombies;
|
||||||
[player,50,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
private ["_vehicle","_curFuel","_newFuel","_finished","_location1","_location2","_abort",
|
|
||||||
"_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText",
|
|
||||||
"_availableCansEmpty","_hasHose","_PlayerNear"];
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||||
dayz_actionInProgress = true;
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
|
private ["_vehicle","_curFuel","_newFuel","_finished","_location1","_location2","_abort",
|
||||||
|
"_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText",
|
||||||
|
"_hasHose","_PlayerNear"];
|
||||||
|
|
||||||
_vehicle = _this select 3;
|
_vehicle = _this select 3;
|
||||||
player removeAction s_player_siphonfuel;
|
player removeAction s_player_siphonfuel;
|
||||||
_hasHose = "equip_hose" in magazines player;
|
_hasHose = "equip_hose" in magazines player;
|
||||||
@@ -44,8 +44,7 @@ _nameText = getText(_configVeh >> "displayName");
|
|||||||
if (_newFuel > 0) then {
|
if (_newFuel > 0) then {
|
||||||
format[localize "str_siphon_preparing",_canTypeEmpty] call dayz_rollingMessages;
|
format[localize "str_siphon_preparing",_canTypeEmpty] call dayz_rollingMessages;
|
||||||
_finished = false;
|
_finished = false;
|
||||||
|
[player,(getPosATL player),20,"refuel"] spawn fnc_alertZombies;
|
||||||
[player,20,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
if (!dayz_isSwimming) then {
|
if (!dayz_isSwimming) then {
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ _posATL = ASLtoATL _posASL;
|
|||||||
//"Land_water_tank" has no spout or opening, doesn't make sense to include
|
//"Land_water_tank" has no spout or opening, doesn't make sense to include
|
||||||
_wells = ["Land_pumpa","Land_Barrel_water","Land_Misc_Well_C_EP1","Land_Misc_Well_L_EP1","land_smd_water_pump"];
|
_wells = ["Land_pumpa","Land_Barrel_water","Land_Misc_Well_C_EP1","Land_Misc_Well_L_EP1","land_smd_water_pump"];
|
||||||
|
|
||||||
_canFill = switch true do {
|
_canFill = call {
|
||||||
//Return: [nearWaterHole, isPond]
|
//Return: [nearWaterHole, isPond]
|
||||||
case (count nearestObjects [_posATL,_wells,4] > 0): {[true,false]};
|
if (count nearestObjects [_posATL,_wells,4] > 0) exitwith {[true,false]};
|
||||||
case (toLower worldName in ["chernarus","namalsk","napf"]): {(call fn_nearWaterHole)};
|
if (toLower worldName in ["chernarus","namalsk","napf"]) exitwith {(call fn_nearWaterHole)};
|
||||||
//Slow searches for maps without waterHoleProxy objects added yet
|
//Slow searches for maps without waterHoleProxy objects added yet
|
||||||
case ({["_well",str _x] call fnc_inString} count nearestObjects [_posATL,[],4] > 0): {[true,false]};
|
if ({["_well",str _x] call fnc_inString} count nearestObjects [_posATL,[],4] > 0) exitwith {[true,false]};
|
||||||
case ({["pond",str _x] call fnc_inString && {_posASL select 2 < ((getPosASL _x) select 2)}} count nearestObjects [player,[],50] > 0): {[true,true]};
|
if ({["pond",str _x] call fnc_inString && {_posASL select 2 < ((getPosASL _x) select 2)}} count nearestObjects [player,[],50] > 0) exitwith {[true,true]};
|
||||||
default {[false,false]};
|
[false,false];
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_canFill select 0) exitWith {
|
if !(_canFill select 0) exitWith {
|
||||||
@@ -59,8 +59,7 @@ if (!dayz_isSwimming) then {
|
|||||||
|
|
||||||
if (_drinking) then {
|
if (_drinking) then {
|
||||||
["FoodDrink",0,[0,0,_recover,0]] call dayz_NutritionSystem; //[Energy,food,water,temp]
|
["FoodDrink",0,[0,0,_recover,0]] call dayz_NutritionSystem; //[Energy,food,water,temp]
|
||||||
[player,"drink",0,false,5] call dayz_zombieSpeak;
|
[player,_posATL,10,"drink"] spawn fnc_alertZombies;
|
||||||
[player,10,true,_posATL] call player_alertZombies;
|
|
||||||
|
|
||||||
if (_water == "containerwaterinfected") then {
|
if (_water == "containerwaterinfected") then {
|
||||||
r_player_infected = true;
|
r_player_infected = true;
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ if (!isNull _obj) then {
|
|||||||
[_lockedClass,objNull] call fn_waitForObject;
|
[_lockedClass,objNull] call fn_waitForObject;
|
||||||
|
|
||||||
if (_lockedClass == "LockboxStorageLocked") then {
|
if (_lockedClass == "LockboxStorageLocked") then {
|
||||||
[player,"lockboxclose",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"lockboxclose"] spawn fnc_alertZombies;
|
||||||
} else {
|
} else {
|
||||||
[player,"safeclose",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"safeclose"] spawn fnc_alertZombies;
|
||||||
};
|
};
|
||||||
|
|
||||||
_code = [_obj getVariable["CharacterID","0"],dayz_combination] select (_ComboMatch);
|
_code = [_obj getVariable["CharacterID","0"],dayz_combination] select (_ComboMatch);
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] || {_typeOf in _campItems}) th
|
|||||||
_dir = direction _obj;
|
_dir = direction _obj;
|
||||||
_pos = getPosATL _obj;
|
_pos = getPosATL _obj;
|
||||||
|
|
||||||
[player,"tentpack",0,false,20] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"tentpack"] spawn fnc_alertZombies;
|
||||||
[player,20,true,getPosATL player] call player_alertZombies;
|
|
||||||
|
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _typeOf >> "displayName");
|
_text = getText (configFile >> "CfgVehicles" >> _typeOf >> "displayName");
|
||||||
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
|
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = fal
|
|||||||
if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_119",_text] call dayz_rollingMessages;};
|
if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_119",_text] call dayz_rollingMessages;};
|
||||||
|
|
||||||
if (isNull _obj && {!alive _obj}) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
|
if (isNull _obj && {!alive _obj}) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
|
||||||
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"tentpack"] spawn fnc_alertZombies;
|
||||||
|
|
||||||
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
|
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ if (!isNull dayz_selectedDoor) then {
|
|||||||
publicVariableServer "PVDZE_handleSafeGear";
|
publicVariableServer "PVDZE_handleSafeGear";
|
||||||
|
|
||||||
DZE_Lock_Door = "";
|
DZE_Lock_Door = "";
|
||||||
[player,"combo_locked",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"combo_locked"] spawn fnc_alertZombies;
|
||||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
if (_doorMethod == "Eye") then {
|
if (_doorMethod == "Eye") then {
|
||||||
localize "STR_EPOCH_DOORACCESS_FAILURE" call dayz_rollingMessages;
|
localize "STR_EPOCH_DOORACCESS_FAILURE" call dayz_rollingMessages;
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ if (_ComboMatch || (_ownerID == dayz_playerUID)) then {
|
|||||||
[_unlockedClass,objNull] call fn_waitForObject;
|
[_unlockedClass,objNull] call fn_waitForObject;
|
||||||
|
|
||||||
if (_unlockedClass == "LockboxStorage") then {
|
if (_unlockedClass == "LockboxStorage") then {
|
||||||
[player,"lockboxopen",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"lockboxopen"] spawn fnc_alertZombies;
|
||||||
} else {
|
} else {
|
||||||
[player,"safeopen",0,false] call dayz_zombieSpeak;
|
[player,(getPosATL player),20,"safeopen"] spawn fnc_alertZombies;
|
||||||
};
|
};
|
||||||
|
|
||||||
_code = [_obj getVariable["CharacterID","0"],dayz_combination] select (_ComboMatch);
|
_code = [_obj getVariable["CharacterID","0"],dayz_combination] select (_ComboMatch);
|
||||||
|
|||||||
@@ -208,6 +208,18 @@ if (!isDedicated) then {
|
|||||||
// Advanced trading default inits for maintaining, Advanced Trading and custom scripts to utilize gem based currency.
|
// Advanced trading default inits for maintaining, Advanced Trading and custom scripts to utilize gem based currency.
|
||||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\AdvancedTrading\defaultInit.sqf";
|
call compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\AdvancedTrading\defaultInit.sqf";
|
||||||
|
|
||||||
|
fnc_alertZombies = {
|
||||||
|
private ["_unit","_pos","_dis","_sfx"];
|
||||||
|
|
||||||
|
_unit = _this select 0;
|
||||||
|
_pos = _this select 1;
|
||||||
|
_dis = _this select 2;
|
||||||
|
_sfx = _this select 3;
|
||||||
|
|
||||||
|
[_unit,_sfx,0,false,_dis] spawn dayz_zombieSpeak;
|
||||||
|
[_unit,_dis,true,_pos] spawn player_alertZombies;
|
||||||
|
};
|
||||||
|
|
||||||
dayz_losChance = {
|
dayz_losChance = {
|
||||||
private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
|
private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
|
||||||
_agent = _this select 0;
|
_agent = _this select 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user