mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-15 12:42:57 +03:00
1.0.1.94 DEV BUILD
This commit is contained in:
@@ -53,7 +53,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
|
||||
_inPain = _unit getVariable ["USEC_inPain", false];
|
||||
_legsBroke = _unit getVariable ["hit_legs", 0] >= 1;
|
||||
_armsBroke = _unit getVariable ["hit_hands", 0] >= 1;
|
||||
_charID = _unit getVariable ["characterID", 0];
|
||||
_charID = _unit getVariable ["CharacterID", 0];
|
||||
_friendlies = player getVariable ["friendlies", []];
|
||||
_playerMagazines = magazines player;
|
||||
_hasBandage = "ItemBandage" in _playerMagazines;
|
||||
|
||||
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil"];
|
||||
private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE"];
|
||||
|
||||
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
|
||||
|
||||
@@ -37,19 +37,14 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
|
||||
s_player_removeflare = -1;
|
||||
};
|
||||
|
||||
if(dayz_playerUID == "4560582") then {
|
||||
hint str(typeOf cursorTarget);
|
||||
if(dayz_playerUID == "4854208") then {
|
||||
// hint str(typeOf cursorTarget);
|
||||
if (s_player_debuglootpos < 0) then {
|
||||
s_player_debuglootpos = player addAction ["Save to arma2.rpt", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["start"], 99, false, true, "",""];
|
||||
s_player_debuglootpos1 = player addAction ["Raise Z", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["up"], 99, false, true, "",""];
|
||||
s_player_debuglootpos2 = player addAction ["Lower Z", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["down"], 99, false, true, "",""];
|
||||
s_player_debuglootpos3 = player addAction ["Raise Z", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["up_small"], 99, false, true, "",""];
|
||||
s_player_debuglootpos4 = player addAction ["Lower Z", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["down_small"], 99, false, true, "",""];
|
||||
Base_Z_height = 0.5;
|
||||
s_player_debuglootpos = player addAction [ "GCam", "gcam\gcam.sqf" ];
|
||||
// handle = [] execVM "gcam\gcam.sqf";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if(_isPZombie) then {
|
||||
if (s_player_callzombies < 0) then {
|
||||
s_player_callzombies = player addAction ["Raise Horde", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false, "",""];
|
||||
@@ -89,10 +84,10 @@ if(_isAir or _isShip) then {
|
||||
};
|
||||
|
||||
if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cursorTarget < _allowedDistance) and _canDo) then { //Has some kind of target
|
||||
|
||||
|
||||
// set cursortarget to variable
|
||||
_cursorTarget = cursorTarget;
|
||||
|
||||
|
||||
// get typeof cursortarget once
|
||||
_typeOfCursorTarget = typeOf _cursorTarget;
|
||||
|
||||
@@ -131,7 +126,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
_isMan = _cursorTarget isKindOf "Man";
|
||||
_traderType = _typeOfCursorTarget;
|
||||
_ownerID = _cursorTarget getVariable ["characterID","0"];
|
||||
_ownerID = _cursorTarget getVariable ["CharacterID","0"];
|
||||
_isAnimal = _cursorTarget isKindOf "Animal";
|
||||
_isDog = (_cursorTarget isKindOf "DZ_Pastor" || _cursorTarget isKindOf "DZ_Fin");
|
||||
_isZombie = _cursorTarget isKindOf "zZombie_base";
|
||||
@@ -385,19 +380,19 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
|
||||
//Allow owner to unlock vault
|
||||
if((_typeOfCursorTarget == "VaultStorageLocked" or _typeOfCursorTarget == "VaultStorage") and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
|
||||
if((_typeOfCursorTarget in DZE_LockableStorage) and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
|
||||
if (s_player_unlockvault < 0) then {
|
||||
if(_typeOfCursorTarget == "VaultStorageLocked") then {
|
||||
if(_typeOfCursorTarget in DZE_LockedStorage) then {
|
||||
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID) then {
|
||||
_combi = player addAction ["Open Safe", "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
_combi = player addAction [format["Open %1",_text], "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
} else {
|
||||
_combi = player addAction ["Unlock Safe", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
_combi = player addAction [format["Unlock %1",_text], "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
s_player_combi set [count s_player_combi,_combi];
|
||||
s_player_unlockvault = 1;
|
||||
} else {
|
||||
if(_ownerID != dayz_combination and _ownerID != dayz_playerUID) then {
|
||||
_combi = player addAction ["Enter Combo", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
_combi = player addAction ["Re-Enter Combination", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
s_player_combi set [count s_player_combi,_combi];
|
||||
s_player_unlockvault = 1;
|
||||
};
|
||||
@@ -409,15 +404,15 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
|
||||
//Allow owner to pack vault
|
||||
if(_typeOfCursorTarget == "VaultStorage" and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
|
||||
if(_typeOfCursorTarget in DZE_UnLockedStorage and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
|
||||
|
||||
if (s_player_lockvault < 0) then {
|
||||
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID) then {
|
||||
s_player_lockvault = player addAction ["Lock Safe", "\z\addons\dayz_code\actions\vault_lock.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
s_player_lockvault = player addAction [format["Lock %1",_text], "\z\addons\dayz_code\actions\vault_lock.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
};
|
||||
if (s_player_packvault < 0 and (_ownerID == dayz_combination or _ownerID == dayz_playerUID)) then {
|
||||
s_player_packvault = player addAction ["<t color='#ff0000'>Pack Safe</t>", "\z\addons\dayz_code\actions\vault_pack.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
s_player_packvault = player addAction [format["<t color='#ff0000'>Pack %1</t>",_text], "\z\addons\dayz_code\actions\vault_pack.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_packvault;
|
||||
@@ -479,6 +474,44 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_fuelauto2 = -1;
|
||||
};
|
||||
|
||||
|
||||
if ((_cursorTarget isKindOf "ModularItems") or (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base")) then {
|
||||
if ((s_player_lastTarget select 0) != _cursorTarget) then {
|
||||
if (s_player_upgrade_build > 0) then {
|
||||
player removeAction s_player_upgrade_build;
|
||||
s_player_upgrade_build = -1;
|
||||
};
|
||||
};
|
||||
if (s_player_upgrade_build < 0) then {
|
||||
// s_player_lastTarget = _cursorTarget;
|
||||
s_player_lastTarget set [0,_cursorTarget];
|
||||
s_player_upgrade_build = player addAction [format["Upgrade %1",_text], "\z\addons\dayz_code\actions\player_upgrade.sqf",_cursorTarget, -1, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_upgrade_build;
|
||||
s_player_upgrade_build = -1;
|
||||
};
|
||||
|
||||
|
||||
// inplace maintenance tool
|
||||
if((_isDestructable or _cursorTarget isKindOf "ModularItems" or _cursorTarget isKindOf "DZE_Housebase")) then {
|
||||
if ((s_player_lastTarget select 1) != _cursorTarget) then {
|
||||
if (s_player_maint_build > 0) then {
|
||||
player removeAction s_player_maint_build;
|
||||
s_player_maint_build = -1;
|
||||
};
|
||||
};
|
||||
|
||||
if (s_player_maint_build < 0) then {
|
||||
s_player_lastTarget set [1,_cursorTarget];
|
||||
s_player_maint_build = player addAction [format["Maintain %1",_text], "\z\addons\dayz_code\actions\player_buildingMaint.sqf",_cursorTarget, -2, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_maint_build;
|
||||
s_player_maint_build = -1;
|
||||
};
|
||||
|
||||
|
||||
//Start Generator
|
||||
if(_cursorTarget isKindOf "Generator_DZ") then {
|
||||
if (s_player_fillgen < 0) then {
|
||||
@@ -659,6 +692,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
|
||||
|
||||
dayz_myCursorTarget = objNull;
|
||||
s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
@@ -722,6 +756,10 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_information = -1;
|
||||
player removeAction s_player_fillgen;
|
||||
s_player_fillgen = -1;
|
||||
player removeAction s_player_upgrade_build;
|
||||
s_player_upgrade_build = -1;
|
||||
player removeAction s_player_maint_build;
|
||||
s_player_maint_build = -1;
|
||||
player removeAction s_player_towing;
|
||||
s_player_towing = -1;
|
||||
player removeAction s_player_fuelauto;
|
||||
@@ -737,7 +775,7 @@ _dogHandle = player getVariable ["dogID", 0];
|
||||
if (_dogHandle > 0) then {
|
||||
_dog = _dogHandle getFSMVariable "_dog";
|
||||
_ownerID = "0";
|
||||
if (!isNull cursorTarget) then { _ownerID = cursorTarget getVariable ["characterID","0"]; };
|
||||
if (!isNull cursorTarget) then { _ownerID = cursorTarget getVariable ["CharacterID","0"]; };
|
||||
if (_canDo and !_inVehicle and alive _dog and _ownerID != dayz_characterID) then {
|
||||
if (s_player_movedog < 0) then {
|
||||
s_player_movedog = player addAction [localize "str_actions_movedog", "\z\addons\dayz_code\actions\dog\move.sqf", player getVariable ["dogID", 0], 1, false, true, "", ""];
|
||||
|
||||
@@ -19,6 +19,7 @@ _num = switch (_type) do {
|
||||
case "dog_bark": {4};
|
||||
case "dog_growl": {3};
|
||||
case "dog_qq": {2};
|
||||
case "keypad_tick": {2};
|
||||
};
|
||||
|
||||
if (count _this > 4) then {
|
||||
|
||||
63
SQF/dayz_code/compile/player_changeCombo.sqf
Normal file
63
SQF/dayz_code/compile/player_changeCombo.sqf
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Change UI image
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_result","_control","_directon","_name","_PubVar","_display"];
|
||||
|
||||
_control = _this select 0;
|
||||
_directon = _this select 1;
|
||||
_name = _this select 2;
|
||||
|
||||
_pubVar = 0;
|
||||
|
||||
switch (_name) do {
|
||||
|
||||
case "top": {
|
||||
_pubVar = DZE_topCombo;
|
||||
};
|
||||
case "mid": {
|
||||
_pubVar = DZE_midCombo;
|
||||
};
|
||||
case "bot": {
|
||||
_pubVar = DZE_botCombo;
|
||||
};
|
||||
};
|
||||
|
||||
if (_directon == 1) then {
|
||||
|
||||
if(_PubVar == 9) then {
|
||||
_result = 0;
|
||||
} else {
|
||||
_result = _pubVar + 1;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
if(_PubVar == 0) then {
|
||||
_result = 9;
|
||||
} else {
|
||||
_result = _pubVar - 1;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
_display = findDisplay 41144;
|
||||
_control = _display displayCtrl _control;
|
||||
_control ctrlSetText format["\z\addons\dayz_epoch\ui\%1_%2.paa",_name,_result];
|
||||
|
||||
[player,"combo_tick",0,false] call dayz_zombieSpeak;
|
||||
|
||||
switch (_name) do {
|
||||
|
||||
case "top": {
|
||||
DZE_topCombo = _result;
|
||||
};
|
||||
case "mid": {
|
||||
DZE_midCombo = _result;
|
||||
};
|
||||
case "bot": {
|
||||
DZE_botCombo = _result;
|
||||
};
|
||||
};
|
||||
|
||||
DZE_Lock_Door = format["%1%2%3",DZE_topCombo,DZE_midCombo,DZE_botCombo];
|
||||
@@ -1,5 +1,5 @@
|
||||
private ["_charID","_friendlies","_rcharID","_rfriendlyTo","_tag","_player","_newTagList","_position","_rfriendlies","_tagList","_statusNew","_tagColor","_humanity","_status","_everyone"];
|
||||
_charID = player getVariable ["characterID", "0"];
|
||||
_charID = player getVariable ["CharacterID", "0"];
|
||||
_friendlies = player getVariable ["friendlies", []];
|
||||
_everyone = player getVariable ["everyone", []];
|
||||
_tagList = player getVariable ["tagList", []];
|
||||
@@ -7,7 +7,7 @@ _tagList = player getVariable ["tagList", []];
|
||||
// create tags
|
||||
{
|
||||
if (isPlayer _x and player != _x) then {
|
||||
_rcharID = _x getVariable ["characterID", "0"];
|
||||
_rcharID = _x getVariable ["CharacterID", "0"];
|
||||
if(!(_rcharID in _everyone)) then {
|
||||
|
||||
// Track who has tags
|
||||
@@ -62,7 +62,7 @@ _newTagList = [];
|
||||
|
||||
if (_status != "green") then {
|
||||
//diag_log format["CHECK IF FRIENDLY: %1", _player];
|
||||
_rcharID = _player getVariable ["characterID", "0"];
|
||||
_rcharID = _player getVariable ["CharacterID", "0"];
|
||||
_rfriendlies = _player getVariable ["friendlies", []];
|
||||
_rfriendlyTo = _player getVariable ["friendlyTo", []];
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ player setVariable["zombieKills",_zombieKills,true];
|
||||
player setVariable["headShots",_headShots,true];
|
||||
player setVariable["humanKills",_humanKills,true];
|
||||
player setVariable["banditKills",_banditKills,true];
|
||||
player setVariable["characterID",_charID,true];
|
||||
player setVariable["CharacterID",_charID,true];
|
||||
player setVariable["worldspace",_worldspace,true];
|
||||
player setVariable["friendlies",_friendlies,true];
|
||||
player setVariable["tagList",_tagList,true];
|
||||
|
||||
39
SQF/dayz_code/compile/player_unlockDoor.sqf
Normal file
39
SQF/dayz_code/compile/player_unlockDoor.sqf
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
DayZ Unlock Door
|
||||
Usage: [_obj] call player_unlockDoor;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_ok"];
|
||||
|
||||
if(!isNull dayz_selectedDoor) then {
|
||||
|
||||
// our target
|
||||
_obj = dayz_selectedDoor;
|
||||
|
||||
// get object combination
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
// Check combination
|
||||
if (DZE_Lock_Door == _objectCharacterID) then {
|
||||
|
||||
[player,"combo_unlock",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// close display
|
||||
_display = findDisplay 41144;
|
||||
_display closeDisplay 3000;
|
||||
|
||||
// unlock if locked
|
||||
if(_obj animationPhase "Open_hinge" == 0) then {
|
||||
_obj animate ["Open_hinge", 1];
|
||||
};
|
||||
|
||||
} else {
|
||||
DZE_Lock_Door = "";
|
||||
[player,"combo_locked",0,false] call dayz_zombieSpeak;
|
||||
};
|
||||
} else {
|
||||
|
||||
// close display since no target
|
||||
_display = findDisplay 41144;
|
||||
_display closeDisplay 3000;
|
||||
};
|
||||
@@ -28,6 +28,9 @@ if(isNull _obj or !(alive _obj)) exitWith { TradeInprogress = false; };
|
||||
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
|
||||
diag_log format["Combination: %1", dayz_combination];
|
||||
|
||||
|
||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; cutText [format["That %1 is already being unlocked.",_text], "PLAIN DOWN"]};
|
||||
|
||||
// Promt user for password if _ownerID != dayz_playerUID
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_characterID","_temp","_isSync","_currentWpn","_currentMag","_magazines","_qty","_qtyT","_val","_isNewPos","_isNewBackp","_humanity","_isNewGear","_doUpdate","_currentModel","_modelChk","_playerPos","_playerGear","_playerBackp","_backpack","_updates","_killsB","_killsH","_medical","_isNewMed","_character","_timeSince","_charPos","_isInVehicle","_justAte","_justDrank","_distanceFoot","_lastPos","_kills","_headShots","_timeGross","_timeLeft","_onLadder","_isTerminal","_vehicle","_wounds","_currentAnim","_muzzles","_array","_key","_lastTime","_config","_currentState"];
|
||||
_character = _this;
|
||||
_doUpdate = false;
|
||||
_characterID = _character getVariable ["characterID","0"];
|
||||
_characterID = _character getVariable ["CharacterID","0"];
|
||||
_updates = _character getVariable ["updatePlayer",[false,false,false,false,false]];
|
||||
_charPos = getPosATL _character;
|
||||
_isInVehicle = vehicle _character != _character;
|
||||
|
||||
@@ -33,4 +33,4 @@ _fsmid = [_dog, typeOf _dog] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
player setVariable ["dogID", _fsmid];
|
||||
_dog setVariable ["fsm_handle", _fsmid];
|
||||
_dog setVariable ["characterID", dayz_characterID, true];
|
||||
_dog setVariable ["CharacterID", dayz_characterID, true];
|
||||
@@ -24,7 +24,6 @@ if (_doLoiter) then {
|
||||
_agent setDir round(random 180);
|
||||
};
|
||||
|
||||
|
||||
dayz_spawnZombies = dayz_spawnZombies + 1;
|
||||
|
||||
if (random 1 > 0.7) then {
|
||||
|
||||
@@ -18,6 +18,7 @@ if (!_isNoone) exitWith {};
|
||||
if (count _unitTypes == 0) then {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
|
||||
_type = _unitTypes call BIS_fnc_selectRandom;
|
||||
|
||||
//Create the Group and populate it
|
||||
|
||||
Reference in New Issue
Block a user