Jump to content

[Tutorial] Dynamic Airdrop


IceEagle132
 Share

Recommended Posts

This a older script from the old Altis Life Site.

Author: RYN_Ryan

Updated By: AlaskaVet

All Edits are done in your life_server

1. inside life_server\init.sqf Add:

[] execVM "\life_server\Functions\Airdrop\config.sqf";
[] execVM "\life_server\Functions\Airdrop\fn_generateAirdropAuto.sqf";

2. Open life_server\config.cpp under class TON_System Add:

class Airdrop {
	file = "\life_server\Functions\Airdrop";
	class generateAirdrop {};
};

3. Put the Airdrop folder in life_server\Functions

And your All done.

 

To edit were the airdrops drop, Open life_server\Functions\Airdrop\config.sqf

Add the cords that you want in this line. All these are near Kavala.

airdrop_positions = [[5228.49,12576.7,0],[5560.94,14875.2,0],[7138.13,13083,0],[5863.29,10692.5,0]];

To change the time of how often the drops happen, Open life_server\Functions\Airdrop\config.sqf

This is set for 1 every 2 hours

_airdrop_time_interval = [1,2]; 

 

Enjoy

AlaskaVet

Airdrop.rar

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

can you repost your script? Dont forget its on a timer....so you may need to be a little patient :)

Mine takes around 10min

 

Mine is as follows

@life_server\addons\life_server\Functions\Airdrop\config.sqf

/*
    @file Version: 1.0.0.0
    @file Author: RYN_Ryan
    @file edit: 20.01.2015
    Copyright © 2015 Ryan Torzynski, All rights reserved
    All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"
*/
airdrop_helicopter_main = "B_Heli_Transport_03_unarmed_F";
airdrop_helicopter_scnd = "B_Heli_Attack_01_F";
airdrop_chance = 100;
//Cords Of Were To Do The Drops
airdrop_positions = [[5228.49,12576.7,0],[5560.94,14875.2,0],[7138.13,13083,0],[5863.29,10692.5,0]];
_airdrop_time_interval = [1,1]; //Time given in hours, this is the interval in which the airdrop should take place

// Do not modify the following code
airdrop_time_min = _airdrop_time_interval select 0;
airdrop_time_max = _airdrop_time_interval select 1;
airdrop_time_min = airdrop_time_min*360;
airdrop_time_max = airdrop_time_max*720;

if (airdrop_time_min>=airdrop_time_max) exitWith {airdrop_enable=false;};
airdrop_enable=true;
airdrop_goingon=false;

 

@life_server\addons\life_server\Functions\Airdrop\fn_generateAirdrop.sqf

/*

    @file Version: 1.0.0.0

    @file Author: RYN_Ryan

    @file edit: 20.01.2015

    Copyright � 2015 Ryan Torzynski, All rights reserved

    All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"!

*/

_posPlayer = [_this,0,[],[[]]] call BIS_fnc_param;

if (!airdrop_enable) exitWith {};

if (airdrop_goingon) exitWith {};

if({side _x == civilian} count playableUnits < 2) exitWith {};

airdrop_goingon = true;

_dest = _posPlayer;

sleep 1;

// AIRDROP STARTEN

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>A shipment is arriving at Pablo's residence in 15 minutes! The drop-location will be transmitted soon!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 300;

_marker = createMarker ["Airdropmarker", _dest];

"Airdropmarker" setMarkerColor "ColorRed";

"Airdropmarker" setMarkerType "Empty";

"Airdropmarker" setMarkerShape "ELLIPSE";

"Airdropmarker" setMarkerSize [500,500];

_markerText = createMarker ["Airdropmarkertext", _dest];

"Airdropmarkertext" setMarkerColor "ColorBlack";

"Airdropmarkertext" setMarkerText "Airdrop-Mission";

"Airdropmarkertext" setMarkerType "mil_warning";

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 minutes until the helicopter will drop the supplies! Check your map for the drop-location!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 300;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>4 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>3 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>2 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

heli1 = CreateVehicle [airdrop_helicopter_main, [7950, 9667, 0], [], 0, "FLY"];

heli2 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9700, 0], [], 0, "FLY"];

heli3 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9630, 0], [], 0, "FLY"];

heli1 allowDamage false;

heli2 allowDamage false;

heli3 allowDamage false;

_mygroup1 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup2 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup3 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

{_x moveInDriver heli1} forEach units _mygroup1;

{_x moveInDriver heli2} forEach units _mygroup2;

{_x moveInDriver heli3} forEach units _mygroup3;

_mygroup1 addWaypoint [_dest, 0];

_mygroup1 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup2 addWaypoint [_dest, 0];

_mygroup2 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup3 addWaypoint [_dest, 0];

_mygroup3 addWaypoint [[2380.47,22267.8,0], 0];

//_markerText = createMarker ["airbox_marker", [14028.5,18719.7,0.0014267]];

//"airbox_marker" setMarkerColor "ColorBlue";

//"airbox_marker" setMarkerText " Airdrop-Box";

//"airbox_marker" setMarkerType "mil_destroy";

_containerdummy = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_containerdummy attachTo [heli1,[0,0,-3.5]];

_containerdummy setDir 90;

while { _dest distance heli1 > 250 } do { "airbox_marker" setMarkerPos getPos heli1; sleep 1; };

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>The supplies have been dropped! 20 minutes until self destruction!</t>"] remoteExec ["life_fnc_broadcast",0];

// Drop the container

deleteVehicle _containerdummy;

sleep 0.1;

_container = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_para = createVehicle ["O_Parachute_02_F", [getPos heli1 select 0, getPos heli1 select 1, getPos heli1 select 2], [], 0, ""];

_para setPosATL (heli1 modelToWorld[0,0,100]);

_para attachTo [heli1,[0,0,-10]];

detach _para;

_container attachTo [_para,[0,0,-2]];

_container setDir 90;

playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _container];

_smoke="SmokeShellGreen" createVehicle [getpos _container select 0, getpos _container select 1,0];

_smoke attachTo [_container,[0,0,0]];

_light = "Chemlight_green" createVehicle getPos _container;

_light attachTo [_container,[0,0,0]];

_flare = "F_40mm_Green" createVehicle getPos _container;

_flare attachTo [_container,[0,0,0]];

sleep 0.1;

while { (getPos _container select 2) > 2 } do { "airbox_marker" setMarkerPos getPos _container;sleep 1; };

detach _container;

_container setPos [getPos _container select 0, getPos _container select 1, (getPos _container select 2)+0.5];

playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _container];

sleep 6;

"M_NLAW_AT_F" createVehicle [getPos _container select 0, getPos _container select 1, 0];

_pos_container = getPos _container;

deleteVehicle _container;

sleep 0.5;

_box = createVehicle ["CargoNet_01_box_F", _pos_container, [], 0, "CAN_COLLIDE"];

_box allowDamage false;

_smoke="SmokeShellGreen" createVehicle [getpos _box select 0,getpos _box select 1,0];

_flare = "F_40mm_Green" createVehicle getPos _container;

_light attachTo [_box,[0,0,0]];

_flare attachTo [_box,[0,0,0]];

// Fill box

clearWeaponCargoGlobal _box;

clearMagazineCargoGlobal _box;

clearItemCargoGlobal _box;

sleep 0.1;

_var=floor(random 6);

if (_var==0) then {_box addWeaponCargoGlobal ["LMG_Zafir_F", 5]; _box addWeaponCargoGlobal ["150Rnd_762x51_Box_Tracer", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==1) then {_box addWeaponCargoGlobal ["launch_Titan_F", 5]; _box addWeaponCargoGlobal ["Titan_AA", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==2) then {_box addWeaponCargoGlobal ["launch_RPG32_F", 5]; _box addMagazineCargoGlobal ["RPG32_F", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==3) then {_box addWeaponCargoGlobal ["arifle_Katiba_GL_F", 5]; _box addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", 5]; _box addWeaponCargoGlobal ["UGL_FlareWhite_F", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==4) then {_box addWeaponCargoGlobal ["srifle_GM6_F", 5]; _box addWeaponCargoGlobal ["optic_SOS", 5]; _box addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag", 20]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==5) then {_box addWeaponCargoGlobal ["SatchelCharge_Remote_Mag", 10]; _box addWeaponCargoGlobal ["ClaymoreDirectionalMine_Remote_Mag", 20]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

sleep 0.1;

// Fill box end

sleep 300;

deleteVehicle heli1;

deleteVehicle heli2;

deleteVehicle heli3;

sleep 600;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 240;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 50;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 seconds until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 10;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission beendet!</t></t><br/><br/><t size='1'>The AirDrop-Mission has ended!</t>"] remoteExec ["life_fnc_broadcast",0];

deleteVehicle _box; 

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-21,(getPos _box select 1)+21,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-1,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+23,(getPos _box select 1)-75,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-50,(getPos _box select 1)+1,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+87,(getPos _box select 1)-22,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+0,(getPos _box select 1)-0,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+20,(getPos _box select 1)-20,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-100,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-55,(getPos _box select 1)+123,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+577,(getPos _box select 1)-83,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+35,(getPos _box select 1)-99,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-431,(getPos _box select 1)-431,0];

"Airdropmarker" setMarkerAlpha 0;

"Airdropmarkertext" setMarkerAlpha 0;

deleteMarker "airbox_marker";

deleteMarker "Airdropmarker";

deleteMarker "Airdropmarkertext";

airdrop_goingon = false;
 

@life_server\addons\life_server\Functions\Airdrop\fn_generateAirdropAuto.sqf

/*

    @file Version: 1.0.0.0

    @file Author: RYN_Ryan

    @file edit: 20.01.2015

    Copyright � 2015 Ryan Torzynski, All rights reserved

    All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"!

*/

sleep 1;

if (!airdrop_enable) exitWith {};

if (airdrop_goingon) exitWith {};

if({side _x == civilian} count playableUnits < 2) exitWith {};

_chance = floor(random 100);

if (_chance>airdrop_chance) exitWith {};

_toWait = (random (airdrop_time_max - airdrop_time_min)) + airdrop_time_min;

sleep _toWait; // Wait abit for the airdrop

if (!airdrop_enable) exitWith {};

if (airdrop_goingon) exitWith {};

airdrop_goingon=true;

// AIRDROP STARTEN

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>A helicopter is going to drop a Supplycrate in 15 minutes! The drop-location will be transmitted soon!</t>"] remoteExec ["life_fnc_broadcast",0];

_poses = count airdrop_positions;

_inArr = floor(random _poses);

_dest = airdrop_positions select _inArr;

sleep 300;

_marker = createMarker ["Airdropmarker", _dest];

"Airdropmarker" setMarkerColor "ColorRed";

"Airdropmarker" setMarkerType "Empty";

"Airdropmarker" setMarkerShape "ELLIPSE";

"Airdropmarker" setMarkerSize [500,500];

_markerText = createMarker ["Airdropmarkertext", _dest];

"Airdropmarkertext" setMarkerColor "ColorBlack";

"Airdropmarkertext" setMarkerText "Airdrop-Mission";

"Airdropmarkertext" setMarkerType "mil_warning";

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 minutes until the helicopter will drop the supplies! Check your map for the drop-location!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 300;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>4 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>3 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>2 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

heli1 = CreateVehicle [airdrop_helicopter_main, [7950, 9667, 0], [], 0, "FLY"];

heli2 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9700, 0], [], 0, "FLY"];

