Scripts working with 1.8

Heavy

Member
*Hopefully this is posted in the right section, if not please excuse my noobish ways :)~

I spent the last week tweaking, rewriting some scripts to work on my 1.8 server and the masses love them. I currently host one test server through DayZ.ST, however the gaming community I belong to/script for uses four servers hosted through DayZPriv, as well as four instances on a dedicated box. By all means I take zero credit for creating these scripts (props to the original creators), just some pats on my back for the time I put in. Also, many thanks to Schweppes for the countless cans of Ginger Ale that was required to keep me focused :)~

*Lights (towers, house, streets) - (axeman)
*Refuel and Repair - (Gorsy)
*Self-Bloodbag - (Krixes)
*Admin Tools - (BluePhoenix) - modified to my liking
*Dancing - (cyrq)
*Remove Clothes - (Churchie/unkinhead/cyrq)
*Salvage Parts - (SilverShot/NeverUsedID)
*Protected Domes - (IT07)
*AI Missions - (lazyink/TheSzerdi) - Novy bug kinda exists...but works a bit better, modified to my liking
*DZAI w/heli patrols - (buttface)
*Login Camera - (AlienX)
*Toggle Debug Monitor - (Matt L) - modified to my liking
*Zombie Killer - (Sarge) - modified to my liking
*Preconfigured R3F Logistics - (CommanderRetra) - still tweaking but script works
*Server Welcome Credits - (ZedBuster)
*Kill Messages (for 1.7.7.1) - (tutorial from DayZ.ST Wiki) - they work, just need to tweak a bit more to my liking
*Custom map markers (lazyink)
*Custom server load screen (props to my Photoshop)
*No fog (too easy)

Also, I'm using tons of sqf's for custom buildings, bases, objects. Some I made myself however props below to those folks who made some real nice ones.

Excelsior
kaysio
FoRcE

Work in progress/things to do: Try out Blur's Advanced Anti-hacks. Already tested those on a DayZPriv server running 1.8 and they work perfect, however I want to try on my test machine as well. The RF3 Logistics throws up a missing sqf file when trying to use view contents. Not a big deal as I will be removing that part of the code. I'm also going to remove the code for "loading objects" as well as a couple other tweaks. I'm only going run lift & tow, nothing else in the script. Another option I thought of is to add towing services to the BTC lift/logistics script.
 
Do you know where to go to add custom spawn points for donators? im with dayz.st and theyre not helping at all.
 
Your Toggle debug monitor -does it stop the dayz journal from working?

look in compiles / variables.sqf for a dayz_spaceInterrupt section. If you merge the debug into that instead of calling on it from the mission pbo as normal, it might fix that.
 
Agh! I'm sick of seeing these threads, the only things with dayz 1.8 that really changed was the combat variable and the login variable. Everything will still work.
 
Your Toggle debug monitor -does it stop the dayz journal from working?

Ya, it does Tang0. It also enables the "F" key functions again. Makes sense though, not a big deal.......back to the drawing board. Matt, I'll give your suggestion a try. I love your debug way too much to give up on it.
 
Ya, it does Tang0. It also enables the "F" key functions again. Makes sense though, not a big deal.......back to the drawing board. Matt, I'll give your suggestion a try. I love your debug way too much to give up on it.

It might not exist in 1.8, but it fixed issues people were having with epoch
 
look in compiles / variables.sqf for a dayz_spaceInterrupt section. If you merge the debug into that instead of calling on it from the mission pbo as normal, it might fix that.

I had got the debug monitor in and loved it but sadly it stopped a lot of 1.8 functions. Journal wouldn't open, 1 - 3 keys for switching weapons, Q/E rotate for deployables, couldn't open gear inside vehicles, the list goes on haha.

Just had a quick look are you sure it was in variables.sqf? Can't find that section in Epoch, Oring or Chernarus files.
 
I had got the debug monitor in and loved it but sadly it stopped a lot of 1.8 functions. Journal wouldn't open, 1 - 3 keys for switching weapons, Q/E rotate for deployables, couldn't open gear inside vehicles, the list goes on haha.

Just had a quick look are you sure it was in variables.sqf? Can't find that section in Epoch, Oring or Chernarus files.
Probably the compiles sqf then
 
Ok yep, it works.

Find
Code:
        if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        _handled

Then ABOVE _handled add
Code:
        if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

Now after
Code:
        if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };
        _handled
    };

Add
Code:
fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
        _kills =        player getVariable["zombieKills",0];
        _killsH =        player getVariable["humanKills",0];
        _killsB =        player getVariable["banditKills",0];
        _humanity =        player getVariable["humanity",0];
        _headShots =    player getVariable["headShots",0];
        _zombies =              count entities "zZombie_Base";
        _zombiesA =    {alive _x} count entities "zZombie_Base";
        _banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits;
        _heroCount  = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits;
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            if (player == vehicle player) then
            {
                _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
            }
                else
            {
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            };
        hintSilent parseText format ["
        <t size='1'font='Bitstream'align='center' color='#EE0000' >%1</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EE0000' >Blood Left:</t><t size='1' font='Bitstream'align='right' color='#EE0000' >%2</t><br/>
        <t size='1'font='Bitstream'align='left' color='#ff8810' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#ff8810' >%3</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Humans Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%4</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Bandits Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%5</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Zombies Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%6</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Head Shots:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%7</t><br/>
        <t size='1' font='Bitstream' align='left' color='#EEC900' >Zombies (alive/total): </t><t size='1' font='Bitstream' align='right' color='#EEC900' >%9/%8</t><br/>
        <t size='1'font='Bitstream'align='left' color='#ff8810' >Current Hero Count:</t><t size='1'font='Bitstream'align='right' color='#ff8810' >%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#ff8810' >Current Bandit Count:</t><t size='1'font='Bitstream'align='right' color='#ff8810' >%10</t><br/>
        <img size='3' image='%12'/><br/>
        <t size='1'font='Bitstream'align='center' color='#ff8810' >Press F10 to toggle! </t><br/>
        <t size='1'font='Bitstream'align='center' color='#ff8810' >Holo Fed Community Server </t><br/>
 
        ",dayz_playerName,r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,count entities "zZombie_Base",{alive _x} count entities "zZombie_Base",_banditCount,_heroCount,_pic];
    sleep 1;
    };
};[] spawn fnc_debug;

Ran a quick test, doesn't interfere with weapon switching, tent placement, accessing gear inside vehicles, or using the journal.
 
Ok yep, it works.

Find
Code:
        if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        _handled

Then ABOVE _handled add
Code:
        if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

Now after
Code:
        if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };
        _handled
    };

Add
Code:
fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
        _kills =        player getVariable["zombieKills",0];
        _killsH =        player getVariable["humanKills",0];
        _killsB =        player getVariable["banditKills",0];
        _humanity =        player getVariable["humanity",0];
        _headShots =    player getVariable["headShots",0];
        _zombies =              count entities "zZombie_Base";
        _zombiesA =    {alive _x} count entities "zZombie_Base";
        _banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits;
        _heroCount  = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits;
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            if (player == vehicle player) then
            {
                _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
            }
                else
            {
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            };
        hintSilent parseText format ["
        <t size='1'font='Bitstream'align='center' color='#EE0000' >%1</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EE0000' >Blood Left:</t><t size='1' font='Bitstream'align='right' color='#EE0000' >%2</t><br/>
        <t size='1'font='Bitstream'align='left' color='#ff8810' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#ff8810' >%3</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Humans Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%4</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Bandits Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%5</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Zombies Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%6</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Head Shots:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%7</t><br/>
        <t size='1' font='Bitstream' align='left' color='#EEC900' >Zombies (alive/total): </t><t size='1' font='Bitstream' align='right' color='#EEC900' >%9/%8</t><br/>
        <t size='1'font='Bitstream'align='left' color='#ff8810' >Current Hero Count:</t><t size='1'font='Bitstream'align='right' color='#ff8810' >%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#ff8810' >Current Bandit Count:</t><t size='1'font='Bitstream'align='right' color='#ff8810' >%10</t><br/>
        <img size='3' image='%12'/><br/>
        <t size='1'font='Bitstream'align='center' color='#ff8810' >Press F10 to toggle! </t><br/>
        <t size='1'font='Bitstream'align='center' color='#ff8810' >Holo Fed Community Server </t><br/>
 
        ",dayz_playerName,r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,count entities "zZombie_Base",{alive _x} count entities "zZombie_Base",_banditCount,_heroCount,_pic];
    sleep 1;
    };
};[] spawn fnc_debug;

