Jump to content

[DRINK BLOOD]


Recommended Posts

You can use knife to cut you and drink your own blood to quench thirst.

make a new sqf called drinkblood.sqf  and put it into  MpMissions/yourinstance/custom/scripts/

Spoiler

private ["_player","_inventory","_hasknife","_LastUsedTime","_Time"];

_player = player;
_inventory = items player;
_hasknife = "ItemKnife" in _inventory;
_LastUsedTime = 300;
_Time = time - lastuse;

if(_Time < _LastUsedTime) exitWith {
    cutText [format["wait %1 seconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};

if !(_hasknife) exitWith {
    cutText [format["Must be equiped whit 1x knife in your toolbet."], "PLAIN DOWN"];
};

if (_hasknife) then {
    lastuse = time;
    sleep 1;
    player playActionNow "Medic";    
    sleep 3;
    _player setDamage 0.2;
    cutText [format["Drink your own blood"], "PLAIN DOWN"];
    [player,-100] call player_humanityChange;
    dayz_thirst = 0;
    };

here we have 2 ways to call the script.

1-if u have DZE_rightclick actions  call it by extra_rc.hpp

or 2- use scroll menu to call it.

1-CALLING WITH extra_rc.hpp

go to your extra_rc.hpp and paste lines in blue.

Spoiler

class ExtraRc {
  class ItemRadio {
     class GroupManagement {
        text = "Group Management";
        script = "execVM 'dzgm\loadGroupManagement.sqf'";
     };
  };
   class ItemKnife {
         class drinkblood {
        text = "DrinkBlood";
        script = "execVM 'custom\scripts\drinkblood.sqf'";
     };   

  };

  };

Done: open your inventory, right click on knife "drinkblood"

2-CALL IT WITH SCROLL MENU

make a new sqf named drinkblood_init.sqf

Spoiler

waituntil {!isnull (finddisplay 46)};
sleep 15;
Servidor = player addaction [("<t color=""#ff3e3e"">" + ("DrinkMyBlood") +"</t>"),"custom\scripts\drinkblood.sqf","",5,false,true,"",""];

now go to very bottom of init.sqf and paste

Spoiler

//DRINK BLOOD
[] execVM "custom\scripts\drinkblood_init.sqf";

Done: use your scroll menu and pick "DrinkMyBlood"

Link to comment
Share on other sites

private ["_player","_inventory","_hasknife","_LastUsedTime","_Time","_infectionChance"];

_player 		= player;
_inventory 		= items player;
_hasknife 		= "ItemKnife" in _inventory;
_LastUsedTime 	= 300;
_Time 			= time - lastuse;

if(_Time < _LastUsedTime) exitWith {
    cutText [format["wait %1 seconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};

if !(_hasknife) exitWith {
    cutText [format["Must be equiped whit 1x knife in your toolbet."], "PLAIN DOWN"];
};

_infectionChance = round(random 10);

if (_hasknife) then {
	if (_infectionChance < 4) then {r_player_infected = true;
		cutText [format["%1, you get infected :(",name player], "PLAIN DOWN"];
	};
    lastuse = time;
    sleep 1;
    player playActionNow "Medic";    
    sleep 3;
    _player setDamage 0.2;
    cutText [format["Drink your own blood"], "PLAIN DOWN"];
    [player,-100] call player_humanityChange;
    dayz_thirst = 0;
    };

Chance to get infection

Link to comment
Share on other sites

see  have this similar too.  i use it to give humanity on players

paganritual.sqf  into custom/scripts/

Spoiler

private ["_player","_playerPos","_nearmiss2","_inventory","_LastUsedTime","_Time","_hasknife"];

call gear_ui_init;

_player = player;
_playerPos = getPosATL player;
_nearmiss2 = count nearestObjects [_playerPos, ["Grave"], 5] > 0;
_LastUsedTime = 10800;
_Time = time - lastuse;
_inventory = items player;
_hasknife = "ItemKnife" in _inventory;


if(_Time < _LastUsedTime) exitWith {
    cutText [format["wait %1 sconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};

if !(_hasknife) exitWith {
cutText [format["U need a Knife to offer your blood to the deads ."], "PLAIN DOWN"];
};

if (_nearmiss2 && _hasknife) then {
    lastuse = time;
    sleep 1;
    player playActionNow "Medic";    
    sleep 3;
    _player setDamage 0.4;
    cutText [format["offer your blood"], "PLAIN DOWN"];
    [player,100] call player_humanityChange;   
    };

at bottom of self_actions

Spoiler

////////////pagan ritual//
private["_playerPos","_nearmiss2"];


_playerPos = getPosATL player;
_nearmiss2 = count nearestObjects [_playerPos, ["Grave"], 5] > 0;
 
if (_nearmiss2) then {
        if (s_player_hlp2 < 0) then {
            s_player_hlp2 = player addaction[("<t color=""#3399cc"">" + ("PaganRitual") +"</t>"),"custom\script\paganritual.sqf"];
        };
    } else {
        player removeAction s_player_hlp2;
        s_player_hlp2 = -1;
    };
////////////////

then u need add some "Graves" with arma2oaeditor  or just change "Graves" for another.

Link to comment
Share on other sites

14 hours ago, juandayz said:

hahaha dear duke! tnks and if u wanna laugh  come some day to my server.. players have sex with sheeps and others funnys :D

nice :D sex with sheeps "CENSORED" text on middle of screen or animation?) what your's server name?

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
  • Discord

×
×
  • Create New...