dayz mission addin (serverside scripts)

Ok so far so good ... climb on back is working ... lift script almost xD (I can lift a vehicle ... but no rope appears and i cant drop it after that)

init.sqf
Code:
//Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "addin\plrInit.sqf";}];
    //_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
    _nul = [] execVM "camera\loginCamera.sqf";
    _nul = [] execVM "addin\plrInit.sqf";
    if (dayz_antihack == 1) then {
    [] execVM "\z\addons\dayz_code\system\antihack.sqf";
    };

still dont know how that line with animal check should look ...
 
waitUntil {!isNil ("dayz_animalCheck")};

Since you deleted some stuff from the files im not sure what you got going on. I know that any script has to be executed in one way or another. Its been a while since ive done the vehicle sitting, usually just used dogs cause the keydown block on the antihack we got from hangender was ridiculously built, thats another story tho lol.

//vehicle climb
_nul = [] execVM "addin\vehInit.sqf";

add that to your init and make sure you have all the vehicle files in your mission and the pathing is correct i.e.
something\something\something\darkside.sqf

The dog file initializes the vehicle script and then the various scripts get initialized form there. Its confusing i know lol
 
ya with that script there is no rope model it just floats :/ the rope isnt an easy thing to add in without creating a new model or the equivalent.
 
just thought i would put this out there, i re worked ours to allow for permanent dogs, i only gave em to registered members though. if you wanted perm dogs i still have it. They dont require any added dog houses either cause they spawn with the players individually.
 
oh ok if you can give me a working file with lift and climb on back for chernarus 1.8 that would be awesome :-O i dont mind the dogs
 
im currently at class and well...uh, its the next ESO beta weekend :p
I dont have one with the vehicle sitting or lift. We used antihack and it blocked ppl from getting off the cars, also we used R3F logistics for toing and lifting cause we liked it more than the addin one. However; give me a bit and i will look over what you got. Ill pm u those files too.
 
Haha.. i also got RF3 logistics but i think the addin lift is way better ... i cant even set which vehicles can lift in RF3 .. or what vehicles (like Tanks) i can lift. And in the Addin lift was a rope between Heli and the lifted vehicle ...
 
Haha.. i also got RF3 logistics but i think the addin lift is way better ... i cant even set which vehicles can lift in RF3 .. or what vehicles (like Tanks) i can lift. And in the Addin lift was a rope between Heli and the lifted vehicle ...
Its in french but there are sections to modify all of that, can lift/can tow, can be lifted/can be towed, etc.
 
Ohay i did it ... Lift and Climb on back are working just like they did in the addin. So i can confirm its working for 1.8 .. was not easy tho xD
 
Ya it never is :/ btw here are those dog files you wanted.

dog.sqf
Code:
//===================piXel 12-02-2013============
waitUntil {!isNil ("dayz_animalCheck")};

//_uid = getPlayerUID player;
//_registered = _uid in registered;

//if (alive player && !_registered) exitWith {sleep 3; cutText [format["%1, registered forum members recieve a permanent K9 companion.", name player], "PLAIN UP"];};

if (isServer) exitWith {

private ["_leader","_dog","_type","_breed","_grp","_dogname","_clientID","_humans","_distance","_foo","_commd","_animals","_targetAnimal","_stopWait","_veh"];
_leader = player;
_clientID = owner _leader;

//if (count dogOwner >= 10) exitWith {[nil, _leader, "loc", rTITLETEXT, "Sorry, all available dogs found a companion", "PLAIN DOWN"] call RE;};
//if ({_X == _leader} count dogOwner == 1) exitWith {[nil, _leader, "loc", rTITLETEXT, "This dog is not interested", "PLAIN DOWN"] call RE;};

_type = round(random 1);
_breed = "Pastor";
switch (_type) do
    {
    case 0:
    {
    _breed = "Pastor";
    };
    case 1:
    {
    _breed = "Pastor";
    };
    };   
_grp = creategroup (side _leader);  
_dogname = "K9";
call compile format ['"%2" createUnit [getposATL _leader, _grp,"%1=this; this setSpeedMode ""full""; this disableAI ""autotarget""; this setbehaviour ""aware"";",1]',_dogname,_breed];
_dog = call compile format ["%1",_dogname];
_dog setIdentity "dogs";
_nul = [objNull, _dog, rSAY, "bark"] call RE;
dogOwner = dogOwner + [_leader];

sleep 1;
_clientID publicVariableClient "dogOwner";

while {(alive _dog) && (alive _leader)} do
{
    _humans = [];
    _distance = 1000;
    _humans = nearestObjects [_leader , ["CAManBase"], 40] - [_leader,_dog];
    _foo = _humans select 0;
    _commd = _leader getVariable "dogAction";
   
    //debug menu
    //_txt = parseText format["debugDog: %1 %2",_leader,_commd];
    //[nil, _leader, "loc", rHINT, _txt, "PLAIN DOWN"] call RE;
   
    if (_commd == "stay") then
        {
        _dog switchmove "Dog_Sit1";
        _dog disableAI "move";
        sleep 4;
        };
    if (_commd == "find") then
        {
        _dog enableAI "move";
        _dog switchmove "";   
        _animals = nearestObjects [_dog, ["Hen","Cock","Cow04","Cow03","Cow02","Cow01","Goat","Sheep","WildBoar"],3000];
        if (count _animals != 0) then
            {
            _targetAnimal = _animals select 0;
            _stopWait = (time + 60);
            _dog domove (position _targetAnimal);
            _dog setspeedmode "FULL";
            waituntil {_dog domove (position _targetAnimal); sleep 2;  (_dog distance _targetAnimal < 20) || (time > _stopWait) || (_leader getVariable "dogAction" != "find")};
            _dog switchmove "Dog_Walk";
            _nul = [objNull, _dog, rSAY, "bark"] call RE;
            };
        _dog switchmove "Dog_Walk";
        sleep 4;
        };   
    if (_commd == "follow") then
    {
    _dog enableAI "move";
    _dog switchmove "";
    //foo
    if ((count _humans > 0) && (alive _foo)) then
        {
        _distance = _leader distance _foo;
        // warning
        If ((_distance > 10) && (_distance < 30)) then
            {
            //_nul = [objNull, _dog, rSAY, "bark"] call RE;
            _dog domove (position _foo);
            _dog setspeedmode "FULL";
            //_nul = [objNull, _dog, rSAY, "bark"] call RE;
            };
        //initiate attack   
        If ((_distance < 11) && (side _foo != side _leader)) then
            {
            _nul = [objNull, _dog, rSAY, "growl"] call RE;
            _dog domove (position _foo);
            _dog setspeedmode "FULL";
            };
        //attack
        If ((_distance < 20) && (side _foo != side _leader)) then
            {
            _dog domove (position _foo);
            _dog setspeedmode "FULL";
            _stopWait = (time + 4);
            waitUntil {sleep 0.5; (_dog distance _foo) < 5 || time > _stopWait};
            _dog domove (position _foo);
            _dog setspeedmode "FULL";
            //_banditSkin = ["TK_INS_Warlord_EP1","TK_GUE_Warlord_EP1","TK_INS_Soldier_Sniper_EP1","TK_INS_Soldier_2_EP1"];
            if ((alive _dog) && (_foo isKindOf "zZombie_Base")) then
                {
                _dog attachTo [_foo,[0,0.8,0],"hrudnik"];
                _dog setDir 180;
                _foo setdamage 0.3;
                sleep 1;
                };
            if ((alive _dog) && (_foo isKindOf "zZombie_Base")) then
                {
                _foo setdamage 0.3;
                sleep 1;
                };
            if ((alive _dog) && (_foo isKindOf "zZombie_Base")) then
                {
                _dog setDir 160;
                _foo setdamage 0.6;
                sleep 1;
                };
            if ((alive _dog) && (_foo isKindOf "zZombie_Base")) then 
                {       
                _dog setDir 180;
                _foo setdamage 0.8;
                sleep 1;
                };
            if ((alive _dog) && (_foo isKindOf "zZombie_Base")) then
                {
                _dog setDir 200;
                _foo setdamage 1;
                };
            detach _dog;
            _dog domove (position _leader);
            _dog setspeedmode "FULL";
            };
        };
    //getin
    if ((vehicle _leader != _leader) && ((vehicle _leader isKindOf "car") || (vehicle _leader isKindOf "air"))) then
        {
        _veh = vehicle _leader;
        _dog domove position _veh;
        _dog setspeedmode "FULL";
        _stopWait = (time + 10);
        waituntil {_dog domove position _veh; sleep 1; (_dog distance _veh < 5) || time > _stopWait};
        _dog attachto [_veh,[0,-0.5,-1],"podlaha"];
    //getout
        waitUntil{sleep 2;((vehicle _leader == _leader) || (!alive _dog) || (!alive _leader))};
        sleep 1;
        detach _dog;
        _dog setPos (getposATL _leader);
        _veh = objNull;
        };
    //tofar
    if ((_leader distance _dog) > 1200) then
        {
        _dog  setDamage 1;
        };
    //toClose
    if ((_leader distance _dog) < 5) then
        {
        _dog switchmove "Dog_Siting";
        }
        else
        {
        _dog switchmove ""; //Dog_Sprint
        _dog domove position _leader;
        _dog setspeedmode "full";
        };
    _foo = objNull;
    sleep 3;
    };
};
sleep 3;   
deleteVehicle _dog;
_grp = grpNull;
_stopWait = (time + 120);
waitUntil {time >= _stopWait};
dogOwner = dogOwner - [_leader];
sleep 1;
_clientID publicVariableClient "dogOwner";
};