heli3 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9630, 0], [], 0, "FLY"];

heli1 allowDamage false;

heli2 allowDamage false;

heli3 allowDamage false;

_mygroup1 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup2 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup3 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

{_x moveInDriver heli1} forEach units _mygroup1;

{_x moveInDriver heli2} forEach units _mygroup2;

{_x moveInDriver heli3} forEach units _mygroup3;

_mygroup1 addWaypoint [_dest, 0];

_mygroup1 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup2 addWaypoint [_dest, 0];

_mygroup2 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup3 addWaypoint [_dest, 0];

_mygroup3 addWaypoint [[2380.47,22267.8,0], 0];

//_markerText = createMarker ["airbox_marker", [14028.5,18719.7,0.0014267]];

//"airbox_marker" setMarkerColor "ColorBlue";

//"airbox_marker" setMarkerText " "; //Airdrop-Box

//"airbox_marker" setMarkerType "mil_destroy";

_containerdummy = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_containerdummy attachTo [heli1,[0,0,-3.5]];

_containerdummy setDir 90;

while { _dest distance heli1 > 250 } do { "airbox_marker" setMarkerPos getPos heli1; sleep 1; };

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>The supplies have been dropped! 20 minutes until self destruction!</t>"] remoteExec ["life_fnc_broadcast",0];

// Drop the container

deleteVehicle _containerdummy;

sleep 0.1;

_container = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_para = createVehicle ["O_Parachute_02_F", [getPos heli1 select 0, getPos heli1 select 1, getPos heli1 select 2], [], 0, ""];

_para setPosATL (heli1 modelToWorld[0,0,100]);

_para attachTo [heli1,[0,0,-10]];

detach _para;

_container attachTo [_para,[0,0,-2]];

_container setDir 90;

playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _container];

_smoke="SmokeShellGreen" createVehicle [getpos _container select 0, getpos _container select 1,0];

_smoke attachTo [_container,[0,0,0]];

_light = "Chemlight_green" createVehicle getPos _container;

_light attachTo [_container,[0,0,0]];

_flare = "F_40mm_Green" createVehicle getPos _container;

_flare attachTo [_container,[0,0,0]];

sleep 0.1;

while { (getPos _container select 2) > 2 } do { "airbox_marker" setMarkerPos getPos _container;sleep 1; };
detach _container;
_container setPos [getPos _container select 0, getPos _container select 1, (getPos _container select 2)+0.5];
playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _container];
sleep 6;
"M_NLAW_AT_F" createVehicle [getPos _container select 0, getPos _container select 1, 0];
_pos_container = getPos _container;
deleteVehicle _container;
sleep 0.5;
_box = createVehicle ["CargoNet_01_box_F", _pos_container, [], 0, "CAN_COLLIDE"];
_box allowDamage false;
_smoke="SmokeShellGreen" createVehicle [getpos _box select 0,getpos _box select 1,0];
_flare = "F_40mm_Green" createVehicle getPos _container;
_light attachTo [_box,[0,0,0]];
_flare attachTo [_box,[0,0,0]];

