Jump to content
  • 0

Bloodbag abuse to get hero


Achmed

Question

18 answers to this question

Recommended Posts

  • 0

would removing the // on line 9 enable a usage limit to bloodbags? Currently it looks set to once a min

private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"];
// 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;

// not possible to transfuse while in a vehicle
if (vehicle player != player) exitWith { };

player playActionNow "Medic";

[1,1] call dayz_HungerThirst;

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 {
	
		/* PVS/PVC - Skaronator */
		PVDZE_send = [_unit,"Transfuse",[_unit,player]];
		publicVariableServer "PVDZE_send";

		[player,100] call player_humanityChange;
	};
} else {
	r_interrupt = false;
	player switchMove "";
	player playActionNow "stop";
};
Link to comment
Share on other sites

  • 0

 

would removing the // on line 9 enable a usage limit to bloodbags? Currently it looks set to once a min

private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"];
// 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;

// not possible to transfuse while in a vehicle
if (vehicle player != player) exitWith { };

player playActionNow "Medic";

[1,1] call dayz_HungerThirst;

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 {
	
		/* PVS/PVC - Skaronator */
		PVDZE_send = [_unit,"Transfuse",[_unit,player]];
		publicVariableServer "PVDZE_send";

		[player,100] call player_humanityChange;
	};
} else {
	r_interrupt = false;
	player switchMove "";
	player playActionNow "stop";
};

 

That might work. If people are actually abusing it you could raise to a higher amount for a while so they don't abuse it and when the abuse has passed lower it back down if you need.

 

OR.

 

Try and change the humanity you recieve from it to a low value like 20 here

[player,100] call player_humanityChange;
Link to comment
Share on other sites

  • 0

do you by any chance know where the \dayz_code\medical\transfusions.sqf file is called from so i can update the paths etc and try it

 

Well the easiest way to find it is, go to your dayz epoch files you have on your pc. In addons, find dayz_code.pbo. Make a copy somewhere else. Extract it and you will see the medical folder and transfusions file there.

--

So as to not affect the players who don't abuse this, I suggest using the _lastused time value to determine if abuse is taking place and if so do not give the player humanity for close successful bloodbagging. Thus, the player loses the bloodbag and does not get humanity.

Link to comment
Share on other sites

  • 0

There are some logic errors in the default line, but you can get it working by changing line 9 to:

if (time - _lastused < 180 && time - _lastused != 0) exitwith {cutText [format["Not so fast! You can use bloodbag again in %1 seconds!",(ceil(180 - (time - _lastused)))],"PLAIN DOWN"]};

Ofc you can change the message and time :)

Link to comment
Share on other sites

  • 0

Nothing complicated about it really tbh. Just the case of moving the files to the mission.pbo and changing the file path accordingly.

After that it's just changing some numbers.

A single tun to a hospital normally gives a minimum of 5 blood bags in a box and some times there's more then one box

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...