dogInit.sqf
Code:
//===================piXel 12-02-2013============
private ["_dogHouse","_dogSound","_trg"];

_dogHouse = player
if (!isserver) exitwith {};

_trg = createTrigger ["emptyDetector", getPosATL _dogHouse];
_trg setTriggerArea [2,2,0, false];
_trg setTriggerTimeout [0,0,0, false];
_trg setTriggerActivation ["any", "present", true];
_trg setTriggerStatements ["isplayer (thisList select 0)",
"nul = [(thisList select 0)] execVM 'addin\dog.sqf'",
""];

plrInit.sqf
Code:
//===================piXel 15-02-2013===========
waitUntil {!isNil ("dayz_animalCheck")};

//dog commands
sleep 1;
player setVariable ["dogAction","follow",true];
sleep 6;
//useless failsafe
_commd = player getVariable "dogAction";
if (_commd != "follow") then
{
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"];

and just in case the dogCommand.sqf
Code:
//===================piXel 12-02-2013============
player = _this select 1;
_actionArray = _this select 3;
_action = _actionArray select 0;

//filter useless publicBroadcast
if (_action == player getVariable "dogAction") exitWith {_nul = [objNull, player, rSAY, "whistleNon"] call RE;};

if (_action == "follow") then
{
player setVariable ["dogAction",_action,true];
_nul = [objNull, player, rSAY, "whistleFollow"] call RE;
};
if (_action == "stay") then
{
player setVariable ["dogAction",_action,true];
_nul = [objNull, player, rSAY, "whistleStay"] call RE;
};
if (_action == "find") then
{
player setVariable ["dogAction",_action,true];
_nul = [objNull, player, rSAY, "whistleFind"] call RE;
};

in your init.sqf add this:
Code:
[] execVM "addin\dog.sqf";

right after if (!isDedicated) then {

and this:
Code:
_null = [] execVM "addin\plrInit.sqf";

after _playerMonitor = blah blah blah


then enjoy your permanent dogs :)
we only used the German Shepard model btw.
 
Do you know how i enable the lift for all players ... somehow lift and climb on back can only be used by Admins ... think it is because anti hack or so :-S
 
go to your anithack and add these player actions
Code:
R3F_LOG_objet_addAction,R3F_LOG_action_charger_deplace_valide,R3F_LOG_action_charger_selection_valide,R3F_LOG_action_contenu_vehicule_valide,
         R3F_LOG_action_remorquer_deplace_valide,R3F_LOG_action_remorquer_selection_valide,R3F_LOG_action_deplacer_objet_valide,R3F_LOG_action_selectionner_objet_remorque_valide,
R3F_LOG_action_detacher_valide,R3F_LOG_action_selectionner_objet_charge_valide

If i was you i would just make your actions section = false like this
Code:
[] spawn
    {
        "+_tlmrand18+" = false;
        while {"+_tlmrand18+"} do
        {
Its not gonna allow any more hacking than already happens on dayz lol. Also it makes it easy when u add addactions to players. 8)
 
I have a prob with the dogs deleting after like 3-5 minutes or so. I have no antihack.sqf and I'm using Overwatch 0.2.5. I've tried removing "&& (alive _leader)" from "while {(alive _dog) && (alive _leader)} do" in the dog.sqf file. Still he deletes/disappears.

Also has anyone figured out how to make them attack Zeds yet? They only bark on my server.

TIA
 
I have a prob with the dogs deleting after like 3-5 minutes or so. I have no antihack.sqf and I'm using Overwatch 0.2.5. I've tried removing "&& (alive _leader)" from "while {(alive _dog) && (alive _leader)} do" in the dog.sqf file. Still he deletes/disappears.

Also has anyone figured out how to make them attack Zeds yet? They only bark on my server.

TIA
well it sounds like u know ur way around the script so try to look at the conditions the code has to meet in order to delteVehicle the dog and then see if you can understand why those conditions are being met and try to alter it. Mine never dissapeared so not really sure whats the deal :/
 
Well I can't find a link to download pixel's addin ...
Can someone help me find it ?
It surely doesn't look like it is on the first page so either i can't find it or is not there.

I hope i can get some help. Thanks.
 
Back
Top