// Fill box
clearWeaponCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearItemCargoGlobal _box;
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["FirstAidKit", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["ToolKit", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["Binocular", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["NVGoggles", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["hgun_Rook40_F", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_9x21_Mag", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["arifle_sdar_F", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["20Rnd_556x45_UW_mag", 2];};
sleep 0.1;
_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["hgun_Pistol_heavy_02_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["6Rnd_45ACP_Cylinder", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["arifle_Mk20C_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_556x45_Stanag", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["arifle_Katiba_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_65x39_caseless_green", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["SMG_01_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_45ACP_Mag_SMG_01", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["srifle_EBR_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["20Rnd_762x51_Mag", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_Arco", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_Aco", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_MRCO", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_Arco", 2];};

sleep 0.1;

// Fill box end

sleep 300;

deleteVehicle heli1;

deleteVehicle heli2;

deleteVehicle heli3;

sleep 600;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 240;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 50;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 seconds until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 10;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission beendet!</t></t><br/><br/><t size='1'>The AirDrop-Mission has ended!</t>"] remoteExec ["life_fnc_broadcast",0];

deleteVehicle _box; 

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-21,(getPos _box select 1)+21,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-1,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+23,(getPos _box select 1)-75,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-50,(getPos _box select 1)+1,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+87,(getPos _box select 1)-22,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+0,(getPos _box select 1)-0,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+20,(getPos _box select 1)-20,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-100,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-55,(getPos _box select 1)+123,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+577,(getPos _box select 1)-83,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+35,(getPos _box select 1)-99,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-431,(getPos _box select 1)-431,0];

"Airdropmarker" setMarkerAlpha 0;
"Airdropmarkertext" setMarkerAlpha 0;

deleteMarker "airbox_marker";
deleteMarker "Airdropmarker";
deleteMarker "Airdropmarkertext";
airdrop_goingon = false;

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Franco Drambuie said:

can you repost your script? Dont forget its on a timer....so you may need to be a little patient :)

Mine takes around 10min

 

Mine is as follows

@life_server\addons\life_server\Functions\Airdrop\config.sqf

/*
    @file Version: 1.0.0.0
    @file Author: RYN_Ryan
    @file edit: 20.01.2015
    Copyright © 2015 Ryan Torzynski, All rights reserved
    All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"
*/
airdrop_helicopter_main = "B_Heli_Transport_03_unarmed_F";
airdrop_helicopter_scnd = "B_Heli_Attack_01_F";
airdrop_chance = 100;
//Cords Of Were To Do The Drops
airdrop_positions = [[5228.49,12576.7,0],[5560.94,14875.2,0],[7138.13,13083,0],[5863.29,10692.5,0]];
_airdrop_time_interval = [1,1]; //Time given in hours, this is the interval in which the airdrop should take place

// Do not modify the following code
airdrop_time_min = _airdrop_time_interval select 0;
airdrop_time_max = _airdrop_time_interval select 1;
airdrop_time_min = airdrop_time_min*360;
airdrop_time_max = airdrop_time_max*720;

if (airdrop_time_min>=airdrop_time_max) exitWith {airdrop_enable=false;};
airdrop_enable=true;
airdrop_goingon=false;

 

@life_server\addons\life_server\Functions\Airdrop\fn_generateAirdrop.sqf

/*

    @file Version: 1.0.0.0

    @file Author: RYN_Ryan

    @file edit: 20.01.2015

    Copyright � 2015 Ryan Torzynski, All rights reserved

    All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"!

*/

_posPlayer = [_this,0,[],[[]]] call BIS_fnc_param;

if (!airdrop_enable) exitWith {};

if (airdrop_goingon) exitWith {};

if({side _x == civilian} count playableUnits < 2) exitWith {};

airdrop_goingon = true;

_dest = _posPlayer;

sleep 1;

// AIRDROP STARTEN

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>A shipment is arriving at Pablo's residence in 15 minutes! The drop-location will be transmitted soon!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 300;

_marker = createMarker ["Airdropmarker", _dest];

"Airdropmarker" setMarkerColor "ColorRed";

"Airdropmarker" setMarkerType "Empty";

"Airdropmarker" setMarkerShape "ELLIPSE";

"Airdropmarker" setMarkerSize [500,500];

_markerText = createMarker ["Airdropmarkertext", _dest];

"Airdropmarkertext" setMarkerColor "ColorBlack";

"Airdropmarkertext" setMarkerText "Airdrop-Mission";

"Airdropmarkertext" setMarkerType "mil_warning";

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 minutes until the helicopter will drop the supplies! Check your map for the drop-location!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 300;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>4 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>3 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>2 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

heli1 = CreateVehicle [airdrop_helicopter_main, [7950, 9667, 0], [], 0, "FLY"];

heli2 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9700, 0], [], 0, "FLY"];

heli3 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9630, 0], [], 0, "FLY"];

heli1 allowDamage false;

heli2 allowDamage false;

heli3 allowDamage false;

_mygroup1 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup2 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup3 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

{_x moveInDriver heli1} forEach units _mygroup1;

{_x moveInDriver heli2} forEach units _mygroup2;

{_x moveInDriver heli3} forEach units _mygroup3;

_mygroup1 addWaypoint [_dest, 0];

_mygroup1 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup2 addWaypoint [_dest, 0];

_mygroup2 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup3 addWaypoint [_dest, 0];

_mygroup3 addWaypoint [[2380.47,22267.8,0], 0];

//_markerText = createMarker ["airbox_marker", [14028.5,18719.7,0.0014267]];

//"airbox_marker" setMarkerColor "ColorBlue";

//"airbox_marker" setMarkerText " Airdrop-Box";

//"airbox_marker" setMarkerType "mil_destroy";

_containerdummy = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_containerdummy attachTo [heli1,[0,0,-3.5]];

_containerdummy setDir 90;

while { _dest distance heli1 > 250 } do { "airbox_marker" setMarkerPos getPos heli1; sleep 1; };

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>The supplies have been dropped! 20 minutes until self destruction!</t>"] remoteExec ["life_fnc_broadcast",0];

// Drop the container

deleteVehicle _containerdummy;

sleep 0.1;

_container = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_para = createVehicle ["O_Parachute_02_F", [getPos heli1 select 0, getPos heli1 select 1, getPos heli1 select 2], [], 0, ""];

_para setPosATL (heli1 modelToWorld[0,0,100]);

_para attachTo [heli1,[0,0,-10]];

