EVR server-side files

This commit is contained in:
worldwidesorrow
2022-04-21 02:04:18 -05:00
parent 3bb6b94185
commit 55ce5e67e2
2 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
/*
EVR Storms AKA "Blowouts" Server Scheduler Functions by JasonTM.
The EVR storms are rolled out in stages for JIP players.
The server controls the EVR timing to keep the clients in sync so players have the same experience.
*/
evr_storm = {
PVDZE_EVR = "Stage1";
publicVariable "PVDZE_EVR";
uiSleep 60;
PVDZE_EVR = "Stage2";
publicVariable "PVDZE_EVR";
uiSleep 50;
PVDZE_EVR = "Stage3";
publicVariable "PVDZE_EVR";
uiSleep 40;
PVDZE_EVR = "Stage4";
publicVariable "PVDZE_EVR";
uiSleep 30;
PVDZE_EVR = "Stage5";
publicVariable "PVDZE_EVR";
uiSleep 20;
PVDZE_EVR = "Stage6";
publicVariable "PVDZE_EVR";
uiSleep 10;
PVDZE_EVR = "Stage7";
publicVariable "PVDZE_EVR";
uiSleep 180;
EVR_Lockout = false;
};
sched_evr_init = {
diag_log "EVR STORMS ENABLED";
EVR_Lockout = false; // Prevents the server from starting an EVR storm while one is running.
[diag_tickTime, (((DZE_EVRFirstTime select 0) max (random (DZE_EVRFirstTime select 1))) * 60)]
};
sched_evr = {
local _time = _this select 0;
local _timer = _this select 1;
if (!EVR_Lockout && {diag_tickTime - _time >= _timer}) then {
[] spawn evr_storm;
EVR_Lockout = true;
_time = diag_tickTime;
_timer = ((DZE_EVRTimer select 0) max (random (DZE_EVRTimer select 1))) * 60;
diag_log format ["EVR Storm Started: Next storm in %1 minutes", round(_timer / 60)];
};
[_time, _timer]
};

View File

@@ -9,6 +9,9 @@ call compile preprocessFileLineNumbers (PATH+"sched_traps.sqf");
if (DZE_Bury_Body || DZE_Butcher_Body) then {
call compile preprocessFileLineNumbers (PATH+"sched_lootCrates.sqf");
};
if (DZE_EVR) then {
call compile preprocessFileLineNumbers (PATH+"sched_evr.sqf");
};
local _list = [
// period offset code <-> ctx init code ->ctx
@@ -24,6 +27,9 @@ local _list = [
if (DZE_Bury_Body || DZE_Butcher_Body) then {
_list set [count _list, [ 60, 240, sched_lootCrates ]];
};
if (DZE_EVR) then {
_list set [count _list, [ 60, 180, sched_evr, sched_evr_init ]];
};
_list execFSM ("\z\addons\dayz_code\system\scheduler\scheduler.fsm");