Setup Exile Revive

This commit is contained in:
Zepheris 2018-03-03 15:22:27 -07:00
parent 3a4a1e4799
commit 2ff259a85a
10 changed files with 430 additions and 9 deletions

View File

@ -8,7 +8,7 @@ echo Launching Server
F:
cd %ARMA%
echo Exile Server Monitor... Active !
start /affinity 0x3 /abovenormal "Arma3" arma3server_SC.exe "-mod=@exile;Kart;Mark;Heli;@lsd_nvg;@CBA_A3;" "-servermod=@exileserver;@asm;@marma;@A3XAI;@ASR_AI3;" -config=%ARMA%\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=%ARMA%\@ExileServer\basic.cfg -name=SC -autoinit -Loadmissiontomemory -hugepages
start /affinity 0x3 /abovenormal "Arma3" arma3server_SC.exe "-mod=@exile;Kart;Mark;Heli;@lsd_nvg;@CBA_A3;" "-servermod=@exileserver;@asm;@marma;@A3XAI;@ASR_AI3;@Enigma;" -config=%ARMA%\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=%ARMA%\@ExileServer\basic.cfg -name=SC -autoinit -Loadmissiontomemory -hugepages
start /affinity 0xC /abovenormal "Arma3_HC" arma3server_HC.exe -client -connect=127.0.0.1 -password=joejer "-mod=@exile;Kart;Mark;Heli;@A3XAI_HC;@asm;@ASR_AI3;@CBA_A3;" -profiles=HC -name=HC
REM ping 127.0.0.1 -n 15 >NUL

Binary file not shown.

View File

@ -3,12 +3,6 @@
//Extended Base Mod
ExileClient_system_lootmanager_thread_spawn = "EBM\exileclient_system_lootmanager_thread_spawn.sqf";
//Exile Revive
ExileClient_object_player_death_startBleedingOut = "custom\EnigmaRevive\ExileClient_object_player_death_startBleedingOut.sqf"; //Happys Revive
ExileClient_object_player_event_onInventoryOpened = "custom\EnigmaRevive\ExileClient_object_player_event_onInventoryOpened.sqf"; //Happys Revive AntiDupe ---NEW with v0.65
//enhancedMovement
ExileClient_system_thread_initialize = "custom\enhancedMovement\ExileClient_system_thread_initialize.sqf";
@ -60,4 +54,8 @@ ExileClient_gui_constructionMode_update = "eXpochVectorBldg\ExileClient_gui_cons
ExileClient_util_world_canBuildHere = "eXpochVectorBldg\ExileClient_util_world_canBuildHere.sqf";
//Persistent Tree
ExileServer_object_tree_network_chopTreeRequest="Custom\persistantTree\ExileServer_object_tree_network_chopTreeRequest.sqf";
ExileServer_object_tree_network_chopTreeRequest="Custom\persistantTree\ExileServer_object_tree_network_chopTreeRequest.sqf";
//Exile Revive
ExileClient_object_player_death_startBleedingOut = "custom\EnigmaRevive\ExileClient_object_player_death_startBleedingOut.sqf"; //Happys Revive
ExileClient_object_player_event_onInventoryOpened = "custom\EnigmaRevive\ExileClient_object_player_event_onInventoryOpened.sqf"; //Happys Revive AntiDupe ---NEW with v0.65

View File

@ -1008,6 +1008,15 @@ class CfgInteractionMenus
condition = "!(alive ExileClientInteractionObject)";
action = "_this call ExileClient_object_player_identifyBody";
};
//////////////Added by [_ZEN_]happydayz/////////////////
class Revive: ExileAbstractAction
{
title = "Perform CPR";
condition = "(!(alive ExileClientInteractionObject) && (ExileClientInteractionObject getVariable ['EnigmaRevivePermitted', true]) && (magazines player find 'Exile_Item_Defibrillator' >= 0))";
action = "_this spawn Enigma_RevivePlyr";
};
class HideCorpse: ExileAbstractAction
{

View File

@ -0,0 +1,119 @@
/*
Enigma_RevivePlyr.sqf
[_ZEN_] Happydayz
© 2016 Enigma Team
*/
private ["_target","_targetname", "_bodypos1", "_bodypos2", "_bodypos3", "_healPlace", "_action", "_bodypos", "_animstate", "_primaryw", "_timer", "_Anims", "_defibpos", "_defibangle", "_posh", "_posi", "_dy", "_dx", "_dir", "_position", "_lootHolder", "_targetsbleedoutcountdown", "_secondsRemaining"];
_target = _this select 0;
_targetname = name _target;
_bodypos1 = [0.75,0.15,0];
_bodypos2 = [-0.75,0.1,0];
_bodypos3 = [0,0.08,0];
_healPlace = "_bodypos1";
_action = "medicStartRightSide";
_bodypos = _bodypos1;
_animstate = animationState _target;
_primaryw = primaryWeapon player;
_timer = 6;
_Anims = ["ainvpknlmstpsnonwrfldnon_ainvpknlmstpsnonwrfldnon_medic","ainvpknlmstpsnonwrfldnon_medic","ainvpknlmstpsnonwrfldr_medic0s","ainvpknlmstpsnonwrfldnon_medic0s","ainvpknlmstpsnonwrfldr_medic0","ainvpknlmstpsnonwrfldnon_medic0","ainvpknlmstpsnonwrfldr_medic1","ainvpknlmstpsnonwrfldnon_medic1","ainvpknlmstpsnonwrfldr_medic2","ainvpknlmstpsnonwrfldnon_medic2","ainvpknlmstpsnonwrfldr_medic3","ainvpknlmstpsnonwrfldnon_medic3","ainvpknlmstpsnonwrfldr_medic4","ainvpknlmstpsnonwrfldnon_medic4","ainvpknlmstpsnonwrfldr_medic5","ainvpknlmstpsnonwrfldnon_medic5"];
_defibpos = [0.4,0.9,0];
_defibangle = 30;
if !(isPlayer _target) exitWith {systemChat Format ["Theres no pulse..."]};
if (_target getVariable "EnigmaRevivePermitted") then
{
if (magazines player find "Exile_Item_Defibrillator" >= 0) then
{
if ((player distance (_target modelToWorld _bodypos2))<((_target modelToWorld _bodypos1) distance player)) then
{
_healPlace = "_bodypos2";
_action = "medicStart";
_bodypos = _bodypos2;
_defibpos = [0,0.9,0];
_defibangle = 180;
};
player attachTo [_target, _bodypos];
_posh = player modelToWorld [0,0,0];
_posi = _target modelToWorld _bodypos3;
_dy = (_posh select 1) - (_posi select 1);
_dx = (_posh select 0) - (_posi select 0);
_dir = getDir player;
player setDir (270 - (_dy atan2 _dx) - direction _target);
sleep 0.001;
player removeMagazine "Exile_Item_Defibrillator";
_position = _target modelToWorld _defibpos;
_lootHolder = createVehicle ["LootWeaponHolder", _position, [], 0, "CAN_COLLIDE"];
_lootHolder setPosATL _position;
_lootHolder addItemCargoGlobal ["Exile_Item_Defibrillator",1];
_lootHolder setDir ((getDir _target) + _defibangle);
if (_primaryw == "") then
{
_target switchMove "AinjPpneMstpSnonWrflDnon";
sleep 0.2;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
}
else
{
if (currentWeapon player != _primaryw) then
{
player selectWeapon _primaryw;
sleep 2;
};
player playActionNow _action;
_timer = 15;
waitUntil { animationState player in _Anims };
};
sleep _timer;
detach player;
if (_primaryw == "") then
{
player switchmove "";
}
else
{
player switchAction "medicStart";
player playActionNow "medicStop";
};
if (_target getVariable["REVIVE", true]) then
{
_targetsbleedoutcountdown = _target getVariable "BleedoutCountDownEnd";
_secondsRemaining = _targetsbleedoutcountdown - time;
if (_secondsRemaining >= 17) then
{
_target setVariable["antidupe", -1, true];
ENIGMA_revivePlayer = [_target,player,1];
publicVariableServer "ENIGMA_revivePlayer";
}
else
{
systemChat Format ["RIP %1! They are too far gone!",_targetname];
};
}
else
{
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
};
};
}
else
{
systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname];
};

View File

@ -0,0 +1,97 @@
private["_respawnDelay","_layer","_descriptions"];
_respawnDelay = _this;
oldgroup = group player;
if (player getVariable["REVIVE", true]) then
{
_descriptions =
[
"KNOCKED OUT",
"CRITICALLY WOUNDED",
"BLEEDING OUT",
"ON DEATHS DOOR"
];
player setVariable ['EnigmaRevivePermitted', true, true];
}
else
{
_descriptions =
[
"WRECKED",
"REKT",
"STOMPED",
"WASTED",
"SCREWED",
"TOASTED",
"REST IN PIECES",
"TERMINATED",
"KILLED",
"EXILED",
"ANNIHILATED",
"HAMMERED",
"NEUTRALIZED",
"DUMPED",
"ZAPPED",
"SLAIN",
"FRIED",
"WIPED OUT",
"VANQUISHED",
"BUSTED",
"PULVERIZED",
"SMASHED",
"SHREDDED",
"CRUSHED"
];
};
// SPLASH
[100] call BIS_fnc_bloodEffect;
// Fade to gray instantly
//ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1.1, -0.05, [0.4, 0.2, 0.3, -0.1], [0.79, 0.72, 0.62, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
// Fade to red slowy
//ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1.1, -0.05, [0.4, 0.2, 0.3, -0.1], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0.4, 0.2, 0.3, 0], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
// Enable blur
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
// Our count down
ExileClientBleedOutHeartbeatPlaying = false;
ExileClientBleedOutCountDownDuration = _respawnDelay;
ExileClientBleedOutCountDownEnd = time + _respawnDelay;
player setVariable ["BleedoutCountDownEnd", ExileClientBleedOutCountDownEnd, true];
// BIS count down GUI
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
_layer cutText ["", "plain"];
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]];
missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
_layer cutRsc ["RscRespawnCounter", "plain"];
// Force enable chat
showChat true;
"Start bleeding out..." call ExileClient_util_log;
// Bleed to death (every 2 seconds)
if(ExileClientBleedOutThread isEqualTo -1)then
{
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
};
true

View File

@ -0,0 +1,63 @@
/**
* ExileClient_object_player_event_onInventoryOpened
*
* Exile Mod
* www.exilemod.com
* © 2015 Exile Mod Team
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/
_cancelEvent = false;
_container = _this select 1;
try
{
if (ExileIsPlayingRussianRoulette) then
{
throw true;
};
if (ExileClientIsHandcuffed) then
{
throw true;
};
if (ExileClientActionDelayShown) then
{
throw true;
};
// Dont double-place walls while in construction mode
if (ExileClientIsInConstructionMode) then
{
throw true;
};
// Cannot access locked vehicles
if ((locked _container) isEqualTo 2) then
{
throw true;
};
// Cannot access locked containers
if (_container getVariable ["ExileIsLocked", 1] isEqualTo -1) then
{
throw true;
};
// Cannot access in progress revive player inventories
if ((_container getVariable["antidupe", 1]) isEqualTo -1) then
{
throw true;
};
ExileClientInventoryOpened = true;
ExileClientCurrentInventoryContainer = _container;
}
catch
{
_cancelEvent = _exception;
};
_cancelEvent

View File

@ -0,0 +1,27 @@
/*
Enigma Exile Revive Compiles
[_ZEN_] Happydayz
© 2016 Enigma Team
*/
if (!hasInterface && isServer) exitWith {
Diag_log "Initializing Enigma Revive Compiles!";
};
private ['_code', '_function', '_file'];
{
_code = '';
_function = _x select 0;
_file = _x select 1;
_code = compileFinal (preprocessFileLineNumbers _file);
missionNamespace setVariable [_function, _code];
}
forEach
[
['Enigma_RevivePlyr', 'Custom\EnigmaRevive\Enigma_RevivePlyr.sqf']
];
true

View File

@ -0,0 +1,105 @@
/*
Enigma Exile Revive Initialization
[_ZEN_] Happydayz
© 2016 Enigma Team
*/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////Custom Settings//////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (!hasInterface && isServer) exitWith {
GR8HumanityInstalled = false; //If you are running GR8's Humanity script set this to true!
MaxRevivesAllowed = 3; //Set the max number of revives permitted per life. I recomend you keep it at 1. Just saying...
DamageWhenRevived = 0.35; //Set to a percentage. 0.95 = 95% damage.... or 5% health
FatiguewhenRevived = 0; //Set to a percentage. 1 = 100% fatigued and can only walk.
//NOTE: this has been designed to only allow 1 revive. I havent put in any checks to prevent players using this to gain respect by killing each other and reviving again!!!
//You have been warned!
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////DO NOT MODIFY BELOW THIS LINE///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////Server Settings/////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ReviveChk_cache = [];
ReviveChk_cache = [[0000,0]];
Diag_log "Initializing Enigma Revive!";
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////Client Settings//////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (hasInterface) then {
[] execVM "Custom\EnigmaRevive\compiles.sqf";
player setVariable ['EnigmaRevivePermitted', false, true];
player setVariable["antidupe", 1, true];
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////EventHandlers//////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
"EnigmaRevive" addPublicVariableEventHandler {
private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"];
_packet = _this select 1;
_newPlayerObject = _packet select 0;
cutText ["","BLACK IN",20];
[100] call BIS_fnc_bloodEffect;
"Reviving player..." call ExileClient_util_log;
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
_layer cutText ["", "plain"];
"Removing bleed out thread..." call ExileClient_util_log;
[ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
ExileClientBleedOutThread = -1;
player setVariable ['EnigmaRevivePermitted', false, true];
false call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur;
true call ExileClient_gui_hud_toggle;
["endBambiStateRequest"] call ExileClient_system_network_send; //remove bambi status (changed in some previous version to clientside control)
[ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask;
ExileClientPlayerIsBambi = false;
false call ExileClient_gui_hud_toggleBambiIcon;
player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player!
};
"EnigmaReviveFail" addPublicVariableEventHandler {
_packet = _this select 1;
_requestingPlayer = _packet select 0;
_revivername = _packet select 1;
systemChat Format ["%1 bungled your revive and killed you!",_revivername];
player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player!
[] call ExileClient_gui_escape_respawn; //force kill player
};
"EnigmaReviveMSG" addPublicVariableEventHandler {
_packet = _this select 1;
_msg = _packet select 0;
systemChat Format ["%1",_msg];
};
waitUntil { uiSleep 0.5; !isNull(findDisplay 46); };
sleep 10;
systemChat "Loading: Enigma Exile Revive"; //Please leave this line as a way of saying thanks to me! :D HAPPYD
};

View File

@ -17,4 +17,7 @@ if (isServer) then {
if (hasInterface) then {
call compile preprocessFileLineNumbers "Custom\st_map_gestures\clientInit.sqf";
};
};
//Exile Revive
[] execVM "Custom\EnigmaRevive\init.sqf";