detach _para;

_container attachTo [_para,[0,0,-2]];

_container setDir 90;

playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _container];

_smoke="SmokeShellGreen" createVehicle [getpos _container select 0, getpos _container select 1,0];

_smoke attachTo [_container,[0,0,0]];

_light = "Chemlight_green" createVehicle getPos _container;

_light attachTo [_container,[0,0,0]];

_flare = "F_40mm_Green" createVehicle getPos _container;

_flare attachTo [_container,[0,0,0]];

sleep 0.1;

while { (getPos _container select 2) > 2 } do { "airbox_marker" setMarkerPos getPos _container;sleep 1; };

detach _container;

_container setPos [getPos _container select 0, getPos _container select 1, (getPos _container select 2)+0.5];

playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _container];

sleep 6;

"M_NLAW_AT_F" createVehicle [getPos _container select 0, getPos _container select 1, 0];

_pos_container = getPos _container;

deleteVehicle _container;

sleep 0.5;

_box = createVehicle ["CargoNet_01_box_F", _pos_container, [], 0, "CAN_COLLIDE"];

_box allowDamage false;

_smoke="SmokeShellGreen" createVehicle [getpos _box select 0,getpos _box select 1,0];

_flare = "F_40mm_Green" createVehicle getPos _container;

_light attachTo [_box,[0,0,0]];

_flare attachTo [_box,[0,0,0]];

// Fill box

clearWeaponCargoGlobal _box;

clearMagazineCargoGlobal _box;

clearItemCargoGlobal _box;

sleep 0.1;

_var=floor(random 6);

if (_var==0) then {_box addWeaponCargoGlobal ["LMG_Zafir_F", 5]; _box addWeaponCargoGlobal ["150Rnd_762x51_Box_Tracer", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==1) then {_box addWeaponCargoGlobal ["launch_Titan_F", 5]; _box addWeaponCargoGlobal ["Titan_AA", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==2) then {_box addWeaponCargoGlobal ["launch_RPG32_F", 5]; _box addMagazineCargoGlobal ["RPG32_F", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==3) then {_box addWeaponCargoGlobal ["arifle_Katiba_GL_F", 5]; _box addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", 5]; _box addWeaponCargoGlobal ["UGL_FlareWhite_F", 15]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==4) then {_box addWeaponCargoGlobal ["srifle_GM6_F", 5]; _box addWeaponCargoGlobal ["optic_SOS", 5]; _box addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag", 20]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

if (_var==5) then {_box addWeaponCargoGlobal ["SatchelCharge_Remote_Mag", 10]; _box addWeaponCargoGlobal ["ClaymoreDirectionalMine_Remote_Mag", 20]; _box addItemCargoGlobal ["muzzle_snds_H", 1]; _box addItemCargoGlobal ["muzzle_snds_acp", 1];};

sleep 0.1;

// Fill box end

sleep 300;

deleteVehicle heli1;

deleteVehicle heli2;

deleteVehicle heli3;

sleep 600;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 240;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 50;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 seconds until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 10;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission beendet!</t></t><br/><br/><t size='1'>The AirDrop-Mission has ended!</t>"] remoteExec ["life_fnc_broadcast",0];

deleteVehicle _box; 

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-21,(getPos _box select 1)+21,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-1,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+23,(getPos _box select 1)-75,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-50,(getPos _box select 1)+1,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+87,(getPos _box select 1)-22,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+0,(getPos _box select 1)-0,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+20,(getPos _box select 1)-20,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-100,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-55,(getPos _box select 1)+123,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+577,(getPos _box select 1)-83,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+35,(getPos _box select 1)-99,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-431,(getPos _box select 1)-431,0];

"Airdropmarker" setMarkerAlpha 0;

"Airdropmarkertext" setMarkerAlpha 0;

deleteMarker "airbox_marker";

deleteMarker "Airdropmarker";

deleteMarker "Airdropmarkertext";

airdrop_goingon = false;
 

@life_server\addons\life_server\Functions\Airdrop\fn_generateAirdropAuto.sqf

/*

    @file Version: 1.0.0.0

    @file Author: RYN_Ryan

    @file edit: 20.01.2015

    Copyright � 2015 Ryan Torzynski, All rights reserved

    All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"!

*/

sleep 1;

if (!airdrop_enable) exitWith {};

if (airdrop_goingon) exitWith {};

if({side _x == civilian} count playableUnits < 2) exitWith {};

_chance = floor(random 100);

if (_chance>airdrop_chance) exitWith {};

_toWait = (random (airdrop_time_max - airdrop_time_min)) + airdrop_time_min;

sleep _toWait; // Wait abit for the airdrop

if (!airdrop_enable) exitWith {};

if (airdrop_goingon) exitWith {};

airdrop_goingon=true;

// AIRDROP STARTEN

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>A helicopter is going to drop a Supplycrate in 15 minutes! The drop-location will be transmitted soon!</t>"] remoteExec ["life_fnc_broadcast",0];

_poses = count airdrop_positions;

_inArr = floor(random _poses);

_dest = airdrop_positions select _inArr;

sleep 300;

_marker = createMarker ["Airdropmarker", _dest];

"Airdropmarker" setMarkerColor "ColorRed";

"Airdropmarker" setMarkerType "Empty";

"Airdropmarker" setMarkerShape "ELLIPSE";

"Airdropmarker" setMarkerSize [500,500];

_markerText = createMarker ["Airdropmarkertext", _dest];

"Airdropmarkertext" setMarkerColor "ColorBlack";

"Airdropmarkertext" setMarkerText "Airdrop-Mission";

"Airdropmarkertext" setMarkerType "mil_warning";

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 minutes until the helicopter will drop the supplies! Check your map for the drop-location!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 300;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>4 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>3 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>2 minutes until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 60;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until the helicopter will drop the supplies!</t>"] remoteExec ["life_fnc_broadcast",0];

heli1 = CreateVehicle [airdrop_helicopter_main, [7950, 9667, 0], [], 0, "FLY"];

heli2 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9700, 0], [], 0, "FLY"];

