Advertisement
Guest User

Untitled

a guest
Jan 15th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 42.53 KB | None | 0 0
  1. 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"];
  2. waitUntil {!isNil "SLIFE_module_SurvivalInitComplete"};
  3. _tickTime1 = diag_tickTime;
  4. _tickTime3 = diag_tickTime;
  5.  
  6. // Variables
  7. _oxygenTimer = 0;
  8. _oxygenTimerLimit = 0;
  9. _oxygenTimerLimit2 = 0;
  10. _oxyText = 0;
  11. _radsText = 0;
  12. _velocity = 0;
  13. _dehydrateTimer = 0;
  14. _starvationTimer = 0;
  15. _distanceTraveled = 0;
  16. _totaldistanceTraveled = 0;
  17. _hypothermiaTimer = 0;
  18. _hyperthermiaTimer = 0;
  19. _heatpackTimer = 0;
  20. _healthVar = 0;
  21. _fluTimer = 0;
  22. _paintimer = 0;
  23. _painText = 0;
  24. _bleedingText = 0;
  25. _sickTimer = 0;
  26. _sickActionTimer = 0;
  27. _increaseStamina = false;
  28. _bloodTypeText = 0;
  29. _fluEndTimer = 0;
  30. _bleedValue = 0;
  31. _bleedTimer = 0;
  32. _brokenLegTimer = 0;
  33. _brokenLegEndTimer = 0;
  34. _transfusionTimer = 0;
  35. _transfusionIncTimer = 0;
  36. _unconsciousTimer = 0;
  37. _unconsciousTimerLimit = 0;
  38. _vitaminTimer = 0;
  39. _fluText = 0;
  40. _sickText = 0;
  41. _infectionText = 0;
  42. _feverText = 0;
  43. _diarrheaText = 0;
  44. _choleraText = 0;
  45. _schistosomiasisText = 0;
  46. _typhoidText = 0;
  47. _antibioticTimer = 0;
  48. _satVar = 0;
  49. _satVar1 = 0;
  50. _satVar2 = 0;
  51. _satVar3 = 0;
  52. _satVar4 = 0;
  53. _hour = 0;
  54. _weightText = 0;
  55. _brokenArmText = 0;
  56. _brokenLegText = 0;
  57. _rndPainChance = 0;
  58. _rndPainTimer = 0;
  59. _brokenArmTimer = 0;
  60. _brokenArmEndTimer = 0;
  61. _playerHeadgear = 0;
  62. _playerFacegear = 0;
  63. _playerUniform = 0;
  64. _playerVest = 0;
  65. _tempResistText = 0;
  66. _wetResistText = 0;
  67.  
  68. while {alive player} do
  69. {
  70.     player allowDamage true;
  71.     _tickTime2 = diag_tickTime;
  72.     if ((_tickTime2 - _tickTime1) > 1) then
  73.     {
  74.         _tickTime1 = _tickTime2;
  75.         if ((_tickTime2 - _tickTime3) > 10) then
  76.         {
  77.             _tickTime3 = _tickTime2;
  78.             call SLIFE_fnc_runLoot;
  79.         };
  80.         _hour = floor daytime;
  81.         _minute = floor ((daytime - _hour) * 60);
  82.         _vehicle = vehicle player;
  83.         SLIFE_lastPlayerPos = getPosATL vehicle player;
  84.         enableCamShake false;
  85.         // CLOSE INVENTORY ON ACTION
  86.         while {SLIFE_ActionInProgress} do
  87.         {
  88.             waituntil {!isnull (findDisplay 602)};
  89.             closeDialog 602;
  90.         }; 
  91.         // TEMPERATURE & WET RESISTANCE - START
  92.         _playerHeadgear = headgear player;
  93.         _playerFacegear = goggles player;
  94.         _playerUniform = uniform player;
  95.         _playerVest = vest player;
  96.         switch (_playerHeadgear) do
  97.         {
  98.             // Headgear
  99.             case "H_RacingHelmet_1_orange_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  100.             case "H_RacingHelmet_1_yellow_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  101.             case "H_RacingHelmet_1_white_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  102.             case "H_RacingHelmet_1_red_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  103.             case "H_RacingHelmet_1_green_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  104.             case "H_RacingHelmet_1_blue_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  105.             case "H_RacingHelmet_1_black_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  106.             case "H_RacingHelmet_4_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  107.             case "H_RacingHelmet_3_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  108.             case "H_RacingHelmet_2_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  109.             case "H_RacingHelmet_1_F": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  110.             case "H_Booniehat_dgtl": {SLIFE_wetResistArrayValueHead = 1;};
  111.             case "H_Booniehat_dirty": {SLIFE_wetResistArrayValueHead = 1;};
  112.             case "H_Booniehat_tan": {SLIFE_wetResistArrayValueHead = 1;};
  113.             case "H_Booniehat_grn": {SLIFE_wetResistArrayValueHead = 1;};
  114.             case "H_Booniehat_mcamo": {SLIFE_wetResistArrayValueHead = 1;};
  115.             case "H_Booniehat_indp": {SLIFE_wetResistArrayValueHead = 1;};
  116.             case "H_Booniehat_oli": {SLIFE_wetResistArrayValueHead = 1;};
  117.             case "H_Booniehat_khk": {SLIFE_wetResistArrayValueHead = 1;};
  118.             case "H_Booniehat_khk_hs": {SLIFE_wetResistArrayValueHead = 1;};
  119.             case "H_HelmetB": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  120.             case "H_HelmetB_camo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  121.             case "H_HelmetB_paint": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  122.             case "H_HelmetB_light": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  123.             case "H_HelmetB_plain_mcamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  124.             case "H_HelmetB_plain_blk": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  125.             case "H_HelmetSpecB": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  126.             case "H_HelmetSpecB_paint1": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  127.             case "H_HelmetSpecB_paint2": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  128.             case "H_HelmetSpecB_blk": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  129.             case "H_HelmetIA": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  130.             case "H_HelmetIA_net": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  131.             case "H_HelmetIA_camo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  132.             case "H_Helmet_Kerry": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  133.             case "H_HelmetB_grass": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  134.             case "H_HelmetB_snakeskin": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  135.             case "H_HelmetB_desert": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  136.             case "H_HelmetB_black": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  137.             case "H_HelmetB_sand": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  138.             case "H_HelmetCrew_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  139.             case "H_HelmetCrew_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  140.             case "H_HelmetCrew_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  141.             case "H_PilotHelmetFighter_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  142.             case "H_PilotHelmetFighter_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  143.             case "H_PilotHelmetFighter_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  144.             case "H_PilotHelmetHeli_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  145.             case "H_PilotHelmetHeli_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  146.             case "H_PilotHelmetHeli_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  147.             case "H_CrewHelmetHeli_B": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  148.             case "H_CrewHelmetHeli_O": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  149.             case "H_CrewHelmetHeli_I": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  150.             case "H_HelmetO_ocamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  151.             case "H_HelmetLeaderO_ocamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  152.             case "H_HelmetB_light_grass": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  153.             case "H_HelmetB_light_snakeskin": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  154.             case "H_HelmetB_light_desert": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  155.             case "H_HelmetB_light_black": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  156.             case "H_HelmetB_light_sand": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  157.             case "H_HelmetO_oucamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  158.             case "H_HelmetLeaderO_oucamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  159.             case "H_HelmetSpecO_ocamo": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  160.             case "H_HelmetSpecO_blk": {SLIFE_tempResistArrayValueHead = 1; SLIFE_wetResistArrayValueHead = 1;};
  161.             case "H_Shemag_khk": {SLIFE_tempResistArrayValueHead = 1;};
  162.             case "H_Shemag_tan": {SLIFE_tempResistArrayValueHead = 1;};
  163.             case "H_Shemag_olive": {SLIFE_tempResistArrayValueHead = 1;};
  164.             case "H_Shemag_olive_hs": {SLIFE_tempResistArrayValueHead = 1;};
  165.             case "H_ShemagOpen_khk": {SLIFE_tempResistArrayValueHead = 1;};
  166.             case "H_ShemagOpen_tan": {SLIFE_tempResistArrayValueHead = 1;};
  167.             case "H_Watchcap_sgg": {SLIFE_tempResistArrayValueHead = 2;};
  168.             case "H_Watchcap_camo": {SLIFE_tempResistArrayValueHead = 2;};
  169.             case "H_Watchcap_khk": {SLIFE_tempResistArrayValueHead = 2;};
  170.             case "H_Watchcap_cbr": {SLIFE_tempResistArrayValueHead = 2;};
  171.             case "H_Watchcap_blk": {SLIFE_tempResistArrayValueHead = 2;};
  172.             default {SLIFE_tempResistArrayValueHead = 0; SLIFE_wetResistArrayValueHead = 0;};
  173.         };
  174.         switch (_playerFacegear) do
  175.         {
  176.         // Facegear
  177.             case "G_Balaclava_blk": {SLIFE_tempResistArrayValueFace = 1;};
  178.             case "G_Balaclava_combat": {SLIFE_tempResistArrayValueFace = 1; SLIFE_wetResistArrayValueFace = 1;};
  179.             case "G_Balaclava_lowprofile": {SLIFE_tempResistArrayValueFace = 1; SLIFE_wetResistArrayValueFace = 1;};
  180.             case "G_Balaclava_oli": {SLIFE_tempResistArrayValueFace = 1;};
  181.             case "G_Bandanna_blk": {SLIFE_tempResistArrayValueFace = 1;};
  182.             case "G_Bandanna_oli": {SLIFE_tempResistArrayValueFace = 1;};
  183.             case "G_Bandanna_khk": {SLIFE_tempResistArrayValueFace = 1;};
  184.             case "G_Bandanna_tan": {SLIFE_tempResistArrayValueFace = 1;};
  185.             case "G_Bandanna_beast": {SLIFE_tempResistArrayValueFace = 1;};
  186.             case "G_Bandanna_shades": {SLIFE_tempResistArrayValueFace = 1;};
  187.             case "G_Bandanna_sport": {SLIFE_tempResistArrayValueFace = 1;};
  188.             case "G_Bandanna_aviator": {SLIFE_tempResistArrayValueFace = 1;};
  189.             case "G_Diving": {SLIFE_wetResistArrayValueFace = 2;};
  190.             case "G_B_Diving" : {SLIFE_wetResistArrayValueFace = 2;};
  191.             case "G_O_Diving": {SLIFE_wetResistArrayValueFace = 2;};
  192.             case "G_I_Diving": {SLIFE_wetResistArrayValueFace = 2;};
  193.             default {SLIFE_tempResistArrayValueFace = 0; SLIFE_wetResistArrayValueFace = 0;SLIFE_radResistArrayValueFace = 0;};
  194.         };
  195.         switch (_playerUniform) do
  196.         {
  197.         // Uniforms
  198.             case "U_B_Wetsuit": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 10;};
  199.             case "U_B_FullGhillie_lsh": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
  200.             case "U_B_FullGhillie_sard": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
  201.             case "U_B_FullGhillie_ard": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
  202.             case "U_B_CombatUniform_mcam": {SLIFE_tempResistArrayValueUniform = 1;};
  203.             case "U_B_GhillieSuit": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
  204.             case "U_B_HeliPilotCoveralls": {SLIFE_tempResistArrayValueUniform = 1;};
  205.             case "U_B_CombatUniform_mcam_worn": {SLIFE_tempResistArrayValueUniform = 1;};
  206.             case "U_B_CombatUniform_wdl": {SLIFE_tempResistArrayValueUniform = 1;};
  207.             case "U_B_CombatUniform_sgg": {SLIFE_tempResistArrayValueUniform = 1;};
  208.             case "U_B_SpecopsUniform_sgg": {SLIFE_tempResistArrayValueUniform = 1;};
  209.             case "U_B_PilotCoveralls": {SLIFE_tempResistArrayValueUniform = 1;};
  210.             case "U_B_CTRG_1": {SLIFE_tempResistArrayValueUniform = 1;};
  211.             case "U_B_survival_uniform": {SLIFE_tempResistArrayValueUniform = 1;SLIFE_wetResistArrayValueUniform = 1;};
  212.             default {SLIFE_tempResistArrayValueUniform = 0; SLIFE_wetResistArrayValueUniform = 0;SLIFE_radResistArrayValueUniform = 0;};
  213.         };
  214.         switch (_playerVest) do
  215.         {
  216.         // Vests
  217.             case "V_RebreatherB": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 5;};
  218.             case "V_RebreatherIR": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 5;};
  219.             case "V_RebreatherIA": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 5;};
  220.             case "V_PlateCarrier1_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  221.             case "V_PlateCarrier2_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  222.             case "V_PlateCarrier3_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  223.             case "V_PlateCarrierGL_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  224.             case "V_PlateCarrier1_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  225.             case "V_PlateCarrierSpec_rgr": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  226.             case "V_TacVest_khk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  227.             case "V_TacVest_brn": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  228.             case "V_TacVest_oli": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  229.             case "V_TacVest_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  230.             case "V_TacVest_camo": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  231.             case "V_TacVest_blk_POLICE": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  232.             case "V_TacVestIR_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  233.             case "V_TacVestCamo_khk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  234.             case "V_PlateCarrierIA1_dgtl": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  235.             case "V_PlateCarrierIA2_dgtl": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  236.             case "V_PlateCarrierIAGL_dgtl": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  237.             case "V_PlateCarrier_Kerry": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  238.             case "V_PlateCarrierL_CTRG": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  239.             case "V_PlateCarrierH_CTRG": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  240.             case "V_I_G_resistanceLeader_F": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  241.             case "V_PlateCarrierGL_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  242.             case "V_PlateCarrierGL_mtp": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  243.             case "V_PlateCarrierSpec_blk": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  244.             case "V_PlateCarrierSpec_mtp": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  245.             case "V_PlateCarrierIAGL_oli": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  246.             case "V_Press_F": {SLIFE_tempResistArrayValueVest = 1; SLIFE_wetResistArrayValueVest = 1;};
  247.             default {SLIFE_tempResistArrayValueVest = 0; SLIFE_wetResistArrayValueVest = 0;SLIFE_radResistArrayValueVest = 0;};
  248.         };
  249.         SLIFE_playerRadResist = 1 + (SLIFE_radResistArrayValueHead + SLIFE_radResistArrayValueFace + SLIFE_radResistArrayValueUniform + SLIFE_radResistArrayValueVest);
  250.         SLIFE_playerTempResist = 1 + (SLIFE_tempResistArrayValueHead + SLIFE_tempResistArrayValueFace + SLIFE_tempResistArrayValueUniform + SLIFE_tempResistArrayValueVest);
  251.         SLIFE_playerWetResist = 1 + (SLIFE_wetResistArrayValueHead + SLIFE_wetResistArrayValueFace + SLIFE_wetResistArrayValueUniform + SLIFE_wetResistArrayValueVest);
  252.         // TEMPERATURE RESISTANCE - END
  253.         // STAMINA - START
  254.         if (_vehicle == player) then
  255.         {
  256.             _velocity = log(abs(speed player));
  257.             if (_velocity > 0.86) then
  258.             {
  259.                 _distanceTraveled = _distanceTraveled + _velocity;
  260.                 if (SLIFE_playerRested) then
  261.                 {
  262.                     _energizedStaminaLoss = (_velocity/2);
  263.                     SLIFE_playerStamina = (SLIFE_playerStamina - (_energizedStaminaLoss/4)) max 0;
  264.                 }else{
  265.                     if (_velocity < 1.2) then
  266.                     {
  267.                         if (!SLIFE_playerFever) then
  268.                         {
  269.                             SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity/10)) max 0;
  270.                         }else{
  271.                             SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity/5)) max 0;
  272.                         };                                                 
  273.                     }else{
  274.                         if (SLIFE_playerFever) then
  275.                         {
  276.                             SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity)) max 0;
  277.                         }else{
  278.                             SLIFE_playerStamina = (SLIFE_playerStamina - (_velocity/2)) max 0;
  279.                         }; 
  280.                     };         
  281.                 };
  282.             } else {
  283.                 _distanceTraveled = 0;
  284.                 _increaseStamina = true;
  285.             };
  286.         };
  287.         if (_increaseStamina && (getFatigue player) == 0 && !SLIFE_playerStaminaDegen) then
  288.         {
  289.             SLIFE_playerStaminaRegenRate = (0.01 * SLIFE_playerStaminaMax);
  290.             if (SLIFE_playerRested) then
  291.                 {
  292.                     _energizedStaminaRegen = (SLIFE_playerStaminaRegenRate*2);
  293.                     SLIFE_playerStamina = (SLIFE_playerStamina + _energizedStaminaRegen) min SLIFE_playerStaminaMax;
  294.                 }else{
  295.                     SLIFE_playerStamina = (SLIFE_playerStamina + SLIFE_playerStaminaRegenRate) min SLIFE_playerStaminaMax;
  296.                 };
  297.         };
  298.         if (SLIFE_playerStaminaDegen) then
  299.         {
  300.             SLIFE_playerStamina = (SLIFE_playerStamina - SLIFE_playerStaminaDegenRate) max 0;      
  301.         };
  302.        
  303.         if (SLIFE_playerStamina > 0) then
  304.         {
  305.             player setFatigue 0;
  306.         };
  307.         if (_distanceTraveled > 0) then
  308.         {
  309.             _totaldistanceTraveled = _totaldistanceTraveled + _distanceTraveled;
  310.             _requirement = SLIFE_playerStaminaMax * 100;
  311.             if (_totaldistanceTraveled >= _requirement) then
  312.             {
  313.                 if ((SLIFE_playerStaminaMax  < 100) && !SLIFE_playerStaminaDegen) then
  314.                 {
  315.                     _distanceTraveled = 0;
  316.                     _totaldistanceTraveled = 0;
  317.                     SLIFE_playerStaminaMax = SLIFE_playerStaminaMax + 1;
  318.                 };
  319.                 if ((SLIFE_playerStaminaMax  > 10) && SLIFE_playerStaminaDegen) then
  320.                 {
  321.                     _distanceTraveled = 0;
  322.                     _totaldistanceTraveled = 0;
  323.                     SLIFE_playerStaminaMax = SLIFE_playerStaminaMax - 1;
  324.                 };
  325.             };
  326.         };
  327.         _fatigue = round(getFatigue player * 100);
  328.         _staminaText = format["Stamina: %1/%2",round(SLIFE_playerStamina),SLIFE_playerStaminaMax];
  329.         _fatigueText = format["Fatigue: %1/100",_fatigue];
  330.         // STAMINA - END
  331.         //-----------------------------------------------------//
  332.         // HUNGER - START
  333.         if (_vehicle == player) then
  334.         {
  335.             // Moving Calories Degeneration
  336.             if ((_velocity > 0.86)) then
  337.             {
  338.                 _hungerDegenMoving = SLIFE_playerCaloriesDegenRate;
  339.                 _hungerDegenMoving = _hungerDegenMoving + _velocity;
  340.                 if (!SLIFE_playerSatiated) then
  341.                 {
  342.                     SLIFE_playerCalories = (SLIFE_playerCalories - (_hungerDegenMoving)) max 0;
  343.                 }; 
  344.                 if (SLIFE_playerSick) then
  345.                 {
  346.                     SLIFE_playerCalories = (SLIFE_playerCalories - (_hungerDegenMoving * 10)) max 0;   
  347.                 };
  348.             };
  349.         };
  350.         if (SLIFE_playerSatiatedValue >= 1200) then
  351.         {
  352.             SLIFE_playerSick = true;
  353.         };
  354.         if (SLIFE_playerSatiatedValue <= 900) then
  355.         {
  356.             SLIFE_playerSick = false;
  357.         };
  358.         if (SLIFE_playerSatiatedValue > 0) then
  359.         {
  360.             SLIFE_playerSatiated = true;
  361.         };
  362.         if (SLIFE_playerHydratedValue >= 1200) then
  363.         {
  364.             SLIFE_playerDiarrhea = true;
  365.         };
  366.         if ((SLIFE_playerHydratedValue <= 900) && !SLIFE_playerCholera && !SLIFE_playerTyphoid)  then
  367.         {
  368.             SLIFE_playerDiarrhea = false;
  369.         };
  370.     // Calories Degeneration
  371.         if (SLIFE_playerSick) then
  372.         {
  373.             SLIFE_playerCalories = (SLIFE_playerCalories - (SLIFE_playerCaloriesDegenRate * 10)) max 0;
  374.         };
  375.         if !(SLIFE_playerSatiated) then
  376.         {
  377.             SLIFE_playerCalories = (SLIFE_playerCalories - (SLIFE_playerCaloriesDegenRate)) max 0; 
  378.         };
  379.             if (SLIFE_playerSatiated) then
  380.             {
  381.                 SLIFE_playerSatiatedValue = (SLIFE_playerSatiatedValue - (1)) max 0;
  382.                 if (SLIFE_playerSatiatedValue <= 0) then
  383.                 {
  384.                     SLIFE_playerSatiated = false;
  385.                 };
  386.             };
  387.             if (SLIFE_playerCalories == 0) then
  388.             {
  389.                 _starvationTimer = _starvationTimer + 1;
  390.                 if (_starvationTimer >= 84000) then
  391.                 {
  392.                     player setDamage 1;
  393.                     cutText ["You died of Starvation.", "BLACK FADED", 999];
  394.                 };
  395.             };
  396.             if (SLIFE_playerCalories > 0) then
  397.             {
  398.                 _starvationTimer = 0;
  399.             };
  400.             if (SLIFE_playerTemp < 35) then
  401.             {
  402.                 _hungerDegenCold = SLIFE_playerCaloriesDegenRate * SLIFE_playerTemp;
  403.                 SLIFE_playerCalories = (SLIFE_playerCalories - (_hungerDegenCold)) max 0;
  404.             };
  405.        
  406.         _hungerText = format["Calories: %1/%2",round(SLIFE_playerCalories),SLIFE_playerCaloriesMax];
  407.         _satiatedText = format["Satiated: %1(%2)",SLIFE_playerSatiated,SLIFE_playerSatiatedValue];
  408.        
  409.        
  410.         // HUNGER - END
  411.         //-----------------------------------------------------//
  412.         // THIRST - START
  413.         if (_vehicle == player) then
  414.         {
  415.             if (_velocity > 0.86) then
  416.             {
  417.                 if (SLIFE_playerDiarrhea) then
  418.                 {
  419.                     _thirstDegenMoving = (SLIFE_playerThirstDegenRate * 10);
  420.                     _thirstDegenMoving = _thirstDegenMoving + _velocity;
  421.                 }else{
  422.                     _thirstDegenMoving = SLIFE_playerThirstDegenRate;
  423.                     _thirstDegenMoving = _thirstDegenMoving + _velocity;
  424.                 };
  425.                 if !(SLIFE_playerHydrated) then
  426.                 {
  427.                     SLIFE_playerThirst = (SLIFE_playerThirst - (_thirstDegenMoving)) max 0;
  428.                 };             
  429.             };
  430.         };
  431.         if (SLIFE_playerHydratedValue > 0) then
  432.         {
  433.             SLIFE_playerHydrated = true;
  434.         };
  435.         if !(SLIFE_playerHydrated) then
  436.         {              
  437.             SLIFE_playerThirst = (SLIFE_playerThirst - (SLIFE_playerThirstDegenRate)) max 0;
  438.         };
  439.         if (SLIFE_playerHydrated) then
  440.         {
  441.             SLIFE_playerHydratedValue = (SLIFE_playerHydratedValue - (1)) max 0;
  442.             if (SLIFE_playerHydratedValue <= 0) then
  443.             {
  444.                 SLIFE_playerHydrated = false;
  445.             };
  446.         };
  447.         if (SLIFE_playerThirst == 0) then
  448.         {
  449.             _dehydrateTimer = _dehydrateTimer + 1;
  450.             if (_dehydrateTimer >= 12000) then
  451.             {
  452.                 player setDamage 1;
  453.                 cutText ["You died of Dehydration.", "BLACK FADED", 999];
  454.             };
  455.         };
  456.         if (SLIFE_playerThirst > 0) then
  457.         {
  458.             _dehydrateTimer = 0;
  459.         };
  460.        
  461.         _thirstText = format["Thirst: %1/%2",round(SLIFE_playerThirst),SLIFE_playerThirstMax];
  462.         _hydrationText = format["Hydrated: %1(%2)",SLIFE_playerHydrated,SLIFE_playerHydratedValue];
  463.         // THIRST - END
  464.         //-----------------------------------------------------//
  465.         // ENERGY - START
  466.         if (SLIFE_playerRestedValue > 0) then
  467.         {
  468.             SLIFE_playerRested = true;
  469.         };
  470.         if (SLIFE_playerRested) then
  471.         {
  472.             SLIFE_playerRestedValue = (SLIFE_playerRestedValue - (1)) max 0;
  473.             if (SLIFE_playerRestedValue <= 0) then
  474.             {
  475.                 SLIFE_playerRested = false;
  476.             }; 
  477.         };
  478.         if !(SLIFE_playerRested) then
  479.         {
  480.             SLIFE_playerEnergy = (SLIFE_playerEnergy - (SLIFE_playerEnergyDegenRate)) max 0;
  481.         };
  482.         if (SLIFE_playerUnconscious) then
  483.         {
  484.             SLIFE_playerEnergy = (SLIFE_playerEnergy + (0.5)) min SLIFE_playerEnergyMax;
  485.         };
  486.         if ((getFatigue player) > 0) then
  487.         {
  488.             _fatigueMultiplier = 0.02;
  489.             SLIFE_playerEnergyDegenRate = (SLIFE_playerEnergyDegenRate + _fatigueMultiplier);
  490.         }else{
  491.             SLIFE_playerEnergyDegenRate = 0.01;
  492.         };
  493.         if (SLIFE_playerFever) then
  494.         {
  495.             SLIFE_playerRested = false;
  496.             SLIFE_playerRestedValue = 0;
  497.         };
  498.         _energyText = format["Energy: %1/%2",round(SLIFE_playerEnergy),SLIFE_playerEnergyMax];
  499.         _energizedText = format["Energized: %1(%2)",SLIFE_playerRested,SLIFE_playerRestedValue];
  500.        
  501.         // HP
  502.         _healthVar = (100 - ((getDammage player) * 100));
  503.        
  504.         if (_healthVar <= 10) then
  505.         {
  506.             addCamShake [1, 0.5, 16];
  507.         };
  508.         if (SLIFE_playerBloodTransfusionCorrect) then
  509.         {
  510.             SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue + (1.33)) min 100;
  511.             player setDamage (getDammage player) - 0.025;
  512.             _transfusionTimer = _transfusionTimer + 1;
  513.             if (_transfusionTimer >= 20) then
  514.             {
  515.                 _transfusionTimer = 0;
  516.                 SLIFE_playerBloodTransfusionCorrect = false;
  517.             };
  518.         };
  519.         if (SLIFE_playerBloodTransfusionIncorrect) then
  520.         {
  521.             SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue + (1.33)) min 100;
  522.             player setDamage (getDammage player) + 0.025;
  523.             _transfusionIncTimer = _transfusionIncTimer + 1;
  524.             if (_transfusionIncTimer >= 20) then
  525.             {
  526.                 _transfusionIncTimer = 0;
  527.                 SLIFE_playerBloodTransfusionIncorrect = false;
  528.             };         
  529.         };
  530.        
  531.         if (SLIFE_playerPain) then
  532.         {
  533.             addCamShake [3, 0.25, 16];
  534.             if (SLIFE_playerPainkillersApplied) then
  535.             {
  536.                 _painTimer = _painTimer + 1;
  537.                 if (_painTimer >= 60) then
  538.                 {
  539.                     SLIFE_playerPain = false;
  540.                     SLIFE_playerPainkillersApplied = false;
  541.                 };     
  542.             };
  543.         };
  544.        
  545.         _healthText = format["Health: %1",round(_healthVar)];
  546.         // ENERGY - END
  547.         //-----------------------------------------------------//
  548.         // TEMPERATURE & WET - START
  549.         _inWater = surfaceIsWater getPos player;
  550.         if (_vehicle == player) then
  551.         {
  552.             // Wet
  553.             if (_inWater) then
  554.             {
  555.                 SLIFE_playerWetValue = (SLIFE_playerWetValue + (20 / SLIFE_playerWetResist)) min 1000;
  556.             }else{
  557.                 if (rain == 0) then
  558.                 {
  559.                     _wetValueDegen = 10 - (overcast * 10);
  560.                     SLIFE_playerWetValue = (SLIFE_playerWetValue - (1 + _wetValueDegen)) max 0;
  561.                 };
  562.             };
  563.             if (rain > 0) then
  564.             {
  565.                 if !(call SLIFE_fnc_isInsideBuilding) then
  566.                 {
  567.                     SLIFE_playerWetValue = (SLIFE_playerWetValue + (rain * 10) / SLIFE_playerWetResist) min 1000;
  568.                 };
  569.             };         
  570.         };
  571.         // Temperature
  572.         if (SLIFE_playerWet) then
  573.         {  
  574.             if !(call SLIFE_fnc_isInsideBuilding) then
  575.             {
  576.                 if (!_inWater) then
  577.                 {
  578.                     if (_hour > 19 || _hour < 5) then
  579.                     {
  580.                         SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) / SLIFE_playerTempResist + (overcast / 10)) max 30;
  581.                     }else{
  582.                         SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) / SLIFE_playerTempResist) max 30;
  583.                     };
  584.                 }else{
  585.                     if (_hour > 19 || _hour < 5) then
  586.                     {
  587.                         SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) + (overcast / 10) / (SLIFE_playerWetResist)) max 30;
  588.                     }else{
  589.                         SLIFE_playerTemp = (SLIFE_playerTemp - ((SLIFE_playerWetValue / SLIFE_playerTempResist) / 1000) / (SLIFE_playerWetResist)) max 30;
  590.                     };
  591.                 };
  592.             }else{
  593.                 _wetValueDegen =  (0.01 + (overcast / 10) * SLIFE_playerWetResist);
  594.                 SLIFE_playerWetValue = (SLIFE_playerWetValue - (1 + _wetValueDegen)) max 0;
  595.             };
  596.         };
  597.         if (!SLIFE_playerWet) then
  598.         {
  599.             if(SLIFE_playerTemp > 37 && _hour > 19 && !SLIFE_playerFever || SLIFE_playerTemp > 37 && _hour < 5 && !SLIFE_playerFever) then
  600.             {
  601.                 SLIFE_playerTemp = (SLIFE_playerTemp - (0.1 + overcast / 10) / SLIFE_playerTempResist) max 37;
  602.             };
  603.             if(SLIFE_playerTemp < 37 && _hour < 19 && !SLIFE_playerFever || SLIFE_playerTemp < 37 && _hour > 5 && !SLIFE_playerFever) then
  604.             {
  605.                 SLIFE_playerTemp = (SLIFE_playerTemp + ((1 - overcast) / 10) + (SLIFE_playerTempResist / 100)) min 37;
  606.             };
  607.             if (SLIFE_playerFever) then
  608.             {
  609.                 if !(SLIFE_playerHydrated) then
  610.                 {
  611.                     SLIFE_playerTemp = (SLIFE_playerTemp + (0.025 * SLIFE_playerTempResist)) min 45;
  612.                 }; 
  613.             };
  614.         };
  615.         if (SLIFE_playerHeatpackApplied) then
  616.             {
  617.                 _heatpackTimer = _heatpackTimer + 1;
  618.                 if (_heatpackTimer <= 60) then
  619.                 {
  620.                     if (SLIFE_playerWet) then
  621.                     {
  622.                         SLIFE_playerTemp = (SLIFE_playerTemp + (0.01)) min 45;
  623.                     }else{
  624.                         SLIFE_playerTemp = (SLIFE_playerTemp + (0.05)) min 45;
  625.                     };             
  626.                 }else{
  627.                     SLIFE_playerHeatpackApplied = false;
  628.                 };         
  629.             };
  630.         if (SLIFE_playerWetValue > 0) then
  631.         {
  632.             SLIFE_playerWet = true;
  633.         }else{
  634.             SLIFE_playerWet = false;
  635.         };
  636.         if (SLIFE_playerTemp < 35) then
  637.         {
  638.             addCamShake [0.5, 0.85, 32];
  639.             _hypothermiaTimer = _hypothermiaTimer + 1;
  640.             _coldRnd = round(random 1000);
  641.             if (SLIFE_playerVitaminsApplied) then
  642.             {
  643.                 if (_coldRnd <= 5) then
  644.                 {
  645.                     SLIFE_playerFlu = true;
  646.                 };
  647.             }else{
  648.                 if (_coldRnd <= 50) then
  649.                 {
  650.                     SLIFE_playerFlu = true;
  651.                 };
  652.             };
  653.             if (_hypothermiaTimer >= 500) then
  654.             {
  655.                 player setDamage 1;
  656.                 cutText ["You died of Hypothermia.", "BLACK FADED", 999];
  657.             };
  658.         };
  659.         if (SLIFE_playerTemp > 40) then
  660.         {
  661.             _hyperthermiaTimer = _hyperthermiaTimer + 1;
  662.             if (_hyperthermiaTimer >= 500) then
  663.             {
  664.                 player setDamage 1;
  665.                 cutText ["You died of Hyperpyrexia.", "BLACK FADED", 999];
  666.             };
  667.         };
  668.         // TEMPERATURE & WET - END
  669.         //-----------------------------------------------------//
  670.         // HYGIENE - START //
  671.         if (_vehicle == player) then
  672.         {  
  673.             if (_inWater) then
  674.             {
  675.                 SLIFE_playerHygiene = (SLIFE_playerHygiene + (1)) min 100;
  676.             }else{
  677.                 SLIFE_playerHygiene = (SLIFE_playerHygiene - (0.01)) max 1;
  678.             };
  679.             if (rain > 0) then
  680.             {
  681.                 if !(call SLIFE_fnc_isInsideBuilding) then
  682.                 {
  683.                     SLIFE_playerHygiene = (SLIFE_playerHygiene + rain) min 100;
  684.                 };
  685.             };
  686.         };
  687.         // HYGIENE - END //
  688.         //-----------------------------------------------------//
  689.         // ILLNESS & DISEASE - START //
  690.         // Illness
  691.         if (SLIFE_playerFlu) then
  692.         {
  693.             _fluTimer = _fluTimer + 1;
  694.             _fluEndTimer = round(random 100);
  695.             if (_fluTimer >= 600) then
  696.             {  
  697.                 if (_fluEndTimer <= 1) then
  698.                 {
  699.                     if (SLIFE_playerTemp > 35) then
  700.                     {
  701.                         _fluTimer = 0;
  702.                         SLIFE_playerFlu = false;
  703.                     }else{
  704.                         _fluTimer = 0;
  705.                     };
  706.                 };
  707.             };
  708.         };
  709.         if (SLIFE_playerInfection) then
  710.         {
  711.             SLIFE_playerFever = true;
  712.         };
  713.         if (SLIFE_playerSick) then
  714.         {
  715.             _sickTimer = _sickTimer + 1;
  716.             _sickActionTimer = round(random 120);
  717.             if (_sickTimer >= _sickActionTimer) then
  718.             {
  719.                 _sickTimer = 0;
  720.             };
  721.         };
  722.         // Disease
  723.         if (SLIFE_playerCholera) then
  724.         {
  725.             SLIFE_playerDiarrhea = true;
  726.         };
  727.         if (SLIFE_playerSchistosomiasis) then
  728.         {
  729.             SLIFE_playerFever = true;
  730.         };
  731.         if (SLIFE_playerTyphoid) then
  732.         {
  733.             SLIFE_playerDiarrhea = true;
  734.             SLIFE_playerFever = true;
  735.         };
  736.         // ILLNESS & DISEASE - END
  737.         //-----------------------------------------------------//
  738.         // MEDICAL - START
  739.         //-----------------------------------------------------//
  740.         if (_vehicle == player) then
  741.         {  
  742.             if (SLIFE_playerBrokenLeg) then
  743.             {
  744.                 if (_velocity > 1.2) then
  745.                 {
  746.                     _currentWeapon = currentWeapon player;
  747.                     _primaryWeapon = primaryWeapon player;
  748.                     _secondaryWeapon = handgunWeapon player;
  749.                     if (_currentWeapon == "") then
  750.                     {
  751.                         player playMove "AmovPercMsprSnonWnonDf_AmovPpneMstpSnonWnonDnon";
  752.                     }else{
  753.                        
  754.                         if (_currentWeapon == _primaryWeapon) then {
  755.                             player playMove "AmovPercMsprSlowWrflDf_AmovPpneMstpSrasWrflDnon";
  756.                         };
  757.                         if (_currentWeapon == _secondaryWeapon) then {
  758.                             player playMove "AmovPercMsprSlowWpstDf_AmovPpneMstpSrasWpstDnon";
  759.                         };
  760.                     };                 
  761.                 }; 
  762.             };
  763.             if (SLIFE_playerBrokenArm) then
  764.             {
  765.                 _brokenArmTimer = _brokenArmTimer + 1;
  766.                 _brokenArmEndTimer = round(random 6000);
  767.                 if (SLIFE_playerArmSplintApplied) then
  768.                 {
  769.                     if (_brokenArmTimer >= 600) then
  770.                     {
  771.                         SLIFE_playerBrokenArm = false;
  772.                         _brokenArmTimer = 0;
  773.                         player addMagazine "SLIFE_item_splint_arm";
  774.                     }; 
  775.                 }else{
  776.                     if (_brokenArmTimer >= 1800) then
  777.                     {
  778.                         if (_brokenArmEndTimer <= 1) then
  779.                         {
  780.                             SLIFE_playerBrokenArm = false;
  781.                             _brokenArmTimer = 0;
  782.                         };
  783.                     }; 
  784.                 };
  785.             }; 
  786.             if (SLIFE_playerBrokenArm || SLIFE_playerBrokenLeg) then
  787.             {
  788.                 if (!SLIFE_playerPain) then
  789.                 {
  790.                     _rndPainChance = round(random 100);
  791.                     _rndPainTimer = _rndPainTimer + 1;
  792.                     if (_rndPainTimer >= 500) then
  793.                     {
  794.                         if (_rndPainChance <= 5) then
  795.                         {
  796.                             SLIFE_playerPain = true;
  797.                             _rndPainChance = 0;
  798.                             _rndPainTimer = 0;
  799.                         };
  800.                     };
  801.                 };
  802.             };
  803.         };
  804.         if (SLIFE_playerBrokenLeg) then
  805.         {
  806.             _brokenLegTimer = _brokenLegTimer + 1;
  807.             _brokenLegEndTimer = round(random 6000);
  808.             if (SLIFE_playerLegSplintApplied) then
  809.             {
  810.                 if (_brokenLegTimer >= 600) then
  811.                 {
  812.                     SLIFE_playerBrokenLeg = false;
  813.                     _brokenLegTimer = 0;
  814.                     player addMagazine "SLIFE_item_splint_leg";
  815.                 }; 
  816.                
  817.             }else{
  818.                 if (_brokenLegTimer >= 1800) then
  819.                 {
  820.                     if (_brokenLegEndTimer <= 1) then
  821.                     {
  822.                         SLIFE_playerBrokenLeg = false;
  823.                         _brokenLegTimer = 0;
  824.                     };
  825.                 }; 
  826.             };
  827.         }; 
  828.         if (isBleeding player) then
  829.         {
  830.             SLIFE_playerBleeding = true;
  831.         };
  832.         if (SLIFE_playerBleeding) then
  833.         {
  834.             player setBleedingRemaining 1;
  835.             _bleedValue = ((getDammage player) / 100);
  836.             if (SLIFE_playerBandageApplied) then
  837.             {
  838.                 if (SLIFE_playerDressingApplied) then
  839.                 {
  840.                     player setDamage (getDammage player) + (_bleedValue / 100);
  841.                 }else{
  842.                     player setDamage (getDammage player) + (_bleedValue / 10);
  843.                 };
  844.             }else{
  845.                 if (SLIFE_playerDressingApplied) then
  846.                 {
  847.                     player setDamage (getDammage player) + (_bleedValue / 5);
  848.                 }else{
  849.                     player setDamage (getDammage player) + _bleedValue;
  850.                 };
  851.             };
  852.             SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue - (getDammage player) / 100) max 0;
  853.             _bleedTimer = _bleedTimer + 1;
  854.             _bleedEndTimer = round(random 128);
  855.             if (_bleedTimer >= 60) then
  856.             {  
  857.                 if (SLIFE_playerDressingApplied) then
  858.                 {
  859.                     if (_bleedEndTimer <= 10) then
  860.                     {
  861.                         _bleedTimer = 0;
  862.                         _bleedEndTimer = 0;
  863.                         SLIFE_playerBleeding = false;
  864.                         SLIFE_playerBandageApplied = false;
  865.                         SLIFE_playerDressingApplied = false;
  866.                     };
  867.                 }else{
  868.                     if (_bleedEndTimer <= 1) then
  869.                     {
  870.                         _bleedTimer = 0;
  871.                         _bleedEndTimer = 0;
  872.                         SLIFE_playerBleeding = false;
  873.                         SLIFE_playerBandageApplied = false;
  874.                         SLIFE_playerDressingApplied = false;
  875.                     };
  876.                 };
  877.             };
  878.         };
  879.         if (!SLIFE_playerBleeding) then
  880.         {
  881.             if (getDammage player > 0) then
  882.             {
  883.                 if (SLIFE_playerHydrated && SLIFE_playerSatiated) then
  884.                 {
  885.                     if (SLIFE_playerBloodPressureValue > 50) then
  886.                     {
  887.                         SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue - (0.025)) max 50;
  888.                     }else{
  889.                         SLIFE_playerBloodPressureValue = (SLIFE_playerBloodPressureValue + (0.025)) min 50;
  890.                     };
  891.                     if !(SLIFE_playerFlu) then
  892.                     {
  893.                         player setDamage (getDammage player) - 0.0025;
  894.                     }else{
  895.                         player setDamage (getDammage player) - 0.001;
  896.                     };         
  897.                 };
  898.             };
  899.         };
  900.         // Blood Pressure
  901.         if (SLIFE_playerBloodPressureValue >= 66) then
  902.         {
  903.             SLIFE_playerBloodPressure = "Elevated";
  904.         };
  905.         if (SLIFE_playerBloodPressureValue >= 33 && SLIFE_playerBloodPressureValue < 66) then
  906.         {
  907.             SLIFE_playerBloodPressure = "Normal";
  908.         };
  909.         if (SLIFE_playerBloodPressureValue < 33) then
  910.         {
  911.             SLIFE_playerBloodPressure = "Low";
  912.         };
  913.         if (SLIFE_playerBloodPressureValue >= 100) then
  914.         {
  915.             player setDamage 1;
  916.             cutText ["You died of Hypertension.", "BLACK FADED", 999];
  917.         };
  918.         if (SLIFE_playerBloodPressureValue <= 0) then
  919.         {
  920.             player setDamage 1;
  921.             cutText ["You died of Hypotension.", "BLACK FADED", 999];
  922.         };
  923.        
  924.         if (SLIFE_playerUnconscious) then
  925.         {
  926.             _unconsciousTimer = _unconsciousTimer + 1;
  927.             _unconsciousTimerLimit = (random 100);
  928.             if (_unconsciousTimer >= _unconsciousTimerLimit && _unconsciousTimer > 30) then
  929.             {
  930.                 SLIFE_playerUnconscious = false;
  931.             };
  932.         };
  933.        
  934.         // Weight
  935.         if (SLIFE_playerWeight > 0) then
  936.         {
  937.        
  938.         };
  939.         _weightText = format["Weight: %1kg",SLIFE_playerWeight];
  940.         if (SLIFE_playerVitaminsApplied) then
  941.         {
  942.             _vitaminTimer = SLIFE_playerVitaminsTimer + 1;
  943.             if (_vitaminTimer >= 6000) then
  944.             {
  945.                 SLIFE_playerVitaminsApplied = false;
  946.             };
  947.         };
  948.        
  949.         if (SLIFE_playerAntibioticsApplied) then
  950.         {
  951.             _antibioticTimer = _antibioticTimer + 1;
  952.             if (_antibioticTimer >= 120) then
  953.             {
  954.                 SLIFE_playerFever = false;
  955.                 SLIFE_playerDiarrhea = false;
  956.                 SLIFE_playerInfection = false;
  957.                 SLIFE_playerCholera = false;
  958.                 SLIFE_playerSchistosomiasis = false;
  959.                 SLIFE_playerTyphoid = false;
  960.             };
  961.         };
  962.         // Desaturate based on HP
  963.         if (_healthVar <= 10) then
  964.         {
  965.             _satVar = round(_healthVar) / 10;
  966.             _satVar1 = (0.0075 * round(_healthVar));
  967.             _satVar2 = (0.0025 * round(_healthVar));
  968.             _satVar3 = (0.01 * round(_healthVar));
  969.             _satVar4 = round(_healthVar) / 100;
  970.             "colorCorrections" ppEffectAdjust [1, 1, 0, [_satVar3, _satVar3, _satVar3, 0], [_satVar3, _satVar3, _satVar3, _satVar4], [_satVar1, _satVar2, 0, _satVar2]];
  971.             "colorCorrections" ppEffectCommit 1;
  972.             "colorCorrections" ppEffectEnable true;
  973.         };
  974.          
  975.         if (SLIFE_playerRadExposureSeverity > 0) then
  976.         {
  977.             SLIFE_playerRadExposure = true;
  978.             SLIFE_playerRads = SLIFE_playerRads + (SLIFE_playerRadExposureSeverity / SLIFE_playerRadResist);
  979.             if (random 3 <= 1) then
  980.             {
  981.                 if (SLIFE_playerRadExposureSeverity == 1) then
  982.                 {
  983.                     player say3D "SLIFE_snd_geigerLow";
  984.                 };
  985.                 if (SLIFE_playerRadExposureSeverity == 2) then
  986.                 {
  987.                     player say3D "SLIFE_snd_geigerMed";
  988.                 };
  989.                 if (SLIFE_playerRadExposureSeverity == 3) then
  990.                 {
  991.                     player say3D "SLIFE_snd_geigerHigh";
  992.                 };
  993.             };
  994.         }else{
  995.             SLIFE_playerRadExposure = false;
  996.         };
  997.         if (SLIFE_playerRads > 0 && SLIFE_playerRads < 1000) then
  998.         {
  999.             player setDamage ((getDammage player) + (SLIFE_playerRads / 1000000));
  1000.         };
  1001.         if (SLIFE_playerGasExposure) then
  1002.         {
  1003.             if (!SLIFE_playerGasResist) then
  1004.             {
  1005.                 SLIFE_playerOxygen = (SLIFE_playerOxygen - (1)) max 0;
  1006.             }else{
  1007.                 if ((getOxygenRemaining player) == 1) then
  1008.                 {
  1009.                     SLIFE_playerOxygen = (SLIFE_playerOxygen + (1)) min 100;
  1010.                 };
  1011.             };
  1012.         };
  1013.         if (!SLIFE_playerGasExposure) then
  1014.         {
  1015.             SLIFE_playerOxygen = (((getOxygenRemaining player) * 100) - 50);
  1016.             if (SLIFE_playerOxygen <= 0) then
  1017.             {
  1018.                 SLIFE_playerOxygen = 0;
  1019.             };
  1020.         };
  1021.         if (SLIFE_playerOxygen <= 0) then
  1022.         {
  1023.             _oxygenTimer = _oxygenTimer + 1;
  1024.             _oxygenTimerLimit = 60;
  1025.             _oxygenTimerLimit2 = 120;
  1026.             if (_oxygenTimer >= _oxygenTimerLimit) then
  1027.             {
  1028.                 SLIFE_playerUnconscious = true;
  1029.                 if (_oxygenTimer >= _oxygenTimerLimit2) then
  1030.                 {
  1031.                     player setDamage 1;
  1032.                     if (SLIFE_playerGasExposure) then
  1033.                     {
  1034.                         cutText ["You died of Suffocation.", "BLACK FADED", 999];
  1035.                     }else{
  1036.                         player setDamage 1;
  1037.                         cutText ["You drowned.", "BLACK FADED", 999];
  1038.                     };
  1039.                 };
  1040.             };
  1041.         };     
  1042.         //-----------------------------------------------------//
  1043.        
  1044.         // DISPLAY HINT
  1045.         _displayTemp = round(SLIFE_playerTemp * (10 ^ 1)) / (10 ^ 1);
  1046.         _oxyText = format ["o2: %1%",round(SLIFE_playerOxygen * 2)];
  1047.         _wetText = format["Wet: %1(%2)",SLIFE_playerWet,round(SLIFE_playerWetValue / 10)];
  1048.         _tempText = format["Body Temp: %1C",_displayTemp];
  1049.         _timeText = format ["Time: %1:%2",_hour,_minute];
  1050.         _serverTimeText = format ["Server Time: %1", (floor daytime)];
  1051.         _velocityText = format ["Speed: %1",_velocity];
  1052.         _hygieneText = format ["Hygiene: %1",round(SLIFE_playerHygiene)];
  1053.         _painText = format ["Pain: %1",SLIFE_playerPain];
  1054.         _bleedingText = format ["Bleeding: %1", SLIFE_playerBleeding];
  1055.         _bloodTypeText = format ["Bloodtype: %1",SLIFE_playerBloodtype];
  1056.         _bloodPressure = format ["Blood Pressure: %1(%2)",SLIFE_playerBloodPressure,round(SLIFE_playerBloodPressureValue)];
  1057.        
  1058.         _fluText = format ["Flu: %1",SLIFE_playerFlu];
  1059.         _sickText = format ["Sick: %1",SLIFE_playerSick];
  1060.         _infectionText = format ["Infection: %1",SLIFE_playerInfection];
  1061.         _feverText = format ["Fever: %1",SLIFE_playerFever];
  1062.         _diarrheaText = format ["Diarrhea: %1",SLIFE_playerDiarrhea];
  1063.         _choleraText = format ["Cholera: %1",SLIFE_playerCholera];
  1064.         _schistosomiasisText = format ["Schistosomiasis: %1",SLIFE_playerSchistosomiasis];
  1065.         _typhoidText = format ["Typhoid: %1",SLIFE_playerTyphoid];
  1066.         _brokenArmText = format ["Broken Arm: %1", SLIFE_playerBrokenArm];
  1067.         _brokenLegText = format ["Broken Leg: %1", SLIFE_playerBrokenLeg];
  1068.         _radsText = format ["Rads: %1", SLIFE_playerRads];
  1069.  
  1070.         _tempResistText = format ["Cold Resist: %1", SLIFE_playerTempResist];
  1071.         _wetResistText = format ["Wet Resist: %1", SLIFE_playerWetResist];
  1072.         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);
  1073.  
  1074.     };
  1075.        
  1076.     if (_healthVar <= 10) then
  1077.     {
  1078.         "dynamicBlur" ppEffectEnable true;
  1079.         "dynamicBlur" ppEffectAdjust [0.5];
  1080.         "dynamicBlur" ppEffectCommit 0.5;
  1081.         enableCamShake true;
  1082.     };
  1083.     if (_healthVar > 10) then
  1084.     {
  1085.         "dynamicBlur" ppEffectEnable false;
  1086.     };
  1087.     if (SLIFE_playerTemp < 35 || SLIFE_playerFlu || SLIFE_playerPain) then
  1088.     {
  1089.         enableCamShake true;
  1090.     }else{
  1091.         enableCamShake false;
  1092.     };
  1093.     if (_healthVar > 10 && _hour > 19 || _healthVar > 10 && _hour < 5) then
  1094.     {
  1095.         "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]];
  1096.         "colorCorrections" ppEffectCommit 1;
  1097.         "colorCorrections" ppEffectEnable true;
  1098.     };
  1099.     if (_healthVar > 10 && _hour > 5 && _hour < 19) then
  1100.     {
  1101.         "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]];
  1102.         "colorCorrections" ppEffectCommit 1;
  1103.         "colorCorrections" ppEffectEnable true;
  1104.     };
  1105. };
  1106. while {!alive player} do
  1107. {
  1108.     hintSilent "";
  1109. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement