dayz mission addin (serverside scripts)

You can just port it yourself. The only thing specific to chern is the locations of the house and anomalies. Edit your own mission file. He shouldn't have to support every map out there.

Pixel: I think i accidentally stumbled upon your issue while testing another script. It seems the dogs don't want to interact with bandit/hero's. I haven't confirmed this yet but will test shortly.
When we were testing on mine the only one it worked for was a neutral survivor, I put someones Halo spwn script in and they were having the same problem. Bandits and Heroes werent workings. This is the new code that fixed their problem. Notice the humanity parts. I did not write this.

if (!isDedicated) then {
[] spawn {
waitUntil {count (dayzPlayerLogin2) > 0 and !isNil ("dayzLoginRecord") and !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) };

if (dayzPlayerLogin2 select 2) then
{
[player, 1000] spawn bis_fnc_halo;
};
};
};
 
Im a noob and I wasnt sure where to put it or if it needed to be edited at all. I just figured it might be relevant and maybe it would help one of you guys figure it out.
 

Hangender

Valued Member!
Actually the heros/bandits/any skin change problem is 2 fold.

First, when you switch skins, you lose the variable dogActions. Second, when you switch skins you also switch player objects so that player != player (essentially). What this means is that if you are a dog owner, and you switch skins then your dog will suicide.
 

Hangender

Valued Member!
Code:
if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayzLoginRecord") and  !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) and !(player getVariable ["humanity",0] > 0 and (typeOf player == "Bandit1_DZ" or typeOf player == "BanditW1_DZ") ) };
     
        player setVariable ["dogAction","follow",true];
        nul = player addAction ["Dog |<t color='#00a6eb'> Stay here</t>","addin\dogCommand.sqf",["stay"],-10,false,true,"","((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Pastor' || ((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Fin' && player in dogOwner"];
        nul = player addAction ["Dog |<t color='#00a6eb'> Follow me</t>","addin\dogCommand.sqf",["follow"],-11,false,true,"","((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Pastor' || ((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Fin' && player in dogOwner"];
        nul = player addAction ["Dog |<t color='#00a6eb'> Find animal</t>","addin\dogCommand.sqf",["find"],-12,false,true,"","((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Pastor' || ((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Fin' && player in dogOwner"];
 
    };
};
Add this to the bottom of init.sqf and it will allow heroes and bandits to have dogs.

Warning: If you change skins you are not able to have a dog again until you rejoin ;)
 
Anyone know where I'll be able to edit how many times a dog spawns per doghouse? I am running into an issue where I run out of the radius of the dog house, then return to the doghouse to have another dog spawn.
 

piXel

Valued Member!
Hello all,
The way I made it, it is irrelevant what skin you have when you get a dog. You could be a zombie for the dogs part. The variable the dog connects to is you as a player not what you wear. @Hangeder (if humanmorfing indeed kills a player the server will cleanup the dog) ill look at it. mm.. "dayzLoginRecord" You have my interest. can I find you somewhere on teamspeak?

helicopter lifted vehicles dissapearing. This happens if you lift vehicles, drop it somewhere and just fly away. The next serverstart those vehicles will be back to its found position. If you are serious about the vehicles you take you or your teammate must get in the vehicle after dropping. so the objectTable gets a new position for the vehic.

progress: regarding randomness dog. The initialisation of the player (which is the issue) I completely changed. I only have to fire the playrinitialisationscript at the right moment. So intro cameramove and dogattach do as supposed. Don't have to much time but hope to have fixed it soon.
 

Hangender

Valued Member!
I will give you an example why changing skins cause problems:

Let's assume everything is working as it should, and the player have acquired a dog. Let's also assume that dogOwner only contains one object (that of the player). This means the player object is in dogOwner array, with dogOwner select 0 == player returning true and _leader == player returning true also (this is obvious).

Now, if the player switch skins, what happen during that process is a new unit is created, and the selectPlayer command is evoked:
Code:
//Make New Unit Playable
    addSwitchableUnit _newUnit;
    setPlayable _newUnit;
    selectPlayer _newUnit;
Now, dogOwner select 0 == player returns false and _leader == player also returns false. Furthermore, alive _leader also return false because _leader is now objNull. This means the dog will think its owner is dead and suicide.

What about a bandit guy that just joined server? He wouldn't be in dogOwner array. The guy would have none of the problem above but he would not be able to interact with dogs. Why? Because of skin switch. By default, every guy is spawned in as Survivor2_dz, with their humanity intact from previous playthrough (This is true with Reality). This is the same for new spawns and old spawns. So a bandit (low humanity) will always undergo a skin switch everytime he logins to the server, which causes the following information to be lost:
Code:
player setVariable ["dogAction","follow",true];
nul = player addAction ["Dog |<t color='#00a6eb'> Stay here</t>","addin\dogCommand.sqf",["stay"],-10,false,true,"","((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Pastor' || ((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Fin' && player in dogOwner"];
nul = player addAction ["Dog |<t color='#00a6eb'> Follow me</t>","addin\dogCommand.sqf",["follow"],-11,false,true,"","((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Pastor' || ((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Fin' && player in dogOwner"];
nul = player addAction ["Dog |<t color='#00a6eb'> Find animal</t>","addin\dogCommand.sqf",["find"],-12,false,true,"","((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Pastor' || ((nearestObjects [player, ['Pastor','Fin'], 40]) select 0) isKindOf 'Fin' && player in dogOwner"];
In other words, he won't be able to interact with dogs ever again.

