GEORGE FLOROS GR 4206 Posted July 1, 2018 1 hour ago, jgaz-uk said: thanks for that I am about to update this script as well , so i will include also a cooldown option. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted July 22, 2018 Updating Changelog: v3.1 Code and fix optimization. Fixed an error: the plane sound now works in all clients. On 1/7/2018 at 1:06 PM, GEORGE FLOROS GR said: so i will include also a cooldown option. Sorry not yet !!! 1 Share this post Link to post Share on other sites
Guest Posted July 22, 2018 Thanks for sending us the update :) The Armaholic mirror has been updated with the new version: GF Cargo Airdrops Script v3.1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted January 24, 2019 Hello to everyone ! I'm going to update this today , because the enemy spawn is bugged due to the recent update. There is also already a new similar edition , more for a survival gameplay here : Thanks ! Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted January 24, 2019 Changelog: v 4.0 Code and fix optimization. added a mod version. Share this post Link to post Share on other sites
xxnocross55no 1 Posted May 3, 2019 i need some help. i'm new with scripts and i have a mission where i want a crate to drop at a random marker i have on the map say once every 5 minutes. currently the crates just drop wherever on the map. how can i fix this? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted May 3, 2019 42 minutes ago, xxnocross55no said: i want a crate to drop at a random marker i have on the map say once every 5 minutes. Hello there xxnocross55no and welcome also to Bis Forums ! I have already include this code inside the script , with comment /*comment */ check where it says "or select a random marker" and about the time , as you see in the bottom , it says "sleep _next_drop_in_sec;" so in the settings there is : _next_drop_in_sec = 10; // _next_drop_in_sec - 10 is for test //________________ The position to drop the Cargo ________________ _Pos = [] call BIS_fnc_randomPos; // For random location // _Pos = getmarkerPos "MarkerName"; // Create a Marker if you want a certain location - // Create a marker // _Pos = getmarkerPos "DROP_Marker_1"; /* // or select a random marker _Marker_array =selectRandom[ "DROP_Marker_1", "DROP_Marker_2", "DROP_Marker_3" ]; _Pos = getmarkerPos _Marker_array; */ // this can be a Supply drop with an add action in an item or player https://community.bistudio.com/wiki/addAction // _Pos = getPos player; // for test or for support purpose // systemchat "_next_drop_in_sec 5"; sleep _next_drop_in_sec; Share this post Link to post Share on other sites
Jinkytwinkie69 1 Posted July 6, 2019 Could someone PLEASE make a video to show me how to do this, so many of me and my friends are struggling to figure this out and I really cant at all. It would be very helpful because I'm sure im not the only person out here having problems, I'm not very computer savvy with scripting 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted July 6, 2019 1 hour ago, Jinkytwinkie69 said: Could someone PLEASE make a video to show me how to do this, Hello there Jinkytwinkie69 ! You are right about the video , this way would be the best solution , but personaly i can't. I can help you though with this ! First , saying that is difficult to use or edit this , you are probably not using a program for .sqf editing with highlight like , Poseidon , etc : http://tom4897.info/projects/poseidon-tools/ Generally i'm trying to keep my scripts as simple as possible to read and edit. You can post your problem so else here to help you. There is also available a similar newer script- mod if you want to check ( suited for survival gameplay purposes ): Thanks ! 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 12, 2019 Hi first of all, awesome work. I am Running Altis Life RPG v5.0.0 and it is working like a charm. //I would like to ask if there is a way to get the Spawned AI to attack any players they encounter / Players that want to get the airdrop. So it is //like they are defending the airdrop. //I have tried changing the AI sides and it does not seem to work. //_Enemy_Side = west; - I am going to make the area KOS now - so i do not need this above... Also when it spawns a green storage crate (not the white) it does not allow the player to access it. It says You cannot access this until the owning player opens it. (Fixed i just // commented out the green one) Is there a way to remove the marker and crate after a period of time or if it has been cleared out? Thank you in advance and for sharing this script. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 12, 2019 Hello there Steel_Dragon and welcome also to BI Forums ! First of all thank you very much ! It's been a while that i have run this script so once i can i will give some accurate answers , until then are you using the GF_Cargo_Airdrops.sqf? What exacly do you mean by saying KOS ? 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 13, 2019 5 hours ago, GEORGE FLOROS GR said: Hello there Steel_Dragon and welcome also to BI Forums ! First of all thank you very much ! It's been a while that i have run this script so once i can i will give some accurate answers , until then are you using the GF_Cargo_Airdrops.sqf? What exacly do you mean by saying KOS ? Quote Hi, thanks for the reply, Yes i am using the GF_Cargo_Airdrops.sqf. I have changed the marker to an Ellipse and coloured it red to mark a K.O.S. (Kill On Sight) zone. It means there is no deceleration required from players inside that area, they can just attack people. Quote 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 17, 2019 On 8/12/2019 at 3:47 AM, Steel_Dragon said: Is there a way to remove the marker and crate after a period of time or if it has been cleared out? Did you find a way about it ? I will try to check it as well , sorry but i couldn't do anyting the days before . 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 18, 2019 Hi i;ve been experimenting but nothing has worked so far. I think it is a little beyond my experience. 🙂 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 18, 2019 9 hours ago, Steel_Dragon said: so far. I think a good solution should be to have for ex. one drop zone at the time (or more ) for a certain or random time , with a marker placed as long the zone is existing and then delete everything and loop again maybe with a delay. Do you want that ? 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 18, 2019 4 hours ago, GEORGE FLOROS GR said: I think a good solution should be to have for ex. one drop zone at the time (or more ) for a certain or random time , with a marker placed as long the zone is existing and then delete everything and loop again maybe with a delay. Do you want that ? Yes that sounds very good... Thank you 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 18, 2019 3 hours ago, Steel_Dragon said: Yes that sounds very good... Thank you Ok hold on i'll check this now! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 18, 2019 Check this : Spoiler //________________ Author : GEORGE FLOROS [GR] ___________ 23.12.18 _____________ /* ________________ GF Auto Loot Airdrops Script - Mod ________________ https://forums.bohemia.net/forums/topic/220962-gf-auto-loot-airdrops-script-mod/ Please keep the Credits or add them to your Diary https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colors to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ */ diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = true; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // test GF_ALA_time_to_delete = 30; // time_to_delete the current zone GF_ALA_height_of_drop = 50; // test GF_ALA_Spawned_Items_Number = 10; GF_ALA_Spawned_Items_Number_random = 10; //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 = 1; GF_ALA_Blacklist_Zone_distance = 1000; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 300; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = true; // 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 = [ "B_supplyCrate_F", "I_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 "GF_ALA_Blacklist_Zone_1"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "GF_ALA_Blacklist_Zone_2"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "GF_ALA_Blacklist_Zone_3"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "GF_ALA_Blacklist_Zone_4"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "GF_ALA_Blacklist_Zone_5"; //________________ 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 = ["arifle_MX_SW_F"]; GF_ALA_secondaryWeapon_array = ["launch_NLAW_F"]; GF_ALA_handgunWeapon_array = ["hgun_P07_F"]; GF_ALA_Magazines_array = ["100Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"]; GF_ALA_Uniform_array = ["U_B_CombatUniform_mcam_tshirt"]; GF_ALA_Vests_array = ["V_PlateCarrier2_rgr"]; GF_ALA_Headgear_array = ["H_HelmetB_grass"]; GF_ALA_Backpacks_array = ["B_AssaultPack_mcamo"]; GF_ALA_Goggles_array = ["G_Combat"]; GF_ALA_Items_array = ["FirstAidKit"]; GF_ALA_Attachments_array = ["acc_pointer_IR"]; GF_ALA_Binocular_and_Nvg_array = ["NVGoggles"]; _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; //________________ 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) > 50) // && ((_pos distance _nearest_Building) > 50) )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 [ 4 + random 20, // distance random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_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]]; 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 ["%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ICON"; _Marker setMarkerType "mil_marker"; _Marker setMarkerColor "ColorUNKNOWN"; _Marker setMarkerText format ["Airdrop : %1",_a]; _Marker setMarkerSize [1,1]; }; _time_to_delete = time + GF_ALA_time_to_delete; waitUntil {time > _time_to_delete}; deleteMarker _Marker; deletevehicle _Cargo; 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 August 18, 2019 (edited) 50 minutes ago, GEORGE FLOROS GR said: Check this : Reveal hidden contents //________________ Author : GEORGE FLOROS [GR] ___________ 23.12.18 _____________ /* ________________ GF Auto Loot Airdrops Script - Mod ________________ https://forums.bohemia.net/forums/topic/220962-gf-auto-loot-airdrops-script-mod/ Please keep the Credits or add them to your Diary https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colors to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ */ diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = true; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; GF_ALA_next_drop_in_sec = 5; // test GF_ALA_time_to_delete = 30; // time_to_delete the current zone GF_ALA_height_of_drop = 50; // test GF_ALA_Spawned_Items_Number = 10; GF_ALA_Spawned_Items_Number_random = 10; //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 = 1; GF_ALA_Blacklist_Zone_distance = 1000; // Add here the distance from the Blacklist Zones GF_ALA_Distanse_from_Players = 300; // Add here the distance from players GF_ALA_Create_Markers = true; // Create a Marker for the Airdrops GF_ALA_Spawn_Enemy = true; // 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 = [ "B_supplyCrate_F", "I_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 "GF_ALA_Blacklist_Zone_1"; GF_ALA_Blacklist_Zone_2 = getMarkerPos "GF_ALA_Blacklist_Zone_2"; GF_ALA_Blacklist_Zone_3 = getMarkerPos "GF_ALA_Blacklist_Zone_3"; GF_ALA_Blacklist_Zone_4 = getMarkerPos "GF_ALA_Blacklist_Zone_4"; GF_ALA_Blacklist_Zone_5 = getMarkerPos "GF_ALA_Blacklist_Zone_5"; //________________ 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 = ["arifle_MX_SW_F"]; GF_ALA_secondaryWeapon_array = ["launch_NLAW_F"]; GF_ALA_handgunWeapon_array = ["hgun_P07_F"]; GF_ALA_Magazines_array = ["100Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"]; GF_ALA_Uniform_array = ["U_B_CombatUniform_mcam_tshirt"]; GF_ALA_Vests_array = ["V_PlateCarrier2_rgr"]; GF_ALA_Headgear_array = ["H_HelmetB_grass"]; GF_ALA_Backpacks_array = ["B_AssaultPack_mcamo"]; GF_ALA_Goggles_array = ["G_Combat"]; GF_ALA_Items_array = ["FirstAidKit"]; GF_ALA_Attachments_array = ["acc_pointer_IR"]; GF_ALA_Binocular_and_Nvg_array = ["NVGoggles"]; _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; //________________ 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) > 50) // && ((_pos distance _nearest_Building) > 50) )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 [ 4 + random 20, // distance random 360 ]; private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Text"]; //________________ _Loot ________________ private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_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]]; 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 ["%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ICON"; _Marker setMarkerType "mil_marker"; _Marker setMarkerColor "ColorUNKNOWN"; _Marker setMarkerText format ["Airdrop : %1",_a]; _Marker setMarkerSize [1,1]; }; _time_to_delete = time + GF_ALA_time_to_delete; waitUntil {time > _time_to_delete}; deleteMarker _Marker; deletevehicle _Cargo; 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 ________________"; wow thank you... So this would replace the GF_Cargo_Airdrops.sqf contents i assume? Testing now. Edited August 18, 2019 by Steel_Dragon add comment 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 19, 2019 Hi thank you very much this works perfectly. I am trying to display a UI hint (on the top right of the screen) to all players 1. Airdrop spawned and 2. Airdrop destroyed. I have tried these and they do not seem to be working: Airdrop Spawned Hint - diag_log "//________________ GF_Auto_Loot_Airdrops initializing _____________"; hint : "Airdrop Spawned"; //________________ Settings ________________ //________________ Set true or false ________________ GF_ALA_Systemchat_info = true; GF_ALA_Hintsilent_info = true; GF_ALA_diag_log_info = true; GF_ALA_Debug = true; Airdrop Destroyed Hint - //________________ GF_ALA_Debug ________________ if(GF_ALA_Create_Markers)then{ _Marker_id = format ["%1",_pos]; _Marker = createMarker [_Marker_id,_pos]; _Marker setMarkerShape "ELLIPSE"; _Marker setMarkerType "mil_marker"; _Marker setMarkerColor "ColorRed"; _Marker setMarkerText format ["Airdrop : %1",_a]; _Marker setMarkerSize [500,500]; }; _time_to_delete = time + GF_ALA_time_to_delete; waitUntil {time > _time_to_delete}; deleteMarker _Marker; deletevehicle _Cargo; hint : "Airdrop Destroyed"; Also as i have changed the marker color the text disappears, is there any way to make the text black on top of the ellipse marker? Thank you again for your amazing work. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 19, 2019 19 hours ago, Steel_Dragon said: hint : "Airdrop Spawned"; Thank you very much i hope you like it ! The ":" is wrong. check here for more info: https://community.bistudio.com/wiki/hint Try this in the server but it might be needed to remoteexec this since the script is running on the server , but i'm not sure about this. Try and tell me about. I also just notice that you said that you are using this script to an life server so the players are civilians right ? 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 20, 2019 Hi, I tried it without the : it did not work. ill look into the remoteexec as you suggested. Yes in the server there are Civilians / Rebels, Cops and Medics. Thank you again 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted August 20, 2019 ok so have solved the hints with the help of this - https://www.altisliferpg.com/topic/3382-color-hints/ Thank you again for all your guidance, I will be crediting you on the credit (on the map) page of the server - Altis is Life 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted August 21, 2019 On 8/20/2019 at 4:05 AM, Steel_Dragon said: Thank you again Thank you as well Steel_Dragon ! Have fun ! 1 Share this post Link to post Share on other sites
Steel_Dragon 30 Posted September 25, 2019 Again Awesome script and thank you, One question how would i add vitems such as heroine, cocaine, custom items etc to the container? thanks 1 Share this post Link to post Share on other sites