GEORGE FLOROS GR 4206 Posted September 27, 2019 On 9/25/2019 at 9:36 AM, Steel_Dragon said: how would i add vitems such as heroine, cocaine You shouldn't ! These are illegal !!!! hahaha ! Since it's for the LIFE purpose , i can't really know! 1 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted September 30, 2019 On 9/28/2019 at 8:26 AM, GEORGE FLOROS GR said: You shouldn't ! These are ellegal !!!! hahaha ! Since it's for the LIFE purpose , i can't really know! lol ok thanks anyway 🙂 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 10, 2019 Hi i know your very busy but i have a question. I have implemented the custom script you kindly helped me with and it seems to be working fine - except i cannot control the number of drops. I would like to have only one drop at a time every x hours. I have gone through the original script and it has a _Number variable to control the number of drops, but the custom does not have this option. I have tried to add the _Number variable but keep breaking the script. (The custom script is below. Thank you. Spoiler //________________ Author : GEORGE FLOROS [GR] ___________ 23.12.18 _____________ diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = false; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 3600; // Every 2 hours = 7200 GF_ALA_time_to_delete = 1200; // time_to_delete the current zone - 20 mins = 1200 GF_ALA_height_of_drop = 300; // 1 = 1m GF_ALA_Spawned_Items_Number = 10; // number of ITEMS GF_ALA_Spawned_Items_Number_random = 0; // number of random ITEMS //GF_ALA_Select --> 1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only GF_ALA_Select = 4; GF_ALA_Blacklist_Zone_distance = 2500; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 2500; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = false; // Spawn Enemy at the site GF_ALA_Enemy_Side = east; // This is for Normal Spawn and EOS , NOT for the DAC units GF_ALA_Squad_Members = 5; // + floor random 5 below GF_ALA_Squad_Members_random = 5; GF_ALA_set_AiSkill = 0.50; GF_ALA_set_AiSkill_random = 0.50; GF_ALA_Patrol_distance = 100; // The distance for BIS_fnc_taskPatrol GF_ALA_Patrol_distance_random = 250; // GF_ALA_Cargo_array - can be any object or vehicle GF_ALA_Cargo_array = [ "I_CargoNet_01_ammo_F", "O_CargoNet_01_ammo_F", "B_CargoNet_01_ammo_F" ]; //________________ Add here your Blacklist Zones ( for more ) , these are included in the 3D editor to copy paste to your mission ________________ GF_ALA_Blacklist_Zone_1 = getMarkerPos "Athira_City_Limits_Marker"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "Kavala_City_Limits_Marker"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "Pyrgos_City_Limits_Marker"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "Sofia_City_Limits_Marker"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "hunting_zone"; //________________ Enemy Array ________________ GF_ALA_Pool_Infantry = [ "O_G_officer_F","O_G_Soldier_SL_F","O_G_Soldier_TL_F","O_G_medic_F","O_G_engineer_F","O_G_Soldier_exp_F","O_G_Soldier_GL_F", "O_G_Soldier_M_F","O_G_Soldier_LAT_F","O_G_Soldier_A_F","O_G_Soldier_F","O_G_Soldier_lite_F","O_G_Sharpshooter_F", "O_G_Soldier_universal_F" ]; if(GF_ALA_Systemchat_info)then{ systemchat "GF Auto Loot Airdrops Script initializing"; }; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; GF_ALA_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); GF_ALA_size = worldsize; //________________ Array ________________ /* //________________ GF_ALA_Binocular_and_Nvg_array Binocular and Nvg slot ________________ It might be needed , to add also the mods , that you want to blacklist , in the GF_ALA_Assignable_Items_Mod_Blacklist in case that the GF_ALA_Attachments_array , generates also items from the blacklisted mods. To check this , uncomment the line that you will find below (in case : % ) , depending the selection GF_ALA_Select copyToClipboard str GF_ALA_Binocular_and_Nvg_array; then run the mission and it will copy the generated array , then ctrl + v to paste the array. The "mcc_sandbox_a3" mod will generate items that they are not Binocular or Nvg. */ GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist = [ "mcc_sandbox_a3", "CUP_Weapons" // Example ]; //________________ case ________________ _Array_Loaded = false; _Select_items_Loaded = false; private ["_items_case"]; switch (GF_ALA_Select) do{ case 1 : { //________________ Load every Mod + Bohemia items ________________ GF_ALA_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod + Bohemia items"; _Select_items_Loaded = true; }; case 2 : { //________________ Load every Mod / No Bohemia items ________________ GF_ALA_primaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod - No Bohemia items"; _Select_items_Loaded = true; }; case 3 : { //________________ Bohemia items Only ________________ GF_ALA_primaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getText( _x >> 'author' ) == 'Bohemia Interactive' && (!(getText( _x >> 'DLC' ) in GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist)) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load Bohemia items Only"; _Select_items_Loaded = true; }; case 4 : { /* //________________ Custom items only ________________ It is posible to add everything to one array and the code below will manage the spawn , GF_ALA_cfgArray = []; But then delete the arrays and their count below */ // add the classnames ex: GF_ALA_primaryWeapon_array = ["srifle_DMR_06_olive_F","srifle_DMR_03_woodland_F","arifle_MXM_F","arifle_MX_SW_khk_F","arifle_Mk20_F","srifle_EBR_F","srifle_LRR_tna_F","LMG_Mk200_F","LMG_Zafir_F","arifle_CTARS_hex_F","arifle_SPAR_02_khk_F","SMG_02_F","arifle_Katiba_F","SMG_01_F"]; GF_ALA_secondaryWeapon_array = [""]; GF_ALA_handgunWeapon_array = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F"]; GF_ALA_Magazines_array = ["20Rnd_762x51_Mag","20Rnd_762x51_Mag","30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","20Rnd_762x51_Mag","7Rnd_408_Mag","200Rnd_65x39_cased_Box","150Rnd_762x54_Box","30Rnd_580x42_Mag_F","150Rnd_556x45_Drum_Mag_F","30Rnd_9x21_Mag_SMG_02","30Rnd_65x39_caseless_green","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag"]; GF_ALA_Uniform_array = ["U_B_FullGhillie_lsh"]; GF_ALA_Vests_array = [""]; GF_ALA_Headgear_array = [""]; GF_ALA_Backpacks_array = ["B_Bergen_dgtl_F"]; // B_Bergen_tna_F - B_Bergen_mcamo_F - B_Bergen_dgtl_F - B_Bergen_hex_F GF_ALA_Goggles_array = [""]; GF_ALA_Items_array = [""]; GF_ALA_Attachments_array = ["optic_KHS_blk","optic_LRPS_ghex_F","optic_Arco_blk_F","optic_Holosight_blk_F"]; GF_ALA_Binocular_and_Nvg_array = [""]; _items_case = "Custom items only"; _Select_items_Loaded = true; }; }; //________________ _Array_Loaded ________________ waituntil {_Select_items_Loaded}; _Array_Loaded = true; if(GF_ALA_Hintsilent_info)then{ hintsilent format ["%1",_items_case]; }; if(GF_ALA_diag_log_info)then{ diag_log format ["%1",_items_case]; }; GF_ALA_cfgArray = GF_ALA_primaryWeapon_array + GF_ALA_secondaryWeapon_array + GF_ALA_handgunWeapon_array + GF_ALA_Magazines_array + GF_ALA_Uniform_array + GF_ALA_Vests_array + GF_ALA_Headgear_array + GF_ALA_Backpacks_array + GF_ALA_Goggles_array + GF_ALA_Items_array + GF_ALA_Attachments_array + GF_ALA_Binocular_and_Nvg_array; waituntil {_Array_Loaded}; ////////////////////////////////////////////////////////////////////////////////// private ["_marker","_x","_a","_pos"]; _x = 0; _a = 0; private ["_marker2","_x","_a","_pos"]; _x = 0; _a = 0; //________________ Number of the Airdrops ________________ while {true} do{ _drop_in_sec = time + GF_ALA_next_drop_in_sec; waitUntil {time > _drop_in_sec}; _a = _a + 1; //________________ Find Airdrops Position ________________ _Found = false; while {!_Found} do{ _pos = [] call BIS_fnc_randomPos; _nearestRoad = [_pos, 50] call BIS_fnc_nearestRoad; _nearest_House = nearestObject [_pos, "House"]; _nearest_Building = nearestObject [_pos, "Building"]; if( //________________ Add Blacklist Distance from all Players ________________ (({((_pos distance _x) <= GF_ALA_Distanse_from_Players)} count GF_ALA_allPlayers) isEqualTo 0) //________________ Add here your Blacklist Zones ( for more ) ________________ && ((_pos distance GF_ALA_Blacklist_Zone_1) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_2) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_3) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_4) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_5) > GF_ALA_Blacklist_Zone_distance) //________________ uncomment to add Distance from _nearestRoad - House - Building ________________ && ((_pos distance _nearestRoad) > 50) && ((_pos distance _nearest_House) > 100) && ((_pos distance _nearest_Building) > 100) )then{ _Found = true; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }else{ _Found = false; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }; }; waituntil {_Found}; //________________ Sound of plane flying above ________________ // https://community.bistudio.com/wiki/Arma_3:_SoundFiles playSound3D ["A3\Sounds_F\ambient\battlefield\battlefield_jet1.wss", _Cargo]; _Plane_sound = selectrandom[ //"GF_ALA_Plane_1", //"GF_ALA_Plane_2", //"GF_ALA_Plane_3" ]; publicVariable _Plane_sound; _Plane_sound remoteExec ["playSound"]; //________________ Cargo ________________ _parachute = createVehicle ["B_Parachute_02_F",_pos, [], 0, "FLY"]; waituntil{!isNull _parachute}; _parachute setPosATL [getPosATL _parachute select 0, getPosATL _parachute select 1, GF_ALA_height_of_drop]; _Cargo_array = selectRandom GF_ALA_Cargo_array; _Cargo = createVehicle [_Cargo_array, position _parachute, [], 0, 'NONE']; waituntil{!isNull _Cargo}; _Cargo attachTo [_parachute,[0,0,0]]; _Cargo enableSimulation false; //________________ clear _Cargo ________________ clearItemCargoGlobal _Cargo; clearWeaponCargoGlobal _Cargo; clearMagazineCargoGlobal _Cargo; //________________ Spawn Loot ________________ for "_i" from 1 to GF_ALA_Spawned_Items_Number + random GF_ALA_Spawned_Items_Number_random do{ //________________ Position of the loot at the Airdrops ________________////////////////////////////////////// _Loot_pos = _pos getPos [ 6 + random 200, // distance from centre//////////////////////////////////////////////////// random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; _Item = selectRandom GF_ALA_cfgArray; _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass"); _Loot = _Cargo; _Color = "Default"; // https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3 _Text = "Empty"; // https://forums.bohemia.net/forums/topic/193019-can-i-detect-all-pistols-from-cfgweapons/?tab=comments#comment-3072020 _type = [0,1,2,4,16,256,4096,131072]; if( (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in [ 0 , 616 ]) or (isClass (configFile >> "CfgGlasses" >> _Item)) or (isClass (configFile >> "CfgMagazines" >> _Item)) )then{ switch true do{ //________________ Gear ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 801) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGUER";_Text = "Uniforms";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 701) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorKhaki";_Text = "Vests";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 605) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGreen";_Text = "Headgear";}; case(_getText isEqualTo "Backpacks") : { _Loot addBackPackCargoGlobal [ _Item, 1 ]; _Color = "ColorBrown";_Text = "Backpacks";}; case(isClass (configFile >> "CfgGlasses" >> _Item)) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorCivilian";_Text = "Glasses";}; //________________ Weapons ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorEAST";_Text = "WeaponsPrimary";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorPink";_Text = "HandGuns";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorOrange";_Text = "WeaponsSecondary";}; case(isClass (configFile >> "CfgMagazines" >> _Item)) : { _Loot addMagazineCargoGlobal [ _Item, round (1 + random 2)]; _Color = "colorRed";_Text = "Mags";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 616): { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorBlue";_Text = "Nvg";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4096) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWEST";_Text = "Items";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWhite";_Text = "Weapon Attachments";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 0) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items";}; }; }else{ _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items"; }; }; //________________ Type of Chemlight and Smoke ________________ _Chemlight1 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight1 attachTo [_Cargo, [0,0.5,-0.4]]; _Chemlight2 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight2 attachTo [_Cargo, [0,-0.5,-0.4]]; _Smoke = "SmokeShellRed" createVehicle (position _Cargo); _Smoke attachTo [_Cargo, [0,0,0]]; _Smoke2 = "SmokeShellRed" createVehicle (position _Cargo); _Smoke2 attachTo [_Cargo, [0,0,0.5]]; waitUntil {getPos _Cargo select 2 < 4}; _vel = velocity _Cargo; _Cargo setVelocity _vel; waitUntil {getPos _Cargo select 2 < 0}; playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss",_Cargo]; detach _Cargo; _parachute disableCollisionWith _Cargo; _time = time + 6; waitUntil {time > _time}; if(!isNull _parachute)then{deleteVehicle _parachute}; _Cargo enableSimulation true; //________________ Spawn a Group at the Airdrops ________________ if(GF_ALA_Spawn_Enemy)then{ // systemchat "GF_ALA_Spawn_Enemy"; _pos_Spawn = [[[_pos, 50 + random 250]],["water"]] call BIS_fnc_randomPos; GF_ALA_Group = createGroup GF_ALA_Enemy_Side; for "_x" from 0 to (GF_ALA_Squad_Members + floor random GF_ALA_Squad_Members_random) do{ _unit = GF_ALA_Group createunit [selectRandom GF_ALA_Pool_Infantry,_pos_Spawn,[],0,"None"]; [_unit] JoinSilent GF_ALA_Group; (leader GF_ALA_Group) setSkill GF_ALA_set_AiSkill + random GF_ALA_set_AiSkill_random; _unit setVariable["Var_GF_ALA",true]; }; [GF_ALA_Group,_pos,GF_ALA_Patrol_distance + random GF_ALA_Patrol_distance_random] call BIS_fnc_taskPatrol; }; //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["area_%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerSize [625,625]; _Marker2_id = format ["text_%1",_pos]; _Marker2 = createMarker [_Marker2_id,_pos]; _Marker2 setMarkerShape "ICON"; _Marker2 setMarkerType "mil_warning"; _Marker2 setMarkerColor "ColorBlack"; _Marker2 setMarkerText format ["WEAPON DROP",_a]; _Marker2 setMarkerSize [0.5,0.5]; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP AREA LOCATED</t>"] remoteExec ["life_fnc_broadcast",0]; }; _time_to_delete = time + GF_ALA_time_to_delete; waitUntil {time > _time_to_delete}; deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP DESTROYED</t>"] remoteExec ["life_fnc_broadcast",0]; if(GF_ALA_Spawn_Enemy)then{ { if(_x getVariable ["Var_GF_ALA",false])then{ deletevehicle _x; }; }foreach units GF_ALA_Group; }; }; if(GF_ALA_Systemchat_info)then{ systemchat "GF_Auto_Loot_Airdrops Script initialized"; }; diag_log "//________________ GF_Auto_Loot_Airdrop Script initialized ________________"; 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 10, 2019 49 minutes ago, Steel_Dragon said: (The custom script is below. Thank you. Hold on let me check this ! Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 11, 2019 21 minutes ago, GEORGE FLOROS GR said: Hold on let me check this ! Thank you 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 11, 2019 Check the settings. You need to adjust the : ex: GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 Spoiler //________________ Author : GEORGE FLOROS [GR] ___________ 23.12.18 _____________ diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = false; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 GF_ALA_height_of_drop = 30; // 1 = 1m GF_ALA_Spawned_Items_Number = 10; // number of ITEMS GF_ALA_Spawned_Items_Number_random = 0; // number of random ITEMS //GF_ALA_Select --> 1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only GF_ALA_Select = 4; GF_ALA_Blacklist_Zone_distance = 2500; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 2500; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = false; // Spawn Enemy at the site GF_ALA_Enemy_Side = east; // This is for Normal Spawn and EOS , NOT for the DAC units GF_ALA_Squad_Members = 5; // + floor random 5 below GF_ALA_Squad_Members_random = 5; GF_ALA_set_AiSkill = 0.50; GF_ALA_set_AiSkill_random = 0.50; GF_ALA_Patrol_distance = 100; // The distance for BIS_fnc_taskPatrol GF_ALA_Patrol_distance_random = 250; // GF_ALA_Cargo_array - can be any object or vehicle GF_ALA_Cargo_array = [ "I_CargoNet_01_ammo_F", "O_CargoNet_01_ammo_F", "B_CargoNet_01_ammo_F" ]; //________________ Add here your Blacklist Zones ( for more ) , these are included in the 3D editor to copy paste to your mission ________________ GF_ALA_Blacklist_Zone_1 = getMarkerPos "Athira_City_Limits_Marker"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "Kavala_City_Limits_Marker"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "Pyrgos_City_Limits_Marker"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "Sofia_City_Limits_Marker"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "hunting_zone"; //________________ Enemy Array ________________ GF_ALA_Pool_Infantry = [ "O_G_officer_F","O_G_Soldier_SL_F","O_G_Soldier_TL_F","O_G_medic_F","O_G_engineer_F","O_G_Soldier_exp_F","O_G_Soldier_GL_F", "O_G_Soldier_M_F","O_G_Soldier_LAT_F","O_G_Soldier_A_F","O_G_Soldier_F","O_G_Soldier_lite_F","O_G_Sharpshooter_F", "O_G_Soldier_universal_F" ]; if(GF_ALA_Systemchat_info)then{ systemchat "GF Auto Loot Airdrops Script initializing"; }; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; GF_ALA_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); GF_ALA_size = worldsize; //________________ Array ________________ /* //________________ GF_ALA_Binocular_and_Nvg_array Binocular and Nvg slot ________________ It might be needed , to add also the mods , that you want to blacklist , in the GF_ALA_Assignable_Items_Mod_Blacklist in case that the GF_ALA_Attachments_array , generates also items from the blacklisted mods. To check this , uncomment the line that you will find below (in case : % ) , depending the selection GF_ALA_Select copyToClipboard str GF_ALA_Binocular_and_Nvg_array; then run the mission and it will copy the generated array , then ctrl + v to paste the array. The "mcc_sandbox_a3" mod will generate items that they are not Binocular or Nvg. */ GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist = [ "mcc_sandbox_a3", "CUP_Weapons" // Example ]; //________________ case ________________ _Array_Loaded = false; _Select_items_Loaded = false; private ["_items_case"]; switch (GF_ALA_Select) do{ case 1 : { //________________ Load every Mod + Bohemia items ________________ GF_ALA_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod + Bohemia items"; _Select_items_Loaded = true; }; case 2 : { //________________ Load every Mod / No Bohemia items ________________ GF_ALA_primaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod - No Bohemia items"; _Select_items_Loaded = true; }; case 3 : { //________________ Bohemia items Only ________________ GF_ALA_primaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getText( _x >> 'author' ) == 'Bohemia Interactive' && (!(getText( _x >> 'DLC' ) in GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist)) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load Bohemia items Only"; _Select_items_Loaded = true; }; case 4 : { /* //________________ Custom items only ________________ It is posible to add everything to one array and the code below will manage the spawn , GF_ALA_cfgArray = []; But then delete the arrays and their count below */ // add the classnames ex: GF_ALA_primaryWeapon_array = ["srifle_DMR_06_olive_F","srifle_DMR_03_woodland_F","arifle_MXM_F","arifle_MX_SW_khk_F","arifle_Mk20_F","srifle_EBR_F","srifle_LRR_tna_F","LMG_Mk200_F","LMG_Zafir_F","arifle_CTARS_hex_F","arifle_SPAR_02_khk_F","SMG_02_F","arifle_Katiba_F","SMG_01_F"]; GF_ALA_secondaryWeapon_array = [""]; GF_ALA_handgunWeapon_array = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F"]; GF_ALA_Magazines_array = ["20Rnd_762x51_Mag","20Rnd_762x51_Mag","30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","20Rnd_762x51_Mag","7Rnd_408_Mag","200Rnd_65x39_cased_Box","150Rnd_762x54_Box","30Rnd_580x42_Mag_F","150Rnd_556x45_Drum_Mag_F","30Rnd_9x21_Mag_SMG_02","30Rnd_65x39_caseless_green","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag"]; GF_ALA_Uniform_array = ["U_B_FullGhillie_lsh"]; GF_ALA_Vests_array = [""]; GF_ALA_Headgear_array = [""]; GF_ALA_Backpacks_array = ["B_Bergen_dgtl_F"]; // B_Bergen_tna_F - B_Bergen_mcamo_F - B_Bergen_dgtl_F - B_Bergen_hex_F GF_ALA_Goggles_array = [""]; GF_ALA_Items_array = [""]; GF_ALA_Attachments_array = ["optic_KHS_blk","optic_LRPS_ghex_F","optic_Arco_blk_F","optic_Holosight_blk_F"]; GF_ALA_Binocular_and_Nvg_array = [""]; _items_case = "Custom items only"; _Select_items_Loaded = true; }; }; //________________ _Array_Loaded ________________ waituntil {_Select_items_Loaded}; _Array_Loaded = true; if(GF_ALA_Hintsilent_info)then{ hintsilent format ["%1",_items_case]; }; if(GF_ALA_diag_log_info)then{ diag_log format ["%1",_items_case]; }; GF_ALA_cfgArray = GF_ALA_primaryWeapon_array + GF_ALA_secondaryWeapon_array + GF_ALA_handgunWeapon_array + GF_ALA_Magazines_array + GF_ALA_Uniform_array + GF_ALA_Vests_array + GF_ALA_Headgear_array + GF_ALA_Backpacks_array + GF_ALA_Goggles_array + GF_ALA_Items_array + GF_ALA_Attachments_array + GF_ALA_Binocular_and_Nvg_array; waituntil {_Array_Loaded}; ////////////////////////////////////////////////////////////////////////////////// private ["_marker","_marker2","_x","_a","_pos"]; _x = 0; _a = 0; //________________ Number of the Airdrops ________________ while {true} do{ _drop_in_sec = time + GF_ALA_next_drop_in_sec; waitUntil {time > _drop_in_sec}; _a = _a + 1; //________________ Find Airdrops Position ________________ _Found = false; while {!_Found} do{ _pos = [] call BIS_fnc_randomPos; _nearestRoad = [_pos, 50] call BIS_fnc_nearestRoad; _nearest_House = nearestObject [_pos, "House"]; _nearest_Building = nearestObject [_pos, "Building"]; if( //________________ Add Blacklist Distance from all Players ________________ (({((_pos distance _x) <= GF_ALA_Distanse_from_Players)} count GF_ALA_allPlayers) isEqualTo 0) //________________ Add here your Blacklist Zones ( for more ) ________________ && ((_pos distance GF_ALA_Blacklist_Zone_1) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_2) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_3) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_4) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_5) > GF_ALA_Blacklist_Zone_distance) //________________ uncomment to add Distance from _nearestRoad - House - Building ________________ && ((_pos distance _nearestRoad) > 50) && ((_pos distance _nearest_House) > 100) && ((_pos distance _nearest_Building) > 100) )then{ _Found = true; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }else{ _Found = false; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }; }; waituntil {_Found}; //________________ Cargo ________________ _parachute = createVehicle ["B_Parachute_02_F",_pos, [], 0, "FLY"]; waituntil{!isNull _parachute}; _parachute setPosATL [getPosATL _parachute select 0, getPosATL _parachute select 1, GF_ALA_height_of_drop]; _Cargo_array = selectRandom GF_ALA_Cargo_array; _Cargo = createVehicle [_Cargo_array, position _parachute, [], 0, 'NONE']; waituntil{!isNull _Cargo}; _Cargo attachTo [_parachute,[0,0,0]]; _Cargo enableSimulation false; //________________ clear _Cargo ________________ clearItemCargoGlobal _Cargo; clearWeaponCargoGlobal _Cargo; clearMagazineCargoGlobal _Cargo; //________________ Sound of plane flying above ________________ // https://community.bistudio.com/wiki/Arma_3:_SoundFiles playSound3D ["A3\Sounds_F\ambient\battlefield\battlefield_jet1.wss", _Cargo]; /* _Plane_sound = selectrandom[ "GF_ALA_Plane_1", "GF_ALA_Plane_2", "GF_ALA_Plane_3" ]; publicVariable _Plane_sound; _Plane_sound remoteExec ["playSound"]; */ //________________ Spawn Loot ________________ for "_i" from 1 to GF_ALA_Spawned_Items_Number + random GF_ALA_Spawned_Items_Number_random do{ //________________ Position of the loot at the Airdrops ________________////////////////////////////////////// _Loot_pos = _pos getPos [ 6 + random 200, // distance from centre//////////////////////////////////////////////////// random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; _Item = selectRandom GF_ALA_cfgArray; _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass"); _Loot = _Cargo; _Color = "Default"; // https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3 _Text = "Empty"; // https://forums.bohemia.net/forums/topic/193019-can-i-detect-all-pistols-from-cfgweapons/?tab=comments#comment-3072020 _type = [0,1,2,4,16,256,4096,131072]; if( (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in [ 0 , 616 ]) or (isClass (configFile >> "CfgGlasses" >> _Item)) or (isClass (configFile >> "CfgMagazines" >> _Item)) )then{ switch true do{ //________________ Gear ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 801) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGUER";_Text = "Uniforms";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 701) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorKhaki";_Text = "Vests";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 605) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGreen";_Text = "Headgear";}; case(_getText isEqualTo "Backpacks") : { _Loot addBackPackCargoGlobal [ _Item, 1 ]; _Color = "ColorBrown";_Text = "Backpacks";}; case(isClass (configFile >> "CfgGlasses" >> _Item)) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorCivilian";_Text = "Glasses";}; //________________ Weapons ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorEAST";_Text = "WeaponsPrimary";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorPink";_Text = "HandGuns";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorOrange";_Text = "WeaponsSecondary";}; case(isClass (configFile >> "CfgMagazines" >> _Item)) : { _Loot addMagazineCargoGlobal [ _Item, round (1 + random 2)]; _Color = "colorRed";_Text = "Mags";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 616): { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorBlue";_Text = "Nvg";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4096) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWEST";_Text = "Items";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWhite";_Text = "Weapon Attachments";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 0) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items";}; }; }else{ _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items"; }; }; //________________ Type of Chemlight and Smoke ________________ _Chemlight1 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight1 attachTo [_Cargo, [0,0.5,-0.4]]; _Chemlight2 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight2 attachTo [_Cargo, [0,-0.5,-0.4]]; _Smoke = "SmokeShellRed" createVehicle (position _Cargo); _Smoke attachTo [_Cargo, [0,0,0]]; _Smoke2 = "SmokeShellRed" createVehicle (position _Cargo); _Smoke2 attachTo [_Cargo, [0,0,0.5]]; waitUntil {getPos _Cargo select 2 < 4}; _vel = velocity _Cargo; _Cargo setVelocity _vel; waitUntil {getPos _Cargo select 2 < 0}; playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss",_Cargo]; detach _Cargo; _parachute disableCollisionWith _Cargo; _time = time + 6; waitUntil {time > _time}; if(!isNull _parachute)then{deleteVehicle _parachute}; _Cargo enableSimulation true; //________________ Spawn a Group at the Airdrops ________________ if(GF_ALA_Spawn_Enemy)then{ // systemchat "GF_ALA_Spawn_Enemy"; _pos_Spawn = [[[_pos, 50 + random 250]],["water"]] call BIS_fnc_randomPos; GF_ALA_Group = createGroup GF_ALA_Enemy_Side; for "_x" from 0 to (GF_ALA_Squad_Members + floor random GF_ALA_Squad_Members_random) do{ _unit = GF_ALA_Group createunit [selectRandom GF_ALA_Pool_Infantry,_pos_Spawn,[],0,"None"]; [_unit] JoinSilent GF_ALA_Group; (leader GF_ALA_Group) setSkill GF_ALA_set_AiSkill + random GF_ALA_set_AiSkill_random; _unit setVariable["Var_GF_ALA",true]; }; [GF_ALA_Group,_pos,GF_ALA_Patrol_distance + random GF_ALA_Patrol_distance_random] call BIS_fnc_taskPatrol; }; //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["area_%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerSize [625,625]; _Marker2_id = format ["text_%1",_pos]; _Marker2 = createMarker [_Marker2_id,_pos]; _Marker2 setMarkerShape "ICON"; _Marker2 setMarkerType "mil_warning"; _Marker2 setMarkerColor "ColorBlack"; _Marker2 setMarkerText format ["WEAPON DROP",_a]; _Marker2 setMarkerSize [0.5,0.5]; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP AREA LOCATED</t>"] remoteExec ["life_fnc_broadcast",0]; }; _time_to_delete = time + GF_ALA_time_to_delete; waitUntil {time > _time_to_delete}; deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; deletevehicle _Chemlight1; deletevehicle _Chemlight2; deletevehicle _Smoke; deletevehicle _Smoke2; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP DESTROYED</t>"] remoteExec ["life_fnc_broadcast",0]; if(GF_ALA_Spawn_Enemy)then{ { if(_x getVariable ["Var_GF_ALA",false])then{ deletevehicle _x; }; }foreach units GF_ALA_Group; }; }; if(GF_ALA_Systemchat_info)then{ systemchat "GF_Auto_Loot_Airdrops Script initialized"; }; diag_log "//________________ GF_Auto_Loot_Airdrop Script initialized ________________"; 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 11, 2019 also add : deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; deletevehicle _Chemlight1; deletevehicle _Chemlight2; deletevehicle _Smoke; deletevehicle _Smoke2; 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 11, 2019 12 hours ago, GEORGE FLOROS GR said: Check the settings. You need to adjust the : ex: GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 Reveal hidden contents //________________ Author : GEORGE FLOROS [GR] ___________ 23.12.18 _____________ diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = false; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 GF_ALA_height_of_drop = 30; // 1 = 1m GF_ALA_Spawned_Items_Number = 10; // number of ITEMS GF_ALA_Spawned_Items_Number_random = 0; // number of random ITEMS //GF_ALA_Select --> 1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only GF_ALA_Select = 4; GF_ALA_Blacklist_Zone_distance = 2500; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 2500; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = false; // Spawn Enemy at the site GF_ALA_Enemy_Side = east; // This is for Normal Spawn and EOS , NOT for the DAC units GF_ALA_Squad_Members = 5; // + floor random 5 below GF_ALA_Squad_Members_random = 5; GF_ALA_set_AiSkill = 0.50; GF_ALA_set_AiSkill_random = 0.50; GF_ALA_Patrol_distance = 100; // The distance for BIS_fnc_taskPatrol GF_ALA_Patrol_distance_random = 250; // GF_ALA_Cargo_array - can be any object or vehicle GF_ALA_Cargo_array = [ "I_CargoNet_01_ammo_F", "O_CargoNet_01_ammo_F", "B_CargoNet_01_ammo_F" ]; //________________ Add here your Blacklist Zones ( for more ) , these are included in the 3D editor to copy paste to your mission ________________ GF_ALA_Blacklist_Zone_1 = getMarkerPos "Athira_City_Limits_Marker"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "Kavala_City_Limits_Marker"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "Pyrgos_City_Limits_Marker"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "Sofia_City_Limits_Marker"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "hunting_zone"; //________________ Enemy Array ________________ GF_ALA_Pool_Infantry = [ "O_G_officer_F","O_G_Soldier_SL_F","O_G_Soldier_TL_F","O_G_medic_F","O_G_engineer_F","O_G_Soldier_exp_F","O_G_Soldier_GL_F", "O_G_Soldier_M_F","O_G_Soldier_LAT_F","O_G_Soldier_A_F","O_G_Soldier_F","O_G_Soldier_lite_F","O_G_Sharpshooter_F", "O_G_Soldier_universal_F" ]; if(GF_ALA_Systemchat_info)then{ systemchat "GF Auto Loot Airdrops Script initializing"; }; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; GF_ALA_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); GF_ALA_size = worldsize; //________________ Array ________________ /* //________________ GF_ALA_Binocular_and_Nvg_array Binocular and Nvg slot ________________ It might be needed , to add also the mods , that you want to blacklist , in the GF_ALA_Assignable_Items_Mod_Blacklist in case that the GF_ALA_Attachments_array , generates also items from the blacklisted mods. To check this , uncomment the line that you will find below (in case : % ) , depending the selection GF_ALA_Select copyToClipboard str GF_ALA_Binocular_and_Nvg_array; then run the mission and it will copy the generated array , then ctrl + v to paste the array. The "mcc_sandbox_a3" mod will generate items that they are not Binocular or Nvg. */ GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist = [ "mcc_sandbox_a3", "CUP_Weapons" // Example ]; //________________ case ________________ _Array_Loaded = false; _Select_items_Loaded = false; private ["_items_case"]; switch (GF_ALA_Select) do{ case 1 : { //________________ Load every Mod + Bohemia items ________________ GF_ALA_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod + Bohemia items"; _Select_items_Loaded = true; }; case 2 : { //________________ Load every Mod / No Bohemia items ________________ GF_ALA_primaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod - No Bohemia items"; _Select_items_Loaded = true; }; case 3 : { //________________ Bohemia items Only ________________ GF_ALA_primaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getText( _x >> 'author' ) == 'Bohemia Interactive' && (!(getText( _x >> 'DLC' ) in GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist)) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load Bohemia items Only"; _Select_items_Loaded = true; }; case 4 : { /* //________________ Custom items only ________________ It is posible to add everything to one array and the code below will manage the spawn , GF_ALA_cfgArray = []; But then delete the arrays and their count below */ // add the classnames ex: GF_ALA_primaryWeapon_array = ["srifle_DMR_06_olive_F","srifle_DMR_03_woodland_F","arifle_MXM_F","arifle_MX_SW_khk_F","arifle_Mk20_F","srifle_EBR_F","srifle_LRR_tna_F","LMG_Mk200_F","LMG_Zafir_F","arifle_CTARS_hex_F","arifle_SPAR_02_khk_F","SMG_02_F","arifle_Katiba_F","SMG_01_F"]; GF_ALA_secondaryWeapon_array = [""]; GF_ALA_handgunWeapon_array = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F"]; GF_ALA_Magazines_array = ["20Rnd_762x51_Mag","20Rnd_762x51_Mag","30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","20Rnd_762x51_Mag","7Rnd_408_Mag","200Rnd_65x39_cased_Box","150Rnd_762x54_Box","30Rnd_580x42_Mag_F","150Rnd_556x45_Drum_Mag_F","30Rnd_9x21_Mag_SMG_02","30Rnd_65x39_caseless_green","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag"]; GF_ALA_Uniform_array = ["U_B_FullGhillie_lsh"]; GF_ALA_Vests_array = [""]; GF_ALA_Headgear_array = [""]; GF_ALA_Backpacks_array = ["B_Bergen_dgtl_F"]; // B_Bergen_tna_F - B_Bergen_mcamo_F - B_Bergen_dgtl_F - B_Bergen_hex_F GF_ALA_Goggles_array = [""]; GF_ALA_Items_array = [""]; GF_ALA_Attachments_array = ["optic_KHS_blk","optic_LRPS_ghex_F","optic_Arco_blk_F","optic_Holosight_blk_F"]; GF_ALA_Binocular_and_Nvg_array = [""]; _items_case = "Custom items only"; _Select_items_Loaded = true; }; }; //________________ _Array_Loaded ________________ waituntil {_Select_items_Loaded}; _Array_Loaded = true; if(GF_ALA_Hintsilent_info)then{ hintsilent format ["%1",_items_case]; }; if(GF_ALA_diag_log_info)then{ diag_log format ["%1",_items_case]; }; GF_ALA_cfgArray = GF_ALA_primaryWeapon_array + GF_ALA_secondaryWeapon_array + GF_ALA_handgunWeapon_array + GF_ALA_Magazines_array + GF_ALA_Uniform_array + GF_ALA_Vests_array + GF_ALA_Headgear_array + GF_ALA_Backpacks_array + GF_ALA_Goggles_array + GF_ALA_Items_array + GF_ALA_Attachments_array + GF_ALA_Binocular_and_Nvg_array; waituntil {_Array_Loaded}; ////////////////////////////////////////////////////////////////////////////////// private ["_marker","_marker2","_x","_a","_pos"]; _x = 0; _a = 0; //________________ Number of the Airdrops ________________ while {true} do{ _drop_in_sec = time + GF_ALA_next_drop_in_sec; waitUntil {time > _drop_in_sec}; _a = _a + 1; //________________ Find Airdrops Position ________________ _Found = false; while {!_Found} do{ _pos = [] call BIS_fnc_randomPos; _nearestRoad = [_pos, 50] call BIS_fnc_nearestRoad; _nearest_House = nearestObject [_pos, "House"]; _nearest_Building = nearestObject [_pos, "Building"]; if( //________________ Add Blacklist Distance from all Players ________________ (({((_pos distance _x) <= GF_ALA_Distanse_from_Players)} count GF_ALA_allPlayers) isEqualTo 0) //________________ Add here your Blacklist Zones ( for more ) ________________ && ((_pos distance GF_ALA_Blacklist_Zone_1) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_2) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_3) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_4) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_5) > GF_ALA_Blacklist_Zone_distance) //________________ uncomment to add Distance from _nearestRoad - House - Building ________________ && ((_pos distance _nearestRoad) > 50) && ((_pos distance _nearest_House) > 100) && ((_pos distance _nearest_Building) > 100) )then{ _Found = true; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }else{ _Found = false; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }; }; waituntil {_Found}; //________________ Cargo ________________ _parachute = createVehicle ["B_Parachute_02_F",_pos, [], 0, "FLY"]; waituntil{!isNull _parachute}; _parachute setPosATL [getPosATL _parachute select 0, getPosATL _parachute select 1, GF_ALA_height_of_drop]; _Cargo_array = selectRandom GF_ALA_Cargo_array; _Cargo = createVehicle [_Cargo_array, position _parachute, [], 0, 'NONE']; waituntil{!isNull _Cargo}; _Cargo attachTo [_parachute,[0,0,0]]; _Cargo enableSimulation false; //________________ clear _Cargo ________________ clearItemCargoGlobal _Cargo; clearWeaponCargoGlobal _Cargo; clearMagazineCargoGlobal _Cargo; //________________ Sound of plane flying above ________________ // https://community.bistudio.com/wiki/Arma_3:_SoundFiles playSound3D ["A3\Sounds_F\ambient\battlefield\battlefield_jet1.wss", _Cargo]; /* _Plane_sound = selectrandom[ "GF_ALA_Plane_1", "GF_ALA_Plane_2", "GF_ALA_Plane_3" ]; publicVariable _Plane_sound; _Plane_sound remoteExec ["playSound"]; */ //________________ Spawn Loot ________________ for "_i" from 1 to GF_ALA_Spawned_Items_Number + random GF_ALA_Spawned_Items_Number_random do{ //________________ Position of the loot at the Airdrops ________________////////////////////////////////////// _Loot_pos = _pos getPos [ 6 + random 200, // distance from centre//////////////////////////////////////////////////// random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; _Item = selectRandom GF_ALA_cfgArray; _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass"); _Loot = _Cargo; _Color = "Default"; // https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3 _Text = "Empty"; // https://forums.bohemia.net/forums/topic/193019-can-i-detect-all-pistols-from-cfgweapons/?tab=comments#comment-3072020 _type = [0,1,2,4,16,256,4096,131072]; if( (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in [ 0 , 616 ]) or (isClass (configFile >> "CfgGlasses" >> _Item)) or (isClass (configFile >> "CfgMagazines" >> _Item)) )then{ switch true do{ //________________ Gear ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 801) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGUER";_Text = "Uniforms";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 701) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorKhaki";_Text = "Vests";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 605) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGreen";_Text = "Headgear";}; case(_getText isEqualTo "Backpacks") : { _Loot addBackPackCargoGlobal [ _Item, 1 ]; _Color = "ColorBrown";_Text = "Backpacks";}; case(isClass (configFile >> "CfgGlasses" >> _Item)) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorCivilian";_Text = "Glasses";}; //________________ Weapons ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorEAST";_Text = "WeaponsPrimary";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorPink";_Text = "HandGuns";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorOrange";_Text = "WeaponsSecondary";}; case(isClass (configFile >> "CfgMagazines" >> _Item)) : { _Loot addMagazineCargoGlobal [ _Item, round (1 + random 2)]; _Color = "colorRed";_Text = "Mags";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 616): { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorBlue";_Text = "Nvg";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4096) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWEST";_Text = "Items";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWhite";_Text = "Weapon Attachments";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 0) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items";}; }; }else{ _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items"; }; }; //________________ Type of Chemlight and Smoke ________________ _Chemlight1 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight1 attachTo [_Cargo, [0,0.5,-0.4]]; _Chemlight2 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight2 attachTo [_Cargo, [0,-0.5,-0.4]]; _Smoke = "SmokeShellRed" createVehicle (position _Cargo); _Smoke attachTo [_Cargo, [0,0,0]]; _Smoke2 = "SmokeShellRed" createVehicle (position _Cargo); _Smoke2 attachTo [_Cargo, [0,0,0.5]]; waitUntil {getPos _Cargo select 2 < 4}; _vel = velocity _Cargo; _Cargo setVelocity _vel; waitUntil {getPos _Cargo select 2 < 0}; playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss",_Cargo]; detach _Cargo; _parachute disableCollisionWith _Cargo; _time = time + 6; waitUntil {time > _time}; if(!isNull _parachute)then{deleteVehicle _parachute}; _Cargo enableSimulation true; //________________ Spawn a Group at the Airdrops ________________ if(GF_ALA_Spawn_Enemy)then{ // systemchat "GF_ALA_Spawn_Enemy"; _pos_Spawn = [[[_pos, 50 + random 250]],["water"]] call BIS_fnc_randomPos; GF_ALA_Group = createGroup GF_ALA_Enemy_Side; for "_x" from 0 to (GF_ALA_Squad_Members + floor random GF_ALA_Squad_Members_random) do{ _unit = GF_ALA_Group createunit [selectRandom GF_ALA_Pool_Infantry,_pos_Spawn,[],0,"None"]; [_unit] JoinSilent GF_ALA_Group; (leader GF_ALA_Group) setSkill GF_ALA_set_AiSkill + random GF_ALA_set_AiSkill_random; _unit setVariable["Var_GF_ALA",true]; }; [GF_ALA_Group,_pos,GF_ALA_Patrol_distance + random GF_ALA_Patrol_distance_random] call BIS_fnc_taskPatrol; }; //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["area_%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerSize [625,625]; _Marker2_id = format ["text_%1",_pos]; _Marker2 = createMarker [_Marker2_id,_pos]; _Marker2 setMarkerShape "ICON"; _Marker2 setMarkerType "mil_warning"; _Marker2 setMarkerColor "ColorBlack"; _Marker2 setMarkerText format ["WEAPON DROP",_a]; _Marker2 setMarkerSize [0.5,0.5]; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP AREA LOCATED</t>"] remoteExec ["life_fnc_broadcast",0]; }; _time_to_delete = time + GF_ALA_time_to_delete; waitUntil {time > _time_to_delete}; deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; deletevehicle _Chemlight1; deletevehicle _Chemlight2; deletevehicle _Smoke; deletevehicle _Smoke2; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP DESTROYED</t>"] remoteExec ["life_fnc_broadcast",0]; if(GF_ALA_Spawn_Enemy)then{ { if(_x getVariable ["Var_GF_ALA",false])then{ deletevehicle _x; }; }foreach units GF_ALA_Group; }; }; if(GF_ALA_Systemchat_info)then{ systemchat "GF_Auto_Loot_Airdrops Script initialized"; }; diag_log "//________________ GF_Auto_Loot_Airdrop Script initialized ________________"; ok i will try thanks. So this will control the amount? as i only want 1 every 2 hours. As i had it they were spawning at the correct time and deleting also - but there were numerous drops not just 1. When using 5 sec drops time and 30 sec destroy it works (1 drop every 5 seconds and delete in 30 seconds). Over a longer period of time it seems to double the drops every time it loops. This is the setting i am using - GF_ALA_next_drop_in_sec = 3600; // Drop every 2 hours = 7200 (I assume this is in seconds) GF_ALA_time_to_delete = 1200; // time_to_delete the current zone - 20 mins = 1200 (I assume this is in seconds) I am doing some experimentation. i noticed that the original drop time was 5 and the delete time was 30... this is opposite to mine. i have worked out 5 x 6 = 30... so there for i have got my spawn time as - 3600 and delete time is 3600 x 6 = 21600... hoping this will fix the multiple spawns. . 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 12, 2019 On 10/11/2019 at 3:52 AM, Steel_Dragon said: I am doing some experimentation. i noticed that the original drop time was 5 and the delete time was 30... this is opposite to mine. i have worked out 5 x 6 = 30... so there for i have got my spawn time as - 3600 and delete time is 3600 x 6 = 21600... hoping this will fix the multiple spawns. The whole script should wait since there is the waitUntil : On 10/11/2019 at 3:24 AM, GEORGE FLOROS GR said: waitUntil {time > _time_to_delete}; Have you notice a second active zone ? Because as i tested ( with the 5 and 30 sec ) there wasn't any. 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 13, 2019 10 hours ago, GEORGE FLOROS GR said: The whole script should wait since there is the waitUntil : Have you notice a second active zone ? Because as i tested ( with the 5 and 30 sec ) there wasn't any. There is but it takes longer than the time. It seems to double the time each time the script loops. or do you mean a second zone that comes with the first one? Yes it works with the timer on a lower value but when the timer is set for 1 hour or 2 hour drops others appear. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 13, 2019 I'll add a code later that should do the job ! 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 13, 2019 3 hours ago, GEORGE FLOROS GR said: I'll add a code later that should do the job ! Thank you. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 13, 2019 9 hours ago, Steel_Dragon said: Thank you. try : Spoiler //________________ Author : GEORGE FLOROS [GR] ___________ 14.10.19 _____________ //EDITED for LIFE Server diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = false; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 GF_ALA_height_of_drop = 30; // 1 = 1m GF_ALA_Spawned_Items_Number = 10; // number of ITEMS GF_ALA_Spawned_Items_Number_random = 0; // number of random ITEMS //GF_ALA_Select --> 1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only GF_ALA_Select = 4; GF_ALA_Blacklist_Zone_distance = 2500; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 2500; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = false; // Spawn Enemy at the site GF_ALA_Enemy_Side = east; // This is for Normal Spawn and EOS , NOT for the DAC units GF_ALA_Squad_Members = 5; // + floor random 5 below GF_ALA_Squad_Members_random = 5; GF_ALA_set_AiSkill = 0.50; GF_ALA_set_AiSkill_random = 0.50; GF_ALA_Patrol_distance = 100; // The distance for BIS_fnc_taskPatrol GF_ALA_Patrol_distance_random = 250; // GF_ALA_Cargo_array - can be any object or vehicle GF_ALA_Cargo_array = [ "I_CargoNet_01_ammo_F", "O_CargoNet_01_ammo_F", "B_CargoNet_01_ammo_F" ]; //________________ Add here your Blacklist Zones ( for more ) , these are included in the 3D editor to copy paste to your mission ________________ GF_ALA_Blacklist_Zone_1 = getMarkerPos "Athira_City_Limits_Marker"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "Kavala_City_Limits_Marker"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "Pyrgos_City_Limits_Marker"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "Sofia_City_Limits_Marker"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "hunting_zone"; //________________ Enemy Array ________________ GF_ALA_Pool_Infantry = [ "O_G_officer_F","O_G_Soldier_SL_F","O_G_Soldier_TL_F","O_G_medic_F","O_G_engineer_F","O_G_Soldier_exp_F","O_G_Soldier_GL_F", "O_G_Soldier_M_F","O_G_Soldier_LAT_F","O_G_Soldier_A_F","O_G_Soldier_F","O_G_Soldier_lite_F","O_G_Sharpshooter_F", "O_G_Soldier_universal_F" ]; if(GF_ALA_Systemchat_info)then{ systemchat "GF Auto Loot Airdrops Script initializing"; }; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; GF_ALA_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); GF_ALA_size = worldsize; //________________ Array ________________ /* //________________ GF_ALA_Binocular_and_Nvg_array Binocular and Nvg slot ________________ It might be needed , to add also the mods , that you want to blacklist , in the GF_ALA_Assignable_Items_Mod_Blacklist in case that the GF_ALA_Attachments_array , generates also items from the blacklisted mods. To check this , uncomment the line that you will find below (in case : % ) , depending the selection GF_ALA_Select copyToClipboard str GF_ALA_Binocular_and_Nvg_array; then run the mission and it will copy the generated array , then ctrl + v to paste the array. The "mcc_sandbox_a3" mod will generate items that they are not Binocular or Nvg. */ GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist = [ "mcc_sandbox_a3", "CUP_Weapons" // Example ]; //________________ case ________________ _Array_Loaded = false; _Select_items_Loaded = false; private ["_items_case"]; switch (GF_ALA_Select) do{ case 1 : { //________________ Load every Mod + Bohemia items ________________ GF_ALA_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod + Bohemia items"; _Select_items_Loaded = true; }; case 2 : { //________________ Load every Mod / No Bohemia items ________________ GF_ALA_primaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod - No Bohemia items"; _Select_items_Loaded = true; }; case 3 : { //________________ Bohemia items Only ________________ GF_ALA_primaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getText( _x >> 'author' ) == 'Bohemia Interactive' && (!(getText( _x >> 'DLC' ) in GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist)) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load Bohemia items Only"; _Select_items_Loaded = true; }; case 4 : { /* //________________ Custom items only ________________ It is posible to add everything to one array and the code below will manage the spawn , GF_ALA_cfgArray = []; But then delete the arrays and their count below */ // add the classnames ex: GF_ALA_primaryWeapon_array = ["srifle_DMR_06_olive_F","srifle_DMR_03_woodland_F","arifle_MXM_F","arifle_MX_SW_khk_F","arifle_Mk20_F","srifle_EBR_F","srifle_LRR_tna_F","LMG_Mk200_F","LMG_Zafir_F","arifle_CTARS_hex_F","arifle_SPAR_02_khk_F","SMG_02_F","arifle_Katiba_F","SMG_01_F"]; GF_ALA_secondaryWeapon_array = [""]; GF_ALA_handgunWeapon_array = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F"]; GF_ALA_Magazines_array = ["20Rnd_762x51_Mag","20Rnd_762x51_Mag","30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","20Rnd_762x51_Mag","7Rnd_408_Mag","200Rnd_65x39_cased_Box","150Rnd_762x54_Box","30Rnd_580x42_Mag_F","150Rnd_556x45_Drum_Mag_F","30Rnd_9x21_Mag_SMG_02","30Rnd_65x39_caseless_green","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag"]; GF_ALA_Uniform_array = ["U_B_FullGhillie_lsh"]; GF_ALA_Vests_array = [""]; GF_ALA_Headgear_array = [""]; GF_ALA_Backpacks_array = ["B_Bergen_dgtl_F"]; // B_Bergen_tna_F - B_Bergen_mcamo_F - B_Bergen_dgtl_F - B_Bergen_hex_F GF_ALA_Goggles_array = [""]; GF_ALA_Items_array = [""]; GF_ALA_Attachments_array = ["optic_KHS_blk","optic_LRPS_ghex_F","optic_Arco_blk_F","optic_Holosight_blk_F"]; GF_ALA_Binocular_and_Nvg_array = [""]; _items_case = "Custom items only"; _Select_items_Loaded = true; }; }; //________________ _Array_Loaded ________________ waituntil {_Select_items_Loaded}; _Array_Loaded = true; if(GF_ALA_Hintsilent_info)then{ hintsilent format ["%1",_items_case]; }; if(GF_ALA_diag_log_info)then{ diag_log format ["%1",_items_case]; }; GF_ALA_cfgArray = GF_ALA_primaryWeapon_array + GF_ALA_secondaryWeapon_array + GF_ALA_handgunWeapon_array + GF_ALA_Magazines_array + GF_ALA_Uniform_array + GF_ALA_Vests_array + GF_ALA_Headgear_array + GF_ALA_Backpacks_array + GF_ALA_Goggles_array + GF_ALA_Items_array + GF_ALA_Attachments_array + GF_ALA_Binocular_and_Nvg_array; waituntil {_Array_Loaded}; ////////////////////////////////////////////////////////////////////////////////// private ["_marker","_marker2","_x","_a","_pos"]; _x = 0; _a = 0; //________________ Number of the Airdrops ________________ while {true} do{ uisleep GF_ALA_next_drop_in_sec; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; _a = _a + 1; //________________ Find Airdrops Position ________________ _Found = false; while {!_Found} do{ _pos = [] call BIS_fnc_randomPos; _nearestRoad = [_pos, 50] call BIS_fnc_nearestRoad; _nearest_House = nearestObject [_pos, "House"]; _nearest_Building = nearestObject [_pos, "Building"]; if( //________________ Add Blacklist Distance from all Players ________________ (({((_pos distance _x) <= GF_ALA_Distanse_from_Players)} count GF_ALA_allPlayers) isEqualTo 0) //________________ Add here your Blacklist Zones ( for more ) ________________ && ((_pos distance GF_ALA_Blacklist_Zone_1) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_2) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_3) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_4) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_5) > GF_ALA_Blacklist_Zone_distance) //________________ uncomment to add Distance from _nearestRoad - House - Building ________________ && ((_pos distance _nearestRoad) > 50) && ((_pos distance _nearest_House) > 100) && ((_pos distance _nearest_Building) > 100) )then{ _Found = true; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }else{ _Found = false; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }; }; waituntil {_Found}; //________________ Cargo ________________ _parachute = createVehicle ["B_Parachute_02_F",_pos, [], 0, "FLY"]; waituntil{!isNull _parachute}; _parachute setPosATL [getPosATL _parachute select 0, getPosATL _parachute select 1, GF_ALA_height_of_drop]; _Cargo_array = selectRandom GF_ALA_Cargo_array; _Cargo = createVehicle [_Cargo_array, position _parachute, [], 0, 'NONE']; waituntil{!isNull _Cargo}; _Cargo attachTo [_parachute,[0,0,0]]; _Cargo enableSimulation false; //________________ clear _Cargo ________________ clearItemCargoGlobal _Cargo; clearWeaponCargoGlobal _Cargo; clearMagazineCargoGlobal _Cargo; //________________ Sound of plane flying above ________________ // https://community.bistudio.com/wiki/Arma_3:_SoundFiles playSound3D ["A3\Sounds_F\ambient\battlefield\battlefield_jet1.wss", _Cargo]; /* _Plane_sound = selectrandom[ "GF_ALA_Plane_1", "GF_ALA_Plane_2", "GF_ALA_Plane_3" ]; publicVariable _Plane_sound; _Plane_sound remoteExec ["playSound"]; */ //________________ Spawn Loot ________________ for "_i" from 1 to GF_ALA_Spawned_Items_Number + random GF_ALA_Spawned_Items_Number_random do{ //________________ Position of the loot at the Airdrops ________________////////////////////////////////////// _Loot_pos = _pos getPos [ 6 + random 200, // distance from centre//////////////////////////////////////////////////// random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; _Item = selectRandom GF_ALA_cfgArray; _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass"); _Loot = _Cargo; _Color = "Default"; // https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3 _Text = "Empty"; // https://forums.bohemia.net/forums/topic/193019-can-i-detect-all-pistols-from-cfgweapons/?tab=comments#comment-3072020 _type = [0,1,2,4,16,256,4096,131072]; if( (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in [ 0 , 616 ]) or (isClass (configFile >> "CfgGlasses" >> _Item)) or (isClass (configFile >> "CfgMagazines" >> _Item)) )then{ switch true do{ //________________ Gear ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 801) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGUER";_Text = "Uniforms";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 701) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorKhaki";_Text = "Vests";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 605) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGreen";_Text = "Headgear";}; case(_getText isEqualTo "Backpacks") : { _Loot addBackPackCargoGlobal [ _Item, 1 ]; _Color = "ColorBrown";_Text = "Backpacks";}; case(isClass (configFile >> "CfgGlasses" >> _Item)) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorCivilian";_Text = "Glasses";}; //________________ Weapons ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorEAST";_Text = "WeaponsPrimary";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorPink";_Text = "HandGuns";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorOrange";_Text = "WeaponsSecondary";}; case(isClass (configFile >> "CfgMagazines" >> _Item)) : { _Loot addMagazineCargoGlobal [ _Item, round (1 + random 2)]; _Color = "colorRed";_Text = "Mags";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 616): { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorBlue";_Text = "Nvg";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4096) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWEST";_Text = "Items";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWhite";_Text = "Weapon Attachments";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 0) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items";}; }; }else{ _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items"; }; }; //________________ Type of Chemlight and Smoke ________________ _Chemlight1 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight1 attachTo [_Cargo, [0,0.5,-0.4]]; _Chemlight2 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight2 attachTo [_Cargo, [0,-0.5,-0.4]]; _Smoke = "SmokeShellRed" createVehicle (position _Cargo); _Smoke attachTo [_Cargo, [0,0,0]]; _Smoke2 = "SmokeShellRed" createVehicle (position _Cargo); _Smoke2 attachTo [_Cargo, [0,0,0.5]]; waitUntil {getPos _Cargo select 2 < 4}; _vel = velocity _Cargo; _Cargo setVelocity _vel; waitUntil {getPos _Cargo select 2 < 0}; playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss",_Cargo]; detach _Cargo; _parachute disableCollisionWith _Cargo; _time = time + 6; waitUntil {time > _time}; if(!isNull _parachute)then{deleteVehicle _parachute}; _Cargo enableSimulation true; //________________ Spawn a Group at the Airdrops ________________ if(GF_ALA_Spawn_Enemy)then{ // systemchat "GF_ALA_Spawn_Enemy"; _pos_Spawn = [[[_pos, 50 + random 250]],["water"]] call BIS_fnc_randomPos; GF_ALA_Group = createGroup GF_ALA_Enemy_Side; for "_x" from 0 to (GF_ALA_Squad_Members + floor random GF_ALA_Squad_Members_random) do{ _unit = GF_ALA_Group createunit [selectRandom GF_ALA_Pool_Infantry,_pos_Spawn,[],0,"None"]; [_unit] JoinSilent GF_ALA_Group; (leader GF_ALA_Group) setSkill GF_ALA_set_AiSkill + random GF_ALA_set_AiSkill_random; _unit setVariable["Var_GF_ALA",true]; }; [GF_ALA_Group,_pos,GF_ALA_Patrol_distance + random GF_ALA_Patrol_distance_random] call BIS_fnc_taskPatrol; }; //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["area_%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerSize [625,625]; _Marker2_id = format ["text_%1",_pos]; _Marker2 = createMarker [_Marker2_id,_pos]; _Marker2 setMarkerShape "ICON"; _Marker2 setMarkerType "mil_warning"; _Marker2 setMarkerColor "ColorBlack"; _Marker2 setMarkerText format ["WEAPON DROP",_a]; _Marker2 setMarkerSize [0.5,0.5]; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP AREA LOCATED</t>"] remoteExec ["life_fnc_broadcast",0]; }; uisleep GF_ALA_time_to_delete; deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; deletevehicle _Chemlight1; deletevehicle _Chemlight2; deletevehicle _Smoke; deletevehicle _Smoke2; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP DESTROYED</t>"] remoteExec ["life_fnc_broadcast",0]; if(GF_ALA_Spawn_Enemy)then{ { if(_x getVariable ["Var_GF_ALA",false])then{ deletevehicle _x; }; }foreach units GF_ALA_Group; }; }; if(GF_ALA_Systemchat_info)then{ systemchat "GF_Auto_Loot_Airdrops Script initialized"; }; diag_log "//________________ GF_Auto_Loot_Airdrop Script initialized ________________"; 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 14, 2019 4 hours ago, GEORGE FLOROS GR said: try : Hide contents //________________ Author : GEORGE FLOROS [GR] ___________ 14.10.19 _____________ //EDITED for LIFE Server diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = false; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 GF_ALA_height_of_drop = 30; // 1 = 1m GF_ALA_Spawned_Items_Number = 10; // number of ITEMS GF_ALA_Spawned_Items_Number_random = 0; // number of random ITEMS //GF_ALA_Select --> 1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only GF_ALA_Select = 4; GF_ALA_Blacklist_Zone_distance = 2500; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 2500; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = false; // Spawn Enemy at the site GF_ALA_Enemy_Side = east; // This is for Normal Spawn and EOS , NOT for the DAC units GF_ALA_Squad_Members = 5; // + floor random 5 below GF_ALA_Squad_Members_random = 5; GF_ALA_set_AiSkill = 0.50; GF_ALA_set_AiSkill_random = 0.50; GF_ALA_Patrol_distance = 100; // The distance for BIS_fnc_taskPatrol GF_ALA_Patrol_distance_random = 250; // GF_ALA_Cargo_array - can be any object or vehicle GF_ALA_Cargo_array = [ "I_CargoNet_01_ammo_F", "O_CargoNet_01_ammo_F", "B_CargoNet_01_ammo_F" ]; //________________ Add here your Blacklist Zones ( for more ) , these are included in the 3D editor to copy paste to your mission ________________ GF_ALA_Blacklist_Zone_1 = getMarkerPos "Athira_City_Limits_Marker"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "Kavala_City_Limits_Marker"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "Pyrgos_City_Limits_Marker"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "Sofia_City_Limits_Marker"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "hunting_zone"; //________________ Enemy Array ________________ GF_ALA_Pool_Infantry = [ "O_G_officer_F","O_G_Soldier_SL_F","O_G_Soldier_TL_F","O_G_medic_F","O_G_engineer_F","O_G_Soldier_exp_F","O_G_Soldier_GL_F", "O_G_Soldier_M_F","O_G_Soldier_LAT_F","O_G_Soldier_A_F","O_G_Soldier_F","O_G_Soldier_lite_F","O_G_Sharpshooter_F", "O_G_Soldier_universal_F" ]; if(GF_ALA_Systemchat_info)then{ systemchat "GF Auto Loot Airdrops Script initializing"; }; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; GF_ALA_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); GF_ALA_size = worldsize; //________________ Array ________________ /* //________________ GF_ALA_Binocular_and_Nvg_array Binocular and Nvg slot ________________ It might be needed , to add also the mods , that you want to blacklist , in the GF_ALA_Assignable_Items_Mod_Blacklist in case that the GF_ALA_Attachments_array , generates also items from the blacklisted mods. To check this , uncomment the line that you will find below (in case : % ) , depending the selection GF_ALA_Select copyToClipboard str GF_ALA_Binocular_and_Nvg_array; then run the mission and it will copy the generated array , then ctrl + v to paste the array. The "mcc_sandbox_a3" mod will generate items that they are not Binocular or Nvg. */ GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist = [ "mcc_sandbox_a3", "CUP_Weapons" // Example ]; //________________ case ________________ _Array_Loaded = false; _Select_items_Loaded = false; private ["_items_case"]; switch (GF_ALA_Select) do{ case 1 : { //________________ Load every Mod + Bohemia items ________________ GF_ALA_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod + Bohemia items"; _Select_items_Loaded = true; }; case 2 : { //________________ Load every Mod / No Bohemia items ________________ GF_ALA_primaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod - No Bohemia items"; _Select_items_Loaded = true; }; case 3 : { //________________ Bohemia items Only ________________ GF_ALA_primaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getText( _x >> 'author' ) == 'Bohemia Interactive' && (!(getText( _x >> 'DLC' ) in GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist)) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load Bohemia items Only"; _Select_items_Loaded = true; }; case 4 : { /* //________________ Custom items only ________________ It is posible to add everything to one array and the code below will manage the spawn , GF_ALA_cfgArray = []; But then delete the arrays and their count below */ // add the classnames ex: GF_ALA_primaryWeapon_array = ["srifle_DMR_06_olive_F","srifle_DMR_03_woodland_F","arifle_MXM_F","arifle_MX_SW_khk_F","arifle_Mk20_F","srifle_EBR_F","srifle_LRR_tna_F","LMG_Mk200_F","LMG_Zafir_F","arifle_CTARS_hex_F","arifle_SPAR_02_khk_F","SMG_02_F","arifle_Katiba_F","SMG_01_F"]; GF_ALA_secondaryWeapon_array = [""]; GF_ALA_handgunWeapon_array = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F"]; GF_ALA_Magazines_array = ["20Rnd_762x51_Mag","20Rnd_762x51_Mag","30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","20Rnd_762x51_Mag","7Rnd_408_Mag","200Rnd_65x39_cased_Box","150Rnd_762x54_Box","30Rnd_580x42_Mag_F","150Rnd_556x45_Drum_Mag_F","30Rnd_9x21_Mag_SMG_02","30Rnd_65x39_caseless_green","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag"]; GF_ALA_Uniform_array = ["U_B_FullGhillie_lsh"]; GF_ALA_Vests_array = [""]; GF_ALA_Headgear_array = [""]; GF_ALA_Backpacks_array = ["B_Bergen_dgtl_F"]; // B_Bergen_tna_F - B_Bergen_mcamo_F - B_Bergen_dgtl_F - B_Bergen_hex_F GF_ALA_Goggles_array = [""]; GF_ALA_Items_array = [""]; GF_ALA_Attachments_array = ["optic_KHS_blk","optic_LRPS_ghex_F","optic_Arco_blk_F","optic_Holosight_blk_F"]; GF_ALA_Binocular_and_Nvg_array = [""]; _items_case = "Custom items only"; _Select_items_Loaded = true; }; }; //________________ _Array_Loaded ________________ waituntil {_Select_items_Loaded}; _Array_Loaded = true; if(GF_ALA_Hintsilent_info)then{ hintsilent format ["%1",_items_case]; }; if(GF_ALA_diag_log_info)then{ diag_log format ["%1",_items_case]; }; GF_ALA_cfgArray = GF_ALA_primaryWeapon_array + GF_ALA_secondaryWeapon_array + GF_ALA_handgunWeapon_array + GF_ALA_Magazines_array + GF_ALA_Uniform_array + GF_ALA_Vests_array + GF_ALA_Headgear_array + GF_ALA_Backpacks_array + GF_ALA_Goggles_array + GF_ALA_Items_array + GF_ALA_Attachments_array + GF_ALA_Binocular_and_Nvg_array; waituntil {_Array_Loaded}; ////////////////////////////////////////////////////////////////////////////////// private ["_marker","_marker2","_x","_a","_pos"]; _x = 0; _a = 0; //________________ Number of the Airdrops ________________ while {true} do{ uisleep GF_ALA_next_drop_in_sec; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; _a = _a + 1; //________________ Find Airdrops Position ________________ _Found = false; while {!_Found} do{ _pos = [] call BIS_fnc_randomPos; _nearestRoad = [_pos, 50] call BIS_fnc_nearestRoad; _nearest_House = nearestObject [_pos, "House"]; _nearest_Building = nearestObject [_pos, "Building"]; if( //________________ Add Blacklist Distance from all Players ________________ (({((_pos distance _x) <= GF_ALA_Distanse_from_Players)} count GF_ALA_allPlayers) isEqualTo 0) //________________ Add here your Blacklist Zones ( for more ) ________________ && ((_pos distance GF_ALA_Blacklist_Zone_1) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_2) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_3) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_4) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_5) > GF_ALA_Blacklist_Zone_distance) //________________ uncomment to add Distance from _nearestRoad - House - Building ________________ && ((_pos distance _nearestRoad) > 50) && ((_pos distance _nearest_House) > 100) && ((_pos distance _nearest_Building) > 100) )then{ _Found = true; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }else{ _Found = false; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }; }; waituntil {_Found}; //________________ Cargo ________________ _parachute = createVehicle ["B_Parachute_02_F",_pos, [], 0, "FLY"]; waituntil{!isNull _parachute}; _parachute setPosATL [getPosATL _parachute select 0, getPosATL _parachute select 1, GF_ALA_height_of_drop]; _Cargo_array = selectRandom GF_ALA_Cargo_array; _Cargo = createVehicle [_Cargo_array, position _parachute, [], 0, 'NONE']; waituntil{!isNull _Cargo}; _Cargo attachTo [_parachute,[0,0,0]]; _Cargo enableSimulation false; //________________ clear _Cargo ________________ clearItemCargoGlobal _Cargo; clearWeaponCargoGlobal _Cargo; clearMagazineCargoGlobal _Cargo; //________________ Sound of plane flying above ________________ // https://community.bistudio.com/wiki/Arma_3:_SoundFiles playSound3D ["A3\Sounds_F\ambient\battlefield\battlefield_jet1.wss", _Cargo]; /* _Plane_sound = selectrandom[ "GF_ALA_Plane_1", "GF_ALA_Plane_2", "GF_ALA_Plane_3" ]; publicVariable _Plane_sound; _Plane_sound remoteExec ["playSound"]; */ //________________ Spawn Loot ________________ for "_i" from 1 to GF_ALA_Spawned_Items_Number + random GF_ALA_Spawned_Items_Number_random do{ //________________ Position of the loot at the Airdrops ________________////////////////////////////////////// _Loot_pos = _pos getPos [ 6 + random 200, // distance from centre//////////////////////////////////////////////////// random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; _Item = selectRandom GF_ALA_cfgArray; _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass"); _Loot = _Cargo; _Color = "Default"; // https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3 _Text = "Empty"; // https://forums.bohemia.net/forums/topic/193019-can-i-detect-all-pistols-from-cfgweapons/?tab=comments#comment-3072020 _type = [0,1,2,4,16,256,4096,131072]; if( (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in [ 0 , 616 ]) or (isClass (configFile >> "CfgGlasses" >> _Item)) or (isClass (configFile >> "CfgMagazines" >> _Item)) )then{ switch true do{ //________________ Gear ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 801) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGUER";_Text = "Uniforms";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 701) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorKhaki";_Text = "Vests";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 605) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGreen";_Text = "Headgear";}; case(_getText isEqualTo "Backpacks") : { _Loot addBackPackCargoGlobal [ _Item, 1 ]; _Color = "ColorBrown";_Text = "Backpacks";}; case(isClass (configFile >> "CfgGlasses" >> _Item)) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorCivilian";_Text = "Glasses";}; //________________ Weapons ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorEAST";_Text = "WeaponsPrimary";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorPink";_Text = "HandGuns";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorOrange";_Text = "WeaponsSecondary";}; case(isClass (configFile >> "CfgMagazines" >> _Item)) : { _Loot addMagazineCargoGlobal [ _Item, round (1 + random 2)]; _Color = "colorRed";_Text = "Mags";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 616): { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorBlue";_Text = "Nvg";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4096) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWEST";_Text = "Items";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWhite";_Text = "Weapon Attachments";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 0) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items";}; }; }else{ _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items"; }; }; //________________ Type of Chemlight and Smoke ________________ _Chemlight1 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight1 attachTo [_Cargo, [0,0.5,-0.4]]; _Chemlight2 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight2 attachTo [_Cargo, [0,-0.5,-0.4]]; _Smoke = "SmokeShellRed" createVehicle (position _Cargo); _Smoke attachTo [_Cargo, [0,0,0]]; _Smoke2 = "SmokeShellRed" createVehicle (position _Cargo); _Smoke2 attachTo [_Cargo, [0,0,0.5]]; waitUntil {getPos _Cargo select 2 < 4}; _vel = velocity _Cargo; _Cargo setVelocity _vel; waitUntil {getPos _Cargo select 2 < 0}; playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss",_Cargo]; detach _Cargo; _parachute disableCollisionWith _Cargo; _time = time + 6; waitUntil {time > _time}; if(!isNull _parachute)then{deleteVehicle _parachute}; _Cargo enableSimulation true; //________________ Spawn a Group at the Airdrops ________________ if(GF_ALA_Spawn_Enemy)then{ // systemchat "GF_ALA_Spawn_Enemy"; _pos_Spawn = [[[_pos, 50 + random 250]],["water"]] call BIS_fnc_randomPos; GF_ALA_Group = createGroup GF_ALA_Enemy_Side; for "_x" from 0 to (GF_ALA_Squad_Members + floor random GF_ALA_Squad_Members_random) do{ _unit = GF_ALA_Group createunit [selectRandom GF_ALA_Pool_Infantry,_pos_Spawn,[],0,"None"]; [_unit] JoinSilent GF_ALA_Group; (leader GF_ALA_Group) setSkill GF_ALA_set_AiSkill + random GF_ALA_set_AiSkill_random; _unit setVariable["Var_GF_ALA",true]; }; [GF_ALA_Group,_pos,GF_ALA_Patrol_distance + random GF_ALA_Patrol_distance_random] call BIS_fnc_taskPatrol; }; //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["area_%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerSize [625,625]; _Marker2_id = format ["text_%1",_pos]; _Marker2 = createMarker [_Marker2_id,_pos]; _Marker2 setMarkerShape "ICON"; _Marker2 setMarkerType "mil_warning"; _Marker2 setMarkerColor "ColorBlack"; _Marker2 setMarkerText format ["WEAPON DROP",_a]; _Marker2 setMarkerSize [0.5,0.5]; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP AREA LOCATED</t>"] remoteExec ["life_fnc_broadcast",0]; }; uisleep GF_ALA_time_to_delete; deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; deletevehicle _Chemlight1; deletevehicle _Chemlight2; deletevehicle _Smoke; deletevehicle _Smoke2; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP DESTROYED</t>"] remoteExec ["life_fnc_broadcast",0]; if(GF_ALA_Spawn_Enemy)then{ { if(_x getVariable ["Var_GF_ALA",false])then{ deletevehicle _x; }; }foreach units GF_ALA_Group; }; }; if(GF_ALA_Systemchat_info)then{ systemchat "GF_Auto_Loot_Airdrops Script initialized"; }; diag_log "//________________ GF_Auto_Loot_Airdrop Script initialized ________________"; Testing 1 Share this post Link to post Share on other sites
jgaz-uk 130 Posted October 15, 2019 In the test mission, now started getting a string error line 30 message. this is since recent CBA & big CUP update. something to do with markers? 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 15, 2019 On 10/14/2019 at 9:10 AM, GEORGE FLOROS GR said: try : Reveal hidden contents //________________ Author : GEORGE FLOROS [GR] ___________ 14.10.19 _____________ //EDITED for LIFE Server diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = false; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // Every 2 hours = 7200 GF_ALA_time_to_delete = 30; // time_to_delete the current zone - 20 mins = 1200 GF_ALA_height_of_drop = 30; // 1 = 1m GF_ALA_Spawned_Items_Number = 10; // number of ITEMS GF_ALA_Spawned_Items_Number_random = 0; // number of random ITEMS //GF_ALA_Select --> 1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only GF_ALA_Select = 4; GF_ALA_Blacklist_Zone_distance = 2500; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 2500; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = false; // Spawn Enemy at the site GF_ALA_Enemy_Side = east; // This is for Normal Spawn and EOS , NOT for the DAC units GF_ALA_Squad_Members = 5; // + floor random 5 below GF_ALA_Squad_Members_random = 5; GF_ALA_set_AiSkill = 0.50; GF_ALA_set_AiSkill_random = 0.50; GF_ALA_Patrol_distance = 100; // The distance for BIS_fnc_taskPatrol GF_ALA_Patrol_distance_random = 250; // GF_ALA_Cargo_array - can be any object or vehicle GF_ALA_Cargo_array = [ "I_CargoNet_01_ammo_F", "O_CargoNet_01_ammo_F", "B_CargoNet_01_ammo_F" ]; //________________ Add here your Blacklist Zones ( for more ) , these are included in the 3D editor to copy paste to your mission ________________ GF_ALA_Blacklist_Zone_1 = getMarkerPos "Athira_City_Limits_Marker"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "Kavala_City_Limits_Marker"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "Pyrgos_City_Limits_Marker"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "Sofia_City_Limits_Marker"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "hunting_zone"; //________________ Enemy Array ________________ GF_ALA_Pool_Infantry = [ "O_G_officer_F","O_G_Soldier_SL_F","O_G_Soldier_TL_F","O_G_medic_F","O_G_engineer_F","O_G_Soldier_exp_F","O_G_Soldier_GL_F", "O_G_Soldier_M_F","O_G_Soldier_LAT_F","O_G_Soldier_A_F","O_G_Soldier_F","O_G_Soldier_lite_F","O_G_Sharpshooter_F", "O_G_Soldier_universal_F" ]; if(GF_ALA_Systemchat_info)then{ systemchat "GF Auto Loot Airdrops Script initializing"; }; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; GF_ALA_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); GF_ALA_size = worldsize; //________________ Array ________________ /* //________________ GF_ALA_Binocular_and_Nvg_array Binocular and Nvg slot ________________ It might be needed , to add also the mods , that you want to blacklist , in the GF_ALA_Assignable_Items_Mod_Blacklist in case that the GF_ALA_Attachments_array , generates also items from the blacklisted mods. To check this , uncomment the line that you will find below (in case : % ) , depending the selection GF_ALA_Select copyToClipboard str GF_ALA_Binocular_and_Nvg_array; then run the mission and it will copy the generated array , then ctrl + v to paste the array. The "mcc_sandbox_a3" mod will generate items that they are not Binocular or Nvg. */ GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist = [ "mcc_sandbox_a3", "CUP_Weapons" // Example ]; //________________ case ________________ _Array_Loaded = false; _Select_items_Loaded = false; private ["_items_case"]; switch (GF_ALA_Select) do{ case 1 : { //________________ Load every Mod + Bohemia items ________________ GF_ALA_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod + Bohemia items"; _Select_items_Loaded = true; }; case 2 : { //________________ Load every Mod / No Bohemia items ________________ GF_ALA_primaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "(!(getText( _x >> 'author' ) == 'Bohemia Interactive')) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load every Mod - No Bohemia items"; _Select_items_Loaded = true; }; case 3 : { //________________ Bohemia items Only ________________ GF_ALA_primaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_secondaryWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_handgunWeapon_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Magazines_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; GF_ALA_Uniform_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Vests_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Headgear_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Backpacks_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; GF_ALA_Goggles_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x}; GF_ALA_Items_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Attachments_array = ("getText( _x >> 'author' ) == 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x}; GF_ALA_Binocular_and_Nvg_array = ( "getText( _x >> 'author' ) == 'Bohemia Interactive' && (!(getText( _x >> 'DLC' ) in GF_ALA_Binocular_and_Nvg_array_Mod_Blacklist)) && getNumber ( _x >> 'scope' ) isEqualTo 2 && getNumber ( _x >> 'type' ) in [ 131072, 4096 ] && getNumber ( _x >> 'ItemInfo' >> 'type' ) in [ 0 , 616 ] "configClasses (configfile >> "CfgWeapons") ) apply {configName _x}; // copyToClipboard str GF_ALA_Binocular_and_Nvg_array; _items_case = "Load Bohemia items Only"; _Select_items_Loaded = true; }; case 4 : { /* //________________ Custom items only ________________ It is posible to add everything to one array and the code below will manage the spawn , GF_ALA_cfgArray = []; But then delete the arrays and their count below */ // add the classnames ex: GF_ALA_primaryWeapon_array = ["srifle_DMR_06_olive_F","srifle_DMR_03_woodland_F","arifle_MXM_F","arifle_MX_SW_khk_F","arifle_Mk20_F","srifle_EBR_F","srifle_LRR_tna_F","LMG_Mk200_F","LMG_Zafir_F","arifle_CTARS_hex_F","arifle_SPAR_02_khk_F","SMG_02_F","arifle_Katiba_F","SMG_01_F"]; GF_ALA_secondaryWeapon_array = [""]; GF_ALA_handgunWeapon_array = ["hgun_Pistol_heavy_01_F","hgun_ACPC2_F"]; GF_ALA_Magazines_array = ["20Rnd_762x51_Mag","20Rnd_762x51_Mag","30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","20Rnd_762x51_Mag","7Rnd_408_Mag","200Rnd_65x39_cased_Box","150Rnd_762x54_Box","30Rnd_580x42_Mag_F","150Rnd_556x45_Drum_Mag_F","30Rnd_9x21_Mag_SMG_02","30Rnd_65x39_caseless_green","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag"]; GF_ALA_Uniform_array = ["U_B_FullGhillie_lsh"]; GF_ALA_Vests_array = [""]; GF_ALA_Headgear_array = [""]; GF_ALA_Backpacks_array = ["B_Bergen_dgtl_F"]; // B_Bergen_tna_F - B_Bergen_mcamo_F - B_Bergen_dgtl_F - B_Bergen_hex_F GF_ALA_Goggles_array = [""]; GF_ALA_Items_array = [""]; GF_ALA_Attachments_array = ["optic_KHS_blk","optic_LRPS_ghex_F","optic_Arco_blk_F","optic_Holosight_blk_F"]; GF_ALA_Binocular_and_Nvg_array = [""]; _items_case = "Custom items only"; _Select_items_Loaded = true; }; }; //________________ _Array_Loaded ________________ waituntil {_Select_items_Loaded}; _Array_Loaded = true; if(GF_ALA_Hintsilent_info)then{ hintsilent format ["%1",_items_case]; }; if(GF_ALA_diag_log_info)then{ diag_log format ["%1",_items_case]; }; GF_ALA_cfgArray = GF_ALA_primaryWeapon_array + GF_ALA_secondaryWeapon_array + GF_ALA_handgunWeapon_array + GF_ALA_Magazines_array + GF_ALA_Uniform_array + GF_ALA_Vests_array + GF_ALA_Headgear_array + GF_ALA_Backpacks_array + GF_ALA_Goggles_array + GF_ALA_Items_array + GF_ALA_Attachments_array + GF_ALA_Binocular_and_Nvg_array; waituntil {_Array_Loaded}; ////////////////////////////////////////////////////////////////////////////////// private ["_marker","_marker2","_x","_a","_pos"]; _x = 0; _a = 0; //________________ Number of the Airdrops ________________ while {true} do{ uisleep GF_ALA_next_drop_in_sec; GF_ALA_allPlayers = allUnits select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}; _a = _a + 1; //________________ Find Airdrops Position ________________ _Found = false; while {!_Found} do{ _pos = [] call BIS_fnc_randomPos; _nearestRoad = [_pos, 50] call BIS_fnc_nearestRoad; _nearest_House = nearestObject [_pos, "House"]; _nearest_Building = nearestObject [_pos, "Building"]; if( //________________ Add Blacklist Distance from all Players ________________ (({((_pos distance _x) <= GF_ALA_Distanse_from_Players)} count GF_ALA_allPlayers) isEqualTo 0) //________________ Add here your Blacklist Zones ( for more ) ________________ && ((_pos distance GF_ALA_Blacklist_Zone_1) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_2) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_3) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_4) > GF_ALA_Blacklist_Zone_distance) && ((_pos distance GF_ALA_Blacklist_Zone_5) > GF_ALA_Blacklist_Zone_distance) //________________ uncomment to add Distance from _nearestRoad - House - Building ________________ && ((_pos distance _nearestRoad) > 50) && ((_pos distance _nearest_House) > 100) && ((_pos distance _nearest_Building) > 100) )then{ _Found = true; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }else{ _Found = false; if(GF_ALA_Systemchat_info)then{ systemchat format ["Airdrops Position Found %1",_Found]; }; }; }; waituntil {_Found}; //________________ Cargo ________________ _parachute = createVehicle ["B_Parachute_02_F",_pos, [], 0, "FLY"]; waituntil{!isNull _parachute}; _parachute setPosATL [getPosATL _parachute select 0, getPosATL _parachute select 1, GF_ALA_height_of_drop]; _Cargo_array = selectRandom GF_ALA_Cargo_array; _Cargo = createVehicle [_Cargo_array, position _parachute, [], 0, 'NONE']; waituntil{!isNull _Cargo}; _Cargo attachTo [_parachute,[0,0,0]]; _Cargo enableSimulation false; //________________ clear _Cargo ________________ clearItemCargoGlobal _Cargo; clearWeaponCargoGlobal _Cargo; clearMagazineCargoGlobal _Cargo; //________________ Sound of plane flying above ________________ // https://community.bistudio.com/wiki/Arma_3:_SoundFiles playSound3D ["A3\Sounds_F\ambient\battlefield\battlefield_jet1.wss", _Cargo]; /* _Plane_sound = selectrandom[ "GF_ALA_Plane_1", "GF_ALA_Plane_2", "GF_ALA_Plane_3" ]; publicVariable _Plane_sound; _Plane_sound remoteExec ["playSound"]; */ //________________ Spawn Loot ________________ for "_i" from 1 to GF_ALA_Spawned_Items_Number + random GF_ALA_Spawned_Items_Number_random do{ //________________ Position of the loot at the Airdrops ________________////////////////////////////////////// _Loot_pos = _pos getPos [ 6 + random 200, // distance from centre//////////////////////////////////////////////////// random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Marker2","_Text"]; _Item = selectRandom GF_ALA_cfgArray; _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass"); _Loot = _Cargo; _Color = "Default"; // https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3 _Text = "Empty"; // https://forums.bohemia.net/forums/topic/193019-can-i-detect-all-pistols-from-cfgweapons/?tab=comments#comment-3072020 _type = [0,1,2,4,16,256,4096,131072]; if( (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "type") in _type) or (getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") in [ 0 , 616 ]) or (isClass (configFile >> "CfgGlasses" >> _Item)) or (isClass (configFile >> "CfgMagazines" >> _Item)) )then{ switch true do{ //________________ Gear ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 801) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGUER";_Text = "Uniforms";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 701) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorKhaki";_Text = "Vests";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 605) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorGreen";_Text = "Headgear";}; case(_getText isEqualTo "Backpacks") : { _Loot addBackPackCargoGlobal [ _Item, 1 ]; _Color = "ColorBrown";_Text = "Backpacks";}; case(isClass (configFile >> "CfgGlasses" >> _Item)) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorCivilian";_Text = "Glasses";}; //________________ Weapons ________________ case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorEAST";_Text = "WeaponsPrimary";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorPink";_Text = "HandGuns";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) : { _Loot addWeaponCargoGlobal [ _Item, 1 ]; private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines"); private _Item_magazines = selectRandom _magazines; _Loot addMagazineCargoGlobal [_Item_magazines, round (1 + random 2)]; _Color = "ColorOrange";_Text = "WeaponsSecondary";}; case(isClass (configFile >> "CfgMagazines" >> _Item)) : { _Loot addMagazineCargoGlobal [ _Item, round (1 + random 2)]; _Color = "colorRed";_Text = "Mags";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") == 616): { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorBlue";_Text = "Nvg";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4096) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWEST";_Text = "Items";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "ColorWhite";_Text = "Weapon Attachments";}; case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 0) : { _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items";}; }; }else{ _Loot addItemCargoGlobal [ _Item, 1 ]; _Color = "colorBLUFOR";_Text = "Inventory Items"; }; }; //________________ Type of Chemlight and Smoke ________________ _Chemlight1 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight1 attachTo [_Cargo, [0,0.5,-0.4]]; _Chemlight2 = "Chemlight_red" createVehicle (position _Cargo); _Chemlight2 attachTo [_Cargo, [0,-0.5,-0.4]]; _Smoke = "SmokeShellRed" createVehicle (position _Cargo); _Smoke attachTo [_Cargo, [0,0,0]]; _Smoke2 = "SmokeShellRed" createVehicle (position _Cargo); _Smoke2 attachTo [_Cargo, [0,0,0.5]]; waitUntil {getPos _Cargo select 2 < 4}; _vel = velocity _Cargo; _Cargo setVelocity _vel; waitUntil {getPos _Cargo select 2 < 0}; playSound3D ["a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss",_Cargo]; detach _Cargo; _parachute disableCollisionWith _Cargo; _time = time + 6; waitUntil {time > _time}; if(!isNull _parachute)then{deleteVehicle _parachute}; _Cargo enableSimulation true; //________________ Spawn a Group at the Airdrops ________________ if(GF_ALA_Spawn_Enemy)then{ // systemchat "GF_ALA_Spawn_Enemy"; _pos_Spawn = [[[_pos, 50 + random 250]],["water"]] call BIS_fnc_randomPos; GF_ALA_Group = createGroup GF_ALA_Enemy_Side; for "_x" from 0 to (GF_ALA_Squad_Members + floor random GF_ALA_Squad_Members_random) do{ _unit = GF_ALA_Group createunit [selectRandom GF_ALA_Pool_Infantry,_pos_Spawn,[],0,"None"]; [_unit] JoinSilent GF_ALA_Group; (leader GF_ALA_Group) setSkill GF_ALA_set_AiSkill + random GF_ALA_set_AiSkill_random; _unit setVariable["Var_GF_ALA",true]; }; [GF_ALA_Group,_pos,GF_ALA_Patrol_distance + random GF_ALA_Patrol_distance_random] call BIS_fnc_taskPatrol; }; //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["area_%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerSize [625,625]; _Marker2_id = format ["text_%1",_pos]; _Marker2 = createMarker [_Marker2_id,_pos]; _Marker2 setMarkerShape "ICON"; _Marker2 setMarkerType "mil_warning"; _Marker2 setMarkerColor "ColorBlack"; _Marker2 setMarkerText format ["WEAPON DROP",_a]; _Marker2 setMarkerSize [0.5,0.5]; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP AREA LOCATED</t>"] remoteExec ["life_fnc_broadcast",0]; }; uisleep GF_ALA_time_to_delete; deleteMarker _Marker; deleteMarker _Marker2; deletevehicle _Cargo; deletevehicle _Chemlight1; deletevehicle _Chemlight2; deletevehicle _Smoke; deletevehicle _Smoke2; [5,"<t size='1.5'><t color='#FF0000'>WEAPON DROP</t></t><br/><br/><t size='1'>WEAPON DROP DESTROYED</t>"] remoteExec ["life_fnc_broadcast",0]; if(GF_ALA_Spawn_Enemy)then{ { if(_x getVariable ["Var_GF_ALA",false])then{ deletevehicle _x; }; }foreach units GF_ALA_Group; }; }; if(GF_ALA_Systemchat_info)then{ systemchat "GF_Auto_Loot_Airdrops Script initialized"; }; diag_log "//________________ GF_Auto_Loot_Airdrop Script initialized ________________"; After testing for a few hours it is looking good thanks again for the help. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 15, 2019 6 hours ago, jgaz-uk said: now started getting a string error line 30 message. this is since recent CBA & big CUP update. Hello there jgaz-uk ! Can you add the error please ?! ( there is not that much of time in order to check it ! ) Have you reedited ? Share this post Link to post Share on other sites
jgaz-uk 130 Posted October 16, 2019 Ive just downloaded it again from your collection, I'll let you know. Re tested & this time NO errors showing this time Yay!. Thank you for your time & your addons! sorry to disturb ✈️ 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 22, 2019 On 10/17/2019 at 12:41 AM, jgaz-uk said: Thank you You're welcome jgaz-uk ! Have fun ! Share this post Link to post Share on other sites
jgaz-uk 130 Posted December 1, 2019 not sure how to limit the number of drops?, as in after 3 requests its no longer available. 1 Share this post Link to post Share on other sites
jgaz-uk 130 Posted December 3, 2019 Me again; Cant get Custom loot to work?, random loot no prob, but get this every time: https://steamcommunity.com/sharedfiles/filedetails/?id=1927804243 with custom. I've gone over the scripting but don't see any errors, may be it might just be a name change problem. 1 Share this post Link to post Share on other sites
h34dup 147 Posted December 4, 2019 Hi @GEORGE FLOROS GR just saying THANK YOU for this awesome script. I managed to modify it to my exact needs after hitting a wall w/ a previous script. Your commenting is seriously next-level, so helpful. @jgaz-uk I ran into the same issue just now, and resolved it by formatting the weapons in arrays, the same way they're formatted for the other contents, eg. ["SmokeShell", 10] (see: https://community.bistudio.com/wiki/addWeaponCargo). Looks like they are considered strings as "Weaponname" instead of the arrays expected. Maybe a bug? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted December 4, 2019 On 12/1/2019 at 5:52 PM, jgaz-uk said: not sure how to limit the number of drops?, as in after 3 requests its no longer available. 7 hours ago, jgaz-uk said: Me again; Cant get Custom loot to work?, random loot no prob, but get this every time: https://steamcommunity.com/sharedfiles/filedetails/?id=1927804243 with custom. I've gone over the scripting but don't see any errors, may be it might just be a name change problem. 3 hours ago, h34dup said: Hi @GEORGE FLOROS GR just saying THANK YOU for this awesome script. I managed to modify it to my exact needs after hitting a wall w/ a previous script. Your commenting is seriously next-level, so helpful. @jgaz-uk I ran into the same issue just now, and resolved it by formatting the weapons in arrays, the same way they're formatted for the other contents, eg. ["SmokeShell", 10] (see: https://community.bistudio.com/wiki/addWeaponCargo). Looks like they are considered strings as "Weaponname" instead of the arrays expected. Maybe a bug? Hello there guys ! Can you share your code jgaz-uk ? It might be better to check for a different approach as well , after all this script is getting old ! I'll try to check for alternatives as well , but seriously the default script it's not working ? I don't play at all to know for a long time now. Share this post Link to post Share on other sites
jgaz-uk 130 Posted December 4, 2019 To drop a crate with Custom gear wont work, going to try h34dup's solution. 1 Share this post Link to post Share on other sites
jgaz-uk 130 Posted December 4, 2019 9 hours ago, h34dup said: @jgaz-uk I ran into the same issue just now, and resolved it by formatting the weapons in arrays, the same way they're formatted for the other contents, eg. ["SmokeShell", 10] (see: https://community.bistudio.com/wiki/addWeaponCargo). Looks like they are considered strings as "Weaponname" instead of the arrays expected. Maybe a bug? YES! That works for custom, maybe an update that caused a Bug? For some reason the random still worked, but thee never seemed to be much in the crates. Thanks for working that out H34dup! I added some rucksacks to the script the same way & that worked also; e.g. //Backpack { _cargo addBackpackCargoGlobal _x; } forEach [ ["B_Carryall_oli", 4], ["tf_rt1523g_bwmod", 4], ["B_ViperLightHarness_ghex_F", 4] ]; 1 Share this post Link to post Share on other sites