mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 18:36:29 +03:00
Add Nightstalker EVR storms
Includes manual on/off for APSI and localized strings.
This commit is contained in:
459
SQF/dayz_code/compile/client_evr.sqf
Normal file
459
SQF/dayz_code/compile/client_evr.sqf
Normal file
@@ -0,0 +1,459 @@
|
||||
/*
|
||||
* EVR Storms Client Side Script for DayZ Epoch 1.0.7+ by JasonTM
|
||||
* Original Blowout Module for Nightstalkers: Shadow of Namalsk by Sumrak
|
||||
* sumrak<at>nightstalkers.cz
|
||||
* Players must have post processing effects enabled in video options in order to experience the visual effects in this script.
|
||||
*/
|
||||
|
||||
fnc_evr = {
|
||||
local _hasAPSI = (player hasWeapon "ItemAPSI_DZE" && {player getVariable ["APSIState", false]});
|
||||
|
||||
call {
|
||||
if (_this == "Stage1") exitWith {
|
||||
playSound "ns_drone2";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
|
||||
uiSleep 4;
|
||||
|
||||
playSound "ns_drone1";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
uiSleep 4;
|
||||
playSound "ns_misc4";
|
||||
};
|
||||
|
||||
if (_this == "Stage2") exitWith {
|
||||
if (_hasAPSI) then {
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
cutRsc ["RscAPSI","PLAIN"];
|
||||
} else {
|
||||
uiSleep 0.4;
|
||||
};
|
||||
|
||||
playSound "ns_drone2";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
|
||||
uiSleep 10;
|
||||
|
||||
playSound "ns_drone1";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
};
|
||||
|
||||
if (_this == "Stage3") exitWith {
|
||||
if (_hasAPSI) then {
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
cutRsc ["RscAPSI_Detected","PLAIN"];
|
||||
} else {
|
||||
uiSleep 0.4;
|
||||
};
|
||||
|
||||
playSound "ns_drone2";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
|
||||
uiSleep 10;
|
||||
|
||||
playSound "ns_drone1";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
};
|
||||
|
||||
if (_this == "Stage4") exitWith {
|
||||
if (_hasAPSI) then {
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
//cutRsc ["RscAPSI_Protected","PLAIN"];
|
||||
} else {
|
||||
uiSleep 0.4;
|
||||
};
|
||||
|
||||
playSound "ns_drone2";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
|
||||
uiSleep 7;
|
||||
|
||||
playSound "ns_drone1";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
};
|
||||
|
||||
if (_this == "Stage5") exitWith {
|
||||
if (_hasAPSI) then {
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
cutRsc ["RscAPSI_Protected","PLAIN"];
|
||||
} else {
|
||||
uiSleep 0.4;
|
||||
};
|
||||
|
||||
playSound "ns_drone2";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
|
||||
uiSleep 5;
|
||||
|
||||
playSound "ns_drone1";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
};
|
||||
|
||||
if (_this == "Stage6") exitWith {
|
||||
if (_hasAPSI) then {
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
playSound "ns_evrDetect";
|
||||
uiSleep 0.2;
|
||||
} else {
|
||||
uiSleep 0.4;
|
||||
};
|
||||
|
||||
playSound "ns_misc4";
|
||||
playSound "ns_drone2";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
|
||||
uiSleep 3;
|
||||
|
||||
playSound "ns_drone1";
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.2;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.1;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.25;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
};
|
||||
|
||||
if (_this == "Stage7") exitWith {
|
||||
|
||||
if (_hasAPSI) then {
|
||||
playSound "ns_evrDetect";
|
||||
cutRsc ["RscAPSI_Start","PLAIN"];
|
||||
};
|
||||
|
||||
player setVariable["startcombattimer", 1];
|
||||
|
||||
playSound "ns_evrBegin";
|
||||
"dynamicBlur" ppEffectAdjust [8];
|
||||
"dynamicBlur" ppEffectEnable true;
|
||||
"dynamicBlur" ppEffectCommit 0;
|
||||
"dynamicBlur" ppEffectAdjust [0.1];
|
||||
"dynamicBlur" ppEffectCommit 0.75;
|
||||
"chromAberration" ppEffectAdjust [0.25,0,true];
|
||||
"chromAberration" ppEffectEnable true;
|
||||
"chromAberration" ppEffectCommit 0.5;
|
||||
uiSleep 0.5;
|
||||
"chromAberration" ppEffectAdjust [-0.15,0,true];
|
||||
"chromAberration" ppEffectCommit 0.35;
|
||||
uiSleep 0.5;
|
||||
"chromAberration" ppEffectAdjust [-0.05,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 0.20;
|
||||
"chromAberration" ppEffectAdjust [0,0,true];
|
||||
"chromAberration" ppEffectCommit 0.20;
|
||||
uiSleep 1;
|
||||
"chromAberration" ppEffectEnable false;
|
||||
"dynamicBlur" ppEffectAdjust [3];
|
||||
"dynamicBlur" ppEffectCommit 2.75;
|
||||
/*
|
||||
local _effect = ppEffectCreate ["colorCorrections", 1555];
|
||||
_effect ppEffectEnable true;
|
||||
_effect ppEffectAdjust [1.0, 1.0, -0.1, [1.0, 0.2, 0.2, 0.0], [1.0, 0.4, 0.0, 0.1],[1.0,0.3,0.3, 0.5]];
|
||||
_effect ppEffectCommit 2;
|
||||
*/
|
||||
|
||||
uiSleep 5;
|
||||
|
||||
// Define arrays of sound effects
|
||||
local _hit = ["ns_evrHit1","ns_evrHit2","ns_evrHit3"];
|
||||
local _wave = ["ns_evrWave1","ns_evrWave2","ns_evrWave3"];
|
||||
#define FLASH titleText["","WHITE OUT",1]; titleText["","WHITE IN",1]; uiSleep 0.25;
|
||||
|
||||
FLASH
|
||||
playSound (_hit select (round (random 2)));
|
||||
"dynamicBlur" ppEffectAdjust [3];
|
||||
"dynamicBlur" ppEffectCommit 5;
|
||||
uiSleep 1;
|
||||
|
||||
FLASH
|
||||
playSound (_hit select (round (random 2)));
|
||||
"dynamicBlur" ppEffectAdjust [2.4];
|
||||
"dynamicBlur" ppEffectCommit 6;
|
||||
uiSleep 4;
|
||||
|
||||
local _effect = ppEffectCreate ["colorCorrections", 1555];
|
||||
_effect ppEffectEnable true;
|
||||
_effect ppEffectAdjust [1.0, 1.0, -0.1, [1.0, 0.2, 0.2, 0.0], [1.0, 0.4, 0.0, 0.1],[1.0,0.3,0.3, 0.5]];
|
||||
_effect ppEffectCommit 2;
|
||||
|
||||
playSound (_wave select (round (random 2)));
|
||||
uiSleep 0.3;
|
||||
|
||||
FLASH
|
||||
playSound (_hit select (round (random 2)));
|
||||
uiSleep 1;
|
||||
|
||||
playSound (_wave select (round (random 2)));
|
||||
uiSleep 2;
|
||||
|
||||
FLASH
|
||||
playSound (_hit select (round (random 2)));
|
||||
uiSleep 1;
|
||||
|
||||
FLASH
|
||||
playSound (_wave select (round (random 2)));
|
||||
|
||||
if (!_hasAPSI) then {
|
||||
playSound "ns_evrPsy"; // This is the voices sound file
|
||||
};
|
||||
|
||||
uiSleep 4;
|
||||
FLASH
|
||||
playSound (_wave select (round (random 2)));
|
||||
|
||||
_effect ppEffectAdjust [1.0, 1.0, -0.1, [1.0, 0.1, 0.1, 0.0], [1.0, 0.1, 0.0, 0.1],[1.0,0.1,0.0, 0.5]];
|
||||
_effect ppEffectCommit 6;
|
||||
uiSleep 1;
|
||||
|
||||
playSound (_hit select (round (random 2)));
|
||||
uiSleep 3;
|
||||
|
||||
FLASH
|
||||
playSound (_wave select (round (random 2)));
|
||||
|
||||
_effect ppEffectAdjust [1.0, 1.0, -0.1, [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 5.0],[0.4,0.0,0.0, 0.7]];
|
||||
_effect ppEffectCommit 1;
|
||||
|
||||
_hasAPSI = (player hasWeapon "ItemAPSI_DZE" && {player getVariable ["APSIState", false]}); // A player can enable the APSI last minute, so we check just before the knockout.
|
||||
|
||||
// Using this technique from fn_unconscious
|
||||
disableUserInput true; disableUserInput true;
|
||||
disableUserInput false; disableUserInput false;
|
||||
disableUserInput true; disableUserInput true;
|
||||
|
||||
if (player == vehicle player) then {
|
||||
if (_hasAPSI) then {
|
||||
player switchMove "";
|
||||
[objNull, player, rswitchMove, ""] call RE;
|
||||
} else {
|
||||
player switchMove "AcinPercMrunSnonWnonDf_agony"; // knockout animation
|
||||
[objNull, player, rSwitchMove, "AcinPercMrunSnonWnonDf_agony"] call RE;
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 0.1;
|
||||
playSound "ns_evrFullWave";
|
||||
uiSleep 0.1;
|
||||
titleText["","BLACK OUT",1];
|
||||
|
||||
if (!_hasAPSI) then {
|
||||
r_player_inpain = true;
|
||||
player setVariable["USEC_inPain",true,true];
|
||||
if (!dayz_inside) then {
|
||||
local _blood = r_player_blood - ((DZE_EVRBloodLoss select 0) max random(DZE_EVRBloodLoss select 1)); // Player is not inside a building so reduce blood.
|
||||
r_player_blood = [_blood,1000] select (_blood < 1000); // Player will have at least 1000 blood.
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
4 fadeSound 0;
|
||||
uiSleep 10;
|
||||
6 fadeSound 1;
|
||||
titleText["","BLACK IN",10];
|
||||
ppEffectDestroy _effect;
|
||||
|
||||
if (DZE_EVRDamageItemsChance > 0) then {
|
||||
local _items = [];
|
||||
{
|
||||
local _tool = _x select 0;
|
||||
if (player hasWeapon _tool) then {
|
||||
if (random 1 <= DZE_EVRDamageItemsChance) then {
|
||||
player removeWeapon _tool;
|
||||
if !(player hasWeapon (_x select 1)) then { // prevent duplicates
|
||||
player addWeapon (_x select 1);
|
||||
};
|
||||
_items set [count _items, (getText(configFile >> "CfgWeapons" >> _tool >> "displayName"))];
|
||||
};
|
||||
};
|
||||
} count DZE_EVRDamageItems;
|
||||
|
||||
if (count _items > 0) then {
|
||||
format[localize "STR_EVR_DAMAGED_ITEMS",_items] call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
"dynamicBlur" ppEffectAdjust [0];
|
||||
"dynamicBlur" ppEffectCommit 16;
|
||||
|
||||
if (!_hasAPSI) then {
|
||||
if (player == vehicle player) then {
|
||||
uiSleep 10; // 10 second knockout.
|
||||
player switchMove "";
|
||||
[objNull, player, rSwitchMove, ""] call RE;
|
||||
};
|
||||
} else {
|
||||
cutRsc ["RscAPSI_End","PLAIN"];
|
||||
};
|
||||
|
||||
// Using this technique from fn_unconscious
|
||||
disableUserInput false; disableUserInput false;
|
||||
disableUserInput true; disableUserInput true;
|
||||
disableUserInput false; disableUserInput false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"PVDZE_EVR" addPublicVariableEventHandler {(_this select 1) spawn fnc_evr;};
|
||||
@@ -28,6 +28,7 @@ local _ConfirmedBanditKills = player getVariable ["ConfirmedBanditKills",0];
|
||||
local _friendlies = player getVariable ["friendlies",[]];
|
||||
local _tagSetting = player getVariable ["DZE_display_name",false];
|
||||
local _radiostate = player getVariable ["radiostate",false];
|
||||
local _apsiState = player getVariable["APSIState",false];
|
||||
local _dayz_onBack = player getVariable ["dayz_onBack",""];
|
||||
local _coins = 0;
|
||||
local _bankCoins = 0;
|
||||
@@ -98,6 +99,7 @@ player setVariable ["ConfirmedBanditKills",_ConfirmedBanditKills,true];
|
||||
player setVariable ["friendlies",_friendlies,true];
|
||||
player setVariable ["DZE_display_name",_tagSetting,true];
|
||||
player setVariable ["radiostate",_radiostate];
|
||||
player setVariable ["APSIState",_apsiState];
|
||||
player setVariable ["dayz_onBack",_dayz_onBack,true];
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
|
||||
Reference in New Issue
Block a user