Ran a quick test, doesn't interfere with weapon switching, tent placement, accessing gear inside vehicles, or using the journal.

Figured it would work, did the same thing for epoch, fixed all issues. #winning
 
Sorry to be an idiot but what file do i find the following code in on dayz 1.8 standard, i looked in the server/compiles folder and cant see a compiles sqf or vaiables sqf etc

if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
_dir = getDir _object + 3;
_object setDir _dir;
_handled = true;
};
_handled
 
Sorry to be an idiot but what file do i find the following code in on dayz 1.8 standard, i looked in the server/compiles folder and cant see a compiles sqf or vaiables sqf etc

if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
_dir = getDir _object + 3;
_object setDir _dir;
_handled = true;
};
_handled


dayz_code\init\compiles.sqf

You'll have to copy the compiles to your mission folder, put it in a folder called fixes (as an example) and make the edits in my above post.
Then in your init.sqf change the line
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";                    //Compile regular functions
To
Code:
call compile preprocessFileLineNumbers "fixes\compiles.sqf";                    //Compile regular functions

OR

If you'd prefer to keep the mission file as small as possible. Instead of copying the whole file, just copy this section over to a file you've made called compiles.sqf
Code:
    dayz_spaceInterrupt = {
        private ["_dikCode", "_handled","_displayg","_shiftState","_ctrlState","_altState","_nill"];
        _dikCode = _this select 1;
        _shiftState = _this select 2;
        _ctrlState = _this select 3;
        _altState = _this select 4;
        _handled = false;
 
        // Disable ESC after death (not sure if needed but it's here to make sure)
        if (_dikCode == 0x01 && r_player_dead) then {
            _handled = true;
        };
 
        switch (_dikCode) do {
            case 0x02: {
                ["rifle"] spawn player_switchWeapon;
                _handled = true;
            };
            case 0x03: {
                ["pistol"] spawn player_switchWeapon;
                _handled = true;
            };
            case 0x04: {
                ["melee"] spawn player_switchWeapon;
                _handled = true;
            };
            default {
                if (_dikCode in [0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05]) then {
                    _handled = true;
                };
            };
        };
 
        if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shiftState and !_ctrlState and !_altState && !dialog) then {
            createGearDialog [player, "RscDisplayGear"];
            _handled = true;
        };
 
        //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
        //Prevent exploit of drag body
        if ((_dikCode in actionKeys "Prone") and r_drag_sqf) then { force_dropBody = true; };
        if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) then { force_dropBody = true; };
 
        if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
        if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
        if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,5,false,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,false,(getPosATL player)] call player_alertZombies;
        };
        if (_dikCode in actionKeys "User20" and (time - dayz_lastCheckBit > 5)) then {
            dayz_lastCheckBit = time;
            _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
        };
        if ((_dikCode in [0x3E,0x0F,0xD3]) and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            call player_forceSave;
        };
        if (_dikCode in [0xB8,0x38,0x3E,0x2A,0x36,0x01]) then {
            _displayg = findDisplay 106;
            if (!isNull _displayg) then {
            call player_forceSave;
            } else {
                if (dialog) then {
                    call player_forceSave;
                };
            };
        };
        _object = player getVariable ["constructionObject", objNull];
        if (!isNull _object and _dikCode in actionKeys "LeanLeft") then {
            _dir = getDir _object - 3;
            _object setDir _dir;
            _handled = true;
        };
        if (!isNull _object and _dikCode in actionKeys "LeanRight") then {
            _dir = getDir _object + 3;
            _object setDir _dir;
            _handled = true;
        };
        _handled
    };

And then make the edits as described in my post above.
Now in init.sqf you'd want to add a line like this
Code:
call compile preprocessFileLineNumbers "fixes\compiles.sqf";                            //Compile custom functions
Directly after the call for the standard compiles.sqf.
 
everyone use pwnozor server pack?? because none of the scripts that work with dayzcc its working now! :(
i'd try selfblood, login camera, sound intro.. and nothing! anyone can help pls :D
 
Back
Top