Jump to content
  • 0
JohnnyBravo666

Anyone have Bury Body, Gut Human, Swap Kit, Check Wallet working on 1.0.6 yet ?

Question

So I have been trying to install these scripts onto the server 1.0.6 for a number of days now, plugging in the code into the fn_selfactions file where I did with my 1.0.5.1 server, had it working fine on that server, but now I can't get the option to come up. I'm sure it's just something simple that I need to change but I'm stumped. I've gone through the file and checked and seen all the variables defined but I'm sure it's something simple. I'll post what I've added into the fn_selfactions file. 

//Bury Body

if (!_isAlive and !_isZombie and !_isAnimal and _hasETool and _isMan and _canDo) then {
        if (s_player_bury_human < 0) then {
            s_player_bury_human = player addAction [format["Bury Body"], "Mods\BuryBody\bury_human.sqf",cursorTarget, 0, false, true];
        }
    } else {
        player removeAction s_player_bury_human;
        s_player_bury_human = -1;
    };

 

//Gut Human

_isHarvested = _cursorTarget getVariable["meatHarvested",false];
    if (!_isAlive and !_isZombie and !_isAnimal and !_isHarvested and _isMan and _hasKnife and _canDo) then {
        if (s_player_butcher_human < 0) then {
            s_player_butcher_human = player addAction [format["Gut Human"], "Mods\Cannibalism\gather_meat_human.sqf",cursorTarget, 0, false, true, "", ""];
        };
    } else {
        player removeAction s_player_butcher_human;
        s_player_butcher_human = -1;
    };

 

//Swap Kit

_playerName = name player;
    _targetName = _cursorTarget getVariable["bodyName","unknown"];
    if (_playerName == _targetName) then {
        _playerBody = true; 
    if (!_isAlive && !_isZombie && !_isAnimal && _isMan && _canDo && _playerBody) then {
        if (s_player_swap_human < 0) then {
            s_player_swap_human = player addAction [format["<t color='#dddd00'>Swap Kit</t>"], "Mods\SwapKit\swap_kit.sqf",cursorTarget, 0, true, true, "", ""];
        };
    } else {
    
        player removeAction s_player_swap_human;
        s_player_swap_human = -1;
    };
    };

 

//Check Wallet

    // Check Wallet
    if (_player_studybody) then {
    if (s_player_studybody < 0) then {
        s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "Mods\ZSC\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""];
    };
} else {
    player removeAction s_player_studybody;
    s_player_studybody = -1;
};

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0
4 hours ago, JohnnyBravo666 said:

So I have been trying to install these scripts onto the server 1.0.6 for a number of days now, plugging in the code into the fn_selfactions file where I did with my 1.0.5.1 server, had it working fine on that server, but now I can't get the option to come up. I'm sure it's just something simple that I need to change but I'm stumped. I've gone through the file and checked and seen all the variables defined but I'm sure it's something simple. I'll post what I've added into the fn_selfactions file. 

//Bury Body

if (!_isAlive and !_isZombie and !_isAnimal and _hasETool and _isMan and _canDo) then {
        if (s_player_bury_human < 0) then {
            s_player_bury_human = player addAction [format["Bury Body"], "Mods\BuryBody\bury_human.sqf",cursorTarget, 0, false, true];
        }
    } else {
        player removeAction s_player_bury_human;
        s_player_bury_human = -1;
    };

 

//Gut Human

_isHarvested = _cursorTarget getVariable["meatHarvested",false];
    if (!_isAlive and !_isZombie and !_isAnimal and !_isHarvested and _isMan and _hasKnife and _canDo) then {
        if (s_player_butcher_human < 0) then {
            s_player_butcher_human = player addAction [format["Gut Human"], "Mods\Cannibalism\gather_meat_human.sqf",cursorTarget, 0, false, true, "", ""];
        };
    } else {
        player removeAction s_player_butcher_human;
        s_player_butcher_human = -1;
    };

 

//Swap Kit

_playerName = name player;
    _targetName = _cursorTarget getVariable["bodyName","unknown"];
    if (_playerName == _targetName) then {
        _playerBody = true; 
    if (!_isAlive && !_isZombie && !_isAnimal && _isMan && _canDo && _playerBody) then {
        if (s_player_swap_human < 0) then {
            s_player_swap_human = player addAction [format["<t color='#dddd00'>Swap Kit</t>"], "Mods\SwapKit\swap_kit.sqf",cursorTarget, 0, true, true, "", ""];
        };
    } else {
    
        player removeAction s_player_swap_human;
        s_player_swap_human = -1;
    };
    };

 

//Check Wallet

    // Check Wallet
    if (_player_studybody) then {
    if (s_player_studybody < 0) then {
        s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "Mods\ZSC\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""];
    };
} else {
    player removeAction s_player_studybody;
    s_player_studybody = -1;
};

These also need to be initialized in your variables.sqf, if you don't have a custom one you will have to make one, here's what you need for your scripts:

dayz_resetSelfActions = {
	s_player_equip_carry = -1;
	s_player_dragbody = -1;
	s_player_fire = -1;
	s_player_cook = -1;
	s_player_boil = -1;
	s_player_fireout = -1;
	s_player_packtent = -1;
	s_player_packtentinfected = -1;
	s_player_fillwater = -1;
	s_player_fillwater2 = -1;
	s_player_fillfuel = -1;
	s_player_grabflare = -1;
	s_player_removeflare = -1;
	s_player_painkiller = -1;
	s_build_Sandbag1_DZ = -1;
	s_build_Hedgehog_DZ = -1;
	s_build_Wire_cat1 = -1;
	s_player_deleteBuild = -1;
	s_player_flipveh = -1;
	s_player_stats = -1;
	s_player_sleep = -1;
	s_player_fillfuel210 = -1;
	s_player_fillfuel20 = -1;
	s_player_fillfuel5 = -1;
	s_player_siphonfuel = -1;
	s_player_repair_crtl = -1;
	s_player_fishing = -1;
	s_player_fishing_veh = -1;
	s_player_gather = -1;
	s_player_debugCheck = -1;
	s_player_destorytent = -1;
	s_player_attach_bomb = -1;
	s_player_upgradestorage = -1;
	s_player_Drinkfromhands = -1;
	
	// EPOCH ADDITIONS
	s_player_packvault = -1;
	s_player_lockvault = -1;
	s_player_unlockvault = -1;
	s_player_attack = -1;
	s_player_callzombies = -1;
	s_player_showname = -1;
	s_player_pzombiesattack = -1;
	s_player_pzombiesvision = -1;
	s_player_pzombiesfeed = -1;
	s_player_tamedog = -1;
	s_player_parts_crtl = -1;
	s_player_movedog = -1;
	s_player_speeddog = -1;
	s_player_calldog = -1;
	s_player_feeddog = -1;
	s_player_waterdog = -1;
	s_player_staydog = -1;
	s_player_trackdog = -1;
	s_player_barkdog = -1;
	s_player_warndog = -1;
	s_player_followdog = -1;
	s_player_information = -1;
	s_player_fuelauto = -1;
	s_player_fuelauto2 = -1;
	s_player_fillgen = -1;
	s_player_upgrade_build = -1;
	s_player_maint_build = -1;
	s_player_downgrade_build = -1;
	s_player_towing = -1;
	s_halo_action = -1;
	s_player_SurrenderedGear = -1;
	s_player_maintain_area = -1;
	s_player_maintain_area_force = -1;
	s_player_maintain_area_preview = -1;
	s_player_heli_lift = -1;
	s_player_heli_detach = -1;
	s_player_lockUnlock_crtl = -1;
	s_player_lockUnlockInside_ctrl = -1;
	s_player_toggleSnap = -1;
	s_player_toggleSnapSelect = -1;
	s_player_toggleSnapSelectPoint = [];
	snapActions = -1;
	s_player_plot_boundary = -1;
	s_player_plot_take_ownership = -1;
	s_player_plotManagement = -1;
	s_player_toggleDegree = -1;
	s_player_toggleDegrees=[];
	degreeActions = -1;
	s_player_toggleVector = -1;
	s_player_toggleVectors=[];
	vectorActions = -1;
	s_player_manageDoor = -1;
	
	//Custom below

	s_player_butcher_human = -1;
	s_player_bury_human = -1;
	s_player_swap_human = -1;
	s_player_studybody = -1;
};