heli3 = CreateVehicle [airdrop_helicopter_scnd, [7950, 9630, 0], [], 0, "FLY"];

heli1 allowDamage false;

heli2 allowDamage false;

heli3 allowDamage false;

_mygroup1 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup2 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_mygroup3 = [[7950, 9667, 0], CIVILIAN, ["O_G_Soldier_SL_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

{_x moveInDriver heli1} forEach units _mygroup1;

{_x moveInDriver heli2} forEach units _mygroup2;

{_x moveInDriver heli3} forEach units _mygroup3;

_mygroup1 addWaypoint [_dest, 0];

_mygroup1 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup2 addWaypoint [_dest, 0];

_mygroup2 addWaypoint [[2380.47,22267.8,0], 0];

_mygroup3 addWaypoint [_dest, 0];

_mygroup3 addWaypoint [[2380.47,22267.8,0], 0];

//_markerText = createMarker ["airbox_marker", [14028.5,18719.7,0.0014267]];

//"airbox_marker" setMarkerColor "ColorBlue";

//"airbox_marker" setMarkerText " "; //Airdrop-Box

//"airbox_marker" setMarkerType "mil_destroy";

_containerdummy = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_containerdummy attachTo [heli1,[0,0,-3.5]];

_containerdummy setDir 90;

while { _dest distance heli1 > 250 } do { "airbox_marker" setMarkerPos getPos heli1; sleep 1; };

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>The supplies have been dropped! 20 minutes until self destruction!</t>"] remoteExec ["life_fnc_broadcast",0];

// Drop the container

deleteVehicle _containerdummy;

sleep 0.1;

_container = createVehicle ["Land_Cargo20_blue_F", [3450.7363, 16708.432, 90], [], 0, "CAN_COLLIDE"];

_para = createVehicle ["O_Parachute_02_F", [getPos heli1 select 0, getPos heli1 select 1, getPos heli1 select 2], [], 0, ""];

_para setPosATL (heli1 modelToWorld[0,0,100]);

_para attachTo [heli1,[0,0,-10]];

detach _para;

_container attachTo [_para,[0,0,-2]];

_container setDir 90;

playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _container];

_smoke="SmokeShellGreen" createVehicle [getpos _container select 0, getpos _container select 1,0];

_smoke attachTo [_container,[0,0,0]];

_light = "Chemlight_green" createVehicle getPos _container;

_light attachTo [_container,[0,0,0]];

_flare = "F_40mm_Green" createVehicle getPos _container;

_flare attachTo [_container,[0,0,0]];

sleep 0.1;

while { (getPos _container select 2) > 2 } do { "airbox_marker" setMarkerPos getPos _container;sleep 1; };
detach _container;
_container setPos [getPos _container select 0, getPos _container select 1, (getPos _container select 2)+0.5];
playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _container];
sleep 6;
"M_NLAW_AT_F" createVehicle [getPos _container select 0, getPos _container select 1, 0];
_pos_container = getPos _container;
deleteVehicle _container;
sleep 0.5;
_box = createVehicle ["CargoNet_01_box_F", _pos_container, [], 0, "CAN_COLLIDE"];
_box allowDamage false;
_smoke="SmokeShellGreen" createVehicle [getpos _box select 0,getpos _box select 1,0];
_flare = "F_40mm_Green" createVehicle getPos _container;
_light attachTo [_box,[0,0,0]];
_flare attachTo [_box,[0,0,0]];