Obviously, if a player switch skins while a dogOwner then both kind of problems affect him.

add hangender on Skype if you have any Q's
 

piXel

Valued Member!
@Hangender
Nice to see you you took a look at my scripts, thx. The morphing from one skin to another is an interesting issue.

The guy joining as a bandit, hero, survivor, ghilly, camo is not an issue since I already delay the player unique publicvariable "follow" on start by 9 seconds (initial follow for the dog). (player will only be added to dogOwner when he owns a dog. If player or dog dies he will be substracted from dogOwner) I hope we will speak soon.
 
i dont get a menu when i try to add it to my own mission file i just get 4 dogs following me

my trigger
Code:
    class Sensors
    {
        items=1;
        class Item0
        {
            position[]={7769.2158,0.92758948,2541.0066};
            a=0;
            b=0;
            interruptable=1;
            age="UNKNOWN";
            name="plrInit";
            expCond="local player";
            expActiv="nul = [] execVM ""addin\plrInit.sqf""";
            class Effects
            {
            };
        };
    };   
};
my doghouse
Code:
class Item0
        {
            position[]={11289.583,253.71249,5479.4429};
            placement=70;
            id=61;
            side="EMPTY";
            vehicle="Land_psi_bouda";
            text="dog_1";
            init="_nul = [this]execVM ""addin\dogInit.sqf"";";
        };
        class Item1
        {
            position[]={10674.429,210.99001,8054.356};
            placement=100;
            id=62;
            side="EMPTY";
            vehicle="Land_psi_bouda";
            text="dog_2";
            init="_nul = [this]execVM ""addin\dogInit.sqf"";";
        };
        class Item2
        {
            position[]={6554.0532,322.00757,6087.0918};
            placement=70;
            id=63;
            side="EMPTY";
            vehicle="Land_psi_bouda";
            text="dog_3";
            init="_nul = [this]execVM ""addin\dogInit.sqf"";";
        };
        class Item3
        {
            position[]={5992.1475,266.90317,10345.947};
            placement=100;
            id=64;
            side="EMPTY";
            vehicle="Land_psi_bouda";
            text="dog_4";
            init="_nul = [this]execVM ""addin\dogInit.sqf"";";
these are my dogs they just follow me and kill zombies
 
I would love to get this to work on my server. I and 3 others have tried for hours...... I wish the install instructions where better for dumb people like me. I just cant get it.... Followed every step... I'm just retarded.... :(
 
2piXel
Привет, мы можем поговорить о твоем паке ? желательно в скайпе (можно без звонка).
Я не могу сделать так, чтобы работал vehClimb :(
В скриптах не особо нуб, так что можно без разжовывания :)

skype: weedsbasta
Спасибо.
 
Anomalies and lifting works all fine, but i cant seem to get the dogs working as they dont spawn in at all

Is there any specific dayz version i have to run?

Im running 1.7.5.1 / 101480 with the files from the zipfile and havent changed anything in them.

Is there anything i have missed like something to add into the database or so?
 

piXel

Valued Member!
@Pasha
If you use the latest version, vehclimb is initialised in plrInit.sqf. If you have the intro you have the sitonbackvehicle. Do you have a TSserver?

@catscan
I think you are fine. But do you know where to get a dog? (versions and hives independent)

The dogshouses with dogs are located with a random radius of 70 meters in: Bor, Msta, Polana, Vyshnoye, Grishino, Dubrovka. Take Vyshnoye. Often on the steep hillside or next to the road that goes up and North, near the village. Doghouses with dog should make a barking sound and are on an 'odd' location.

.
 

piXel

Valued Member!
@angelo
If you install custom, I have no clue what you do and already run, but please read howtoAddin.txt. So for sure it is something with init.sqf. dogOwner = []; etc. If you have a TSserver we could speak.
 
@angelo
If you install custom, I have no clue what you do and already run, but please read howtoAddin.txt. So for sure it is something with init.sqf. dogOwner = []; etc. If you have a TSserver we could speak.
it works now but when i get killed i get kicked for MPEventhandler remote exec#8 ?

this is the log

Code:
RemoteExec Restriction #8 "Hit" 3:61 Survivor2_DZ - "_this spawn server_playerHit;"
 
piXel, can you give me a direction, what I should remove if I want to remove the secret lab? The anomalies are awesome, and I defo wanna keep them up and running, but the lab causes heavy lag to the server, sadly, so I think its the best for now if I remove it.

Thanks in advance! :)
 

piXel

Valued Member!
@angelo
Good to hear you got it working. About your BEkick "_this spawn server_playerHit" is not in any of my scripts and I dont use MPeventhandlers.
 
Top