call dayz_resetSelfActions;

 

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, salival said:

These also need to be initialized in your variables.sqf, if you don't have a custom one you will have to make one, here's what you need for your scripts:

dayz_resetSelfActions = {
	s_player_equip_carry = -1;
	s_player_dragbody = -1;
	s_player_fire = -1;
	s_player_cook = -1;
	s_player_boil = -1;
	s_player_fireout = -1;
	s_player_packtent = -1;
	s_player_packtentinfected = -1;
	s_player_fillwater = -1;
	s_player_fillwater2 = -1;
	s_player_fillfuel = -1;
	s_player_grabflare = -1;
	s_player_removeflare = -1;
	s_player_painkiller = -1;
	s_build_Sandbag1_DZ = -1;
	s_build_Hedgehog_DZ = -1;
	s_build_Wire_cat1 = -1;
	s_player_deleteBuild = -1;
	s_player_flipveh = -1;
	s_player_stats = -1;
	s_player_sleep = -1;
	s_player_fillfuel210 = -1;
	s_player_fillfuel20 = -1;
	s_player_fillfuel5 = -1;
	s_player_siphonfuel = -1;
	s_player_repair_crtl = -1;
	s_player_fishing = -1;
	s_player_fishing_veh = -1;
	s_player_gather = -1;
	s_player_debugCheck = -1;
	s_player_destorytent = -1;
	s_player_attach_bomb = -1;
	s_player_upgradestorage = -1;
	s_player_Drinkfromhands = -1;
	
	// EPOCH ADDITIONS
	s_player_packvault = -1;
	s_player_lockvault = -1;
	s_player_unlockvault = -1;
	s_player_attack = -1;
	s_player_callzombies = -1;
	s_player_showname = -1;
	s_player_pzombiesattack = -1;
	s_player_pzombiesvision = -1;
	s_player_pzombiesfeed = -1;
	s_player_tamedog = -1;
	s_player_parts_crtl = -1;
	s_player_movedog = -1;
	s_player_speeddog = -1;
	s_player_calldog = -1;
	s_player_feeddog = -1;
	s_player_waterdog = -1;
	s_player_staydog = -1;
	s_player_trackdog = -1;
	s_player_barkdog = -1;
	s_player_warndog = -1;
	s_player_followdog = -1;
	s_player_information = -1;
	s_player_fuelauto = -1;
	s_player_fuelauto2 = -1;
	s_player_fillgen = -1;
	s_player_upgrade_build = -1;
	s_player_maint_build = -1;
	s_player_downgrade_build = -1;
	s_player_towing = -1;
	s_halo_action = -1;
	s_player_SurrenderedGear = -1;
	s_player_maintain_area = -1;
	s_player_maintain_area_force = -1;
	s_player_maintain_area_preview = -1;
	s_player_heli_lift = -1;
	s_player_heli_detach = -1;
	s_player_lockUnlock_crtl = -1;
	s_player_lockUnlockInside_ctrl = -1;
	s_player_toggleSnap = -1;
	s_player_toggleSnapSelect = -1;
	s_player_toggleSnapSelectPoint = [];
	snapActions = -1;
	s_player_plot_boundary = -1;
	s_player_plot_take_ownership = -1;
	s_player_plotManagement = -1;
	s_player_toggleDegree = -1;
	s_player_toggleDegrees=[];
	degreeActions = -1;
	s_player_toggleVector = -1;
	s_player_toggleVectors=[];
	vectorActions = -1;
	s_player_manageDoor = -1;
	
	//Custom below

	s_player_butcher_human = -1;
	s_player_bury_human = -1;
	s_player_swap_human = -1;
	s_player_studybody = -1;
};

