Krixes - Self Bloodbag Script
Version 1.4
All of the edits can be done in player_selfBloodbag.sqf under the Config area!
Change Log 1.5:
DayZ 1.7.6.1:
Chernarus
Fallujah*
Lingor Island*
Namalsk*
Panthera Island*
Takistan*
Taviana both Version*
Oring*
Celle*
Other:
DayZ Epoch*
DayZ Origin*
*Note - For most of the other mods other than stock Chernarus you will need to use your own fn_selfActions.sqf located inside your @modnamehere/dayz_code.pbo files and then follow the custom fn_selfAction.sqf tutorial below.
Confirmed working on the listed mods below by Krixes!
DayZ 1.7.7:
Chernarus*
*Note - For DayZ 1.7.7 you must copy and use the fn_selfActions.sqf located inside your @DayZ/dayz_code.pbo folder and then follow the custom fn_selfActions.sqf!
Please like this post if you like and it works for you, it would be appreciated!
Please post questions, comments and suggestions below!
Installation Instructions For new dayz_mission.pbo:
Open your dayz_mission.pbo and find init.sqf
add this just before progressLoadingScreen 1.0;
Now create a folder in your dayz_mission.pbo called Scripts and create a new empty file called compiles.sqf inside.
Edit the compiles.sqf to look like this.....
add the attached fn_selfActions.sqf to your custom folder.
Now lastly add the attached player_selfbloodbag.sqf into your custom folder.
Go in game give yourself a bloodbag and use the scroll wheel to select Self Bloodbag and you should be all set!
Installation Instructions For existing custom dayz_mission.pbo and fn_selfActions.sqf:
Open your dayz_mission.pbo
Create a new folder called Scripts in your dayz_mission.pbo and add my player_selfBloodbag.sqf to the custom folder you just created!
open your fn_selfActions.sqf in YOUR dayz_mission.pbo and add this in....
just after this part...........
Have Fun,
Krixes
Version 1.4
All of the edits can be done in player_selfBloodbag.sqf under the Config area!
Change Log 1.5:
- Updated for DayZ 1.8
- Changed combat variable for use in 1.8.
- Updated by CommanderRetra
- Added bloodbag use timer
- Added a timer for the amount of time before player can use self bloodbag again
- Added a lot more comments!
- Added config area and variables for custom user changes
- Added a fancy interrupt method
- Removed unnecessary methods
- Player2 for the infection chance and some of the comments!
- istealth for the combat check!
- Dantw for his testing on multiple mods!
DayZ 1.7.6.1:
Chernarus
Fallujah*
Lingor Island*
Namalsk*
Panthera Island*
Takistan*
Taviana both Version*
Oring*
Celle*
Other:
DayZ Epoch*
DayZ Origin*
*Note - For most of the other mods other than stock Chernarus you will need to use your own fn_selfActions.sqf located inside your @modnamehere/dayz_code.pbo files and then follow the custom fn_selfAction.sqf tutorial below.
Confirmed working on the listed mods below by Krixes!
DayZ 1.7.7:
Chernarus*
*Note - For DayZ 1.7.7 you must copy and use the fn_selfActions.sqf located inside your @DayZ/dayz_code.pbo folder and then follow the custom fn_selfActions.sqf!
Please like this post if you like and it works for you, it would be appreciated!
Please post questions, comments and suggestions below!
Installation Instructions For new dayz_mission.pbo:
Open your dayz_mission.pbo and find init.sqf
add this just before progressLoadingScreen 1.0;
Code:
call compile preprocessFileLineNumbers "Scripts\compiles.sqf"; //Compile custom compiles
Now create a folder in your dayz_mission.pbo called Scripts and create a new empty file called compiles.sqf inside.
Edit the compiles.sqf to look like this.....
Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "Scripts\fn_selfActions.sqf"; // fnc_usec_selfActions - adds custom actions to dayz code
add the attached fn_selfActions.sqf to your custom folder.
Now lastly add the attached player_selfbloodbag.sqf into your custom folder.
Go in game give yourself a bloodbag and use the scroll wheel to select Self Bloodbag and you should be all set!
Installation Instructions For existing custom dayz_mission.pbo and fn_selfActions.sqf:
Open your dayz_mission.pbo
Create a new folder called Scripts in your dayz_mission.pbo and add my player_selfBloodbag.sqf to the custom folder you just created!
open your fn_selfActions.sqf in YOUR dayz_mission.pbo and add this in....
Code:
// ---------------------------------------Krixes Self Bloodbag Start------------------------------------
_mags = magazines player;
// Krixes Self Bloodbag
if ("ItemBloodbag" in _mags) then {
hasBagItem = true;
} else { hasBagItem = false;};
if((speed player <= 1) && hasBagItem && _canDo) then {
if (s_player_selfBloodbag < 0) then {
s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self Bloodbag") +"</t>"),"Scripts\player_selfbloodbag.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_selfBloodbag;
s_player_selfBloodbag = -1;
};
// ---------------------------------------Krixes Self Bloodbag End------------------------------------
just after this part...........
Code:
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
Have Fun,
Krixes