[RELEASE] Hero Perks (Epoch pre-configured)

Matt L

OpenDayZ Rockstar!
Hero Perks
Version 1

Everyone knows it's harder to play the hero than the bandit, so why not give them some perks? What this does is runs a humanity check then if they have above 5000 humanity they spawn up north with a random skin in their inventory. Each perk is set up at 5k, 10k, 20k, and 30k, but can be easily changed. Each perk after 5k also gets a random spawn and random skin. At 10k you are given a motor bike, 20k gets you an SUV, and 30k gets you a mozzie with a box full of 3 randomly selected weapons, randomly selected item sets, and a randomly selected backpack.

To Install:

You will need PBO manager and Notepad ++
  1. This will conflict with any antihack, battle eye, and server cleanup routines. To fix the antihack (if using infistar) go into ahconfig and turn off the hack box check. I personally don't use battle eye so I can't help with writing exceptions. For most of you the server cleanup routine will be in the server_cleanup.fsm which is located in the dayz_server.pbo in the system folder, Ctrl + F for hacker and find the line that start with
    Code:
    (vehicle _x != _x
    and change that line to resemble something like
    Code:
    if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
    and if you're using Epoch this routine is in the server_functions.sqf, find it by searching for hacker once more then replace the vehicle line with
    Code:
    if(vehicle _x != _x && (vehicle _x getVariable ["Mission",0] != 1) && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
  2. Next, go into your dayz_server\compiles folder and find server_playerSetup.sqf, (note this will be different for most mods, but this is what it is for Epoch) locate the line that looks like
    Code:
    dayzPlayerLogin2 = [_worldspace,_state];
    and replace it with
    Code:
    dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];
    and repack your dayz_server.pbo
  3. Next open your init.sqf in your dayz_mission.pbo and at the bottom add
    Code:
    //hero spawn
    herospawn = compile preprocessFileLineNumbers "CHANGE\FILE\PATH\HERE\heroperk.sqf";
    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (dayzPlayerLogin2 select 2) then
    {
        player spawn herospawn;
    };
    obviously adjust the file path to where you placed heroperk.sqf
  4. Download and edit to your liking
Credits -
HollowAddiction from www.CraftDoge.com for the idea and testing
CommanderRetra for helping with random skin and backpack assortment (bis_fnc_selectrandom).
Ebay for server cleanup example

Help Thread
At some point in the future I may release a version with added bandit negative effects like a small chance to spawn infected, or randomly spawning in the middle of nowhere or losing a tiny bit of blood every couple seconds for a couple minutes etc.
 
Last edited:
VERSION 1.1

CHANGELOG: Added a distance check to delete the box instead of sleep timer
CHANGELOG: better randomization of weapon, and gives only the ammunition for the weapon selected
CHANGELOG: added an 80k hero level with an overwatch vehicle (I run overpoch) change this as needed.
 
Last edited:
Back
Top