mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
EVR server-side files
This commit is contained in:
57
SQF/dayz_server/system/scheduler/sched_evr.sqf
Normal file
57
SQF/dayz_server/system/scheduler/sched_evr.sqf
Normal 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]
|
||||
};
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user