Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- Author: Robin Withes
- Desc: Handles multiple different medical events.
- When: This script gets called in fn_revived.sqf
- */
- if (!alive player) exitWith {};
- //////Medical Events etc////////
- _brokenLeg = {
- [] spawn {
- morphineHeal = 0;
- _robinTime = time + 500;
- while {true} do {
- if (_robinTime < time) exitWith {hint "Your legs have healed";};
- if (morphineHeal == 1) exitWith {hint "You have been healed";};
- if (!alive player) exitWith {};
- if (stance player != "PRONE") then {
- hint "Your legs are broken and you cant stand up!";
- player switchMove "AidlPpneMstpSnonWnonDnon_AI";
- };
- sleep 1;
- };
- };
- };
- _cardiacArrest = {
- [] spawn {
- cardiacHeal = 0;
- _robinTime3 = time + 120;
- hint "Your heart is going crazy!";
- while {true} do {
- if (_robinTime3 < time) exitWith {hint "You've gone out of cardiac arrest!"; enableCamShake false;};
- if (cardiacHeal == 1) exitWith {hint "You've gone out of cardiac arrest!"; enableCamShake false;};
- if (!alive player) exitWith {enableCamShake false;};
- enableCamShake true;
- _randomShake2 = selectRandom [12,13,14,15,16,17];
- addCamShake [_randomShake2, 20, 100];
- sleep 10;
- hint "You fainted!";
- titleCut ["", "BLACK FADED", 999];
- player playMoveNow "Incapacitated";
- sleep 3;
- titleCut ["", "BLACK IN", 5];
- player switchMove "AidlPpneMstpSnonWnonDnon_AI";
- };
- };
- };
- _concussion = {
- [] spawn {
- concussionHeal = 0;
- _robinTime2 = time + 1200;
- hint "You have a massive headache, You should get some medical help!";
- PP_wetD = ppEffectCreate ["WetDistortion",300];
- PP_wetD ppEffectEnable true;
- PP_wetD ppEffectAdjust [1,0.2,0.2,1.84,1.53,1.68,1.61,0.05,0.01,0.05,0.01,0.1,0.1,0.2,0.2];
- PP_wetD ppEffectCommit 0;
- while {true} do {
- if (_robinTime2 < time) exitWith {hint "Your concussion has stopped!"; PP_wetD ppEffectEnable false;};
- if (concussionHeal == 1) exitWith {hint "Your concussion has been healed!"; PP_wetD ppEffectEnable false;};
- if (!alive player) exitWith {PP_wetD ppEffectEnable false;};
- };
- };
- };
- _brokenArm = {
- [] spawn {
- brokenArmHeal = 0;
- _robinTime4 = time + 600;
- hint "Your arm feels weird...";
- while {true} do {
- if (_robinTime4 < time) exitWith {hint "Your arm has been healed"; enableCamShake false;};
- if (brokenArmHeal == 1) exitWith {hint "Your arm has been healed"; enableCamShake false;};
- if (currentWeapon player != "") then {
- _unitWeapon = currentWeapon player;
- _timer = 15;
- hint format ["Your %1 is too heavy to carry with your broken hand!",_unitWeapon];
- while {currentWeapon player != ""} do {
- _timer = _timer - 4;
- if (_timer < 0) then {
- _unitWeapon = currentWeapon player;
- player removeWeapon _unitWeapon;
- hint "You dropped your weapon!";
- _holder = createVehicle [ "GroundWeaponHolder", getPosATL player, [], 0, "CAN_COLLIDE" ];
- _holder addWeaponCargoGlobal [_unitWeapon,1];
- };
- enableCamShake true;
- addCamShake [10, 10, 40];
- sleep 4;
- };
- };
- };
- };
- };
- _metalObject = {
- };
- _bloodLoss = {
- player setDamage 0.99;
- };
- _weetapix = {
- [] spawn {
- SUB(life_hunger,90);
- [] call life_fnc_hudUpdate;
- hint "Your starving and you have a strange desire for Weetabix™. Get something to eat fast!";
- player enableFatigue true;
- player setFatigue 1;
- PP_wetD = ppEffectCreate ["WetDistortion",300];
- PP_wetD ppEffectEnable true;
- PP_wetD ppEffectAdjust [0.2,0.2,0.2,1,1,1,1,-0.08,0.01,0.05,0.01,0.1,0.1,0.2,0.2];
- PP_wetD ppEffectCommit 0;
- PP_colorC = ppEffectCreate ["ColorCorrections",1500];
- PP_colorC ppEffectEnable true;
- PP_colorC ppEffectAdjust [0.2,0.78,0.06,[0.03,0,0,0],[1,1,1,1],[0.33,0.33,0.33,0],[0,0,0,0,0,0,4]];
- PP_colorC ppEffectCommit 0;
- while {true} do {
- player setFatigue 1;
- sleep 3;
- if (!alive player) exitWith {
- player enableFatigue false;
- player setFatigue 0;
- PP_colorC ppEffectEnable false;
- PP_wetD ppEffectEnable false;
- };
- if (life_hunger > 20) exitWith {
- player enableFatigue false;
- player setFatigue 0;
- PP_colorC ppEffectEnable false;
- hint "You nourished yourself and feel alot better!";
- PP_wetD ppEffectEnable false;
- };
- };
- };
- };
- //////Medical Events End////////
- _dummy = selectRandom [_brokenLeg,_concussion,_cardiacArrest,_brokenArm,_weetapix];
- [] call _dummy;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement