Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ["_increaseStamina","_distanceTraveled","_velocity","_totaldistanceTraveled","_requirement","_tickTime1","_vehicle","_tickTime2","_thirstDegenMoving","_hungerDegenMoving","_starvationTimer","_dehydrateTimer","_fatigue","_staminaText","_fatigueText","_hungerText","_satiatedText","_thirstText","_hydrationText","_energyText","_energizedText","_fatigueMultiplier","_energizedStaminaLoss","_healthVar","_healthText","_energizedStaminaRegen","_wetText","_hypothermiaTimer","_hyperthermiaTimer","_tempText","_displayTemp","_tempChangeWetDegen","_tempChangeHot","_tempChangeCold","_wetValueDegen","_inWater","_timeText","_hour","_minute","_coldRnd","_velocityText","_fluTimer","_fluEndTimer","_serverTimeText","_hygieneText","_bleedValue","_hungerDegenCold","_currentWeapon","_primaryWeapon","_secondaryWeapon","_bleedTimer","_bleedEndTimer","_brokenLegTimer","_brokenLegEndTimer","_transfusionTimer","_transfusionIncTimer","_paintimer","_painText","_heatpackTimer","_bloodTypeText","_bloodPressure","_sickTimer","_sickActionTimer","_unconsciousTimer","_unconsciousTimerLimit","_vitaminTimer","_fluText","_sickText","_infectionText","_feverText","_diarrheaText","_choleraText","_schistosomiasisText","_typhoidText","_antibioticTimer","_satVar","_satVar1","_satVar2","_satVar3","_satVar4","_bleedingText","_weightText","_brokenArmText","_brokenLegText","_rndPainChance","_rndPainTimer","_brokenArmTimer","_brokenArmEndTimer","_playerHeadgear","_playerFacegear","_playerUniform","_playerVest","_tempResistText","_wetResistText","_radsText","_oxyText","_oxygenTimer","_oxygenTimerLimit","_oxygenTimerLimit2"];
- waitUntil {!isNil "SLIFE_module_SurvivalInitComplete"};
- _tickTime1 = diag_tickTime;
- _tickTime3 = diag_tickTime;
- // Variables
- _oxygenTimer = 0;
- _oxygenTimerLimit = 0;
- _oxygenTimerLimit2 = 0;
- _oxyText = 0;
- _radsText = 0;
- _velocity = 0;
- _dehydrateTimer = 0;
- _starvationTimer = 0;
- _distanceTraveled = 0;
- _totaldistanceTraveled = 0;
- _hypothermiaTimer = 0;
- _hyperthermiaTimer = 0;
- _heatpackTimer = 0;
- _healthVar = 0;
- _fluTimer = 0;
- _paintimer = 0;
- _painText = 0;
- _bleedingText = 0;
- _sickTimer = 0;
- _sickActionTimer = 0;
- _increaseStamina = false;
- _bloodTypeText = 0;
- _fluEndTimer = 0;
- _bleedValue = 0;
- _bleedTimer = 0;
- _brokenLegTimer = 0;
- _brokenLegEndTimer = 0;
- _transfusionTimer = 0;
- _transfusionIncTimer = 0;
- _unconsciousTimer = 0;
- _unconsciousTimerLimit = 0;
- _vitaminTimer = 0;
- _fluText = 0;
- _sickText = 0;
- _infectionText = 0;
- _feverText = 0;
- _diarrheaText = 0;
- _choleraText = 0;
- _schistosomiasisText = 0;
- _typhoidText = 0;
- _antibioticTimer = 0;
- _satVar = 0;
- _satVar1 = 0;
- _satVar2 = 0;
- _satVar3 = 0;
- _satVar4 = 0;
- _hour = 0;
- _weightText = 0;
- _brokenArmText = 0;
- _brokenLegText = 0;
- _rndPainChance = 0;
- _rndPainTimer = 0;
- _brokenArmTimer = 0;
- _brokenArmEndTimer = 0;
- _playerHeadgear = 0;
- _playerFacegear = 0;
- _playerUniform = 0;
- _playerVest = 0;
- _tempResistText = 0;
- _wetResistText = 0;
- while {alive player} do
- {
- player allowDamage true;
- _tickTime2 = diag_tickTime;
- if ((_tickTime2 - _tickTime1) > 1) then
- {
- _tickTime1 = _tickTime2;
- if ((_tickTime2 - _tickTime3) > 10) then
- {
- _tickTime3 = _tickTime2;
- call SLIFE_fnc_runLoot;
- };
- _hour = floor daytime;
- _minute = floor ((daytime - _hour) * 60);
- _vehicle = vehicle player;
- SLIFE_lastPlayerPos = getPosATL vehicle player;
- enableCamShake false;
- // CLOSE INVENTORY ON ACTION
- while {SLIFE_ActionInProgress} do
- {
- waituntil {!isnull (findDisplay 602)};
- closeDialog 602;
- };
- // TEMPERATURE & WET RESISTANCE - START
- _playerHeadgear = headgear player;
- _playerFacegear = goggles player;
- _playerUniform = uniform player;
- _playerVest = vest player;
- switch (_playerHeadgear) do
- {
- // Headgear
- case "H_RacingHelmet_1_orange_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_yellow_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_white_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_red_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_green_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_blue_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_black_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_4_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_3_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_2_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_RacingHelmet_1_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_dgtl": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_dirty": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_tan": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_grn": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_mcamo": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_indp": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_oli": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_khk": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_Booniehat_khk_hs": {SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_camo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_paint": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_light": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_plain_mcamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_plain_blk": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetSpecB": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetSpecB_paint1": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetSpecB_paint2": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetSpecB_blk": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetIA": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetIA_net": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetIA_camo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_Helmet_Kerry": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_grass": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_snakeskin": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_desert": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_black": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_sand": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetCrew_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetCrew_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetCrew_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_PilotHelmetFighter_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_PilotHelmetFighter_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_PilotHelmetFighter_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_PilotHelmetHeli_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_PilotHelmetHeli_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_PilotHelmetHeli_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_CrewHelmetHeli_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_CrewHelmetHeli_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_CrewHelmetHeli_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetO_ocamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetLeaderO_ocamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_light_grass": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_light_snakeskin": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_light_desert": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_light_black": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetB_light_sand": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetO_oucamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetLeaderO_oucamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetSpecO_ocamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_HelmetSpecO_blk": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
- case "H_Shemag_khk": {SLIFE_tempResistArrayValueHead = 1;};
- case "H_Shemag_tan": {SLIFE_tempResistArrayValueHead = 1;};
- case "H_Shemag_olive": {SLIFE_tempResistArrayValueHead = 1;};
- case "H_Shemag_olive_hs": {SLIFE_tempResistArrayValueHead = 1;};
- case "H_ShemagOpen_khk": {SLIFE_tempResistArrayValueHead = 1;};
- case "H_ShemagOpen_tan": {SLIFE_tempResistArrayValueHead = 1;};
- case "H_Watchcap_sgg": {SLIFE_tempResistArrayValueHead = 2;};
- case "H_Watchcap_camo": {SLIFE_tempResistArrayValueHead = 2;};
- case "H_Watchcap_khk": {SLIFE_tempResistArrayValueHead = 2;};
- case "H_Watchcap_cbr": {SLIFE_tempResistArrayValueHead = 2;};
- case "H_Watchcap_blk": {SLIFE_tempResistArrayValueHead = 2;};
- default {SLIFE_tempResistArrayValueHead = 0; SLIFE_wetResistArrayValueHead = 0;};
- };
- switch (_playerFacegear) do
- {
- // Facegear
- case "G_Balaclava_blk": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Balaclava_combat": {SLIFE_tempResistArrayValueFace = 1; SLIFE_wetResistArrayValueFace = 1;};
- case "G_Balaclava_lowprofile": {SLIFE_tempResistArrayValueFace = 1; SLIFE_wetResistArrayValueFace = 1;};
- case "G_Balaclava_oli": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_blk": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_oli": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_khk": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_tan": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_beast": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_shades": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_sport": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Bandanna_aviator": {SLIFE_tempResistArrayValueFace = 1;};
- case "G_Diving": {SLIFE_wetResistArrayValueFace = 2;};
- case "G_B_Diving" : {SLIFE_wetResistArrayValueFace = 2;};
- case "G_O_Diving": {SLIFE_wetResistArrayValueFace = 2;};
- case "G_I_Diving": {SLIFE_wetResistArrayValueFace = 2;};
- default {SLIFE_tempResistArrayValueFace = 0; SLIFE_wetResistArrayValueFace = 0;SLIFE_radResistArrayValueFace = 0;};
- };
- switch (_playerUniform) do
- {
- // Uniforms
- case "U_B_Wetsuit": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 10;};
- case "U_B_FullGhillie_lsh": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
- case "U_B_FullGhillie_sard": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
- case "U_B_FullGhillie_ard": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
- case "U_B_CombatUniform_mcam": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_GhillieSuit": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
- case "U_B_HeliPilotCoveralls": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_CombatUniform_mcam_worn": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_CombatUniform_wdl": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_CombatUniform_sgg": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_SpecopsUniform_sgg": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_PilotCoveralls": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_CTRG_1": {SLIFE_tempResistArrayValueUniform = 1;};
- case "U_B_survival_uniform": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
- default {SLIFE_tempResistArrayValueUniform = 0; SLIFE_wetResistArrayValueUniform = 0;SLIFE_radResistArrayValueUniform = 0;};
- };
- switch (_playerVest) do
- {
- // Vests
- case "V_RebreatherB": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 5;};
- case "V_RebreatherIR": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 5;};
- case "V_RebreatherIA": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 5;};
- case "V_PlateCarrier1_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrier2_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrier3_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierGL_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrier1_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierSpec_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVest_khk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVest_brn": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVest_oli": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVest_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVest_camo": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVest_blk_POLICE": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVestIR_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_TacVestCamo_khk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierIA1_dgtl": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierIA2_dgtl": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierIAGL_dgtl": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrier_Kerry": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierL_CTRG": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierH_CTRG": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_I_G_resistanceLeader_F": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierGL_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierGL_mtp": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierSpec_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierSpec_mtp": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_PlateCarrierIAGL_oli": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- case "V_Press_F": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
- default {SLIFE_tempResistArrayValueVest = 0; SLIFE_wetResistArrayValueVest = 0;SLIFE_radResistArrayValueVest = 0;};
- };
- SLIFE_playerRadResist = 1 + (SLIFE_radResistArrayValueHead + SLIFE_radResistArrayValueFace + SLIFE_radResistArrayValueUniform + SLIFE_radResistArrayValueVest);
- SLIFE_playerTempResist = 1 + (SLIFE_tempResistArrayValueHead + SLIFE_tempResistArrayValueFace + SLIFE_tempResistArrayValueUniform + SLIFE_tempResistArrayValueVest);
- SLIFE_playerWetResist = 1 + (SLIFE_wetResistArrayValueHead + SLIFE_wetResistArrayValueFace + SLIFE_wetResistArrayValueUniform + SLIFE_wetResistArrayValueVest);
- // TEMPERATURE RESISTANCE - END
- // STAMINA - START
- if (_vehicle == player) then
- {
- _velocity = log(abs(speed player));
- if (_velocity > 0.86) then
- {
- _distanceTraveled = _distanceTraveled + _velocity;
- if (SLIFE_playerRested) then
- {
- _energizedStaminaLoss = (_velocity/2);
- SLIFE_playerStamina = (SLIFE_playerStamina - (_energizedStaminaLoss/4)) max 0;
- }else{
- if (_velocity < 1.2) then
- {
- if (!SLIFE_playerFever) then
- {
- SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity/10)) max 0;
- }else{
- SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity/5)) max 0;
- };
- }else{
- if (SLIFE_playerFever) then
- {
- SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity)) max 0;
- }else{
- SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity/2)) max 0;
- };
- };
- };
- } else {
- _distanceTraveled = 0;
- _increaseStamina = true;
- };
- };
- if (_increaseStamina && (getFatigue player) == 0 && !SLIFE_playerStaminaDegen) then
- {
- SLIFE_playerStaminaRegenRate = (0.01 * SLIFE_playerStaminaMax);
- if (SLIFE_playerRested) then
- {
- _energizedStaminaRegen = (SLIFE_playerStaminaRegenRate*2);
- SLIFE_playerStamina = (SLIFE_playerStamina + _energizedStaminaRegen) min SLIFE_playerStaminaMax;
- }else{
- SLIFE_playerStamina = (SLIFE_playerStamina + SLIFE_playerStaminaRegenRate) min SLIFE_playerStaminaMax;
- };
- };
- if (SLIFE_playerStaminaDegen) then
- {
- SLIFE_playerStamina = (SLIFE_playerStamina - SLIFE_playerStaminaDegenRate) max 0;
- };
- if (SLIFE_playerStamina > 0) then
- {
- player setFatigue 0;
- };
- if (_distanceTraveled > 0) then
- {
- _totaldistanceTraveled = _totaldistanceTraveled + _distanceTraveled;
- _requirement = SLIFE_playerStaminaMax * 100;
- if (_totaldistanceTraveled >= _requirement) then
- {
- if ((SLIFE_playerStaminaMax < 100) && !SLIFE_playerStaminaDegen) then
- {
- _distanceTraveled = 0;
- _totaldistanceTraveled = 0;
- SLIFE_playerStaminaMax = SLIFE_playerStaminaMax + 1;
- };
- if ((SLIFE_playerStaminaMax > 10) && SLIFE_playerStaminaDegen) then
- {
- _distanceTraveled = 0;
- _totaldistanceTraveled = 0;
- SLIFE_playerStaminaMax = SLIFE_playerStaminaMax - 1;
- };
- };
- };
- _fatigue = round(getFatigue player * 100);
- _staminaText = format["Stamina: %1/%2",round(SLIFE_playerStamina),SLIFE_playerStaminaMax];
- _fatigueText = format["Fatigue: %1/100",_fatigue];
- // STAMINA - END
- //-----------------------------------------------------//
- // HUNGER - START
- if (_vehicle == player) then
- {
- // Moving Calories Degeneration
- if ((_velocity > 0.86)) then
- {
- _hungerDegenMoving = SLIFE_playerCaloriesDegenRate;
- _hungerDegenMoving = _hungerDegenMoving + _velocity;
- if (!SLIFE_playerSatiated) then
- {
- SLIFE_playerCalories = (SLIFE_playerCalories - (_hungerDegenMoving)) max 0;
- };
- if (SLIFE_playerSick) then
- {
- SLIFE_playerCalories = (SLIFE_playerCalories - (_hungerDegenMoving * 10)) max 0;
- };
- };
- };
- if (SLIFE_playerSatiatedValue >= 1200) then
- {
- SLIFE_playerSick = true;
- };
- if (SLIFE_playerSatiatedValue <= 900) then
- {
- SLIFE_playerSick = false;
- };
- if (SLIFE_playerSatiatedValue > 0) then
- {
- SLIFE_playerSatiated = true;
- };
- if (SLIFE_playerHydratedValue >= 1200) then
- {
- SLIFE_playerDiarrhea = true;
- };
- if ((SLIFE_playerHydratedValue <= 900) && !SLIFE_playerCholera && !SLIFE_playerTyphoid) then
- {
- SLIFE_playerDiarrhea = false;
- };
- // Calories Degeneration
- if (SLIFE_playerSick) then
- {
- SLIFE_playerCalories = (SLIFE_playerCalories - (SLIFE_playerCaloriesDegenRate * 10)) max 0;
- };
- if !(SLIFE_playerSatiated) then
- {
- SLIFE_playerCalories = (SLIFE_playerCalories - (SLIFE_playerCaloriesDegenRate)) max 0;
- };
- if (SLIFE_playerSatiated) then
- {
- SLIFE_playerSatiatedValue = (SLIFE_playerSatiatedValue - (1)) max 0;
- if (SLIFE_playerSatiatedValue <= 0) then
- {
- SLIFE_playerSatiated = false;
- };
- };
- if (SLIFE_playerCalories == 0) then
- {
- _starvationTimer = _starvationTimer + 1;
- if (_starvationTimer >= 84000) then
- {
- player setDamage 1;
- cutText ["You died of Starvation.", "BLACK FADED", 999];
- };
- };
- if (SLIFE_playerCalories > 0) then
- {
- _starvationTimer = 0;
- };
- if (SLIFE_playerTemp < 35) then
- {
- _hungerDegenCold = SLIFE_playerCaloriesDegenRate * SLIFE_playerTemp;
- SLIFE_playerCalories = (SLIFE_playerCalories - (_hungerDegenCold)) max 0;
- };
- _hungerText = format["Calories: %1/%2",round(SLIFE_playerCalories),SLIFE_playerCaloriesMax];
- _satiatedText = format["Satiated: %1(%2)",SLIFE_playerSatiated,SLIFE_playerSatiatedValue];
- // HUNGER - END
- //-----------------------------------------------------//
- // THIRST - START
- if (_vehicle == player) then
- {
- if (_velocity > 0.86) then
- {
- if (SLIFE_playerDiarrhea) then
- {
- _thirstDegenMoving = (SLIFE_playerThirstDegenRate * 10);
- _thirstDegenMoving = _thirstDegenMoving + _velocity;
- }else{
- _thirstDegenMoving = SLIFE_playerThirstDegenRate;
- _thirstDegenMoving = _thirstDegenMoving + _velocity;
- };
- if !(SLIFE_playerHydrated) then
- {
- SLIFE_playerThirst = (SLIFE_playerThirst - (_thirstDegenMoving)) max 0;
- };
- };
- };
- if (SLIFE_playerHydratedValue > 0) then
- {
- SLIFE_playerHydrated = true;
- };
- if !(SLIFE_playerHydrated) then
- {
- SLIFE_playerThirst = (SLIFE_playerThirst - (SLIFE_playerThirstDegenRate)) max 0;
- };
- if (SLIFE_playerHydrated) then
- {
- SLIFE_playerHydratedValue = (SLIFE_playerHydratedValue - (1)) max 0;
- if (SLIFE_playerHydratedValue <= 0) then
- {
- SLIFE_playerHydrated = false;
- };
- };
- if (SLIFE_playerThirst == 0) then
- {
- _dehydrateTimer = _dehydrateTimer + 1;
- if (_dehydrateTimer >= 12000) then
- {
- player setDamage 1;
- cutText ["You died of Dehydration.", "BLACK FADED", 999];
- };
- };
- if (SLIFE_playerThirst > 0) then
- {
- _dehydrateTimer = 0;
- };
- _thirstText = format["Thirst: %1/%2",round(SLIFE_playerThirst),SLIFE_playerThirstMax];
- _hydrationText = format["Hydrated: %1(%2)",SLIFE_playerHydrated,SLIFE_playerHydratedValue];
- // THIRST - END
- //-----------------------------------------------------//
- // ENERGY - START
- if (SLIFE_playerRestedValue > 0) then
- {
- SLIFE_playerRested = true;
- };
- if (SLIFE_playerRested) then
- {
- SLIFE_playerRestedValue = (SLIFE_playerRestedValue - (1)) max 0;
- if (SLIFE_playerRestedValue <= 0) then
- {
- SLIFE_playerRested = false;
- };
- };
- if !(SLIFE_playerRested) then
- {
- SLIFE_playerEnergy = (SLIFE_playerEnergy - (SLIFE_playerEnergyDegenRate)) max 0;
- };
- if (SLIFE_playerUnconscious) then
- {
- SLIFE_playerEnergy = (SLIFE_playerEnergy + (0.5)) min SLIFE_playerEnergyMax;
- };
- if ((getFatigue player) > 0) then
- {
- _fatigueMultiplier = 0.02;
- SLIFE_playerEnergyDegenRate = (SLIFE_playerEnergyDegenRate + _fatigueMultiplier);
- }else{
- SLIFE_playerEnergyDegenRate = 0.01;
- };
- if (SLIFE_playerFever) then
- {
- SLIFE_playerRested = false;
- SLIFE_playerRestedValue = 0;
- };
- _energyText = format["Energy: %1/%2",round(SLIFE_playerEnergy),SLIFE_playerEnergyMax];
- _energizedText = format["Energized: %1(%2)",SLIFE_playerRested,SLIFE_playerRestedValue];
- // HP
- _healthVar = (100 - ((getDammage player) * 100));
- if (_healthVar <= 10) then
- {
- addCamShake [1, 0.5, 16];
- };
- if (SLIFE_playerBloodTransfusionCorrect) then
- {
- SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue + (1.33)) min 100;
- player setDamage (getDammage player) - 0.025;
- _transfusionTimer = _transfusionTimer + 1;
- if (_transfusionTimer >= 20) then
- {
- _transfusionTimer = 0;
- SLIFE_playerBloodTransfusionCorrect = false;
- };
- };
- if (SLIFE_playerBloodTransfusionIncorrect) then
- {
- SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue + (1.33)) min 100;
- player setDamage (getDammage player) + 0.025;
- _transfusionIncTimer = _transfusionIncTimer + 1;
- if (_transfusionIncTimer >= 20) then
- {
- _transfusionIncTimer = 0;
- SLIFE_playerBloodTransfusionIncorrect = false;
- };
- };
- if (SLIFE_playerPain) then
- {
- addCamShake [3, 0.25, 16];
- if (SLIFE_playerPainkillersApplied) then
- {
- _painTimer = _painTimer + 1;
- if (_painTimer >= 60) then
- {
- SLIFE_playerPain = false;
- SLIFE_playerPainkillersApplied = false;
- };
- };
- };
- _healthText = format["Health: %1",round(_healthVar)];
- // ENERGY - END
- //-----------------------------------------------------//
- // TEMPERATURE & WET - START
- _inWater = surfaceIsWater getPos player;
- if (_vehicle == player) then
- {
- // Wet
- if (_inWater) then
- {
- SLIFE_playerWetValue = (SLIFE_playerWetValue + (20 / SLIFE_playerWetResist)) min 1000;
- }else{
- if (rain == 0) then
- {
- _wetValueDegen = 10 - (overcast * 10);
- SLIFE_playerWetValue = (SLIFE_playerWetValue - (1 + _wetValueDegen)) max 0;
- };
- };
- if (rain > 0) then
- {
- if !(call SLIFE_fnc_isInsideBuilding) then
- {
- SLIFE_playerWetValue = (SLIFE_playerWetValue + (rain * 10) / SLIFE_playerWetResist) min 1000;
- };
- };
- };
- // Temperature
- if (SLIFE_playerWet) then
- {
- if !(call SLIFE_fnc_isInsideBuilding) then
- {
- if (!_inWater) then
- {
- if (_hour > 19 || _hour < 5) then
- {
- SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) / SLIFE_playerTempResist + (overcast / 10)) max 30;
- }else{
- SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) / SLIFE_playerTempResist) max 30;
- };
- }else{
- if (_hour > 19 || _hour < 5) then
- {
- SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) + (overcast / 10) / (SLIFE_playerWetResist)) max 30;
- }else{
- SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) / (SLIFE_playerWetResist)) max 30;
- };
- };
- }else{
- _wetValueDegen = (0.01 + (overcast / 10) * SLIFE_playerWetResist);
- SLIFE_playerWetValue = (SLIFE_playerWetValue - (1 + _wetValueDegen)) max 0;
- };
- };
- if (!SLIFE_playerWet) then
- {
- if(SLIFE_playerTemp > 37 && _hour > 19 && !SLIFE_playerFever || SLIFE_playerTemp > 37 && _hour < 5 && !SLIFE_playerFever) then
- {
- SLIFE_playerTemp = (SLIFE_playerTemp - (0.1 + overcast / 10) / SLIFE_playerTempResist) max 37;
- };
- if(SLIFE_playerTemp < 37 && _hour < 19 && !SLIFE_playerFever || SLIFE_playerTemp < 37 && _hour > 5 && !SLIFE_playerFever) then
- {
- SLIFE_playerTemp = (SLIFE_playerTemp + ((1 - overcast) / 10) + (SLIFE_playerTempResist / 100)) min 37;
- };
- if (SLIFE_playerFever) then
- {
- if !(SLIFE_playerHydrated) then
- {
- SLIFE_playerTemp = (SLIFE_playerTemp + (0.025 * SLIFE_playerTempResist)) min 45;
- };
- };
- };
- if (SLIFE_playerHeatpackApplied) then
- {
- _heatpackTimer = _heatpackTimer + 1;
- if (_heatpackTimer <= 60) then
- {
- if (SLIFE_playerWet) then
- {
- SLIFE_playerTemp = (SLIFE_playerTemp + (0.01)) min 45;
- }else{
- SLIFE_playerTemp = (SLIFE_playerTemp + (0.05)) min 45;
- };
- }else{
- SLIFE_playerHeatpackApplied = false;
- };
- };
- if (SLIFE_playerWetValue > 0) then
- {
- SLIFE_playerWet = true;
- }else{
- SLIFE_playerWet = false;
- };
- if (SLIFE_playerTemp < 35) then
- {
- addCamShake [0.5, 0.85, 32];
- _hypothermiaTimer = _hypothermiaTimer + 1;
- _coldRnd = round(random 1000);
- if (SLIFE_playerVitaminsApplied) then
- {
- if (_coldRnd <= 5) then
- {
- SLIFE_playerFlu = true;
- };
- }else{
- if (_coldRnd <= 50) then
- {
- SLIFE_playerFlu = true;
- };
- };
- if (_hypothermiaTimer >= 500) then
- {
- player setDamage 1;
- cutText ["You died of Hypothermia.", "BLACK FADED", 999];
- };
- };
- if (SLIFE_playerTemp > 40) then
- {
- _hyperthermiaTimer = _hyperthermiaTimer + 1;
- if (_hyperthermiaTimer >= 500) then
- {
- player setDamage 1;
- cutText ["You died of Hyperpyrexia.", "BLACK FADED", 999];
- };
- };
- // TEMPERATURE & WET - END
- //-----------------------------------------------------//
- // HYGIENE - START //
- if (_vehicle == player) then
- {
- if (_inWater) then
- {
- SLIFE_playerHygiene = (SLIFE_playerHygiene + (1)) min 100;
- }else{
- SLIFE_playerHygiene = (SLIFE_playerHygiene - (0.01)) max 1;
- };
- if (rain > 0) then
- {
- if !(call SLIFE_fnc_isInsideBuilding) then
- {
- SLIFE_playerHygiene = (SLIFE_playerHygiene + rain) min 100;
- };
- };
- };
- // HYGIENE - END //
- //-----------------------------------------------------//
- // ILLNESS & DISEASE - START //
- // Illness
- if (SLIFE_playerFlu) then
- {
- _fluTimer = _fluTimer + 1;
- _fluEndTimer = round(random 100);
- if (_fluTimer >= 600) then
- {
- if (_fluEndTimer <= 1) then
- {
- if (SLIFE_playerTemp > 35) then
- {
- _fluTimer = 0;
- SLIFE_playerFlu = false;
- }else{
- _fluTimer = 0;
- };
- };
- };
- };
- if (SLIFE_playerInfection) then
- {
- SLIFE_playerFever = true;
- };
- if (SLIFE_playerSick) then
- {
- _sickTimer = _sickTimer + 1;
- _sickActionTimer = round(random 120);
- if (_sickTimer >= _sickActionTimer) then
- {
- _sickTimer = 0;
- };
- };
- // Disease
- if (SLIFE_playerCholera) then
- {
- SLIFE_playerDiarrhea = true;
- };
- if (SLIFE_playerSchistosomiasis) then
- {
- SLIFE_playerFever = true;
- };
- if (SLIFE_playerTyphoid) then
- {
- SLIFE_playerDiarrhea = true;
- SLIFE_playerFever = true;
- };
- // ILLNESS & DISEASE - END
- //-----------------------------------------------------//
- // MEDICAL - START
- //-----------------------------------------------------//
- if (_vehicle == player) then
- {
- if (SLIFE_playerBrokenLeg) then
- {
- if (_velocity > 1.2) then
- {
- _currentWeapon = currentWeapon player;
- _primaryWeapon = primaryWeapon player;
- _secondaryWeapon = handgunWeapon player;
- if (_currentWeapon == "") then
- {
- player playMove "AmovPercMsprSnonWnonDf_AmovPpneMstpSnonWnonDnon";
- }else{
- if (_currentWeapon == _primaryWeapon) then {
- player playMove "AmovPercMsprSlowWrflDf_AmovPpneMstpSrasWrflDnon";
- };
- if (_currentWeapon == _secondaryWeapon) then {
- player playMove "AmovPercMsprSlowWpstDf_AmovPpneMstpSrasWpstDnon";
- };
- };
- };
- };
- if (SLIFE_playerBrokenArm) then
- {
- _brokenArmTimer = _brokenArmTimer + 1;
- _brokenArmEndTimer = round(random 6000);
- if (SLIFE_playerArmSplintApplied) then
- {
- if (_brokenArmTimer >= 600) then
- {
- SLIFE_playerBrokenArm = false;
- _brokenArmTimer = 0;
- player addMagazine "SLIFE_item_splint_arm";
- };
- }else{
- if (_brokenArmTimer >= 1800) then
- {
- if (_brokenArmEndTimer <= 1) then
- {
- SLIFE_playerBrokenArm = false;
- _brokenArmTimer = 0;
- };
- };
- };
- };
- if (SLIFE_playerBrokenArm || SLIFE_playerBrokenLeg) then
- {
- if (!SLIFE_playerPain) then
- {
- _rndPainChance = round(random 100);
- _rndPainTimer = _rndPainTimer + 1;
- if (_rndPainTimer >= 500) then
- {
- if (_rndPainChance <= 5) then
- {
- SLIFE_playerPain = true;
- _rndPainChance = 0;
- _rndPainTimer = 0;
- };
- };
- };
- };
- };
- if (SLIFE_playerBrokenLeg) then
- {
- _brokenLegTimer = _brokenLegTimer + 1;
- _brokenLegEndTimer = round(random 6000);
- if (SLIFE_playerLegSplintApplied) then
- {
- if (_brokenLegTimer >= 600) then
- {
- SLIFE_playerBrokenLeg = false;
- _brokenLegTimer = 0;
- player addMagazine "SLIFE_item_splint_leg";
- };
- }else{
- if (_brokenLegTimer >= 1800) then
- {
- if (_brokenLegEndTimer <= 1) then
- {
- SLIFE_playerBrokenLeg = false;
- _brokenLegTimer = 0;
- };
- };
- };
- };
- if (isBleeding player) then
- {
- SLIFE_playerBleeding = true;
- };
- if (SLIFE_playerBleeding) then
- {
- player setBleedingRemaining 1;
- _bleedValue = ((getDammage player) / 100);
- if (SLIFE_playerBandageApplied) then
- {
- if (SLIFE_playerDressingApplied) then
- {
- player setDamage (getDammage player) + (_bleedValue / 100);
- }else{
- player setDamage (getDammage player) + (_bleedValue / 10);
- };
- }else{
- if (SLIFE_playerDressingApplied) then
- {
- player setDamage (getDammage player) + (_bleedValue / 5);
- }else{
- player setDamage (getDammage player) + _bleedValue;
- };
- };
- SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue - (getDammage player) / 100) max 0;
- _bleedTimer = _bleedTimer + 1;
- _bleedEndTimer = round(random 128);
- if (_bleedTimer >= 60) then
- {
- if (SLIFE_playerDressingApplied) then
- {
- if (_bleedEndTimer <= 10) then
- {
- _bleedTimer = 0;
- _bleedEndTimer = 0;
- SLIFE_playerBleeding = false;
- SLIFE_playerBandageApplied = false;
- SLIFE_playerDressingApplied = false;
- };
- }else{
- if (_bleedEndTimer <= 1) then
- {
- _bleedTimer = 0;
- _bleedEndTimer = 0;
- SLIFE_playerBleeding = false;
- SLIFE_playerBandageApplied = false;
- SLIFE_playerDressingApplied = false;
- };
- };
- };
- };
- if (!SLIFE_playerBleeding) then
- {
- if (getDammage player > 0) then
- {
- if (SLIFE_playerHydrated && SLIFE_playerSatiated) then
- {
- if (SLIFE_playerBloodPressureValue > 50) then
- {
- SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue - (0.025)) max 50;
- }else{
- SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue + (0.025)) min 50;
- };
- if !(SLIFE_playerFlu) then
- {
- player setDamage (getDammage player) - 0.0025;
- }else{
- player setDamage (getDammage player) - 0.001;
- };
- };
- };
- };
- // Blood Pressure
- if (SLIFE_playerBloodPressureValue >= 66) then
- {
- SLIFE_playerBloodPressure = "Elevated";
- };
- if (SLIFE_playerBloodPressureValue >= 33 && SLIFE_playerBloodPressureValue < 66) then
- {
- SLIFE_playerBloodPressure = "Normal";
- };
- if (SLIFE_playerBloodPressureValue < 33) then
- {
- SLIFE_playerBloodPressure = "Low";
- };
- if (SLIFE_playerBloodPressureValue >= 100) then
- {
- player setDamage 1;
- cutText ["You died of Hypertension.", "BLACK FADED", 999];
- };
- if (SLIFE_playerBloodPressureValue <= 0) then
- {
- player setDamage 1;
- cutText ["You died of Hypotension.", "BLACK FADED", 999];
- };
- if (SLIFE_playerUnconscious) then
- {
- _unconsciousTimer = _unconsciousTimer + 1;
- _unconsciousTimerLimit = (random 100);
- if (_unconsciousTimer >= _unconsciousTimerLimit && _unconsciousTimer > 30) then
- {
- SLIFE_playerUnconscious = false;
- };
- };
- // Weight
- if (SLIFE_playerWeight > 0) then
- {
- };
- _weightText = format["Weight: %1kg",SLIFE_playerWeight];
- if (SLIFE_playerVitaminsApplied) then
- {
- _vitaminTimer = SLIFE_playerVitaminsTimer + 1;
- if (_vitaminTimer >= 6000) then
- {
- SLIFE_playerVitaminsApplied = false;
- };
- };
- if (SLIFE_playerAntibioticsApplied) then
- {
- _antibioticTimer = _antibioticTimer + 1;
- if (_antibioticTimer >= 120) then
- {
- SLIFE_playerFever = false;
- SLIFE_playerDiarrhea = false;
- SLIFE_playerInfection = false;
- SLIFE_playerCholera = false;
- SLIFE_playerSchistosomiasis = false;
- SLIFE_playerTyphoid = false;
- };
- };
- // Desaturate based on HP
- if (_healthVar <= 10) then
- {
- _satVar = round(_healthVar) / 10;
- _satVar1 = (0.0075 * round(_healthVar));
- _satVar2 = (0.0025 * round(_healthVar));
- _satVar3 = (0.01 * round(_healthVar));
- _satVar4 = round(_healthVar) / 100;
- "colorCorrections" ppEffectAdjust [1, 1, 0, [_satVar3, _satVar3, _satVar3, 0], [_satVar3, _satVar3, _satVar3, _satVar4], [_satVar1, _satVar2, 0, _satVar2]];
- "colorCorrections" ppEffectCommit 1;
- "colorCorrections" ppEffectEnable true;
- };
- if (SLIFE_playerRadExposureSeverity > 0) then
- {
- SLIFE_playerRadExposure = true;
- SLIFE_playerRads = SLIFE_playerRads + (SLIFE_playerRadExposureSeverity / SLIFE_playerRadResist);
- if (random 3 <= 1) then
- {
- if (SLIFE_playerRadExposureSeverity == 1) then
- {
- player say3D "SLIFE_snd_geigerLow";
- };
- if (SLIFE_playerRadExposureSeverity == 2) then
- {
- player say3D "SLIFE_snd_geigerMed";
- };
- if (SLIFE_playerRadExposureSeverity == 3) then
- {
- player say3D "SLIFE_snd_geigerHigh";
- };
- };
- }else{
- SLIFE_playerRadExposure = false;
- };
- if (SLIFE_playerRads > 0 && SLIFE_playerRads < 1000) then
- {
- player setDamage ((getDammage player) + (SLIFE_playerRads / 1000000));
- };
- if (SLIFE_playerGasExposure) then
- {
- if (!SLIFE_playerGasResist) then
- {
- SLIFE_playerOxygen = (SLIFE_playerOxygen - (1)) max 0;
- }else{
- if ((getOxygenRemaining player) == 1) then
- {
- SLIFE_playerOxygen = (SLIFE_playerOxygen + (1)) min 100;
- };
- };
- };
- if (!SLIFE_playerGasExposure) then
- {
- SLIFE_playerOxygen = (((getOxygenRemaining player) * 100) - 50);
- if (SLIFE_playerOxygen <= 0) then
- {
- SLIFE_playerOxygen = 0;
- };
- };
- if (SLIFE_playerOxygen <= 0) then
- {
- _oxygenTimer = _oxygenTimer + 1;
- _oxygenTimerLimit = 60;
- _oxygenTimerLimit2 = 120;
- if (_oxygenTimer >= _oxygenTimerLimit) then
- {
- SLIFE_playerUnconscious = true;
- if (_oxygenTimer >= _oxygenTimerLimit2) then
- {
- player setDamage 1;
- if (SLIFE_playerGasExposure) then
- {
- cutText ["You died of Suffocation.", "BLACK FADED", 999];
- }else{
- player setDamage 1;
- cutText ["You drowned.", "BLACK FADED", 999];
- };
- };
- };
- };
- //-----------------------------------------------------//
- // DISPLAY HINT
- _displayTemp = round(SLIFE_playerTemp * (10 ^ 1)) / (10 ^ 1);
- _oxyText = format ["o2: %1%",round(SLIFE_playerOxygen * 2)];
- _wetText = format["Wet: %1(%2)",SLIFE_playerWet,round(SLIFE_playerWetValue / 10)];
- _tempText = format["Body Temp: %1C",_displayTemp];
- _timeText = format ["Time: %1:%2",_hour,_minute];
- _serverTimeText = format ["Server Time: %1", (floor daytime)];
- _velocityText = format ["Speed: %1",_velocity];
- _hygieneText = format ["Hygiene: %1",round(SLIFE_playerHygiene)];
- _painText = format ["Pain: %1",SLIFE_playerPain];
- _bleedingText = format ["Bleeding: %1", SLIFE_playerBleeding];
- _bloodTypeText = format ["Bloodtype: %1",SLIFE_playerBloodtype];
- _bloodPressure = format ["Blood Pressure: %1(%2)",SLIFE_playerBloodPressure,round(SLIFE_playerBloodPressureValue)];
- _fluText = format ["Flu: %1",SLIFE_playerFlu];
- _sickText = format ["Sick: %1",SLIFE_playerSick];
- _infectionText = format ["Infection: %1",SLIFE_playerInfection];
- _feverText = format ["Fever: %1",SLIFE_playerFever];
- _diarrheaText = format ["Diarrhea: %1",SLIFE_playerDiarrhea];
- _choleraText = format ["Cholera: %1",SLIFE_playerCholera];
- _schistosomiasisText = format ["Schistosomiasis: %1",SLIFE_playerSchistosomiasis];
- _typhoidText = format ["Typhoid: %1",SLIFE_playerTyphoid];
- _brokenArmText = format ["Broken Arm: %1", SLIFE_playerBrokenArm];
- _brokenLegText = format ["Broken Leg: %1", SLIFE_playerBrokenLeg];
- _radsText = format ["Rads: %1", SLIFE_playerRads];
- _tempResistText = format ["Cold Resist: %1", SLIFE_playerTempResist];
- _wetResistText = format ["Wet Resist: %1", SLIFE_playerWetResist];
- hintSilent parseText (_bloodTypeText + "<br/>" + _bloodPressure + "<br/>" + _weightText + "<br/>" + _oxyText + "<br/><br/>" + _fluText + "<br/>" + _sickText + "<br/>" + _infectionText + "<br/>" + _feverText + "<br/>" + _diarrheaText + "<br/>" + _choleraText + "<br/>" + _schistosomiasisText + "<br/>" + _typhoidText + "<br/><br/>" + _healthText + "<br/>" + _staminaText + "<br/>" + _fatigueText + "<br/>" + _hungerText + "<br/>" + _thirstText + "<br/>" + _energyText + "<br/>" + _radsText + "<br/><br/>" + _satiatedText + "<br/>" + _hydrationText + "<br/>" + _energizedText + "<br/>" + _painText + "<br/>" + _bleedingText + "<br/>" + _brokenArmText + "<br/>" + _brokenLegText + "<br/><br/>" + _wetText + "<br/>" + _wetResistText + "<br/>" + _tempText + "<br/>" + _tempResistText + "<br/><br/>" + _hygieneText);
- };
- if (_healthVar <= 10) then
- {
- "dynamicBlur" ppEffectEnable true;
- "dynamicBlur" ppEffectAdjust [0.5];
- "dynamicBlur" ppEffectCommit 0.5;
- enableCamShake true;
- };
- if (_healthVar > 10) then
- {
- "dynamicBlur" ppEffectEnable false;
- };
- if (SLIFE_playerTemp < 35 || SLIFE_playerFlu || SLIFE_playerPain) then
- {
- enableCamShake true;
- }else{
- enableCamShake false;
- };
- if (_healthVar > 10 && _hour > 19 || _healthVar > 10 && _hour < 5) then
- {
- "colorCorrections" ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [0.6, 0.6, 1.8, 0.7], [0.199, 0.587, 0.114, 0.0]];
- "colorCorrections" ppEffectCommit 1;
- "colorCorrections" ppEffectEnable true;
- };
- if (_healthVar > 10 && _hour > 5 && _hour < 19) then
- {
- "colorCorrections" ppEffectAdjust [1.0, 1.0, 0.0,[1.0, 1.0, 1.0, 0.0],[1.0, 1.0, 0.9, 0.35],[0.3,0.3,0.3,-0.1]];
- "colorCorrections" ppEffectCommit 1;
- "colorCorrections" ppEffectEnable true;
- };
- };
- while {!alive player} do
- {
- hintSilent "";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement