mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Cleanup Files
This commit is contained in:
@@ -1,137 +0,0 @@
|
||||
/*
|
||||
DayZ Enhanced ChopWood
|
||||
Usage: spawn player_chopWood;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_isOk","_objName","_finished","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree","_finishedTime","_item"];
|
||||
|
||||
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_53") , "PLAIN DOWN"]; };
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
if((currentWeapon player) != "MeleeHatchet_DZE") exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_54"), "PLAIN DOWN"]; };
|
||||
|
||||
// allowed trees list move this later
|
||||
_trees = DZE_trees;
|
||||
|
||||
//_item = _this;
|
||||
call gear_ui_init;
|
||||
|
||||
_findNearestTree = [];
|
||||
{
|
||||
if("" == typeOf _x) then {
|
||||
|
||||
if (alive _x) then {
|
||||
|
||||
_objName = _x call DZE_getModelName;
|
||||
|
||||
// Exit since we found a tree
|
||||
if (_objName in _trees) exitWith {
|
||||
_findNearestTree set [(count _findNearestTree),_x];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
} foreach nearestObjects [getPos player, [], 20];
|
||||
|
||||
//diag_log format["DEBUG TREES: %1", _findNearestTree];
|
||||
|
||||
if (count(_findNearestTree) >= 1) then {
|
||||
|
||||
closeDialog 1;
|
||||
|
||||
_tree = _findNearestTree select 0;
|
||||
|
||||
// get 2d distance
|
||||
_distance2d = [player, _tree] call BIS_fnc_distance2D;
|
||||
_distance3d = player distance _tree;
|
||||
|
||||
if(_distance2d <= 5) then {
|
||||
|
||||
_countOut = ceil(_distance3d-_distance2d);
|
||||
|
||||
//diag_log format["DEBUG TREE DISTANCE: %1 - %2 = %3", _distance3d,_distance2d,(_distance3d-_distance2d)];
|
||||
|
||||
// Start chop tree loop
|
||||
_counter = 0;
|
||||
_isOk = true;
|
||||
_proceed = false;
|
||||
while {_isOk} do {
|
||||
|
||||
closeDialog 1;
|
||||
|
||||
// player playActionNow "Medic";
|
||||
player playActionNow "GestureSwing";
|
||||
[player,"chopwood",0,false] call dayz_zombieSpeak;
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
r_doLoop = true;
|
||||
|
||||
_finished = false;
|
||||
_finishedTime = diag_tickTime+3;
|
||||
|
||||
while {r_doLoop} do {
|
||||
if (diag_tickTime >= _finishedTime) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
if(!_finished) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = false;
|
||||
};
|
||||
|
||||
if(_finished) then {
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
cutText [format[(localize "str_epoch_player_147"), _counter, _countOut], "PLAIN DOWN"];
|
||||
|
||||
if(_counter == _countOut) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
sleep 1;
|
||||
};
|
||||
};
|
||||
|
||||
if (_proceed) then {
|
||||
|
||||
_itemOut = "PartWoodPile";
|
||||
|
||||
_item = createVehicle ["WeaponHolder", getPosATL player, [], 1, "CAN_COLLIDE"];
|
||||
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
||||
|
||||
player reveal _item;
|
||||
|
||||
// chop down tree
|
||||
if("" == typeOf _tree) then {
|
||||
_tree setDamage 1;
|
||||
};
|
||||
//diag_log format["DEBUG TREE DAMAGE: %1", _tree];
|
||||
|
||||
cutText [format[(localize "str_epoch_player_148"), _countOut], "PLAIN DOWN"];
|
||||
|
||||
player action ["Gear", _item];
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText [(localize "str_epoch_player_55"), "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [localize "str_player_23", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [localize "str_player_23", "PLAIN DOWN"];
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
@@ -1,27 +0,0 @@
|
||||
private ["_item","_config","_onLadder","_consume","_meleeNum","_bag"];
|
||||
_item = _this;
|
||||
_config = configFile >> "CfgWeapons" >> _item;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
_consume = ([] + getArray (_config >> "magazines")) select 0;
|
||||
|
||||
_meleeNum = ({_x == _consume} count magazines player);
|
||||
for "_i" from 1 to _meleeNum do {
|
||||
player removeMagazine _consume;
|
||||
};
|
||||
|
||||
player removeWeapon _item;
|
||||
if (_item == "MeleeHatchet_DZE") then {_item = "ItemHatchet_DZE";};
|
||||
if (_item == "MeleeCrowbar") then {_item = "MeleeCrowbar";};
|
||||
if (_item == "MeleeMachete") then {_item = "ItemMachete";};
|
||||
|
||||
//if (_item == "MeleeFishingPole") then {_item = "MeleeFishingPole";};
|
||||
//if (_item == "MeleeSledge") then {_item = "MeleeSledge";};
|
||||
|
||||
_bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 0, "CAN_COLLIDE"];
|
||||
_bag setdir (getDir player);
|
||||
player reveal _bag;
|
||||
@@ -1,57 +0,0 @@
|
||||
private ["_position","_target","_targetPos","_isAlive","_list","_isSomeone","_myDest","_agent"];
|
||||
//Definitions
|
||||
_agent = _this select 0;
|
||||
|
||||
//Add handlers
|
||||
//_id = _agent addeventhandler ["HandleDamage",{_this call local_zombieDamage}];
|
||||
|
||||
//Loop behaviour
|
||||
_list = (getposATL _agent) nearEntities ["Man",200];
|
||||
_isSomeone = ({isPlayer _x} count _list) > 0;
|
||||
_isAlive = alive _agent;
|
||||
while {_isAlive and _isSomeone} do {
|
||||
//NO TARGET
|
||||
_agent disableAI "FSM";
|
||||
_target = objNull;
|
||||
_targetPos = [];
|
||||
|
||||
//Spawn roaming script (individual to unit)
|
||||
_myDest = getPosATL _agent;
|
||||
|
||||
//Loop looking for targets
|
||||
while {isNull _target and _isAlive and _isSomeone} do {
|
||||
_isAlive = alive _agent;
|
||||
_list = (getposATL _agent) nearEntities ["Man",200];
|
||||
_isSomeone = ({isPlayer _x} count _list) > 0;
|
||||
_target = _agent call zombie_findTargetAgent;
|
||||
if (_isAlive and (_agent distance _myDest < 5)) then {
|
||||
[_agent,_position] call zombie_loiter;
|
||||
};
|
||||
_agent forceSpeed 2;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
//CHASE TARGET
|
||||
|
||||
//Leader cries out
|
||||
[_agent,"attack",0,false] call dayz_zombieSpeak;
|
||||
|
||||
//Start Movement loop
|
||||
while {!isNull _target and _isAlive and _isSomeone} do {
|
||||
_target = _agent call zombie_findTargetAgent;
|
||||
_isAlive = alive _agent;
|
||||
_targetPos = getPosATL _target;
|
||||
//Move to target
|
||||
_agent moveTo _targetPos;
|
||||
_agent forceSpeed 8;
|
||||
sleep 1;
|
||||
};
|
||||
//LOOP
|
||||
_agent setVariable ["targets",[],true];
|
||||
_isAlive = alive _agent;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
//Wait for a while then cleanup
|
||||
sleep 5;
|
||||
deleteVehicle _agent;
|
||||
@@ -135,7 +135,6 @@ if (_nearbyCount < 1) exitwith
|
||||
if (dayz_maxCurrentZeds < dayz_maxZeds) then {
|
||||
if (dayz_CurrentZombies < dayz_maxGlobalZombies) then {
|
||||
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
|
||||
//[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
|
||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _zombied) * 525948;
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
// private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_nearbyBuildings","_nearby","_type","_config","_canZombie","_canLoot","_dis","_keepAwayDist","_isNoone","_looted","_cleared"];//_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings
|
||||
//
|
||||
// _radius = _this select 0;
|
||||
// _position = _this select 1;
|
||||
// _inVehicle = _this select 2;
|
||||
// _dateNow = _this select 3;
|
||||
// _age = _this select 4;
|
||||
// _locationstypes = _this select 5;
|
||||
// _nearestCity = _this select 6;
|
||||
//
|
||||
// _looted = (_x getVariable ["looted",-0.1]);
|
||||
// _cleared = (_x getVariable ["cleared",true]);
|
||||
// _dateNow = (DateToNumber date);
|
||||
// _age = (_dateNow - _looted) * 525948;
|
||||
// //diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
|
||||
// if ((_age > 10) and (!_cleared)) then {
|
||||
// _nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
|
||||
// {deleteVehicle _x} forEach _nearByObj;
|
||||
// _x setVariable ["cleared",true];
|
||||
// _x setVariable ["looted",_dateNow,true];
|
||||
// };
|
||||
// if ((_age > 10) and (_cleared)) then {
|
||||
// //Register
|
||||
// _x setVariable ["looted",_dateNow,true];
|
||||
// //cleanup
|
||||
// _handle = [_x] spawn building_spawnLoot;
|
||||
// waitUntil{scriptDone _handle};
|
||||
// };
|
||||
@@ -1,19 +0,0 @@
|
||||
private ["_dateNow","_age","_zombied","_x"];
|
||||
|
||||
//_radius = _this select 0;
|
||||
//_position = _this select 1;
|
||||
//_inVehicle = _this select 2;
|
||||
_dateNow = _this select 3;
|
||||
_age = _this select 4;
|
||||
//_locationstypes = _this select 5;
|
||||
//_nearestCity = _this select 6;
|
||||
//_maxZombies = _this select 7;
|
||||
|
||||
|
||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _zombied) * 525948;
|
||||
if (_age > 1) then {
|
||||
_x setVariable ["zombieSpawn",_dateNow,true];
|
||||
[_x] call building_spawnZombies;
|
||||
};
|
||||
@@ -1,42 +0,0 @@
|
||||
#define WHITE [1,1,1,1]
|
||||
#define GREY [0.75,0.75,0.75,1]
|
||||
#define GREEN [0.6,0.8,0.4,1]
|
||||
#define RED [1,0.1,0,1]
|
||||
|
||||
private["_task", "_taskDescription", "_taskStatus", "_taskParams"];
|
||||
|
||||
_task = _this select 0;
|
||||
_taskDescription = (taskDescription _task) select 1;
|
||||
_taskStatus = toUpper(taskState _task);
|
||||
|
||||
|
||||
_taskParams = switch (_taskStatus) do
|
||||
{
|
||||
case "CREATED":
|
||||
{
|
||||
[format["NEW TASK ASSIGNED: \n%1", _taskDescription], WHITE, "taskNew"]
|
||||
};
|
||||
|
||||
case "ASSIGNED":
|
||||
{
|
||||
[format["ASSIGNED TASK: \n%1", _taskDescription], WHITE, "taskCurrent"]
|
||||
};
|
||||
|
||||
case "SUCCEEDED":
|
||||
{
|
||||
[format["TASK ACCOMPLISHED: \n%1", _taskDescription], GREEN, "taskDone"]
|
||||
};
|
||||
|
||||
case "FAILED":
|
||||
{
|
||||
[format["TASK FAILED: \n%1", _taskDescription], RED, "taskFAILED"]
|
||||
};
|
||||
|
||||
case "CANCELED":
|
||||
{
|
||||
[format["TASK CANCELED: \n%1", _taskDescription], GREY, "taskDone"]
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
taskHint _taskParams;
|
||||
@@ -18,14 +18,9 @@ if (!isDedicated) then {
|
||||
player_animalCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_animalCheck.sqf";
|
||||
player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf";
|
||||
player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf";
|
||||
// player_spawnLootCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnlootCheck.sqf";
|
||||
// player_spawnZedCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnzedCheck.sqf";
|
||||
building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
|
||||
// player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
|
||||
building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf";
|
||||
dayz_spaceInterrupt = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\dayz_spaceInterrupt.sqf";
|
||||
//animal_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\animal_monitor.sqf";
|
||||
// building_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\building_monitor.sqf";
|
||||
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre and audial rating
|
||||
player_harvest = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_harvest.sqf";
|
||||
player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
|
||||
@@ -56,7 +51,6 @@ if (!isDedicated) then {
|
||||
player_changeCombo = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_changeCombo.sqf";
|
||||
|
||||
player_lockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_lockVault.sqf";
|
||||
// control_zombieAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";
|
||||
player_updateGui = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";
|
||||
player_crossbowBolt = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_crossbowBolt.sqf";
|
||||
player_music = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_music.sqf"; //Used to generate ambient music
|
||||
@@ -86,7 +80,6 @@ if (!isDedicated) then {
|
||||
|
||||
pz_attack = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf";
|
||||
|
||||
//
|
||||
dog_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf";
|
||||
|
||||
//actions
|
||||
@@ -103,13 +96,10 @@ if (!isDedicated) then {
|
||||
player_useMeds = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_useMeds.sqf";
|
||||
player_fillWater = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\water_fill.sqf";
|
||||
player_makeFire = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_makefire.sqf";
|
||||
//player_chopWood = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_chopWood.sqf";
|
||||
player_harvestPlant = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_harvestPlant.sqf";
|
||||
player_goFishing = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_goFishing.sqf";
|
||||
player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf";
|
||||
player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf";
|
||||
//player_dropWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_dropWeapon.sqf";
|
||||
//playerpip_setTrap = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_setTrap.sqf";
|
||||
object_pickup = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf";
|
||||
player_flipvehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_flipvehicle.sqf";
|
||||
player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
|
||||
@@ -141,6 +131,7 @@ if (!isDedicated) then {
|
||||
// trader
|
||||
trader_enter = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\trader_enter.sqf";
|
||||
trader_leave = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\trader_leave.sqf";
|
||||
player_traderCity = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_traderCity.sqf";
|
||||
|
||||
// combination of check and remove items
|
||||
player_checkAndRemoveItems = {
|
||||
|
||||
Reference in New Issue
Block a user