Jump to content

Runewulv

Member
  • Posts

    95
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Runewulv

  1. 4 hours ago, ReDBaroN said:

    We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option.

    
    ["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"]

    As you can see above, we have the option "_packAny      | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die.

    Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106?

    you could keep it as anyone can repack the deployable and then add it to the garage to restrict removal variable in your ConfigVariables.sqf. The restrict removal option keeps anyone from removing anything from your plot thats in that array without permission on the plot pole first.

  2. in 1051 it was amazing. Loved it very much, used it for years. It's died since 1.6 was released. Salival had mentioned looking into it as well. Would be great to have that mod up and running again. I've been a server owner for about 5 years now.

  3. 2 hours ago, looter809 said:
      Reveal hidden contents

    /////////////////////////////////////////////////////////////////////
    //
    // Script: Call Car v0.1 (12/2014)
    // Created by: jahangir13 
    // Calls the car belonging to the key this script was executed by
    //
    // Player needs the key of the car (right click option) and a watch in the inventory.
    // Car needs enough fuel to be called (config value). For now only cars/motorcycles are allowed.
    // When car is moving, press F7 to toggle Cam mode (F8 in Cam mode to toggle night vision).
    // Car is locked during movement and after arrival.
    //
    //Script slightly edited by ZzBombardierzZ/looter809/Jeremiah to not allow more than one vehicle being called at a time per player
    //Script edited again by ZzBombardierzZ/looter809/Jeremiah to stop the loop if vehicle is stuck (like in a base).
    //Script Modified by Schalldampfer, to allow vehicle selection for masterkey (11/2017)
    /////////////////////////////////////////////////////////////////////

    private [
    "_scanRadius", "_debrisArray", "_minFuelLevel", "_wpSpeed", "_wpCombatMode", "_behaviour", "_targetRadius", "_debrisRemoveRadius", "_zedKillRadius", "_camHeight", "_driverModel",
    "_loopLimiter", "_keyCode", "_keyID", "_keyName", "_vehTarget", "_characterID", "_vehDisplayName", "_vehicle", "_minFuelLimit",
    "_timeBegin", "_timeEnd", "_doLoop", "_count", "_startPos", "_destPos", "_vehGroup", "_vehDriver", "_wayPoint", "_camera", "_countZombies", "_countDebris","_i",
    "_exit","_foundPos","_vehicleFound","_timesCarGotStuck"];

    //###############################################################################################################################################
    ////////// Configuration Begin //////////
    // Radius around player to scan for the car belonging to the key
    _scanRadius = 25000;
    // Debris array (all objects of classnames listed here are removed if car is too near)
    _debrisArray = [
        "Fort_Barricade","Wreck_Base","Rubbish1","Rubbish2","Rubbish3","Rubbish4","Rubbish5","Land_Misc_Rubble_EP1","Land_Misc_Garb_Heap_EP1"
    ];
    // Minimum fuel level the car needs to have (0.1 = 10%)
    _minFuelLevel = 0.1;
    // Waypoint speed (Possible values: "UNCHANGED","LIMITED","NORMAL","FULL")
    _wpSpeed = "FULL";
    // Waypoint combat mode ( https://community.bistudio.com/wiki/setWaypointCombatMode )
    _wpCombatMode = "GREEN";
    // Driving behaviour of the vehicle group ( https://community.bistudio.com/wiki/setWaypointBehaviour )
    _behaviour = "CARELESS";
    // Target radius: if the car reaches this radius around the destination position, it is near enough and stops (destination zone)
    _targetRadius = 20;
    // Radius around the car in which debris/junk will be deleted (otherwise car stops or tries to get around somehow)
    _debrisRemoveRadius = 10;
    // Radius around the car in which Zombies will be killed (otherwise car stops or tries to get around somehow)
    _zedKillRadius = 15;
    // Height of the camera above target vehicle
    _camHeight = 60;
    // Classname/model of the driver
    _driverModel = "Functionary1_EP1_DZ";
    // Inner loop limiter ( Execute the code in this if only each n-th execution of the loop (debug monitor update, looking for Zeds, check cam on/off))
    _loopLimiter = 20;
    ////////// Configuration End //////////
    //###############################################################################################################################################

    if (isNil "rv_init") then {
        if (getText (configFile >> "CfgMods" >> "DayZ" >> "version") == "DayZ Epoch 1.0.6.1") then {epoch_tempKeys = compile preprocessFileLineNumbers "scripts\remoteVehicle\epoch_tempKeys.sqf";}; // This can be removed when 1.0.6.2 comes out.
        rv_vehicleInfo = compile preprocessFileLineNumbers "scripts\remoteVehicle\vehicleInfo.sqf";
        rv_init = true;
    };

    disableSerialization;

    // Keydown function
    fnc_key = {
        private ["_keyCode"];
        _keyCode = _this select 0;
        //diag_log format ["keyCode: %1", _keyCode];
        // F7 pressed (Cam mode)
        if ( (_keyCode == 65) ) then {
            if ( showCam ) then {
                showCam = false;
            } else {
                showCam = true;
            };
        };
        // F8 pressed (NV mode)
        if ( (_keyCode == 66) ) then {
            if ( showNV ) then {
                showNV = false;
                camUseNVG false;
            } else {
                showNV = true;
                camUseNVG true;
            };
        };
    };

    _exit = {
        dayz_actionInProgress = false;
        rv_vehicleList = nil;
        rv_selected = nil;
    };

    //###############################################################################################################################################

    if(!(isNull findDisplay 106)) then {findDisplay 106 closeDisplay 0}; // close gear menu

    // Exit if player has no watch in inventory
    if ( !("ItemRadio" in ([player] call BIS_fnc_invString)) ) exitWith {"You don't have a radio. You can't call." call dayz_rollingMessages;};

    if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
    dayz_actionInProgress = true;

    // Get key Owner, key name from ui_selectSlot.sqf
    _keyList = call epoch_tempKeys;
    _keyID = 0;

    _keyID = (_keyList select 0) select ((_keyList select 2) find (_this select 0));//characterID for key
    _foundPos = (_keyList select 0) find _keyID;

    if (_foundPos >= 0) then {
        _keyName = (_keyList select 1) select _foundPos;//display name
    };

    if (_foundPos == -1) exitWith {"No valid keys in your toolbelt." call dayz_rollingMessages; call _exit;};

    if (isNil "carRunning") then {carRunning = false;};
    //---------------------------------------------------------------------------------------------------------    
    // Compare with vehicles on map (allow only land vehicles)
    rv_vehicleList = [];
    _vehicleFound = false;
    {
        _characterID = _x getVariable ["CharacterID", "0"];
        if ( ( ((typeOf _x) isKindOf "LandVehicle") && !((typeOf _x) isKindOf "StaticWeapon") ) && (_characterID == _keyID) && (player distance _x < _scanRadius) ) then {
            _vehicleFound = true;
            rv_vehicleList set [count rv_vehicleList,_x];//Add vehicle to list
        };
    } count vehicles;
    if (!_vehicleFound) exitWith {"Unable to find a valid vehicle for this key." call dayz_rollingMessages; call _exit;};
    //---------------------------------------------------------------------------------------------------------    

    //Selection menu
    rv_selected = nil;
    if (count rv_vehicleList > 1) then {
        rv_isOk = false;

        createDialog "remoteVehicle";

        _display = uiNamespace getVariable["rv_dialog", displayNull];
        _display displayCtrl 8801 ctrlSetText(format ["Kitt, come! - Vehicles for %1",_keyDisplay]);

        _control = ((findDisplay 8800) displayCtrl 8802);
        lbClear _control;
        {
            _control lbAdd getText(configFile >> "CfgVehicles" >> typeOf _x >> "displayName");
            if (!isNull DZE_myVehicle && {local DZE_myVehicle} && {alive DZE_myVehicle} && {DZE_myVehicle == _x}) then {
                _control lbSetColor [(lbSize _control)-1,[0, 1, 0, 1]];
            };
        } count rv_vehicleList;
        _control lbSetCurSel 0;

        waitUntil {!dialog};

    } else {
        rv_selected = rv_vehicleList select 0;
        rv_isOk = true;
    };

    if (!alive rv_selected) exitWith {"The vehicle has been destroyed." call dayz_rollingMessages; call _exit;};

    //reset
    _vehTarget = objNull;
    dayz_actionInProgress = false;
    rv_vehicleList = nil;

    // if vehicle has been found
    if (rv_isOk) then {
        //Set selected Vehicle
        _vehTarget = rv_selected;rv_selected = nil;

        if (carRunning) exitWith {systemChat "JCC: You already have a vehicle on it's way to you!";};
        carRunning = true;

        // Get crew out
        if (alive driver _vehTarget) then {
            (driver _vehTarget) vehicleChat "The owner called this car. Let's eject!";
            sleep 0.5;
            (driver _vehTarget) action ["Eject", _vehTarget];
            sleep 2;
        };

        _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName");

        //Fuel check
        if ( (fuel _vehTarget) < _minFuelLimit) exitWith { systemChat "JCC: Not enough fuel for the ride. Exit."; };

        systemChat format["JCC: (%1) KITT, come here... I need you buddy.",_vehDisplayName];

        // Variable init
        _timeBegin = 0;
        _timeEnd = 0;
        showCam = false;
        showNV = false;
        _doLoop = true;
        _count = 0;
        _timesCarGotStuck = 0;

        _destPos = player modelToWorld [0, 8, 0];

        // Start counter
        _timeBegin = time;

        // Create a unit group
        _vehGroup = createGroup WEST;
        _vehDriver = _vehGroup createUnit [_driverModel, _vehTarget, [], 0,"LIEUTENANT"];
        _vehDriver assignAsDriver _vehTarget;
        _vehDriver moveInDriver _vehTarget;
        _vehDriver setSkill 1;
        _vehGroup setBehaviour _behaviour;
        removeAllWeapons _vehDriver;
        removeAllItems _vehDriver;

        // Waypoint at destination where car should drive to
        _wayPoint = _vehGroup addwaypoint [_destPos, 0];
        _wayPoint setwaypointtype "MOVE";
        _wayPoint setWaypointSpeed _wpSpeed;
        _wayPoint setWaypointCombatMode _wpCombatMode;

        // Lock the vehicle
        _vehTarget setVehicleLock "LOCKED";

        // Add keydown Event Handler
        jccKeyDown = (findDisplay 46) displayAddEventHandler ["KeyDown","[_this select 1] call fnc_key; false;"];

        // Camera init
        cameraEffectEnableHUD true;
        showCinemaBorder true;
        _camera = "camera" camCreate [0,0,0];

        systemChat "JCC: Toggle CAM (F7) ... Toggle NV (F8)";

        // Loop until destination is reached, driver died or left car or car cannot move anymore
        for "_i" from 0 to 1 step 0 do {
            _count = _count + 1;
            _camera camSetTarget _vehTarget;
            _camera camSetRelPos [0, -20, _camHeight];
            _camera setVectorDirAndUp [[0,0.5,0.5],[0,-0.5,0.5]];

            _camera camCommitPrepared 0;
            _camera camCommit 0;

            // Do not execute the commands within the if condition too often (each _loopLimiter time only)
            if ( (_count mod _loopLimiter) == 0 ) then {

                if ( showCam ) then {
                    _camera cameraeffect ["internal", "back"];
                } else {
                    _camera cameraeffect ["terminate", "back"];
                };

                // Get rid of zombies
                _countZombies = _vehTarget nearEntities ["zZombie_Base", _zedKillRadius];
                if ( count _countZombies > 0 ) then {
                    {
                        _x setDamage 1;
                    } count _countZombies;
                };

                // take the current time
                _timeEnd = time;

                // Show debug info
                hintSilent parseText format ["
                <t size='1.2' font='Bitstream' align='right' color='#5882FA'>JCC Autodrive Monitor</t><br/>
                <t size='1.0' font='Bitstream' align='left' color='#FFBF00'>Distance Target:</t><t size='1.0' font='Bitstream' align='right'>%1(m)</t><br/>
                <t size='1.0' font='Bitstream' align='left' color='#FFBF00'>Duration:</t><t size='1.0' font='Bitstream' align='right'>%4(s)</t><br/>
                <t size='1.0' font='Bitstream' align='left' color='#FFBF00'>Velocity:</t><t size='1.0' font='Bitstream' align='right'>%2(km/h)</t><br/>
                <t size='1.0' font='Bitstream' align='left' color='#FFBF00'>Fuel:</t><t size='1.0' font='Bitstream' align='right'>%5(%6)</t><br/>
                <t size='1.0' font='Bitstream' align='left' color='#FFBF00'>Damage:</t><t size='1.0' font='Bitstream' align='right'>%3(%7)</t><br/>",
                (round ( _vehTarget distance _destPos)),
                (round (speed _vehTarget)),
                (round(100*(damage _vehTarget))),
                (round( _timeEnd - _timeBegin)),
                (round(100*(fuel _vehTarget))),
                "%","%"
                ];

                // Leave the loop if condition is true
                if ( (_vehTarget distance _destPos < _targetRadius ) OR ( !canMove _vehTarget ) OR ( {alive _x} count crew _vehTarget == 0 ) OR !( alive _vehDriver) ) exitWith { _doLoop = false; };
                //below is added by bomb/looter809 to fix issue with vehicle stuck in base
                if ((speed _vehTarget < 1) && (_timeEnd - _timeBegin > 15) && ( _vehTarget distance _destPos > _targetRadius + 10)) then {_timesCarGotStuck = _timesCarGotStuck + 1;};
                if ( _timesCarGotStuck > 20) exitWith { systemChat "Uh oh! Your car seems stuck!";};
            };

            // Get rid of debris/junk
            _countDebris = nearestObjects [(getPosATL _vehTarget), _debrisArray, _debrisRemoveRadius];
            if ( count _countDebris > 0 ) then {
                {
                    deleteVehicle _x;
                } count _countDebris;
            };

            if ( !_doLoop ) exitWith { true };

            sleep 0.01;
        }; // end of loop

        sleep 1;

        // Destroy camera not needed anymore
        _camera cameraeffect ["terminate", "back"];
        camdestroy _camera;

        // Remove keydown Event Handler
        (findDisplay 46) displayRemoveEventHandler ["KeyDown", jccKeyDown];

        // Exit if driver is not alive (to send player right error message)
        if ( !(alive _vehDriver) ) exitWith {systemChat "JCC: Driver was killed. Exit."; carRunning = false;deleteVehicle _vehDriver;deleteGroup _vehGroup;};
        // Nobody there to drive anymore
        if ( {alive _x} count crew _vehTarget == 0 ) exitWith {systemChat "JCC: Nobody in the car anymore. Exit."; carRunning = false;deleteVehicle _vehDriver;deleteGroup _vehGroup;};

        sleep 1;

        // Get crew out and delete members
        {
            moveOut _x;
            deleteVehicle _x;
        } forEach (crew _vehTarget);

        // Delete crew that got out before arrival / delete vehicle group
        {deleteVehicle _x} forEach units _vehGroup;
        deleteGroup _vehGroup;

        // Lock the vehicle again
        _vehTarget setVehicleLock "LOCKED";

        // Exit if vehicle cannot move (to send player right error message)
        if ( !canMove _vehTarget ) exitWith {systemChat "JCC: Vehicle cannot move anymore. Exit."; carRunning = false;};

     /*below is added by bomb/looter809 to fix issue with vehicle stuck in base.*/
        if (_timesCarGotStuck > 20) exitWith {systemChat "JCC: Sir, the car seems stuck. I'm sorry to fail you."; carRunning = false;};

        // Success message if car arrived in the destination zone
        systemChat format ["JCC: %1 arrived. Damage: %2%5 Fuel: %3%6 Time: %4s", _vehDisplayName, (round(100*(damage _vehTarget))), (round(100*(fuel _vehTarget))),(round( _timeEnd - _timeBegin)),"%","%"];

        carRunning = false;


    // If vehicle has not been found in range
    } else {
        systemChat "JCC: None was selected";
        call _exit;
    };

    Here's the fixed version of what I last posted with @Schalldampfer's remote script as well. I don't personally use the remote vehicle script (thought about it, still kind of on the fence), but I have added a couple more options on my personal file. One addition I have added is coins as I stated before. The other addition is adding a small part of the knight rider theme song which plays on repeat on the server side (took me forever to get the repeat to work lol, I kind of wonder if there was an easier way, but I tried multiple methods...) If anyone wants the coins and knight rider theme additions just let me know.

    (the fix i did from last time to this time fixes the problem @Runewulv said with the new method of checking if the car is stuck. I have it at 20 checks atm but it may do better with more/less)

    Awesome Looter I will update my server now and take a look see. Thanks for tweaking! Have you ever tried working on Just Another Evac Mod? 

  4. ah OK, I did test it out. It worked very well from what I could tell. But was not compatible with WAI. The missions wouldnt spawn. I'm super disappointed in that as I was excited to use it. I like DZAI but Sarge was always a lot more crafty and more versatile. It also cut about 10 FPS right off the top of all my players LOL. I run mission systems too which is why and Sarge is taxing obviously. Just too bad, was hoping to swap out DZAI for Sarge.

  5. I've tested the fixes done by Looter809 with the additions added by Schalldampfer. It seems to be working well. My only issue is, the AI seems a bit too ready to abandon the vehicle. Depending on distance, I have to keep re-calling the vehicle because it will drive a random distance and then abandon the vehicle. So it's not bugging you to where you can't use it, but the abandon option is just a little too aggressive.

  6. 15 hours ago, looter809 said:

    @Runewulv & @Schalldampfer https://pastebin.com/xBttdSU7 This has the fix for vehicle being stuck in a base. I didn't see if the variable "canMove" is defined anywhere, I imagine it's a true variable for the AI system, so I left it alone. But you can see what I fixed in this version in my comments near the added code. I will next be making the script cost coins to call since I find it sort of OP of a script, if you guys want the edits I make for that as well let me know and I can post it too. Or I could add to the script so it asks for briefcases if you don't use coins.

    And I know my C++ writing could be improved, so if you see something I added to this script that could be improved feel free to teach me a lesson and show me what I did wrong. Thanks :)

     

    Edit: Coins are now working on the script. If anyone wants my finished (at least for now) version of this awesome script let me know.

    well done looter, in your pastebin does this also have  @Schalldampfer masterkey compatible menu added in?

  7.  

    7 hours ago, looter809 said:

    Did anyone figure out a way to fix:

    ?

     

    Also, I tested this inside a base and it was not moving but the script didn't end.

    
    ( !canMove _vehTarget )

    this doesn't seem to be stopping the script

    This has always been an issue even in 1051. If there are player built walls up the AI will not be able to find a path very well. Ive suggested to all my players to make sure there is an open space for them. The two best ways to clear this issue out is to lobby log, or get in the vehicle urself and drive it to the location u called it to. Once you pull up to that spot it will stop the vehicle and kick you out of it as if it was delivered properly and the AI will despawn. 

  8. 10 hours ago, salival said:

    in your dayz_server\system\server_monitor.sqf find: 

    
    _hiveLoaded = false;

    add below:

    
    PVDZE_EvacChopperFields = [];

    find this line:

    
    if (_isDZ_Buildable || {(_isSafeObject && !_isTrapItem)}) then {

    Add this above:

    
    			if ((typeOf _object) == "HeliHRescue") then {
    				PVDZE_EvacChopperFields set [count PVDZE_EvacChopperFields, _object];
    			};

    Add at bottom of server_monitor.sqf:

    
    if (isServer && (isNil "EvacServerPreload")) then {
        publicVariable "PVDZE_EvacChopperFields";
        
        ON_fnc_evacChopperFieldsUpdate = {
            private ["_action","_targetField"];
            _action = _this select 0;
            _targetField = _this select 1;
            
            if (_action == "add") then {
                PVDZE_EvacChopperFields = PVDZE_EvacChopperFields + [_targetField];
            };
            
            if (_action == "rem") then {
                PVDZE_EvacChopperFields = PVDZE_EvacChopperFields - [_targetField];
            };
            
            publicVariable "PVDZE_EvacChopperFields";
        };
    
        "PVDZE_EvacChopperFieldsUpdate" addPublicVariableEventHandler {(_this select 1) spawn ON_fnc_evacChopperFieldsUpdate};
    
        EvacServerPreload = true;
    };

     

    OMG Salival. I'll be installing this ASAP to see if it works. Can't thank you enough for what you do for the community.

  9. On 8/27/2017 at 3:04 AM, _Lance_ said:

    I put this on my test server tonight, should have seen my face when I stored my suv for the first time, I haven't smiled so big over dayzmod since my evac chopper came to pick me up for the first time back in 1.0.5.1  lol. Awesome mod/update here, great instructions, easy merge too. This is going on both my servers tomorrow for sure. Thanks Salival !

    Man do I miss JAEM working. I have it installed on my server, but have never been able to get it work since the 1.6 conversion. The Legacy thread is dead. Biggest issue reported was the change in the server_monitor file. Would love to have Evac choppers back *tear of nostalgia* 

  10. yeah I gotcha there. I dont want to have to maintain, i just like disabling base decay. 

     

    Is this something new in 106? I've had A2 Epoch servers for years, and all you had to do to disable base decay before was the -1 cleanupafterdays. I never had to disable any damage in the database as well. Even hosts had instructed me in the past that this was the way to do it. Now they say check Epoch forums because things have changed and even they arent certain LOL

  11. Anhor, then you have no authority to speak for the entire population of the game bro LOL. As I said originally, I'm cool with civilian vehicles being added too, but for you to say we don't need military weapons and vehicles is pretty biased and selfish on your behalf LOL

  12. LOL I dont do either of those options. My server is set up for the long haul and I have many vets that have played my servers for years now. 

    And there were small issues in 1.0.6.1, but 1.0.6 was a rough patch. 

    That's why you set up a full mill server smart. I dont give basekits or start money. I have 10k Hero, 30k Special Forces, 50k Alpha Wolf, 100k 25% Discount, and 500k 50% discount traders. It's all about setting it up smart. In my experience (as I've been playing Arma 2 for 5 years) the servers with basic stuff is usually the ones where people get super bored, or if you make it too easy to get stuff. You cant get a m1a2 on my server till u hit 50k and then have 70 briefcases. I dont use coins, I prefer old school. The only time my servers have had trouble maintaining population is in the last few months.

    thanks for a whole bucket load of BS assumptions though.

  13. agreed Salival, that is always going to be a factor with newer games coming out. But, like myself, arma 2 always seems to draw me back. I like A3 Epoch, but what keeps it from being the same for me is the lack of actual zombies. 

  14. I think that's more of a personal opinion Anhor. I think civilian vehicles would be good as well, but to just give up on weapons and military vehicles is hardly a good idea. Especially considering all that's still out there. I suppose if you are running a non-military server I can understand your view point, but there are a lot of full military servers out there that would disagree with you. That being said, I'd love to see a Harley Davidson make it lol

    Also, I think the 1.6 issues scared a lot of players away, and some new content would be just the needed boost of epinephrine to get them to come back and check it out.

  15. I'm glad they continue to update. My opinion? Maybe don't so much worry about adding scripts and what not. What about adding more vehicles and weapons? Offgaming is no longer a thing and incorporating their RMOD items would be so great. I used to use RMOD all the time. Maxx Pros, slew of submachine guns, Spooky C130, and the beautiful Mi35 (just to name a few). Other than having to tweak a few files it feels like it would be much easier to add and update. Just my opinion. you guys have done a great job with adding things (although masterkey should be base game by now or at the very least some kind of key ring to hold all your keys in one toolbelt slot), but I think some additions of weapons and vehicles would be the shot in the arm Epoch desperately needs. Just my opinion again, thanks for all you guys have done.

×
×
  • Create New...