mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
+ [ADDED] Added 4 more new military skins as rare drops on militaryclothes: (FR_OHara_DZ,FR_Rodriguez_DZ,CZ_Soldier_Sniper_EP1_DZ,Graves_Light_DZ) Picture. Left to right. http://i.imgur.com/HlE4o2R.jpg + [CHANGED] You can now only sell vehicles to the trader if they are between 75% and 100% health. + [ADDED] Added generator as build-able and now can be started with one 20 liter Jerrycan and runs until server restart. + [CHANGED] Lowered building preview time from 50 seconds to 15. + [ADDED] First release of PHP tool to help config traders. + [ADDED] Player Zombie vision. + [CHANGED] You must now be the owner of a plot or a friend of an owner to build. + [CHANGED] When removing base building elements and not the owner or friend removal counter is doubled. + [FIXED] Potential fix for shifting position of mg nest. + [ADDED] New sniper rifle SCAR_H_LNG_Sniper_SD (ammo: 20Rnd_762x51_SB_SCAR) added to MassGrave loot tables. + [ADDED] New Machine Gun Pecheneg_DZ to MilitarySpecial loot tables and to traders. (ammo:100Rnd_762x54_PK) + [ADDED] New SMG: Sa61_EP1 (ammo: 20Rnd_B_765x17_Ball), UZI_SD_EP1 (ammo: 30Rnd_9x19_UZI_SD) added to traders and Military loot tables. + [ADDED] New Pistol added to traders and loot tables MassGrave,DynamicDebrisMilitary, and Residential : MakarovSD (ammo: 8Rnd_9x18_MakarovSD) + [ADDED] Bikeys Added for playwith versions of taviana, namalsk, celle, lingor. + [INFO] Attention server owners should change @tavi_DayZ_Epoch folder on the server to @taviana and your players can then connect and install automatically with play.withsix.com with the above mentioned bikeys.
273 lines
7.5 KiB
Plaintext
273 lines
7.5 KiB
Plaintext
[]execVM "\z\addons\dayz_server\system\s_fps.sqf"; //server monitor FPS (writes each ~181s diag_fps+181s diag_fpsmin*)
|
|
|
|
dayz_versionNo = getText(configFile >> "CfgMods" >> "DayZ" >> "version");
|
|
dayz_hiveVersionNo = getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
|
|
_script = getText(missionConfigFile >> "onPauseScript");
|
|
|
|
if ((count playableUnits == 0) and !isDedicated) then {
|
|
isSinglePlayer = true;
|
|
};
|
|
|
|
waitUntil{initialized}; //means all the functions are now defined
|
|
|
|
diag_log "HIVE: Starting";
|
|
|
|
if (_script != "") then
|
|
{
|
|
diag_log "MISSION: File Updated";
|
|
} else {
|
|
while {true} do
|
|
{
|
|
diag_log "MISSION: File Needs Updating";
|
|
sleep 1;
|
|
};
|
|
};
|
|
|
|
serverVehicleCounter = [];
|
|
|
|
//Stream in objects
|
|
/* STREAM OBJECTS */
|
|
//Send the key
|
|
_key = format["CHILD:302:%1:",dayZ_instance];
|
|
_result = _key call server_hiveReadWrite;
|
|
|
|
diag_log "HIVE: Request sent";
|
|
|
|
//Process result
|
|
_status = _result select 0;
|
|
|
|
_myArray = [];
|
|
if (_status == "ObjectStreamStart") then {
|
|
_val = _result select 1;
|
|
//Stream Objects
|
|
diag_log ("HIVE: Commence Object Streaming...");
|
|
for "_i" from 1 to _val do {
|
|
_result = _key call server_hiveReadWrite;
|
|
|
|
_status = _result select 0;
|
|
_myArray set [count _myArray,_result];
|
|
//diag_log ("HIVE: Loop ");
|
|
};
|
|
//diag_log ("HIVE: Streamed " + str(_val) + " objects");
|
|
};
|
|
|
|
_countr = 0;
|
|
_totalvehicles = 0;
|
|
{
|
|
|
|
//Parse Array
|
|
_countr = _countr + 1;
|
|
|
|
_idKey = _x select 1;
|
|
_type = _x select 2;
|
|
_ownerID = _x select 3;
|
|
|
|
_worldspace = _x select 4;
|
|
_intentory= _x select 5;
|
|
_hitPoints= _x select 6;
|
|
_fuel = _x select 7;
|
|
_damage = _x select 8;
|
|
|
|
_dir = 0;
|
|
_pos = [0,0,0];
|
|
_wsDone = false;
|
|
if (count _worldspace >= 2) then
|
|
{
|
|
_dir = _worldspace select 0;
|
|
if (count (_worldspace select 1) == 3) then {
|
|
_pos = _worldspace select 1;
|
|
_wsDone = true;
|
|
}
|
|
};
|
|
if (!_wsDone) then {
|
|
if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
|
|
_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
|
|
if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
|
|
diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
|
|
};
|
|
|
|
if (_damage < 1) then {
|
|
diag_log format["OBJ: %1 - %2", _idKey,_type];
|
|
|
|
//Create it
|
|
_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
|
|
_object setVariable ["lastUpdate",time];
|
|
_object setVariable ["ObjectID", _idKey, true];
|
|
_object setVariable ["CharacterID", _ownerID, true];
|
|
|
|
clearWeaponCargoGlobal _object;
|
|
clearMagazineCargoGlobal _object;
|
|
|
|
if ((typeOf _object) in dayz_allowedObjects) then {
|
|
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
|
// Test disabling simulation server side on buildables only.
|
|
_object enableSimulation false;
|
|
};
|
|
|
|
_object setdir _dir;
|
|
_object setpos _pos;
|
|
_object setDamage _damage;
|
|
|
|
if (count _intentory > 0) then {
|
|
if (_object isKindOf "VaultStorageLocked") then {
|
|
// Fill variables with loot
|
|
_object setVariable ["WeaponCargo", (_intentory select 0), true];
|
|
_object setVariable ["MagazineCargo", (_intentory select 1), true];
|
|
_object setVariable ["BackpackCargo", (_intentory select 2), true];
|
|
_object setVariable ["OEMPos", _pos, true];
|
|
} else {
|
|
|
|
//Add weapons
|
|
_objWpnTypes = (_intentory select 0) select 0;
|
|
_objWpnQty = (_intentory select 0) select 1;
|
|
_countr = 0;
|
|
{
|
|
if (_x == "Crossbow") then { _x = "Crossbow_DZ" }; // Convert Crossbow to Crossbow_DZ
|
|
_isOK = isClass(configFile >> "CfgWeapons" >> _x);
|
|
if (_isOK) then {
|
|
_block = getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
|
|
if (!_block) then {
|
|
_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
|
|
};
|
|
};
|
|
_countr = _countr + 1;
|
|
} forEach _objWpnTypes;
|
|
|
|
//Add Magazines
|
|
_objWpnTypes = (_intentory select 1) select 0;
|
|
_objWpnQty = (_intentory select 1) select 1;
|
|
_countr = 0;
|
|
{
|
|
if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
|
|
_isOK = isClass(configFile >> "CfgMagazines" >> _x);
|
|
if (_isOK) then {
|
|
_block = getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
|
|
if (!_block) then {
|
|
_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
|
|
};
|
|
};
|
|
_countr = _countr + 1;
|
|
} forEach _objWpnTypes;
|
|
|
|
//Add Backpacks
|
|
_objWpnTypes = (_intentory select 2) select 0;
|
|
_objWpnQty = (_intentory select 2) select 1;
|
|
_countr = 0;
|
|
{
|
|
_isOK = isClass(configFile >> "CfgVehicles" >> _x);
|
|
if (_isOK) then {
|
|
_block = getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
|
|
if (!_block) then {
|
|
_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
|
|
};
|
|
};
|
|
_countr = _countr + 1;
|
|
} forEach _objWpnTypes;
|
|
};
|
|
};
|
|
|
|
if (_object isKindOf "AllVehicles") then {
|
|
{
|
|
_selection = _x select 0;
|
|
_dam = _x select 1;
|
|
if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
|
|
[_object,_selection,_dam] call object_setFixServer;
|
|
} forEach _hitpoints;
|
|
|
|
_object setFuel _fuel;
|
|
|
|
if (!((typeOf _object) in dayz_allowedObjects)) then {
|
|
|
|
_object setvelocity [0,0,1];
|
|
_object call fnc_vehicleEventHandler;
|
|
|
|
if(_ownerID != "0") then {
|
|
_object setvehiclelock "locked";
|
|
};
|
|
|
|
_totalvehicles = _totalvehicles + 1;
|
|
|
|
// total each vehicle
|
|
serverVehicleCounter set [count serverVehicleCounter,_type];
|
|
};
|
|
};
|
|
|
|
//Monitor the object
|
|
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
|
};
|
|
} forEach _myArray;
|
|
|
|
// # END OF STREAMING #
|
|
|
|
//Set the Time
|
|
//Send request
|
|
_key = "CHILD:307:";
|
|
_result = _key call server_hiveReadWrite;
|
|
_outcome = _result select 0;
|
|
if(_outcome == "PASS") then {
|
|
_date = _result select 1;
|
|
if(isDedicated) then {
|
|
//["dayzSetDate",_date] call broadcastRpcCallAll;
|
|
setDate _date;
|
|
dayzSetDate = _date;
|
|
publicVariable "dayzSetDate";
|
|
};
|
|
|
|
diag_log ("HIVE: Local Time set to " + str(_date));
|
|
};
|
|
|
|
createCenter civilian;
|
|
if (isDedicated) then {
|
|
endLoadingScreen;
|
|
};
|
|
|
|
if (isDedicated) then {
|
|
_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
|
|
};
|
|
|
|
|
|
// Custom Configs
|
|
if(isnil "MaxVehicleLimit") then {
|
|
MaxVehicleLimit = 50;
|
|
};
|
|
if(isnil "MaxHeliCrashes") then {
|
|
MaxHeliCrashes = 5;
|
|
};
|
|
if(isnil "MaxDynamicDebris") then {
|
|
MaxDynamicDebris = 100;
|
|
};
|
|
|
|
// Custon Configs End
|
|
|
|
// spawn_vehicles
|
|
_vehLimit = MaxVehicleLimit - _totalvehicles;
|
|
diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
|
|
if(_vehLimit > 0) then {
|
|
for "_x" from 1 to _vehLimit do {
|
|
_id = [] spawn spawn_vehicles;
|
|
//waitUntil{scriptDone _id};
|
|
};
|
|
};
|
|
|
|
|
|
// spawn_roadblocks
|
|
diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
|
|
for "_x" from 1 to MaxDynamicDebris do {
|
|
_id = [] spawn spawn_roadblocks;
|
|
//waitUntil{scriptDone _id};
|
|
};
|
|
|
|
|
|
allowConnection = true;
|
|
|
|
if(isnil "dayz_MapArea") then {
|
|
dayz_MapArea = 10000;
|
|
};
|
|
if(isnil "HeliCrashArea") then {
|
|
HeliCrashArea = dayz_MapArea / 2;
|
|
};
|
|
|
|
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
|
|
nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
|
|
|