call dayz_resetSelfActions;

 

Sorry I forgot to mention but I did include that in the variables file already right where you showed there. This is why I'm stumped.

I added in online banking last night through the safe and that works on the scroll wheel now, I just can't get any options to show on the dead bodies.

Share this post


Link to post
Share on other sites
  • 0

bury bodies:  i removed the crate option on mine as personally i feel once a body is buried the gear should be gone

Spoiler

private ["_corpse", "_type", "_isBuried", "_humanity", "_breakChance", "_nul", "_position", "_dir", "_mound", "_crosstype", "_cross", "_deathMessage"];

_corpse = _this select 3;
_type = typeOf _corpse;
_isBuried = _corpse getVariable["isBuried",false];
_humanity = player getVariable ["humanity",0];
_breakChance = floor(random 100);

player removeAction s_player_bury_human;
s_player_bury_human = -1;

if (dayz_actionInProgress) exitWith {};

if ((_humanity < 5000) && (_humanity > -5000)) then {
    if (_breakChance > 30) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };
};    

if (((_humanity > 5000) && (_humanity < 20000 )) || ((_humanity < -5000) && (_humanity > -20000 ))) then {
    if (_breakChance > 15) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

if (((_humanity > 20000) && (_humanity < 50000 )) || ((_humanity < -20000) && (_humanity > -50000 ))) then {
    if (_breakChance > 5) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

if ((_humanity > 50000) || (_humanity < -50000)) then {
    if (_breakChance > 1) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

 

Same with gut human, i had it show a body bag once they have been gutted,  the bury body shows a grave with a cross

Spoiler

private ["_corpse", "_type", "_meatHarvested", "_humanity", "_breakChance", "_nul", "_position", "_dir", "_mound", "_deathMessage"];

_corpse = _this select 3;
_type = typeOf _corpse;
_meatHarvested = _corpse getVariable["meatHarvested",false];
_humanity = player getVariable ["humanity",0];
_breakChance = floor(random 100);

player removeAction s_player_bury_human;
s_player_bury_human = -1;

if (dayz_actionInProgress) exitWith {};

if ((_humanity < 5000) && (_humanity > -5000)) then {
    if (_breakChance > 30) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
            
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };
};    

if (((_humanity > 5000) && (_humanity < 20000 )) || ((_humanity < -5000) && (_humanity > -20000 ))) then {
    if (_breakChance > 15) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower!" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

if (((_humanity > 20000) && (_humanity < 50000 )) || ((_humanity < -20000) && (_humanity > -50000 ))) then {
    if (_breakChance > 5) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

if ((_humanity > 50000) || (_humanity < -50000)) then {
    if (_breakChance > 1) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,-0,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

 

 

Check_wallet

 

Spoiler

private ["_body","_hisMoney","_myMoney"];

_body = _this select 3;
_walletCheck = _body getVariable [Z_MoneyVariable,0];

_PlayerNear = _body call dze_isnearest_player;
if (_PlayerNear) exitWith { localize "str_pickup_limit_4" call dayz_rollingMessages; };

player playActionNow "PutDown";
if (_walletCheck == 0) exitWith { "Wallet is empty." call dayz_rollingMessages;};

_hisMoney = _body getVariable [Z_MoneyVariable,0];
_myMoney = player getVariable [Z_MoneyVariable,0];
_myMoney = _myMoney + _hisMoney;
_body setVariable [Z_MoneyVariable, 0 , true];

player setVariable [Z_MoneyVariable, _myMoney , true];

format ['You found %1 Gold in this Wallet!',[_hisMoney] call BIS_fnc_numberText] call dayz_rollingMessages;
uiSleep 2;

_cid =    player getVariable ["CharacterID","0"];
_cashMoney = player getVariable [Z_MoneyVariable,0];

if !(_cashMoney > 0) then {
    _cashMoney = 0;
};
 

 

 

hope these help

 

on a side note anything special you had to do to get money to save in safes/objects? i cant seem to get that to work, i have coins working on people just fine, but objects wont update

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, SideShowFreak said:

bury bodies:  i removed the crate option on mine as personally i feel once a body is buried the gear should be gone

  Reveal hidden contents

private ["_corpse", "_type", "_isBuried", "_humanity", "_breakChance", "_nul", "_position", "_dir", "_mound", "_crosstype", "_cross", "_deathMessage"];

_corpse = _this select 3;
_type = typeOf _corpse;
_isBuried = _corpse getVariable["isBuried",false];
_humanity = player getVariable ["humanity",0];
_breakChance = floor(random 100);

player removeAction s_player_bury_human;
s_player_bury_human = -1;

if (dayz_actionInProgress) exitWith {};

if ((_humanity < 5000) && (_humanity > -5000)) then {
    if (_breakChance > 30) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };
};    

if (((_humanity > 5000) && (_humanity < 20000 )) || ((_humanity < -5000) && (_humanity > -20000 ))) then {
    if (_breakChance > 15) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

if (((_humanity > 20000) && (_humanity < 50000 )) || ((_humanity < -20000) && (_humanity > -50000 ))) then {
    if (_breakChance > 5) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

if ((_humanity > 50000) || (_humanity < -50000)) then {
    if (_breakChance > 1) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

 

Same with gut human, i had it show a body bag once they have been gutted,  the bury body shows a grave with a cross

  Reveal hidden contents

private ["_corpse", "_type", "_meatHarvested", "_humanity", "_breakChance", "_nul", "_position", "_dir", "_mound", "_deathMessage"];

_corpse = _this select 3;
_type = typeOf _corpse;
_meatHarvested = _corpse getVariable["meatHarvested",false];
_humanity = player getVariable ["humanity",0];
_breakChance = floor(random 100);

player removeAction s_player_bury_human;
s_player_bury_human = -1;

if (dayz_actionInProgress) exitWith {};

if ((_humanity < 5000) && (_humanity > -5000)) then {
    if (_breakChance > 30) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
            
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };
};    

if (((_humanity > 5000) && (_humanity < 20000 )) || ((_humanity < -5000) && (_humanity > -20000 ))) then {
    if (_breakChance > 15) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower!" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

if (((_humanity > 20000) && (_humanity < 50000 )) || ((_humanity < -20000) && (_humanity > -50000 ))) then {
    if (_breakChance > 5) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

if ((_humanity > 50000) || (_humanity < -50000)) then {
    if (_breakChance > 1) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,-0,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

 

 

Check_wallet

 

  Reveal hidden contents

private ["_body","_hisMoney","_myMoney"];

_body = _this select 3;
_walletCheck = _body getVariable [Z_MoneyVariable,0];

_PlayerNear = _body call dze_isnearest_player;
if (_PlayerNear) exitWith { localize "str_pickup_limit_4" call dayz_rollingMessages; };

player playActionNow "PutDown";
if (_walletCheck == 0) exitWith { "Wallet is empty." call dayz_rollingMessages;};

_hisMoney = _body getVariable [Z_MoneyVariable,0];
_myMoney = player getVariable [Z_MoneyVariable,0];
_myMoney = _myMoney + _hisMoney;
_body setVariable [Z_MoneyVariable, 0 , true];

player setVariable [Z_MoneyVariable, _myMoney , true];

format ['You found %1 Gold in this Wallet!',[_hisMoney] call BIS_fnc_numberText] call dayz_rollingMessages;
uiSleep 2;

_cid =    player getVariable ["CharacterID","0"];
_cashMoney = player getVariable [Z_MoneyVariable,0];

if !(_cashMoney > 0) then {
    _cashMoney = 0;
};
 

 

 

hope these help

 

on a side note anything special you had to do to get money to save in safes/objects? i cant seem to get that to work, i have coins working on people just fine, but objects wont update

You need to be running this fix that I pushed to github, it's in 1.0.6.1. https://github.com/EpochModTeam/DayZ-Epoch/commit/ce75f87e1da90c5eb13fcd214b4ebef0a8bd566f

I also helped @A Man with his coins saving/reading from safes correctly here: 

 

Share this post


Link to post
Share on other sites
  • 0

oh i forgot the self actions:

 

Spoiler

    _hasShovel = "ItemShovel" in _itemsPlayer;
    _hasETool = "ItemEtool" in _itemsPlayer;
    _hasKnife = "ItemKnife" in _itemsPlayer;

 

///////////////////////////////////////////////////BURY BODY START///////////////////////////////////////////////////////////
    _isZombie = _cursorTarget isKindOf "zZombie_base";
    if (_isMan and !_isAlive and !_isZombie and _hasShovel ) then {
        if (s_player_bury_human < 0) then {
            s_player_bury_human = player addAction [format["<t color='#0017ff'>Bury Body</t>"], "Custom\BuryHuman\bury_human.sqf",_cursorTarget,0, false,true];
        }
    } else {
        player removeAction s_player_bury_human;
        s_player_bury_human = -1;
    };

///////////////////////////////////////////////////BURY BODY END///////////////////////////////////////////////////////////
/////////////////////////////////////////CANNIBALISM START/////////////////////////////////////////
    _isHarvested = _cursorTarget getVariable["meatHarvested",false];
    _isZombie = _cursorTarget isKindOf "zZombie_base";
    if (_isMan and !_isAlive and !_isZombie and _hasKnife ) then {
        if (s_player_butcher_human < 0) then {
            s_player_butcher_human = player addAction [format["<t color='#ff6900'>Gut Human</t>"], "custom\cannibalism\gather_meat_human.sqf",_cursorTarget,0, false,true];
        };
    } else {
        
        player removeAction s_player_butcher_human;
        s_player_butcher_human = -1;
    };

/////////////////////////////////////////CANNIBALISM END/////////////////////////////////////////    
/////////////////////////////////////////Check Wallet Start//////////////////////////////////////
    

    if (_isMan and !_isAlive and !_isZombie ) then {
        if (s_player_checkWallet < 0) then {
            s_player_checkWallet = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "scripts\ZSC\actions\check_wallet.sqf",_cursorTarget, 0, false, true];
        };
    } else {
        player removeAction s_player_checkWallet;
        s_player_checkWallet = -1;
    };

//////////////////////////////////////////Check Wallet End///////////////////////////////////////

obviously change out shovel for etool if you wish

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, SideShowFreak said:

bury bodies:  i removed the crate option on mine as personally i feel once a body is buried the gear should be gone

  Reveal hidden contents

private ["_corpse", "_type", "_isBuried", "_humanity", "_breakChance", "_nul", "_position", "_dir", "_mound", "_crosstype", "_cross", "_deathMessage"];

_corpse = _this select 3;
_type = typeOf _corpse;
_isBuried = _corpse getVariable["isBuried",false];
_humanity = player getVariable ["humanity",0];
_breakChance = floor(random 100);

player removeAction s_player_bury_human;
s_player_bury_human = -1;

if (dayz_actionInProgress) exitWith {};

if ((_humanity < 5000) && (_humanity > -5000)) then {
    if (_breakChance > 30) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };
};    

if (((_humanity > 5000) && (_humanity < 20000 )) || ((_humanity < -5000) && (_humanity > -20000 ))) then {
    if (_breakChance > 15) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

if (((_humanity > 20000) && (_humanity < 50000 )) || ((_humanity < -20000) && (_humanity > -50000 ))) then {
    if (_breakChance > 5) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

if ((_humanity > 50000) || (_humanity < -50000)) then {
    if (_breakChance > 1) then {
        if (!_isBuried) then {
            _corpse setVariable["isBuried",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Grave", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];
            _crosstype = ["GraveCross1","GraveCross2","GraveCrossHelmet"]  call BIS_fnc_selectRandom;
            _cross = createVehicle [_crosstype, _position, [], 0, "CAN_COLLIDE"];
            _cross setpos [(getposATL _cross select 0),(getposATL _cross select 1)-1.2, 0];

            "Rest in Peace!" call dayz_rollingMessages;
            [50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_isBuried) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "digBreak"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemShovel";
            player addWeapon "ItemShovelBroken";
            uiSleep 7;
            "Your shovel broke while you were trying to bury that body!" call dayz_rollingMessages;
        };
    };    
};

 

Same with gut human, i had it show a body bag once they have been gutted,  the bury body shows a grave with a cross

  Reveal hidden contents

private ["_corpse", "_type", "_meatHarvested", "_humanity", "_breakChance", "_nul", "_position", "_dir", "_mound", "_deathMessage"];

_corpse = _this select 3;
_type = typeOf _corpse;
_meatHarvested = _corpse getVariable["meatHarvested",false];
_humanity = player getVariable ["humanity",0];
_breakChance = floor(random 100);

player removeAction s_player_bury_human;
s_player_bury_human = -1;

if (dayz_actionInProgress) exitWith {};

if ((_humanity < 5000) && (_humanity > -5000)) then {
    if (_breakChance > 30) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
            
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };
};    

if (((_humanity > 5000) && (_humanity < 20000 )) || ((_humanity < -5000) && (_humanity > -20000 ))) then {
    if (_breakChance > 15) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower!" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

if (((_humanity > 20000) && (_humanity < 50000 )) || ((_humanity < -20000) && (_humanity > -50000 ))) then {
    if (_breakChance > 5) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

if ((_humanity > 50000) || (_humanity < -50000)) then {
    if (_breakChance > 1) then {
        if (!_meatHarvested) then {
            _corpse setVariable["meatHarvested",true,true];
            ["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "dig"] call RE;
            player playActionNow "Medic";
            uiSleep 8;

            _position = getPosATL _corpse;
            _dir = getDir _corpse;

            deleteVehicle _corpse;

            _mound = createVehicle ["Body", _position, [], 0, "CAN_COLLIDE"];
            _mound setpos [(getposATL _mound select 0),(getposATL _mound select 1), 0];

            "You have gutted a human your hands are covered with blood, you feel your humanity lower" call dayz_rollingMessages;
            [-50,0] call player_humanityChange;
            _id = [player,-0,true,(getPosATL player)] spawn player_alertZombies;
        };
    } else {
        if (!_meatHarvested) then {
            ["Working",0,[10,20,7,0]] call dayz_NutritionSystem;
            _nul = [objNull, player, rSAY, "cutKnife"] call RE;
            player playActionNow "Medic";
            player removeWeapon "ItemKnife";
            player addWeapon "ItemKnifeBlunt";
            uiSleep 7;
            "Your knife broke while you were trying to slice up that body!" call dayz_rollingMessages;
        };
    };    
};

 

 

Check_wallet

 

  Reveal hidden contents

private ["_body","_hisMoney","_myMoney"];

_body = _this select 3;
_walletCheck = _body getVariable [Z_MoneyVariable,0];

_PlayerNear = _body call dze_isnearest_player;
if (_PlayerNear) exitWith { localize "str_pickup_limit_4" call dayz_rollingMessages; };

player playActionNow "PutDown";
if (_walletCheck == 0) exitWith { "Wallet is empty." call dayz_rollingMessages;};

_hisMoney = _body getVariable [Z_MoneyVariable,0];
_myMoney = player getVariable [Z_MoneyVariable,0];
_myMoney = _myMoney + _hisMoney;
_body setVariable [Z_MoneyVariable, 0 , true];

player setVariable [Z_MoneyVariable, _myMoney , true];

format ['You found %1 Gold in this Wallet!',[_hisMoney] call BIS_fnc_numberText] call dayz_rollingMessages;
uiSleep 2;

_cid =    player getVariable ["CharacterID","0"];
_cashMoney = player getVariable [Z_MoneyVariable,0];

if !(_cashMoney > 0) then {
    _cashMoney = 0;
};
 

 

 

hope these help

 

on a side note anything special you had to do to get money to save in safes/objects? i cant seem to get that to work, i have coins working on people just fine, but objects wont update

Thank you very much for this. I can finally stop ripping out my hair lol. 

I didn't have this line before in there  _isZombie = _cursorTarget isKindOf "zZombie_base";  and I think that was a contributor to it not working. Added it and instantly the options came up on the scroll wheel :D

I never did get storage coins to work in the safes and whatnot, it was just the "online Banking", but I was only running that until storage coins were working, which I'm about to try the fix in the last post on the thread right now and try it. If it works, I'm removing the online banking as I have bankers in the trader cities already.

Will post again after trying the storage coins fix.

Share this post


Link to post
Share on other sites
  • 0
6 hours ago, JohnnyBravo666 said:

Thank you very much for this. I can finally stop ripping out my hair lol. 

I didn't have this line before in there  _isZombie = _cursorTarget isKindOf "zZombie_base";  and I think that was a contributor to it not working. Added it and instantly the options came up on the scroll wheel :D

I never did get storage coins to work in the safes and whatnot, it was just the "online Banking", but I was only running that until storage coins were working, which I'm about to try the fix in the last post on the thread right now and try it. If it works, I'm removing the online banking as I have bankers in the trader cities already.

Will post again after trying the storage coins fix.

The fixes I posted for safes/lockboxes definitely work, it's what i'm running on my server

Share this post


Link to post
Share on other sites
  • 0
Just now, salival said:

The fixes I posted for safes/lockboxes definitely work, it's what i'm running on my server

I implemented those fixes but I'm sure I've screwed something up mission side so I'm pulling all my mission side stuff for storage coins and starting again. Just to confirm, which variable is used for storage coins? I remember seeing a post from awhile ago but can't find the page again and didn't bookmark it. I know there's cashMoney, moneySpecial, and I cannot remember the other, which I think is the storage coins variable.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By salival
      Hi guys,
      Here's my version of the bury/butcher body script. Focus'd on optimization and cleanliness.
      * Tested as working on a blank Epoch 1.0.7 server
      * Contains a server side scheduler module to clean up old weapon crates, graves and crosses after 25 minutes.
      * Removes the flies sound when body is buried for performance.
       
      To download: https://github.com/oiad/buryBodies
       
      **** For Epoch 1.0.6.2 only **** >> Download <<
      Visit this link: https://github.com/oiad/buryBodies/tree/Epoch_1.0.6.2
    • By chi
      I've been trying to figure this out for 2 days.
      I have the zupa single currency and have the "check Wallet" function added to selfactions. I also have a dead player journal that can be checked. The problem is that the dead player journal also shows up on dead zombies and AI
      .
      Could you help me out with this and maybe explain how whatever you do works, just so i can maybe learn a little something from this experience?
       
      P.S. I have the check wallet function showing up on AI, Zombies, and players, and i want to keep it that way. Doesn't really matter if the journal stays on AI either, i just really dont want it on the zombies. If i could remove it from the AI, that would be great. DZAI and WAI
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...