Organize files a bit and removed non source pbo's

This commit is contained in:
vbawol
2013-06-24 06:26:15 -05:00
parent b4cee9175b
commit 483279c126
1607 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
private["_hasMeds","_med","_effect"];
_med = "ItemAntibiotic";
_hasMeds = _med in magazines player;
if (_hasMeds) then {
player removeMagazine _med;
};
//remove option
player removeAction s_player_antiobiotic;
s_player_antiobiotic = -1;
//remove infection
r_player_infected = false;
player setVariable["USEC_infected",false,true];

View File

@@ -0,0 +1,59 @@
// bleed.sqf
_unit = (_this select 3) select 0;
player removeMagazine "ItemBandage";
call fnc_usec_medic_removeActions;
r_action = false;
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Medic";
};
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
[player,"bandage",0,false] call dayz_zombieSpeak;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if (_finished) then {
//["usecBandage",[_unit,player]] call broadcastRpcCallAll;
usecBandage = [_unit,player];
publicVariable "usecBandage";
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
} else {
//dayzHumanity = [player,20];
[player,20] call player_humanityChange;
};
{_unit setVariable[_x,false,true];} forEach USEC_woundHit;
_unit setVariable ["USEC_injured",false,true];
} else {
r_interrupt = false;
if (vehicle player == player) then {
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
};
player addMagazine "ItemBandage";
};

View File

@@ -0,0 +1,59 @@
/*
CARRY BODY SCRIPT
Allows players to carry unconscious bodies
JULY 2010 - norrin
*****************************************************************************************************************************
Start carry.sqf
*/
private ["_unit","_dragee","_pos","_dir"];
_dragee = _this select 3;
_can_be_revived = NORRN_revive_array select 20;
_can_be_revived_2 = NORRN_revive_array select 21;
_unit = player;
r_carry_sqf = true;
r_drag_sqf = false;
_unit removeAction Norrn_carryAction;
if (isNull _dragee) exitWith {};
_dragee setVariable ["NORRN_unit_dragged", true, true];
detach _dragee;
sleep 1.5;
// public EH
norrnRACarUp = _dragee;
publicVariable "norrnRACarUp";
_dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up";
norrnRAPicUp = _unit;
publicVariable "norrnRAPicUp";
_unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
sleep 10;
_dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still";
_dragee attachto [_unit,[-0.2, 0.2, 0]];
while {r_carry_sqf} do
{
_anim_name = animationstate _unit;
if (!(_dragee getVariable "NORRN_unconscious")) exitWith
{
detach _dragee;
_unit switchMove "";
player removeAction Norrn_dropAction;
r_carry_sqf = false;
};
//check that dragged unit still exists
if (!alive _unit || _anim_name != "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon" && _anim_name != "acinpercmstpsraswrfldnon" && _anim_name != "acinpercmrunsraswrfldf") exitWith
{
player removeAction NORRN_dropAction;
detach _dragee;
_unit switchMove "";
r_carry_sqf = false;
};
sleep 0.1;
};
if (true) exitWith {};

View File

@@ -0,0 +1,60 @@
/*
CARRY BODY SCRIPT
Allows players to carry unconscious bodies
JULY 2010 - norrin
*****************************************************************************************************************************
Start carry.sqf
*/
private ["_unit","_dragee","_pos","_dir"];
_dragee = _this select 3;
_can_be_revived = NORRN_revive_array select 20;
_can_be_revived_2 = NORRN_revive_array select 21;
_unit = player;
r_carry_sqf = true;
r_drag_sqf = false;
_unit removeAction Norrn_carryAction;
if (isNull _dragee) exitWith {};
_dragee setVariable ["NORRN_unit_dragged", true, true];
detach _dragee;
sleep 1.5;
// public EH
norrnRACarUp = _dragee;
publicVariable "norrnRACarUp";
_dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up";
norrnRAPicUp = _unit;
publicVariable "norrnRAPicUp";
_unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
sleep 10;
_dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still";
_dragee attachto [_unit,[-0.2, 0.2, 0]];
while {r_carry_sqf} do
{
_anim_name = animationstate _unit;
if (!(_dragee getVariable "NORRN_unconscious")) exitWith
{
detach _dragee;
_unit switchMove "";
player removeAction Norrn_dropAction;
r_carry_sqf = false;
};
//check that dragged unit still exists
if (!alive _unit || _anim_name != "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon" && _anim_name != "acinpercmstpsraswrfldnon" && _anim_name != "acinpercmrunsraswrfldf") exitWith
{
player removeAction NORRN_dropAction;
detach _dragee;
_unit switchMove "";
r_carry_sqf = false;
};
sleep 0.1;
};
_dragee playActionNow "Die";
if (true) exitWith {};

View File

@@ -0,0 +1,46 @@
/*
DRAG BODY SCRIPT
Allows players to drag unconscious bodies
JULY 2010 - norrin
*****************************************************************************************************************************
Start drag.sqf
*/
private ["_unit","_dragee","_pos","_dir"];
_dragee = _this select 3;
_unit = player;
_unconscious = _dragee getVariable ["NORRN_unconscious", false];
if (isNull _dragee) exitWith {};
if (!_unconscious) exitWith {};
//player assumes dragging posture
_dragee setVariable ["NORRN_unit_dragged", true, true];
_unit playActionNow "grabDrag";
sleep 2;
//unconscious unit assumes dragging posture
//public EH
//["norrnRaDrag",_dragee] call broadcastRpcCallAll;
norrnRaDrag = [_dragee];
publicVariable "norrnRaDrag";
_dragee attachto [_unit,[0.1, 1.01, 0]];
sleep 0.02;
//rotate wounded units so that it is facing the correct direction
norrnR180 = _dragee;
publicVariable "norrnR180";
_dragee setDir 180;
r_drag_sqf = true;
//Uneccesary actions removed & drop body added
call fnc_usec_medic_removeActions;
NORRN_dropAction = player addAction ["Drop body", "\z\addons\dayz_code\medical\drop_body.sqf",_dragee, 0, false, true];
//NORRN_carryAction = player addAction ["Carry body", "\z\addons\dayz_code\medical\carry.sqf",_dragee, 0, false, true];
sleep 1;
if (true) exitWith {};

View File

@@ -0,0 +1,33 @@
/*
DROP BODY SCRIPT
Allows players to drop unconscious bodies
JULY 2010 - norrin
*****************************************************************************************************************************
Start drop_body.sqf
*/
_dragee = _this select 3;
player removeAction NORRN_dropAction;
player removeAction NORRN_carryAction;
NORRN_remove_drag = true;
r_drag_sqf = false;
r_carry_sqf = false;
r_action = false;
_unit = player;
detach _unit;
detach _dragee;
_unit switchMove "";
_dragee switchMove "";
NORRN_Dragged_body = objNull;
_dragee setVariable ["NORRN_unit_dragged", false, true];
//lie on back
_dragee playMoveNow "ainjppnemstpsnonwrfldnon";
norrnRalie = _dragee;
publicVariable "norrnRalie";
if (true) exitWith {};

View File

@@ -0,0 +1,20 @@
// bleed.sqf
_unit = (_this select 3) select 0;
_isDead = _unit getVariable["USEC_isDead",false];
call fnc_usec_medic_removeActions;
player playActionNow "Medic";
player removeMagazine "ItemEpinephrine";
sleep 3;
if (!_isDead) then {
_unit setVariable ["NORRN_unconscious", false, true];
_unit setVariable ["USEC_isCardiac",false,true];
sleep 5;
//["usecEpi",[_unit,player,"ItemEpinephrine"]] call broadcastRpcCallAll;
usecEpi = [_unit,player,"ItemEpinephrine"];
publicVariable "usecEpi";
};
r_action = false;

View File

@@ -0,0 +1,89 @@
// init_related_scripts.sqf ArmA2 revive
// <20> AUGUST 2010 - norrin
// Functions
// Added pvEH - scripts modified to remove the need for sending long strings via setVehicleInit to reduce network traffic and JIP load - 04072010
// INCLUDE REQUIRED GAME CODES
#include "\ca\editor\Data\Scripts\dikCodes.h"
//Settings
usec_bandage_recovery = 5; //time to recover after bandaging
//"colorCorrections" ppEffectEnable true;
//"dynamicBlur" ppEffectEnable true;
//[man2] call fnc_usec_damageHandle;
//[player] call fnc_usec_damageHandle;
//random morphine chance
//Epi pen not working chance
//Water Unconscious handling
// localize "CLIENT: Medical System Initiated";
while {true} do {
//hintSilent format["Injured: %1\nUnconscious: %2 (%7)\nBlood: %5\nPain: %6\nMust Evac: %8\nHandler: %3\nAction: %4\nLeg Damage: %9\nArm Damage: %10\nInfected: %11",r_player_injured,r_player_unconscious,r_player_handler,r_action,r_player_blood,r_player_inpain,r_player_timeout,r_player_dead, player getVariable ["hit_legs",0], player getVariable ["hit_arms",0],r_player_infected];
if (r_player_blood <= 0) then {
[player,900] call fnc_usec_damageUnconscious;
_id = [dayz_sourceBleeding,"bled"] spawn player_death;
};
if ((r_player_blood <= 3000) and !r_player_unconscious) then {
_rnd = random 100;
if (_rnd > 99) then {
[player,((random 0.1) + 0.2)] call fnc_usec_damageUnconscious;
};
};
//Handle Unconscious player
if ((r_player_unconscious) and (!r_player_handler1)) then {
//localize "CLIENT: Start Unconscious Function";
[] spawn fnc_usec_unconscious;
};
//Handle player bleeding
if ((r_player_injured) and (!r_player_handler)) then {
r_player_handler = true;
sleep 1;
//localize "CLIENT: Start Player Bleeding";
[] spawn fnc_usec_playerBleed; //publicizes the blood value at regular intervals
[] spawn fnc_med_publicBlood;
};
//Handle player infection
if ((r_player_infected) and (!r_player_handler)) then {
r_player_handler = true;
sleep 1;
[] spawn fnc_med_publicBlood;
};
//Add player actions
[] call fnc_usec_damageActions;
[] call fnc_usec_selfActions;
//Low Blood Effects
if (!r_player_unconscious) then {
if (((r_player_blood/r_player_bloodTotal) < 0.35)) then {
r_player_lowblood = true;
playSound "heartbeat_1";
addCamShake [2, 0.5, 25];
if (r_player_lowblood) then {
0 fadeSound ((r_player_blood/r_player_bloodTotal) + 0.5);
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [4]; "dynamicBlur" ppEffectCommit 0.2;
};
sleep 0.5;
if (r_player_lowblood) then {
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [1]; "dynamicBlur" ppEffectCommit 0.5;
};
sleep 0.5;
_lowBlood = player getVariable ["USEC_lowBlood", false];
if ((r_player_blood < r_player_bloodTotal) and !_lowBlood) then {
player setVariable["USEC_lowBlood",true,true];
};
};
};
sleep 1;
};
endLoadingScreen;

View File

@@ -0,0 +1,33 @@
// Load_act.sqf
// JULY 2010 - norrin
private ["_args","_dragger","_vcl","_wounded"];
_args = _this select 3;
_dragger = _args select 0;
_vcl = _args select 1;
_wounded = _args select 2;
r_drag_sqf = false;
r_action = false;
r_action_load = false;
call fnc_usec_medic_removeActions;
_dragger removeAction NORRN_loadWoundedAction;
if ((_vcl emptyPositions "cargo") > 0) then
{
detach _wounded;
_dragger switchMove "";
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
sleep 1;
//["norrnRLact",_wounded] call broadcastRpcCallAll;
norrnRLact = [_wounded];
publicVariable "norrnRLact";
player removeAction NORRN_dropAction;
}else{
hint "No space left in vehicle";
};
NORRN_load_wounded_action = true;
if (true) exitWith {};

View File

@@ -0,0 +1,51 @@
// Load_wounded.sqf
// OCTOBER 2010 - norrin
private ["_wounded","_vcl","_group"];
_wounded = _this select 0;
if (!local _wounded) exitWith {};
sleep 1;
_vcl = _wounded getVariable "NORRN_loadVcl";
_wounded setVariable ["NORRN_unit_dragged", true, true];
_wounded assignAsCargo _vcl;
_wounded moveInCargo _vcl;
sleep 1;
//["norrnRALW",_wounded] call broadcastRpcCallAll;
norrnRALW = [_wounded];
publicVariable "norrnRALW";
if (local _wounded) then
{
waitUntil {!(_wounded getVariable "NORRN_unconscious")|| !alive _wounded || vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo"};
if (vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo") exitWith
{
if (_wounded getVariable "NORRN_AIunconscious") then
{
if (vehicle _wounded != _wounded) then
{
unassignVehicle _wounded;
sleep 0.05;
_wounded action ["EJECT", _vcl];
sleep 1;
};
norrinRAlie = _wounded;
publicVariable "norrinRAlie";
_wounded switchMove "ainjppnemstpsnonwrfldnon";
_wounded setVariable ["NORRN_unit_dragged", false, true];
sleep 1;
};
};
if (vehicle _wounded != _wounded && alive _wounded) then
{
_wounded playMove "BasicDriver";
};
};
sleep 0.01;
if (true) exitWith {};

View File

@@ -0,0 +1,37 @@
// unLoad_act.sqf
// AUGUST 2010 - norrin
private ["_args","_dragger","_vcl","_wounded"];
_args = _this select 3;
_name = _args select 0;
_vcl = _args select 1;
_crewVcl = crew _vcl;
_name removeAction NORRN_pullOutAction;
for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do
{
_unit = _crewVcl select _loop;
if (_unit getVariable "NORRN_unconscious") then
{
unassignVehicle _unit;
sleep 0.05;
_unit action ["EJECT", _vcl];
sleep 1;
_position = position _unit;
_isOnDeck = getPos _unit in LHA_Deck;
if (_isOnDeck) then {
_unit setPosAsl [(_position select 0), (_position select 1), (LHA_height+1)];
};
_unit switchMove "";
_unit switchMove "ainjppnemstpsnonwrfldnon";
sleep 0.2;
norrnRalie = _unit;
publicVariable "norrnRalie";
};
sleep 0.1;
};
if (true) exitWith {};

View File

@@ -0,0 +1,53 @@
// Load_wounded.sqf
// OCTOBER 2010 - norrin
private ["_wounded","_vcl","_group"];
_wounded = _this select 0;
//if (!local _wounded) exitWith {};
r_action = false;
sleep 1;
_vcl = _wounded getVariable "NORRN_loadVcl";
_wounded setVariable ["NORRN_unit_dragged", true, true];
_wounded assignAsCargo _vcl;
_wounded moveInCargo _vcl;
sleep 1;
//["norrnRALW",_wounded] call broadcastRpcCallAll;
norrnRALW = [_wounded];
publicVariable "norrnRALW";
if (local _wounded) then
{
waitUntil {!(_wounded getVariable "NORRN_unconscious")|| !alive _wounded || vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo"};
if (vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo") exitWith
{
if (_wounded getVariable "NORRN_AIunconscious") then
{
if (vehicle _wounded != _wounded) then
{
unassignVehicle _wounded;
sleep 0.05;
_wounded action ["EJECT", _vcl];
sleep 1;
};
norrinRAlie = _wounded;
publicVariable "norrinRAlie";
_wounded switchMove "ainjppnemstpsnonwrfldnon";
_wounded setVariable ["NORRN_unit_dragged", false, true];
sleep 1;
};
};
if (vehicle _wounded != _wounded && alive _wounded) then
{
_wounded playMove "BasicDriver";
};
};
sleep 0.01;
if (true) exitWith {};

View File

@@ -0,0 +1,57 @@
// bleed.sqf
_unit = (_this select 3) select 0;
_unit setVariable ["hit_legs",0];
_unit setVariable ["hit_hands",0];
call fnc_usec_medic_removeActions;
r_action = false;
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Medic";
};
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if (_finished) then {
_num_removed = ([player,"ItemMorphine"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
} else {
//dayzHumanity = [player,50];
[player,50] call player_humanityChange;
};
//["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
usecMorphine = [_unit,player];
publicVariable "usecMorphine";
};
} else {
r_interrupt = false;
if (vehicle player == player) then {
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
};
};

View File

@@ -0,0 +1,34 @@
// bleed.sqf
private ["_id","_unit"];
_unit = (_this select 3) select 0;
call fnc_usec_medic_removeActions;
r_action = false;
_num_removed = ([player,"ItemPainkiller"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
_unit setVariable ["USEC_inPain", false, true];
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Gear";
};
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
} else {
//dayzHumanity = [player,20];
[player,20] call player_humanityChange;
};
sleep 1;
//clear the healed player's vision
//["usecPainK",[_unit,player]] call broadcastRpcCallAll;
usecPainK = [_unit,player];
publicVariable "usecPainK";
};

View File

@@ -0,0 +1,7 @@
// allowDamage.sqf
_unit = _this select 0;
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
_unit allowDamage true;
_unit setCaptive false;

View File

@@ -0,0 +1,5 @@
// animDrag.sqf
_dragee = _this select 0;
_dragee switchmove "ainjppnemstpsnonwrfldb_still";

View File

@@ -0,0 +1,9 @@
// animHealed.sqf
_unit = _this select 0;
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
if (_unit == player) then {
r_player_unconscious = false;
r_player_injured = false;
};

View File

@@ -0,0 +1,4 @@
//carriedUp.sqf
_dragee = _this select 0;
_dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_up";

View File

@@ -0,0 +1,6 @@
//deadState.sqf
_unit = _this select 0;
_unit switchMove "deadState";

View File

@@ -0,0 +1,6 @@
//lieStill.sqf
_dragee = _this select 0;
_dragee playMoveNow "ainjppnemstpsnonwrfldnon";

View File

@@ -0,0 +1,5 @@
// load_wounded.sqf
_unit = _this select 0;
_unit switchMove "kia_hmmwv_driver";

View File

@@ -0,0 +1,22 @@
// animHealed.sqf
private["_array","_unit","_medic","_display","_control"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if (_unit == player) then {
r_player_injured = false;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
r_player_handler = false;
if (r_player_blood == r_player_bloodTotal) then {
player setVariable["USEC_lowBlood",false,true];
};
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1303;
_control ctrlShow false;
};
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -0,0 +1,71 @@
// medBreakLegs.sqf
private["_array","_unit","_attacker","_display","_control","_hitLegs","_hitArms"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_attacker = _array select 1;
if (_unit == player && player distance _attacker < 5) then {
player setVariable["startcombattimer", 1, false];
// Make bleed
if (random 2 < 1) then {
// Find hit
_cnt = count (DAYZ_woundHit_ok select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit_ok select 1) select _index;
_hit = (DAYZ_woundHit_ok select 0) select _index;
_damage = 0.1 + random (1.2);
//Record Damage to Minor parts (legs, arms)
if (_hit in USEC_MinorWounds) then {
[_unit,_hit,_damage] call object_processHit;
};
player setVariable["medForceUpdate",true,true];
1 call fnc_usec_bulletHit;
_wound = _hit call fnc_usec_damageGetWound;
//Create Wound
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_unit,_wound,_hit];
publicVariable "usecBleed";
//Set Injured if not already
_isInjured = _unit getVariable["USEC_injured",false];
if (!_isInjured) then {
_unit setVariable["USEC_injured",true,true];
dayz_sourceBleeding = _attacker;
};
//Set ability to give blood
_lowBlood = _unit getVariable["USEC_lowBlood",false];
if (!_lowBlood) then {
_unit setVariable["USEC_lowBlood",true,true];
};
r_player_injured = true;
// reduce blood
r_player_blood = r_player_blood - 50;
// Make player infected
if (random 5 < 1) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];
};
};
[_unit,"hit",2,false] call dayz_zombieSpeak;
};

View File

@@ -0,0 +1,25 @@
// animHealed.sqf
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
_isDead = _unit getVariable["USEC_isDead",false];
if (local _unit) then {_unit setCaptive false};
if (!_isDead) then {
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
//no need to public broadcast the variables since this runs on every peer
_unit setVariable ["NORRN_unconscious", false, false];
_unit setVariable ["USEC_isCardiac",false, false];
if (_unit == player) then {
r_player_unconscious = false;
disableUserInput false;
r_player_cardiac = false;
r_player_handler1 = false;
};
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};
};

View File

@@ -0,0 +1,26 @@
// animHealed.sqf
private["_array","_unit","_medic","_display","_control","_hitLegs","_hitArms"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if (_unit == player) then {
r_fracture_legs = false;
r_fracture_arms = false;
_unit setHit["legs",0];
_unit setHit["hands",0];
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1203;
_control ctrlShow false;
_id = false spawn dayz_disableRespawn;
};
_unit setVariable ["hit_legs",0,false];
_unit setVariable ["hit_hands",0,false];
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -0,0 +1,13 @@
// animHealed.sqf
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if (_unit == player) then {
r_player_inpain = false;
R3F_TIRED_Accumulator = 0;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
};
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -0,0 +1,32 @@
// animHealed.sqf
private["_array","_unit","_medic","_display","_control","_lowBlood"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
_rndInfection = (random 15);
_TransfusionInfection = (_rndInfection < 1);
if (_unit == player) then {
r_player_blood = r_player_bloodTotal;
r_player_lowblood = false;
10 fadeSound 1;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
if (_TransfusionInfection) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];
};
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1300;
_control ctrlShow true;
player setVariable["USEC_BloodQty",r_player_bloodTotal,true];
};
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -0,0 +1,7 @@
// animHealed.sqf
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
_item = _array select 2;
_medic playMove "AinvPknlMstpSnonWrflDnon_medic1";

View File

@@ -0,0 +1,5 @@
//noAnim.sqf
_unit = _this select 0;
_unit switchMove "";

View File

@@ -0,0 +1,8 @@
// noDamage.sqf
_unit = _this select 0;
_unit setCaptive 3;
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
_unit allowDamage false;
sleep 0.01;

View File

@@ -0,0 +1,5 @@
// pickUp.sqf
_unit = _this select 0;
_unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";

View File

@@ -0,0 +1,5 @@
// promptRName.sqf
_unit = _this select 0;
call compile format ["server globalChat reviver_%1", _unit];

View File

@@ -0,0 +1,6 @@
// rolltoback.sqf
_unit = _this select 0;
_unit switchMove "ainjppnemstpsnonwrfldnon_rolltoback";

View File

@@ -0,0 +1,6 @@
// rolltofront.sqf
_unit = _this select 0;
_unit switchMove "ainjppnemstpsnonwrfldnon_rolltofront";

View File

@@ -0,0 +1,5 @@
// set180.sqf
_dragee = _this select 0;
_dragee setDir 180;

View File

@@ -0,0 +1,17 @@
// bleed.sqf
_unit = (_this select 3);
_isDead = _unit getVariable["USEC_isDead",false];
_isCardiac = _unit getVariable["USEC_isCardiac",false];
sleep 1;
if (_isDead) then {
TitleText["Pulse is extremely weak","PLAIN DOWN",3];
} else {
if (_isCardiac) then {
TitleText["Pulse is weak","PLAIN DOWN",3];
} else {
TitleText["Pulse is strong","PLAIN DOWN",3];
};
};
//r_action = false;

View File

@@ -0,0 +1,258 @@
fnc_usec_damageHandle = {
/***********************************************************
ASSIGN DAMAGE HANDLER TO A UNIT
- Function
- [unit] call fnc_usec_damageHandle;
************************************************************/
private["_unit","_eh"];
_unit = _this select 0;
// Remove handle damage override
// _unit removeEventHandler ["HandleDamage",temp_handler];
mydamage_eh1 = _unit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;} ];
mydamage_eh2 = _unit addEventHandler ["Fired", {_this call player_fired;}];
mydamage_eh3 = _unit addEventHandler ["Killed", {_id = [] spawn player_death;}];
};
fnc_usec_pitchWhine = {
_visual = _this select 0;
_sound = _this select 1;
//affect the player
0 fadeSound 0;
playMusic ["PitchWhine",0];
if (!r_player_unconscious) then {
_visual call fnc_usec_bulletHit;
_sound fadeSound 1;
};
r_pitchWhine = true;
[] spawn {
sleep 32;
r_pitchWhine = false;
};
};
fnc_usec_damageUnconscious = {
private["_unit","_damage"];
_unit = _this select 0;
_damage = _this select 1;
_inVehicle = (vehicle _unit != _unit);
if (_unit == player) then {
r_player_timeout = round(((random 2) * _damage) * 40);
if (_type == 1) then {r_player_timeout = r_player_timeout + 90};
if (_type == 2) then {r_player_timeout = r_player_timeout + 60};
r_player_unconscious = true;
player setVariable["medForceUpdate",true,true];
player setVariable ["unconsciousTime", r_player_timeout, true];
};
if (_inVehicle) then {
_unit spawn {
private["_veh","_unit"];
_veh = vehicle _this;
_unit = _this;
waitUntil{(((position _veh select 2 < 1) and (speed _veh < 1)) or (!r_player_unconscious))};
if (r_player_unconscious) then {
_unit action ["eject", _veh];
waitUntil{((vehicle _this) != _this)};
sleep 1;
_unit setVariable ["NORRN_unconscious", true, true];
_unit playActionNow "Die";
};
};
} else {
_unit setVariable ["NORRN_unconscious", true, true];
_unit playActionNow "Die";
};
};
//Action Handlers added to init file
fnc_usec_bulletHit = {
private["_commit"];
_commit = _this;
if (!r_player_unconscious) then {
"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0;
addCamShake [5, 0.5, 25];
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit _commit;
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit _commit;
};
};
fnc_usec_damageType = {
private["_damage","_ammo","_type"];
_damage = _this select 0;
_ammo = _this select 1;
_type = 0;
if ((_ammo isKindof "Grenade") or (_ammo isKindof "ShellBase") or (_ammo isKindof "TimeBombCore") or (_ammo isKindof "BombCore") or (_ammo isKindof "MissileCore") or (_ammo isKindof "RocketCore") or (_ammo isKindof "FuelExplosion") or (_ammo isKindof "GrenadeBase")) then {
_type = 1;
};
if ((_ammo isKindof "B_127x107_Ball") or (_ammo isKindof "B_127x99_Ball")) then {
_type = 2;
};
_type;
};
fnc_usec_damageGetWound = {
private["_hit","_sPoint","_options","_rnd","_wound"];
_hit = format["%1",_this];
_sPoint = USEC_woundHit find _hit;
_options = USEC_woundPoint select _sPoint;
_rnd = floor(random(count _options));
_wound = _options select _rnd;
_wound;
};
fnc_usec_medic_removeActions = {
_obj = player;
{
_obj = _x;
{
_obj removeAction _x;
} forEach r_player_actions;
} forEach r_action_targets;
r_player_actions = [];
r_action_targets = [];
};
fnc_usec_self_removeActions = {
{
player removeAction _x;
} forEach r_self_actions;
r_self_actions = [];
};
fnc_med_publicBlood = {
while {(r_player_injured or r_player_infected) and r_player_blood > 0} do {
player setVariable["USEC_BloodQty",r_player_blood,true];
player setVariable["medForceUpdate",true];
sleep 5;
};
};
fnc_usec_playerBleed = {
private["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime"];
_bleedTime = 400; //seconds
_bleedPerSec = (r_player_bloodTotal / _bleedTime);
_total = r_player_bloodTotal;
r_player_injured = true;
_myBleedTime = (random 300) + 30;
_bTime = 0;
while {r_player_injured} do {
// If kneeling or crawling reduce bleeding
if(dayz_isKneeling) then {
_bleedPerSec = _bleedPerSec / 2;
};
if(dayz_isCrawling) then {
_bleedPerSec = _bleedPerSec / 4;
};
//bleed out
if (r_player_blood > 0) then {
r_player_blood = r_player_blood - _bleedPerSec;
};
_bTime = _bTime + 1;
if (_bTime > _myBleedTime) then {
r_player_injured = false;
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
{player setVariable[_x,false,true];} forEach USEC_woundHit;
player setVariable ["USEC_injured",false,true];
};
sleep 1;
};
};
fnc_usec_damageBleed = {
/***********************************************************
PROCESS DAMAGE TO A UNIT
- Function
- [_unit, _wound, _injury] call fnc_usec_damageBleed;
************************************************************/
private["_unit","_wound","_injury","_modelPos","_point","_source"];
_unit = _this select 0;
_wound = _this select 1;
_injury = _this select 2;
_modelPos = [0,0,0];
switch (_wound) do {
case "Pelvis": {
_modelPos = [0,0,0.2];
};
case "aimpoint": {
_rndX = (0.1 - random 0.2);
_modelPos = [_rndX,0,0.2];
};
case "RightShoulder": {
_modelPos = [0,0,0.2];
};
case "LeftShoulder": {
_modelPos = [0,0,0.2];
};
};
while {true} do {
scopeName "main";
waitUntil {(vehicle _unit == _unit)};
_point = "Logic" createVehicleLocal getPosATL _unit;
_source = "#particlesource" createVehicleLocal getPosATL _unit;
_source setParticleParams
/*Sprite*/ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"",// File,Ntieth,Index,Count,Loop(Bool)
/*Type*/ "Billboard",
/*TimmerPer*/ 1,
/*Lifetime*/ 0.2,
/*Position*/ [0,0,0],
/*MoveVelocity*/ [0,0,0.5],
/*Simulation*/ 1,0.32,0.1,0.05,//rotationVel,weight,volume,rubbing
/*Scale*/ [0.05,0.25],
/*Color*/ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
/*AnimSpeed*/ [0.1],
/*randDirPeriod*/ 0,
/*randDirIntesity*/ 0,
/*onTimerScript*/ "",
/*DestroyScript*/ "",
/*Follow*/ _point];
_source setParticleRandom [2, [0, 0, 0], [0.0, 0.0, 0.0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.02;
_point attachTo [_unit,_modelPos,_wound];
sleep 5;
while {((_unit getVariable["USEC_injured",true]) and (alive _unit))} do {
scopeName "loop";
if (vehicle _unit != _unit) then {
BreakOut "loop";
};
sleep 1;
};
deleteVehicle _source;
deleteVehicle _point;
if (!(_unit getVariable["USEC_injured",false])) then {
BreakOut "main";
};
};
deleteVehicle _source;
deleteVehicle _point;
};
fnc_usec_recoverUncons = {
//same actions as in the EH, just timed differently
player setVariable ["NORRN_unconscious", false, true];
player setVariable ["unconsciousTime", 0, true];
player setVariable ["USEC_isCardiac",false,true];
player setVariable["medForceUpdate",true,true];
sleep 1;
usecEpi = [player,player];
publicVariable "usecEpi";
r_player_unconscious = false;
sleep 1;
r_player_cardiac = false;
r_player_handler1 = false;
player switchMove "AmovPpneMstpSnonWnonDnon_healed";
};

View File

@@ -0,0 +1,57 @@
private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused","_text"];
// bleed.sqf
_unit = (_this select 3) select 0;
//_lowBlood = _unit getVariable ["USEC_lowBlood", false];
//_injured = _unit getVariable ["USEC_injured", false];
//_inPain = _unit getVariable ["USEC_inPain", false];
_lastused = _unit getVariable ["LastTransfusion", time];
// if (_lastused - time < 60) exitwith {cutText [format[(localize "str_actions_medical_18"),_text] , "PLAIN DOWN"]};
call fnc_usec_medic_removeActions;
r_action = false;
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Medic";
};
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if (_finished) then {
_unit setVariable["LastTransfusion",time,true];
_unit setVariable["USEC_lowBlood",false,true];
_num_removed = ([player,"ItemBloodbag"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
//["usecTransfuse",[_unit,player]] call broadcastRpcCallAll;
usecTransfuse = [_unit,player];
publicVariable "usecTransfuse";
//dayzHumanity = [player,100];
[player,100] call player_humanityChange;
};
} else {
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
};