Achmed Posted February 1, 2014 Report Share Posted February 1, 2014 People are using bloodbags as a way to get there humanity up real fast so they can access the hero trader Is there some way to limit how often you can receive a bloodbag? Link to comment Share on other sites More sharing options...
0 Adminlaststand Posted February 1, 2014 Report Share Posted February 1, 2014 theres limits you can set in the config file as to how much humanity they get and how oftern Link to comment Share on other sites More sharing options...
0 Achmed Posted February 1, 2014 Author Report Share Posted February 1, 2014 im not referring to self blood bag. I mean when giving someone else a blood bag Link to comment Share on other sites More sharing options...
0 Achmed Posted February 1, 2014 Author Report Share Posted February 1, 2014 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 More sharing options...
0 Judge Bread Posted February 1, 2014 Report Share Posted February 1, 2014 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 More sharing options...
0 Achmed Posted February 1, 2014 Author Report Share Posted February 1, 2014 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 Link to comment Share on other sites More sharing options...
0 Firefly Posted February 1, 2014 Report Share Posted February 1, 2014 Personally if you catch them doing it reset it in the db as a warning. Thats pretty much how we did it. Link to comment Share on other sites More sharing options...
0 Judge Bread Posted February 2, 2014 Report Share Posted February 2, 2014 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 More sharing options...
0 Achmed Posted February 2, 2014 Author Report Share Posted February 2, 2014 I know where the file is located client side but can't work out where it is called from to adjust it to look in the mission.pbo Link to comment Share on other sites More sharing options...
0 Judge Bread Posted February 2, 2014 Report Share Posted February 2, 2014 fn_damageActions.sqf which is in the compiles as fnc_usec_damageActions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageActions.sqf"; Might start getting more complex than first thought. Link to comment Share on other sites More sharing options...
0 Achmed Posted February 2, 2014 Author Report Share Posted February 2, 2014 Thanks. I'll have a look into it and see how complex it is Link to comment Share on other sites More sharing options...
0 Achmed Posted February 2, 2014 Author Report Share Posted February 2, 2014 Not to complex at all. just need to test it now and see if it works. Link to comment Share on other sites More sharing options...
0 Judge Bread Posted February 2, 2014 Report Share Posted February 2, 2014 I'd love to see how u managed it to get it all to work because I do like the idea of having an anti abuse system in place. I could figure it out myself but its easier this way :P Link to comment Share on other sites More sharing options...
0 Achmed Posted February 2, 2014 Author Report Share Posted February 2, 2014 its not tested yet. once i tested it if it works ill post details. the line was already there so its just the case of moving it to the mission.pbo and changing the paths etc Link to comment Share on other sites More sharing options...
0 Judge Bread Posted February 2, 2014 Report Share Posted February 2, 2014 Nevermind took two minutes to think about it :) Anyways. Would be useful for future seekers if you did post something. Link to comment Share on other sites More sharing options...
0 adg Posted February 4, 2014 Report Share Posted February 4, 2014 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 More sharing options...
0 Achmed Posted February 4, 2014 Author Report Share Posted February 4, 2014 Yeah I tried the default and it said I could not do it as had to wait but that was before evening doing a blood bag so as I'm not a coder I gave up and just changed the humanity gain. I'll try what you have posted. Thanks :) Link to comment Share on other sites More sharing options...
0 ekroemer Posted February 5, 2014 Report Share Posted February 5, 2014 Quite complicated solutions. On our servers we have the same problem but we simply don't refill bloodbags at the traders. Since players nowadays seem to be too lazy to go looting this fixes the problem ;-) Link to comment Share on other sites More sharing options...
0 Achmed Posted February 5, 2014 Author Report Share Posted February 5, 2014 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 More sharing options...
Question
Achmed
People are using bloodbags as a way to get there humanity up real fast so they can access the hero trader
Is there some way to limit how often you can receive a bloodbag?
Link to comment
Share on other sites
18 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now