// Fill box
clearWeaponCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearItemCargoGlobal _box;
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["FirstAidKit", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["ToolKit", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["Binocular", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["NVGoggles", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["hgun_Rook40_F", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_9x21_Mag", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["arifle_sdar_F", 2];};
sleep 0.1;
_var=floor(random 2);
if (_var==1) then {_box addWeaponCargoGlobal ["20Rnd_556x45_UW_mag", 2];};
sleep 0.1;
_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["hgun_Pistol_heavy_02_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["6Rnd_45ACP_Cylinder", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["arifle_Mk20C_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_556x45_Stanag", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["arifle_Katiba_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_65x39_caseless_green", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["SMG_01_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["30Rnd_45ACP_Mag_SMG_01", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["srifle_EBR_F", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["20Rnd_762x51_Mag", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_Arco", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_Aco", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_MRCO", 2];};

sleep 0.1;

_var=floor(random 2);

if (_var==1) then {_box addWeaponCargoGlobal ["optic_Arco", 2];};

sleep 0.1;

// Fill box end

sleep 300;

deleteVehicle heli1;

deleteVehicle heli2;

deleteVehicle heli3;

sleep 600;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>5 minutes until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 240;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>1 minute until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 50;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission</t></t><br/><br/><t size='1'>10 seconds until self destruction</t>"] remoteExec ["life_fnc_broadcast",0];

sleep 10;

[3,"<t size='1.2'><t color='#FF0000'>Airdrop-Mission beendet!</t></t><br/><br/><t size='1'>The AirDrop-Mission has ended!</t>"] remoteExec ["life_fnc_broadcast",0];

deleteVehicle _box; 

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-21,(getPos _box select 1)+21,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-1,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+23,(getPos _box select 1)-75,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-50,(getPos _box select 1)+1,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+87,(getPos _box select 1)-22,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+0,(getPos _box select 1)-0,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+20,(getPos _box select 1)-20,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-100,(getPos _box select 1)+56,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-55,(getPos _box select 1)+123,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+577,(getPos _box select 1)-83,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+35,(getPos _box select 1)-99,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)+100,(getPos _box select 1)-100,0];

sleep 1;

_bmb = "BO_GBU12_LGB" createVehicle [(getPos _box select 0)-431,(getPos _box select 1)-431,0];

"Airdropmarker" setMarkerAlpha 0;
"Airdropmarkertext" setMarkerAlpha 0;

deleteMarker "airbox_marker";
deleteMarker "Airdropmarker";
deleteMarker "Airdropmarkertext";
airdrop_goingon = false;

 

Where did you place 

[] execVM "\life_server\Functions\Airdrop\config.sqf";
[] execVM "\life_server\Functions\Airdrop\fn_generateAirdropAuto.sqf";

in your init.sqf?  This is where I placed mine..

#include "script_macros.hpp"
/*
    File: init.sqf
    Author: Bryan "Tonic" Boardwine

    Edit: Nanou for HeadlessClient optimization.
    Please read support for more informations.

    Description:
    Initialize the server and required systems.
*/

[] execVM "\life_server\Functions\Airdrop\config.sqf";
[] execVM "\life_server\Functions\Airdrop\fn_generateAirdropAuto.sqf";

private["_dome","_rsb","_timeStamp"];
DB_Async_Active = false;
DB_Async_ExtraLock = false;
life_server_isReady = false;
life_server_extDB_notLoaded = "";
serv_sv_use = [];
publicVariable "life_server_isReady";
life_save_civilian_position = if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 0) then {false} else {true};
fn_whoDoneit = compile preprocessFileLineNumbers "\life_server\Functions\Systems\fn_whoDoneit.sqf";

/*
    Prepare the headless client.
*/
life_HC_isActive = false;
publicVariable "life_HC_isActive";
HC_Life = false;
publicVariable "HC_Life";

if (EXTDB_SETTING(getNumber,"HeadlessSupport") isEqualTo 1) then {
    [] execVM "\life_server\initHC.sqf";
};

/*
    Prepare extDB before starting the initialization process
    for the server.
*/

if (isNil {uiNamespace getVariable "life_sql_id"}) then {
    life_sql_id = round(random(9999));
    CONSTVAR(life_sql_id);
    uiNamespace setVariable ["life_sql_id",life_sql_id];
        try {
        _result = EXTDB format["9:ADD_DATABASE:%1",EXTDB_SETTING(getText,"DatabaseName")];
        if (!(_result isEqualTo "[1]")) then {throw "extDB2: Error with Database Connection"};
        _result = EXTDB format["9:ADD_DATABASE_PROTOCOL:%2:SQL_RAW_V2:%1:ADD_QUOTES",FETCH_CONST(life_sql_id),EXTDB_SETTING(getText,"DatabaseName")];
        if (!(_result isEqualTo "[1]")) then {throw "extDB2: Error with Database Connection"};
    } catch {
        diag_log _exception;
        life_server_extDB_notLoaded = [true, _exception];
    };
    publicVariable "life_server_extDB_notLoaded";
    if (life_server_extDB_notLoaded isEqualType []) exitWith {};
    EXTDB "9:LOCK";
    diag_log "extDB2: Connected to Database";
} else {
    life_sql_id = uiNamespace getVariable "life_sql_id";
    CONSTVAR(life_sql_id);
    diag_log "extDB2: Still Connected to Database";
};

if (life_server_extDB_notLoaded isEqualType []) exitWith {};

/* Run stored procedures for SQL side cleanup */
["CALL resetLifeVehicles",1] call DB_fnc_asyncCall;
["CALL deleteDeadVehicles",1] call DB_fnc_asyncCall;
["CALL deleteOldHouses",1] call DB_fnc_asyncCall;
["CALL deleteOldGangs",1] call DB_fnc_asyncCall;

_timeStamp = diag_tickTime;
diag_log "----------------------------------------------------------------------------------------------------";
diag_log "---------------------------------- Starting Altis Life Server Init ---------------------------------";
diag_log "------------------------------------------ Version 4.4r4 -------------------------------------------";
diag_log "----------------------------------------------------------------------------------------------------";

if (LIFE_SETTINGS(getNumber,"save_civilian_position_restart") isEqualTo 1) then {
    [] spawn {
        _query = "UPDATE players SET civ_alive = '0' WHERE civ_alive = '1'";
        [_query,1] call DB_fnc_asyncCall;
    };
};

/* Map-based server side initialization. */
master_group attachTo[bank_obj,[0,0,0]];

{
    _hs = createVehicle ["Land_Hospital_main_F", [0,0,0], [], 0, "NONE"];
    _hs setDir (markerDir _x);
    _hs setPosATL (getMarkerPos _x);
    _var = createVehicle ["Land_Hospital_side1_F", [0,0,0], [], 0, "NONE"];
    _var attachTo [_hs, [4.69775,32.6045,-0.1125]];
    detach _var;
    _var = createVehicle ["Land_Hospital_side2_F", [0,0,0], [], 0, "NONE"];
    _var attachTo [_hs, [-28.0336,-10.0317,0.0889387]];
    detach _var;
} forEach ["hospital_2","hospital_3"];

{
    if (!isPlayer _x) then {
        _npc = _x;
        {
            if (_x != "") then {
                _npc removeWeapon _x;
            };
        } forEach [primaryWeapon _npc,secondaryWeapon _npc,handgunWeapon _npc];
    };
} forEach allUnits;

[8,true,12] execFSM "\life_server\FSM\timeModule.fsm";

life_adminLevel = 0;
life_medicLevel = 0;
life_copLevel = 0;
CONST(JxMxE_PublishVehicle,"false");

/* Setup radio channels for west/independent/civilian */
life_radio_west = radioChannelCreate [[0, 0.95, 1, 0.8], "Side Channel", "%UNIT_NAME", []];
life_radio_civ = radioChannelCreate [[0, 0.95, 1, 0.8], "Side Channel", "%UNIT_NAME", []];
life_radio_indep = radioChannelCreate [[0, 0.95, 1, 0.8], "Side Channel", "%UNIT_NAME", []];

/* Set the amount of gold in the federal reserve at mission start */
fed_bank setVariable ["safe",count playableUnits,true];
[] spawn TON_fnc_federalUpdate;

/* Event handler for disconnecting players */
addMissionEventHandler ["HandleDisconnect",{_this call TON_fnc_clientDisconnect; false;}];
[] call compile PreProcessFileLineNumbers "\life_server\functions.sqf";

/* Set OwnerID players for Headless Client */
TON_fnc_requestClientID =
{
    (_this select 1) setVariable ["life_clientID", owner (_this select 1), true];
};
"life_fnc_RequestClientId" addPublicVariableEventHandler TON_fnc_requestClientID;

/* Event handler for logs */
"money_log" addPublicVariableEventHandler {diag_log (_this select 1)};
"advanced_log" addPublicVariableEventHandler {diag_log (_this select 1)};

/* Miscellaneous mission-required stuff */
life_wanted_list = [];
life_bounty_list = [];

cleanupFSM = [] execFSM "\life_server\FSM\cleanup.fsm";

[] spawn {
    for "_i" from 0 to 1 step 0 do {
        uiSleep (30 * 60);
        {
            _x setVariable["sellers",[],true];
        } forEach [Dealer_1,Dealer_2,Dealer_3];
    };
};

[] spawn TON_fnc_initHouses;
cleanup = [] spawn TON_fnc_cleanup;

TON_fnc_playtime_values = [];
TON_fnc_playtime_values_request = [];

//Just incase the Headless Client connects before anyone else
publicVariable "TON_fnc_playtime_values";
publicVariable "TON_fnc_playtime_values_request";


/* Setup the federal reserve building(s) */
_dome = nearestObject [[16019.5,16952.9,0],"Land_Dome_Big_F"];
_rsb = nearestObject [[16019.5,16952.9,0],"Land_Research_house_V1_F"];

for "_i" from 1 to 3 do {_dome setVariable[format["bis_disabled_Door_%1",_i],1,true]; _dome animate [format["Door_%1_rot",_i],0];};
_dome setVariable["locked",true,true];
_rsb setVariable["locked",true,true];
_rsb setVariable["bis_disabled_Door_1",1,true];
_dome allowDamage false;
_rsb allowDamage false;

/* Tell clients that the server is ready and is accepting queries */
life_server_isReady = true;
publicVariable "life_server_isReady";

/* Initialize hunting zone(s) */
aiSpawn = ["hunting_zone",30] spawn TON_fnc_huntingZone;

// We create the attachment point to be used for objects to attachTo load virtually in vehicles.
life_attachment_point = "Land_HelipadEmpty_F" createVehicle [0,0,0];
life_attachment_point setPosASL [0,0,0];
life_attachment_point setVectorDirAndUp [[0,1,0], [0,0,1]];

// Sharing the point of attachment with all players.
publicVariable "life_attachment_point";

diag_log "----------------------------------------------------------------------------------------------------";
diag_log format["               End of Altis Life Server Init :: Total Execution Time %1 seconds ",(diag_tickTime) - _timeStamp];
diag_log "----------------------------------------------------------------------------------------------------";

Link to comment
Share on other sites

On 2/13/2017 at 10:37 AM, SergeantLubanko said:

I can't get this to work for the life of me, and I'm no noob to programming. No errors in my RPT, no messages when I call the function in my debug aswell.

have you tried changing the time so when you do hop on it actually comes? i set mine to 1,0.25 that way its 1 every 15 mins

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.