Arma2 Battle Royale Carepackage Markers! HELP

execVM "\z\addons\dayz_server\Carepackage\CP_Config.sqf"; in bottom of server_functions.sqf

RPT errors

Code:
21:49:54 Error in expression <ineammount];
};

for "_i" from 0 to  do {
_array = _magazinearray call bis_fnc_s>
21:49:54   Error position: <{
_array = _magazinearray call bis_fnc_s>
21:49:54   Error Missing ;
21:49:54 File z\addons\dayz_server\Carepackage\CP_Fill.sqf, line 31
21:49:54 Error in expression <ineammount];
};

for "_i" from 0 to  do {
_array = _magazinearray call bis_fnc_s>
21:49:54   Error position: <{
_array = _magazinearray call bis_fnc_s>
21:49:54   Error Missing ;
21:49:54 File z\addons\dayz_server\Carepackage\CP_Fill.sqf, line 31
21:49:54 Error in expression <t _unitGroup;

{
_pilot setSkill [_x,1]
_gunner     setSkill [(_x select 0),(_x sel>
21:49:54   Error position: <_gunner     setSkill [(_x select 0),(_x sel>
21:49:54   Error Missing ;
21:49:54 File z\addons\dayz_server\Carepackage\CP_Heli.sqf, line 52
21:49:54 Error in expression <t _unitGroup;

{
_pilot setSkill [_x,1]
_gunner     setSkill [(_x select 0),(_x sel>
21:49:54   Error position: <_gunner     setSkill [(_x select 0),(_x sel>
21:49:54   Error Missing ;
21:49:54 File z\addons\dayz_server\Carepackage\CP_Heli.sqf, line 52
21:49:54 Warning Message: Script z\addons\dayz_server\Carepackage\CP_Cleanup.sqf not found
21:49:54 ":: Carepackage :: Config finished..."
21:49:54 Error in expression <: Carepackage :: Config finished...";


while (1 == 1) do {
_timer = (round (ran>
21:49:54   Error position: <while (1 == 1) do {
_timer = (round (ran>
21:49:54   Error while: Type Bool, expected code
21:49:54 File z\addons\dayz_server\Carepackage\CP_Config.sqf, line 53
21:49:54 Error in expression <er || !isMultiplayer) then {

I did say its untested ;).Once I get it all working I'll have it all updated but thats the code I have at the moment for it. The repeats in the array for weapons are more for drop percentage, if you repeat a weapon it'll have a higher chance to drop.

I do have several of those errors fixed in the dropbox files tho now.
 
oh I know man I'm helping you test! I did not know that about the array I thought you might have just rushed through that part :)

I like the script so far it looks very clean and configurable. I might remove the gunner bit so I can use an osprey but so far I like it. I'll toss it back on the server tomorrow and test it further for ya and let you know what I get!
 
I actually tossed this on and tested it really quickly. I turned the spawn timers up so I didnt have to wait around for it.. it does not appear to be working but I'm also not getting any errors in the RPT, only this

Code:
20:46:00 ":: Carepackage :: Spawn chance Successful..."
20:46:00 ":: Carepackage :: Starting SpawnHeli..."
20:46:14 ":: Carepackage :: Spawn chance Successful..."
20:46:14 ":: Carepackage :: Starting SpawnHeli..."
20:46:26 ":: Carepackage :: Spawn chance Successful..."
20:46:26 ":: Carepackage :: Starting SpawnHeli..."
20:47:06 ":: Carepackage :: Spawn chance Successful..."
20:47:06 ":: Carepackage :: Starting SpawnHeli..."
20:47:32 ":: Carepackage :: Spawn chance Successful..."
20:47:32 ":: Carepackage :: Starting SpawnHeli..."
 
I actually tossed this on and tested it really quickly. I turned the spawn timers up so I didnt have to wait around for it.. it does not appear to be working but I'm also not getting any errors in the RPT, only this

Code:
20:46:00 ":: Carepackage :: Spawn chance Successful..."
20:46:00 ":: Carepackage :: Starting SpawnHeli..."
20:46:14 ":: Carepackage :: Spawn chance Successful..."
20:46:14 ":: Carepackage :: Starting SpawnHeli..."
20:46:26 ":: Carepackage :: Spawn chance Successful..."
20:46:26 ":: Carepackage :: Starting SpawnHeli..."
20:47:06 ":: Carepackage :: Spawn chance Successful..."
20:47:06 ":: Carepackage :: Starting SpawnHeli..."
20:47:32 ":: Carepackage :: Spawn chance Successful..."
20:47:32 ":: Carepackage :: Starting SpawnHeli..."
I finally got my test server up and working except for cpbo randomly corrupting the server pbo half the time so I can start polishing it all up (getting it working/no errors). At the moment all the code is more of a work flow of how it is going to work, never done anything with AI so Its probably just my code that is not working, but no errors is a good thing and bad thing at the same time since its not doing anything lol. I'll add some more daig_logs to see where it seems to be stopping but it seems to be near the beginning of the CP_Heli.sqf; I suspect the AI part. I work from home so I may just install a sever on my work OS to work on it while "at work" to try and get it done quicker.
 
Well I spent some time on the script today, and I should have a revision soon that is working.

Cpbo is terrible, use pbo manager

I do have pbo manager installed on my main OS but the pack option never worked so I had to get cpbo for packing and pbo manager for unpacking. My work OS its all working fine tho with pbo manager and haven't had a single issue with repacking the server pbo.
 
Well I have the dropbox files updated just not sure if its 100% working yet, the heli and everything works with the waypoints and the package drops but I have yet to see a package since I didn't have time to check it.
 
Cpbo is terrible, use pbo manager

I have literally the exact opposite opinion. PBO manager ALWAYS neglects to put the PBO prefix into my pbo. I've never actually been able to solve it. Doesn't matter how many times you edit the prefix tab to match your server directory. CPBO has always worked for me 100% of the time.
 
wPXPHzF.jpg


I have to use USVehicleBox because I'm pretty sure the default box is for vanilla only. Anyways, it is not appearing at ground level, it is half sunk in the ground. Some times you can't even see it.
 
So other than the crate basically being unlootable because it is not at ground level, this script seems to be running quite well. I've modified a lot of it to my liking easily enough and I'd be ready to throw this up on the server just as soon as the crate issue is fixed. I've played around with it some, and even looked at DZMS and how it sets the crate but I can't seem to figure out how to get the crate vectored to the ground. I think the issue is that you need to delete the original box and parachute when it hits the ground and create a new box at that location. I'm going to paste the DZMS script and perhaps it might give you some ideas. DZMS seems to delete the parachute as well.
 
Last edited:
Code:
/*
    AN-2 Bandit Supply Drop by Vampire
    Example Code by Halv
*/

private ["_missName","_coords","_plane","_aiGrp","_pilot","_wp","_wp_pos","_loop","_half","_newPos","_plane2","_chute","_box","_dropDir","_wp2","_fallCount","_boxFin","_smoke"];

//Name of the Mission
//_missName = "Air Drop1";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;

//[nil,nil,rTitleText,"An AN-2 with Bandit Supplies is Flying In!\nGet to the Location and Capture the Package!", "PLAIN",10] call RE;

//DZMSAddMajMarker is a simple script that adds a marker to the location
//[_coords,_missname] ExecVM DZMSAddMajMarker;

//Lets get the AN2 Flying
_plane = createVehicle ["MV22", [0,0,500], [], 0, "FLY"];
[_plane] call DZMSProtectObj;
_plane engineOn true;
_plane flyInHeight 250;
_plane forceSpeed 400;

//Empty the plane
clearMagazineCargoGlobal _plane;
clearWeaponCargoGlobal _plane;

//Lets make AI for the plane and get them in it
_aiGrp = creategroup east;

_pilot = _aiGrp createUnit ["SurvivorW2_DZ",getPos _plane,[],0,"FORM"];
_pilot moveindriver _plane;
_pilot assignAsDriver _plane;

_wp = _aiGrp addWaypoint [[(_coords select 0), (_coords select 1),150], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "CARELESS";
_wp_pos = waypointPosition [_aiGrp,1];

_pilot addWeapon 'NVGoggles';
_pilot addWeapon 'ItemCompass';
_pilot addWeapon 'ItemRadio';
_pilot addWeapon 'ItemMap';
_pilot addWeapon 'ItemGPS';
sleep 5;
/*
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,2,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,2,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,1,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
*/
_loop = true;
_half = false;
while {_loop} do {
    if (!Alive _plane OR !Alive _pilot) then {
        sleep 5;

        // We are going to pretend the plane was shot down nearby
        deleteVehicle _plane;
        deleteVehicle _pilot;

        _newPos = [(_coords select 0) + (random(2000)),(_coords select 1) - (random(2000)),0];

        if (surfaceIsWater _newPos) then {
            //newPos is water, so lets just drop it on mark
            //This is a temporary fix for needed logic
            _newPos = _coords;
        };

        //Create the plane and kill it
        _plane2 = createVehicle ["MV22", [(_newPos select 0),(_newPos select 1),200], [], 0, "FLY"];
        [_plane2] call DZMSProtectObj;
        _plane2 engineOn true;
        _plane2 flyInHeight 200;
        _plane2 forceSpeed 400;
        sleep 2;
        _plane2 setDamage 1;

        //Update the location
        [_coords,"Air Drop"] ExecVM DZMSAddMajMarker;
        //[nil,nil,rTitleText,"The AN2 was shot down by UN Peacekeepers!\nGo Find the Supplies!", "PLAIN",10] call RE;

        _chute = createVehicle ["ParachuteMediumEast", [(_newPos select 0),(_newPos select 1),200], [], 0, "FLY"];
        [_chute] call DZMSProtectObj;
        _box = createVehicle ["USVehicleBox", [(_newPos select 0),(_newPos select 1),200],[], 0, "CAN_COLLIDE"];
        [_box] call DZMSProtectObj;
        _box attachTo [_chute, [0, 0, 1]];
        _smoke = "SmokeShellred" createVehicle (getPos _box);
        _smoke attachTo [_box, [0,0,0]];
        _loop = false;
    };

    if ((Alive _plane) AND (Alive _pilot) AND ((_plane distance _wp_pos) <= 1200) AND (!(_half))) then {
        //[nil,nil,rTitleText,"The AN2 is only 1200m out from the drop point!", "PLAIN",10] call RE;

        //Keep on truckin'
        _plane forceSpeed 375;
        _plane flyInHeight 200;
        _plane setspeedmode "LIMITED";
        _half = true;
    };

    if ((Alive _plane) AND (Alive _pilot) AND ((_plane distance _wp_pos) <= 200)) then {
        //Drop the package

        _dropDir = getDir _plane;
        _newPos = [(getPosATL _plane select 0) - 15*sin(_dropDir), (getPosATL _plane select 1) - 15*cos(_dropDir), (getPosATL _plane select 2) - 10];

        //[nil,nil,rTitleText,"The AN2 has reached the location and dropped the cargo!", "PLAIN",10] call RE;

        _chute = createVehicle ["ParachuteMediumEast", _newPos, [], 0, "FLY"];
        [_chute] call DZMSProtectObj;
        _box = createVehicle ["USVehicleBox", _newPos,[], 0, "CAN_COLLIDE"];
        [_box] call DZMSProtectObj;
        _box attachTo [_chute, [0, 0, 1]];
        _smoke = "SmokeShellred" createVehicle (getPos _box);
        _smoke attachTo [_box, [0,0,0]];

        deleteWaypoint [_aiGrp, 1];
        _wp2 = _aiGrp addWaypoint [[0,0,150], 0];
        _wp2 setWaypointType "MOVE";
        _wp2 setWaypointBehaviour "CARELESS";
        _plane forceSpeed 350;
        _plane setSpeedmode "FULL";

        _loop = false;
    };
};

//The box was dropped, lets get it on the ground.
_fallCount = 0;
while {_fallCount < 45} do {
    if (((getPos _box) select 2) < 1) then {_fallCount = 46};
    sleep 0.1;
    _fallCount = _fallCount + 0.1;
};

detach _box;
_box setpos [(getpos _box select 0), (getpos _box select 1), 0];
_boxFin = createVehicle ["USVehicleBox",[(getpos _box select 0),(getpos _box select 1), 0],[],0,"CAN_COLLIDE"];
deletevehicle _box;
deletevehicle _chute;
[[(getpos _boxFin select 0), (getpos _boxFin select 1), 0],"Air Drop"] ExecVM DZMSAddMajMarker;
clearWeaponCargoGlobal _boxFin;
clearMagazineCargoGlobal _boxFin;
clearBackpackCargoGlobal _boxFin;
[_boxFin,"weapons"] ExecVM DZMSBoxSetup;
[_boxFin] call DZMSProtectObj;

//Wait until the player is within 30 meters and also meets the kill req
[position _boxFin,"DZMSUnitsMajor"] call DZMSWaitMissionComp;

//Let everyone know the mission is over
[nil,nil,rTitleText,"A Player is Looting the Air Drop!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM2 AN2 Drop Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";

//Let the timer know the mission is over
DZMSMajDone = true;

specifically around the lines where it uses
detach _box;
and deletes the parachute and checks for water.
 
Last edited:
Code:
/*
    AN-2 Bandit Supply Drop by Vampire
    Example Code by Halv
*/

private ["_missName","_coords","_plane","_aiGrp","_pilot","_wp","_wp_pos","_loop","_half","_newPos","_plane2","_chute","_box","_dropDir","_wp2","_fallCount","_boxFin","_smoke"];

//Name of the Mission
//_missName = "Air Drop1";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;

//[nil,nil,rTitleText,"An AN-2 with Bandit Supplies is Flying In!\nGet to the Location and Capture the Package!", "PLAIN",10] call RE;

//DZMSAddMajMarker is a simple script that adds a marker to the location
//[_coords,_missname] ExecVM DZMSAddMajMarker;

//Lets get the AN2 Flying
_plane = createVehicle ["MV22", [0,0,500], [], 0, "FLY"];
[_plane] call DZMSProtectObj;
_plane engineOn true;
_plane flyInHeight 250;
_plane forceSpeed 400;

//Empty the plane
clearMagazineCargoGlobal _plane;
clearWeaponCargoGlobal _plane;

//Lets make AI for the plane and get them in it
_aiGrp = creategroup east;

_pilot = _aiGrp createUnit ["SurvivorW2_DZ",getPos _plane,[],0,"FORM"];
_pilot moveindriver _plane;
_pilot assignAsDriver _plane;

_wp = _aiGrp addWaypoint [[(_coords select 0), (_coords select 1),150], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "CARELESS";
_wp_pos = waypointPosition [_aiGrp,1];

_pilot addWeapon 'NVGoggles';
_pilot addWeapon 'ItemCompass';
_pilot addWeapon 'ItemRadio';
_pilot addWeapon 'ItemMap';
_pilot addWeapon 'ItemGPS';
sleep 5;
/*
//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[_coords,2,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,2,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[_coords,1,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
*/
_loop = true;
_half = false;
while {_loop} do {
    if (!Alive _plane OR !Alive _pilot) then {
        sleep 5;

        // We are going to pretend the plane was shot down nearby
        deleteVehicle _plane;
        deleteVehicle _pilot;

        _newPos = [(_coords select 0) + (random(2000)),(_coords select 1) - (random(2000)),0];

        if (surfaceIsWater _newPos) then {
            //newPos is water, so lets just drop it on mark
            //This is a temporary fix for needed logic
            _newPos = _coords;
        };

        //Create the plane and kill it
        _plane2 = createVehicle ["MV22", [(_newPos select 0),(_newPos select 1),200], [], 0, "FLY"];
        [_plane2] call DZMSProtectObj;
        _plane2 engineOn true;
        _plane2 flyInHeight 200;
        _plane2 forceSpeed 400;
        sleep 2;
        _plane2 setDamage 1;

        //Update the location
        [_coords,"Air Drop"] ExecVM DZMSAddMajMarker;
        //[nil,nil,rTitleText,"The AN2 was shot down by UN Peacekeepers!\nGo Find the Supplies!", "PLAIN",10] call RE;

        _chute = createVehicle ["ParachuteMediumEast", [(_newPos select 0),(_newPos select 1),200], [], 0, "FLY"];
        [_chute] call DZMSProtectObj;
        _box = createVehicle ["USVehicleBox", [(_newPos select 0),(_newPos select 1),200],[], 0, "CAN_COLLIDE"];
        [_box] call DZMSProtectObj;
        _box attachTo [_chute, [0, 0, 1]];
        _smoke = "SmokeShellred" createVehicle (getPos _box);
        _smoke attachTo [_box, [0,0,0]];
        _loop = false;
    };

    if ((Alive _plane) AND (Alive _pilot) AND ((_plane distance _wp_pos) <= 1200) AND (!(_half))) then {
        //[nil,nil,rTitleText,"The AN2 is only 1200m out from the drop point!", "PLAIN",10] call RE;

        //Keep on truckin'
        _plane forceSpeed 375;
        _plane flyInHeight 200;
        _plane setspeedmode "LIMITED";
        _half = true;
    };

    if ((Alive _plane) AND (Alive _pilot) AND ((_plane distance _wp_pos) <= 200)) then {
        //Drop the package

        _dropDir = getDir _plane;
        _newPos = [(getPosATL _plane select 0) - 15*sin(_dropDir), (getPosATL _plane select 1) - 15*cos(_dropDir), (getPosATL _plane select 2) - 10];

        //[nil,nil,rTitleText,"The AN2 has reached the location and dropped the cargo!", "PLAIN",10] call RE;

        _chute = createVehicle ["ParachuteMediumEast", _newPos, [], 0, "FLY"];
        [_chute] call DZMSProtectObj;
        _box = createVehicle ["USVehicleBox", _newPos,[], 0, "CAN_COLLIDE"];
        [_box] call DZMSProtectObj;
        _box attachTo [_chute, [0, 0, 1]];
        _smoke = "SmokeShellred" createVehicle (getPos _box);
        _smoke attachTo [_box, [0,0,0]];

        deleteWaypoint [_aiGrp, 1];
        _wp2 = _aiGrp addWaypoint [[0,0,150], 0];
        _wp2 setWaypointType "MOVE";
        _wp2 setWaypointBehaviour "CARELESS";
        _plane forceSpeed 350;
        _plane setSpeedmode "FULL";

        _loop = false;
    };
};

//The box was dropped, lets get it on the ground.
_fallCount = 0;
while {_fallCount < 45} do {
    if (((getPos _box) select 2) < 1) then {_fallCount = 46};
    sleep 0.1;
    _fallCount = _fallCount + 0.1;
};

detach _box;
_box setpos [(getpos _box select 0), (getpos _box select 1), 0];
_boxFin = createVehicle ["USVehicleBox",[(getpos _box select 0),(getpos _box select 1), 0],[],0,"CAN_COLLIDE"];
deletevehicle _box;
deletevehicle _chute;
[[(getpos _boxFin select 0), (getpos _boxFin select 1), 0],"Air Drop"] ExecVM DZMSAddMajMarker;
clearWeaponCargoGlobal _boxFin;
clearMagazineCargoGlobal _boxFin;
clearBackpackCargoGlobal _boxFin;
[_boxFin,"weapons"] ExecVM DZMSBoxSetup;
[_boxFin] call DZMSProtectObj;

//Wait until the player is within 30 meters and also meets the kill req
[position _boxFin,"DZMSUnitsMajor"] call DZMSWaitMissionComp;

//Let everyone know the mission is over
[nil,nil,rTitleText,"A Player is Looting the Air Drop!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM2 AN2 Drop Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";

//Let the timer know the mission is over
DZMSMajDone = true;

specifically around the lines where it uses
detach _box;
and deletes the parachute and checks for water.

I'll probably do some sort of merge between this and what I have since it does work a lot nicer. But glad to hear it works other then being in the ground lol!
 
yea it works really well. If I could just get it to NOT be in the ground I'd put it on my server! I'm trying to do a rough merge myself by just deleting the _crate and making a _crate2 or something like that but I suck at this :)
 
I think I updated every file except 1 so you may have to redo any changes to it. A couple more config options as well.
 
This version is not working as well unfortunately. It doesn't seem to clean up the helicopters like the old script did. The old script just deleted them when they were done and flew off of the map. This one they are all just flying in circles in a group up in the north of the map.
Also the carepackages are not attached to the parachute but rather they are on the ground and the parachute just falls from the sky on its own.
I've attached some pictures to show you what I mean.

e70Jym1.jpg
9Govm44.jpg
 
on the plus side, the crates do appear to be at ground level now and still no RPT errors

I had that same issue with the parachutes but just assumed it way dayz 1.8.9. The helis for me were despawning tho, sometimes they would take a few minutes for some odd reason tho. I'll take a look at it again tomorrow and should be able to get those issues sorted out.
 
Back
Top