Jump to content

Recommended Posts

4 minutes ago, Marius U said:

wrong line?

 

No as i see it's ok.

So you see any errors ?

  • Like 1

Share this post


Link to post
Share on other sites

no errors...it just only spawns loot in only 1 marker...and its always a random one between those 3....

so it picks a random one out of the array and spawn the loot in it but not the other ones 😛

  • Like 1

Share this post


Link to post
Share on other sites
20 hours ago, Marius U said:

so it picks a random one out of the array and spawn the loot in it but not the other ones 😛

 

Can you post your code below ( in a spoiler ) in order to check this ?

Thanks !

Share this post


Link to post
Share on other sites

sure thing man...

 

here is is:

 

Spoiler


//________________    Author : GEORGE FLOROS [GR]    ___________    06.04.19    ___________


/*
________________    GF Auto Loot Script - Mod    ________________

https://forums.bohemia.net/forums/topic/220701-gf-auto-loot-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/

ArmA 3 | Notepad ++ SQF tutorial
https://www.youtube.com/watch?v=aI5P7gp3x90

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/

BI Forum Ravage Club Owner :
https://forums.bohemia.net/clubs/73-bi-forum-ravage-club/
*/

GF_AL_Distance_Check_Loaded = false;

//________________    GF_Distance_Check.sqf    ________________
[] execVM "GF_Auto_Loot\GF_Distance_Check.sqf";

waituntil{GF_AL_Distance_Check_Loaded};

    
//________________ Settings ________________
//________________ Set true or false  ________________

GF_AL_Systemchat_info                    = true;        
GF_AL_Hintsilent_info                    = true;
GF_AL_diag_log_info                        = true;
GF_AL_Debug                             = true;

GF_AL_Systemchat_info_count_items        = true;
GF_AL_diag_log_info_count_items            = true;


GF_AL_items_number                         = 1000;        //    Number of the spawned items

//    1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only
GF_AL_Select                            = 1;

GF_AL_Blacklist_Zone_distance            = 50;        //    Add here the distance from the Blacklist Zones
GF_AL_Distance                            = 20;        //    Add here the distance from players

GF_AL_Cleaner_Spawn_Enabled                = true;
GF_AL_Cleaner_Spawn_Loop                = 600;    //    ex : 4 hours = 14400 sec

GF_AL_Exclude_List = [
"Land_Pier_F",
"Land_Pier_small_F",
"Land_NavigLight",
"Land_LampHarbour_F"
];


if (GF_AL_Systemchat_info) then {
systemchat "GF Auto Loot Script initializing";            
};    

if (GF_AL_diag_log_info) then {
diag_log "//________________ GF Auto Loot Script initializing ________________";
};


//GF_AL_centerPosition = getMarkerPos "GF_AL_Blacklist_Zone_1", "GF_AL_Blacklist_Zone_2";    
//GF_AL_size = 100;


//________________    Array     ________________

/*
//________________    GF_AL_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_AL_Assignable_Items_Mod_Blacklist
in case that the GF_AL_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_AL_Select

copyToClipboard str GF_AL_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_AL_Binocular_and_Nvg_array_Mod_Blacklist = [
    "mcc_sandbox_a3",
    "CUP_Weapons"        //    Example
    ];
//________________    GF_AL_Assignable_Items_Mod_Blacklist     ________________


//________________    INFO : Everything will Spawn automaticaly    ________________
//________________    adding extra custom arrays , will give more percetage possibility to find theese items    ________________

GF_AL_Custom_array_1 = [        

    //    Ravage_items
    
    //    x1
//    "rvg_plasticBottleEmpty",
//    "rvg_canteenEmpty",
//    "rvg_hose",
//    "rvg_sleepingBag_Blue",
//    "rvg_foldedTent",
//    "rvg_rustyCan",
//    "rvg_Geiger",
//    "rvg_canisterFuel_Empty",
//    "rvg_toolkit",
//    "rvg_tire",

    //    Vital            
//    "rvg_money",
//    "rvg_notepad",
//    "rvg_docFolder",
//    "rvg_canOpener",
//    "rvg_guttingKnife",
//    "rvg_matches",
//    "rvg_plasticBottle",
//    "rvg_plasticBottlePurified",
//    "rvg_spirit",
//    "rvg_franta",
//    "rvg_beans",
//    "rvg_bacon",
//    "rvg_milk",
//    "rvg_rice",
//    "rvg_antiRad",
//    "rvg_purificationTablets",                        

    //x2 Vital
//    "rvg_money",
//    "rvg_notepad",
//    "rvg_docFolder",
//    "rvg_canOpener",
//    "rvg_guttingKnife",
//    "rvg_matches",
//    "rvg_plasticBottle",
//    "rvg_plasticBottlePurified",
//    "rvg_spirit",
//    "rvg_franta",
//    "rvg_beans",
//    "rvg_bacon",
//    "rvg_milk",
//    "rvg_rice",
//    "rvg_antiRad",
//    "rvg_purificationTablets",

    //    Mask
    "Mask_M40_OD",
    "Mask_M40",
    "Mask_M50"
];


//    ACE3 Class Names
//   https://ace3mod.com/wiki/class-names.html
GF_AL_Custom_array_2 = [

    //    ACE3_mod_Medical

//    "ACE_atropine",
    "ACE_fieldDressing",
//    "ACE_elasticBandage",
//    "ACE_quikclot",
    "ACE_bloodIV",
//    "ACE_bloodIV_500",
//    "ACE_bloodIV_250",
//    "ACE_bodyBag",
//    "ACE_bodyBagObject",
    "ACE_epinephrine",
    "ACE_morphine",
//    "ACE_packingBandage",
//    "ACE_personalAidKit",
    "ACE_plasmaIV",
//    "ACE_plasmaIV_500",
//    "ACE_plasmaIV_250",
    "ACE_salineIV"
//    "ACE_salineIV_500",
//    "ACE_salineIV_250",
//    "ACE_surgicalKit",
//    "ACE_tourniquet"
];


GF_AL_Custom_array_3 = [

    //    ACE3_mod_items_array
    //    AtragMX
//    "ACE_ATragMX",

    //    Captive
//    "ACE_CableTie",

    //    Chemlights
//    "ACE_Chemlight_HiOrange",
//    "ACE_Chemlight_HiRed",
//    "ACE_Chemlight_HiYellow",
//    "ACE_Chemlight_HiWhite",
//    "ACE_Chemlight_Orange",
//    "ACE_Chemlight_White",
//    "ACE_Chemlight_IR",

    //    Common
//    "ACE_Banana",

    //    Concertina Wire
//    "ACE_ConcertinaWireCoil",
//    "ACE_ConcertinaWire",

    //    DAGR
//    "ACE_DAGR",

    //    Explosives
//    "ACE_Cellphone",
//    "ACE_Clacker",
//    "ACE_M26_Clacker",
//    "ACE_DefusalKit",
//    "ACE_DeadManSwitch",

    //    Flashlights
//    "ACE_Flashlight_MX991",
//    "ACE_Flashlight_KSF1",
//    "ACE_Flashlight_XL50",

    //    Grenades
//    "ACE_HandFlare_White",
//    "ACE_HandFlare_Red",
//    "ACE_HandFlare_Green",
//    "ACE_HandFlare_Yellow",
    "ACE_M14",
    "ACE_M84",

    //    Gun Bag
    "ACE_gunbag",
    "ACE_gunbag_Tan",

    //    Hearing
    "ACE_EarPlugs",

    //    HuntIR
    "ACE_HuntIR_monitor",
    "ACE_HuntIR_M203",
    "ACE_HuntIR_Box",

    //    Kestrel
//    "ACE_Kestrel4500",

    //    Laser Pointers
    "acc_pointer_IR",
    "ACE_acc_pointer_red",
    "ACE_acc_pointer_green_IR",
    "ACE_acc_pointer_green",

    //    ACE_acc_pointer_green
//    "ACE_UAVBattery",
//    "ACE_wirecutter",            

    //    Map Tools
    "ACE_MapTools",

    //    MicroDAGR
//    "ACE_microDAGR",

    //    Mine Detector
//    "ACE_VMH3",
//    "ACE_VMM3",

    //    MX2A    Binocular
//    "ACE_MX2A",

    //    Nightvision
//    "ACE_NVG_Gen1",
//    "ACE_NVG_Gen2",
//    "ACE_NVG_Gen4",
//    "ACE_NVG_Wide",

    //    Optics
    "ACE_optic_Arco_2D",
    "ACE_optic_Arco_PIP",
    "ACE_optic_LRPS_2D",
    "ACE_optic_LRPS_PIP",
    "ACE_optic_SOS_2D",
    "ACE_optic_SOS_PIP",
    "ACE_optic_MRCO_2D",
    "ACE_optic_MRCO_PIP",
    "ACE_optic_Hamr_2D",
    "ACE_optic_Hamr_PIP"

    //    Rangecard
//    "ACE_RangeCard",

    //    ACE_Track
//    "ACE_Track",
//    "ACE_Wheel",

    //    Sandbag
//    "ACE_Sandbag_empty",
//    "ACE_SandbagObject",

    //    Spotting Scope
//    "ACE_SpottingScope",
//    "ACE_SpottingScopeObject",

    //    Tactical Ladder
//    "ACE_TacticalLadder_Pack",
    //    "ACE_Tactical_Ladder",

    //    ACE_Tactical_Ladder
//    "ACE_SpraypaintBlack",
//    "ACE_SpraypaintBlue",
//    "ACE_SpraypaintGreen",
//    "ACE_SpraypaintRed",

    //    Trenches
//    "ACE_EntrenchingTool",

    //    Tripod
//    "ACE_Tripod",
//    "ACE_TripodObject",

    //    Vehicle Lock
//    "ACE_key_master",
//    "ACE_key_lockpick",
//    "ACE_key_west",
//    "ACE_key_east",
//    "ACE_key_indp",
//    "ACE_key_civ",

    //    Vector
//    "ACE_Vector",
//    "ACE_VectorDay",

    //    Yardage 450
//    "ACE_Yardage450"
];

    
//________________    case    ________________
    
_Array_Loaded = false;
_Select_items_Loaded = false;

private ["_items_case"];

switch (GF_AL_Select) do {


case 1 : {

//________________    Load every Mod + Bohemia items    ________________

GF_AL_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_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_AL_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x};
GF_AL_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x};

GF_AL_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};

GF_AL_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_AL_Binocular_and_Nvg_array;


_items_case = "Load every Mod + Bohemia items";
_Select_items_Loaded = true;
};


case 2 : {

//________________    Load every Mod / No Bohemia items    ________________

GF_AL_primaryWeapon_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_handgunWeapon_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Magazines_array = ("(!(getText( _x >> 'author' ) isEqualto '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_AL_Uniform_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Vests_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Headgear_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Backpacks_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x};
GF_AL_Goggles_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x};

GF_AL_Items_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Attachments_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};

GF_AL_Binocular_and_Nvg_array = (
    "(!(getText( _x >> 'author' ) isEqualto '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_AL_Binocular_and_Nvg_array;

_items_case = "Load every Mod - No Bohemia items";
_Select_items_Loaded = true;    
};


case 3 : {

//________________    Bohemia items Only    ________________

GF_AL_primaryWeapon_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_secondaryWeapon_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_handgunWeapon_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Magazines_array = ("getText( _x >> 'author' ) isEqualto '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_AL_Uniform_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Vests_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Headgear_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Backpacks_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x};
GF_AL_Goggles_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x};

GF_AL_Items_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Attachments_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};

GF_AL_Binocular_and_Nvg_array = (
    "getText( _x >> 'author' ) isEqualto 'Bohemia Interactive'
    && (!(getText( _x >> 'DLC' ) in GF_AL_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_AL_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_AL_cfgArray = [];
But then delete the arrays and their count below
*/

//    add the classnames (as many you want ex : ["classnames","classnames"];    ex:
GF_AL_primaryWeapon_array  = ["arifle_MX_SW_F"];
GF_AL_secondaryWeapon_array = ["launch_NLAW_F"];
GF_AL_handgunWeapon_array = ["hgun_P07_F"];
GF_AL_Magazines_array = ["100Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"];
GF_AL_Uniform_array = ["U_B_CombatUniform_mcam_tshirt"];
GF_AL_Vests_array = ["V_PlateCarrier2_rgr"];
GF_AL_Headgear_array = ["H_HelmetB_grass"];
GF_AL_Backpacks_array = ["B_AssaultPack_mcamo"];
GF_AL_Goggles_array = ["G_Combat"];
GF_AL_Items_array = ["FirstAidKit"];
GF_AL_Attachments_array = ["acc_pointer_IR"];
GF_AL_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_AL_Hintsilent_info) then {
hintsilent format ["%1",_items_case];
};

if (GF_AL_diag_log_info) then {
diag_log format ["%1",_items_case];
};


GF_AL_cfgArray =
    GF_AL_primaryWeapon_array
    + GF_AL_secondaryWeapon_array
    + GF_AL_handgunWeapon_array
    + GF_AL_Magazines_array
//    + GF_AL_Uniform_array
    + GF_AL_Vests_array
    + GF_AL_Headgear_array
    + GF_AL_Backpacks_array
//    + GF_AL_Goggles_array
//    + GF_AL_Items_array
    + GF_AL_Attachments_array
//    + GF_AL_Binocular_and_Nvg_array
    
    //    + Custom arrays    
    + GF_AL_Custom_array_1        //    Ravage_items
    + GF_AL_Custom_array_2        //    ACE3_mod_Medical
    + GF_AL_Custom_array_3;        //    ACE3_mod_items_array

waituntil {_Array_Loaded};

//________________    GF_AL    ________________


GF_AL = {


_ok = false;
while {!(_ok)} do{
GF_AL_allPlayers = [];
{if(alive _x && isPlayer _x) then{GF_AL_allPlayers pushBack _x;};}forEach allUnits;

if(count GF_AL_allPlayers > 0)then{
    _ok = true;
    }else{
    if (GF_AL_Systemchat_info) then {
    //    systemchat "Waiting a Player to enter";            
    };    

    if (GF_AL_diag_log_info) then {
    //    diag_log "//________________ Waiting a Player to enter ________________";
    };
    uisleep 1;
    };
};


waituntil{_ok};

if (GF_AL_Systemchat_info) then {
//    systemchat "a Player entered";            
};    

if (GF_AL_diag_log_info) then {
//    diag_log "//________________ a Player entered ________________";
};

GF_AL_allPlayers = [];
{if(alive _x && isPlayer _x) then{GF_AL_allPlayers pushBack _x;};}forEach allUnits;

_array = selectRandom[    
            "lm1",        //loot marker 1
            "lm2",        //loot marker 2
            "lm3"          //loot marker 3
            ];
GF_AL_centerPosition = getmarkerPos _array;
GF_AL_size = 100;

_Buildings = nearestObjects [GF_AL_centerPosition, ["House", "Building"], GF_AL_size];
_a = 0;
    
while {(_a < GF_AL_items_number) && (count GF_AL_allPlayers > 0)} do {
    
GF_AL_allPlayers = [];
{if(alive _x && isPlayer _x) then{GF_AL_allPlayers pushBack _x;};}forEach allUnits;

if (typeName _Buildings != "ARRAY") exitWith {};
if (count _Buildings > 0) then {

_Building = selectRandom _Buildings;

if (!(typeOf _Building in GF_AL_Exclude_List)) then {

    _buildingPositions = [_Building] call BIS_fnc_buildingPositions;
    _count = count _buildingPositions;
    
    if (_count > 0) then {
    _buildingpos = selectRandom _buildingPositions;

    if !(_buildingpos isEqualTo [0,0,0]) then {

    _Pos = getPos _Building;

    GF_AL_Distance_Check_initialized = false;
    GF_AL_Distance_Check_Ok = false;

    [_Pos] call GF_AL_Distance_Check;    
    waituntil{GF_AL_Distance_Check_initialized};
    
    if (GF_AL_Distance_Check_Ok isEqualTo true)then {

    
    //________________    _Loot    ________________

    private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Text"];
    
    _Item = selectrandom GF_AL_cfgArray;
    _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass");    
    
    
    _Loot = createVehicle ["WeaponHolderSimulated",[_buildingpos select 0, _buildingpos select 1,_buildingpos select 2], [], 0, "CAN_COLLIDE"];
    _Color = "Default";    //   https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3
    _Text =  "Empty";
    
    _Loot setVariable ["Var_GF_AL_Loot",true];
    
    
    //   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") isEqualto 801) : {
//    _Loot addItemCargoGlobal [ _Item, 1 ];
//    _Color = "ColorGUER";_Text = "Uniforms";
//    };
    
case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") isEqualto 701) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "ColorKhaki";_Text = "Vests";
    };

case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") isEqualto 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") isEqualto 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") isEqualto 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") isEqualto 4) : {
    _Loot addWeaponCargoGlobal [ _Item, 1 ];
    private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines");
    if (count _magazines > 0) then {
    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") isEqualto 616): {
//    _Loot addItemCargoGlobal [ _Item, 1 ];
//    _Color = "ColorBlue";_Text = "Nvg";
//    };    
    
case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") isEqualto 4096) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "ColorWEST";_Text = "Items";
    };        

case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") isEqualto 131072) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "ColorWhite";_Text = "Weapon Attachments";
    };        
    
case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") isEqualto 0) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "colorBLUFOR";_Text = "Inventory Items";
    };    
    
};

    _a = _a + 1;
    };
    
//________________    GF_AL_Debug    ________________
    
if (GF_AL_Debug && {!(isNull _Loot)}) then {

    _Marker_Number = format ["%1",_buildingpos];
    _Marker = createMarker [_Marker_Number,getpos _Loot];        
    _Marker setMarkerShape "ICON";
    _Marker setMarkerType "mil_dot";
    _Marker setMarkerColor _Color;
    _Marker setMarkerText _Text;    
    _Marker setMarkerSize [0.6,0.6];
    };        


    if (GF_AL_Systemchat_info_count_items) then {
    systemchat format ["Items : %1",_a];
    };

    if (GF_AL_diag_log_info_count_items) then {
    diag_log format ["Items : %1",_a];
    };

    };
};
};
};
};
};
};


if (GF_AL_Cleaner_Spawn_Enabled) then {


[] spawn GF_AL;


if (GF_AL_Systemchat_info) then {
systemchat "Cleaner and Spawn Enabled";            
};    

if (GF_AL_diag_log_info) then {
diag_log "//________________ Cleaner and Spawn Enabled ________________";
};


[]spawn    {
    while {true} do {


        //___________________    MP    ___________________
        
        if (isMultiplayer) then {
        
        waitUntil{uisleep GF_AL_Cleaner_Spawn_Loop;

        if (GF_AL_Hintsilent_info) then {
        hintsilent "Deleting and Spawning";            
        };    

        if (GF_AL_diag_log_info) then {
        diag_log "//________________ Deleting and Spawning ________________";
        };
        
        
        _list = nearestObjects [GF_AL_centerPosition, [
        //    "WeaponHolder"
        //    "groundWeaponHolder",
            "WeaponHolderSimulated"
        ], worldSize];    

        {    
        _object = _x;
        if (
    
            (isNull(attachedTo _object))
            && (_x getVariable ["Var_GF_AL_Loot",false])
            && ({_x distance _object > GF_AL_Distance}count GF_AL_allPlayers > 0)
            
        )then{
        _list = _list - [_x];    
        deleteVehicle _x;    
        };
        }forEach _list;
        
        
        if (GF_AL_Debug) then {
        {deleteMarker _x;}forEach allMapMarkers;
        };
        
        uisleep 2;
        [] call GF_AL;
        
        
        };
        
        }else{

        //___________________    SP    ___________________
        
        waitUntil{uisleep GF_AL_Cleaner_Spawn_Loop;

        if (GF_AL_Hintsilent_info) then {
        hintsilent "Deleting and Spawning";            
        };    

        if (GF_AL_diag_log_info) then {
        diag_log "//________________ Deleting and Spawning ________________";
        };
        
        _list = nearestObjects [GF_AL_centerPosition, [
        //    "WeaponHolder"
        //    "groundWeaponHolder",
            "WeaponHolderSimulated"
        ], worldSize];    
        
        {    
        _object = _x;
        if (
    
            (isNull(attachedTo _object))  
            && (_x getVariable ["Var_GF_AL_Loot",false])
            && ((_x distance player) > GF_AL_Distance)
            
        ) then {
        _list = _list - [_x];        
        deleteVehicle _x;    
        };
        }forEach _list;
        
        
        if (GF_AL_Debug) then {
        {deleteMarker _x;}forEach allMapMarkers;
        };
        
        uisleep 3;
        [] call GF_AL;
        };
        
        };
    };    
};

}else{

[] spawn GF_AL;
};


if (GF_AL_Systemchat_info) then {
systemchat "GF Auto Loot Script initialized";            
};    

if (GF_AL_diag_log_info) then {
diag_log "//________________ GF Auto Loot Script initialized ________________";
};

 

  • Thanks 1

Share this post


Link to post
Share on other sites
On 7/11/2019 at 5:21 AM, Marius U said:

hey man...

 

Hello there Marius !

I was away  , so i'll try to check this as soon as possible !

 

PS : if i forgot it , please post here again !

Thanks !

Share this post


Link to post
Share on other sites
On 7/11/2019 at 5:21 AM, Marius U said:

hey man...where u able to figure it out?

 

Hello there Marius !

 

I just checked it , you just need to add this after the "while true" :

_array = selectRandom[    
            "lm1",        //loot marker 1
            "lm2",        //loot marker 2
            "lm3"          //loot marker 3
            ];
GF_AL_centerPosition = getmarkerPos _array;
GF_AL_size = 500; // meters

_Buildings = nearestObjects [GF_AL_centerPosition, ["House", "Building"], GF_AL_size];

 

The full code below :

Spoiler


//________________    Author : GEORGE FLOROS [GR]    ___________    06.04.19    ___________


/*
________________    GF Auto Loot Script - Mod    ________________

https://forums.bohemia.net/forums/topic/220701-gf-auto-loot-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/

ArmA 3 | Notepad ++ SQF tutorial
https://www.youtube.com/watch?v=aI5P7gp3x90

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/

BI Forum Ravage Club Owner :
https://forums.bohemia.net/clubs/73-bi-forum-ravage-club/
*/

GF_AL_Distance_Check_Loaded = false;

//________________    GF_Distance_Check.sqf    ________________
[] execVM "GF_Auto_Loot\GF_Distance_Check.sqf";

waituntil{GF_AL_Distance_Check_Loaded};

    
//________________ Settings ________________
//________________ Set true or false  ________________

GF_AL_Systemchat_info                    = true;        
GF_AL_Hintsilent_info                    = true;
GF_AL_diag_log_info                        = true;
GF_AL_Debug                             = true;

GF_AL_Systemchat_info_count_items        = true;
GF_AL_diag_log_info_count_items            = true;


GF_AL_items_number                         = 1000;        //    Number of the spawned items

//    1 = Load every Mod + Bohemia Items , 2 = Load every Mod - No Bohemia Items , 3 = Load Bohemia Items Only , 4 = Custom items only
GF_AL_Select                            = 1;

GF_AL_Blacklist_Zone_distance            = 50;        //    Add here the distance from the Blacklist Zones
GF_AL_Distance                            = 20;        //    Add here the distance from players

GF_AL_Cleaner_Spawn_Enabled                = true;
GF_AL_Cleaner_Spawn_Loop                = 600;    //    ex : 4 hours = 14400 sec

GF_AL_Exclude_List = [
"Land_Pier_F",
"Land_Pier_small_F",
"Land_NavigLight",
"Land_LampHarbour_F"
];


if (GF_AL_Systemchat_info) then {
systemchat "GF Auto Loot Script initializing";            
};    

if (GF_AL_diag_log_info) then {
diag_log "//________________ GF Auto Loot Script initializing ________________";
};


//GF_AL_centerPosition = getMarkerPos "GF_AL_Blacklist_Zone_1", "GF_AL_Blacklist_Zone_2";    
//GF_AL_size = 100;


//________________    Array     ________________

/*
//________________    GF_AL_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_AL_Assignable_Items_Mod_Blacklist
in case that the GF_AL_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_AL_Select

copyToClipboard str GF_AL_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_AL_Binocular_and_Nvg_array_Mod_Blacklist = [
    "mcc_sandbox_a3",
    "CUP_Weapons"        //    Example
    ];
//________________    GF_AL_Assignable_Items_Mod_Blacklist     ________________


//________________    INFO : Everything will Spawn automaticaly    ________________
//________________    adding extra custom arrays , will give more percetage possibility to find theese items    ________________

GF_AL_Custom_array_1 = [        

    //    Ravage_items
    
    //    x1
//    "rvg_plasticBottleEmpty",
//    "rvg_canteenEmpty",
//    "rvg_hose",
//    "rvg_sleepingBag_Blue",
//    "rvg_foldedTent",
//    "rvg_rustyCan",
//    "rvg_Geiger",
//    "rvg_canisterFuel_Empty",
//    "rvg_toolkit",
//    "rvg_tire",

    //    Vital            
//    "rvg_money",
//    "rvg_notepad",
//    "rvg_docFolder",
//    "rvg_canOpener",
//    "rvg_guttingKnife",
//    "rvg_matches",
//    "rvg_plasticBottle",
//    "rvg_plasticBottlePurified",
//    "rvg_spirit",
//    "rvg_franta",
//    "rvg_beans",
//    "rvg_bacon",
//    "rvg_milk",
//    "rvg_rice",
//    "rvg_antiRad",
//    "rvg_purificationTablets",                        

    //x2 Vital
//    "rvg_money",
//    "rvg_notepad",
//    "rvg_docFolder",
//    "rvg_canOpener",
//    "rvg_guttingKnife",
//    "rvg_matches",
//    "rvg_plasticBottle",
//    "rvg_plasticBottlePurified",
//    "rvg_spirit",
//    "rvg_franta",
//    "rvg_beans",
//    "rvg_bacon",
//    "rvg_milk",
//    "rvg_rice",
//    "rvg_antiRad",
//    "rvg_purificationTablets",

    //    Mask
    "Mask_M40_OD",
    "Mask_M40",
    "Mask_M50"
];


//    ACE3 Class Names
//   https://ace3mod.com/wiki/class-names.html
GF_AL_Custom_array_2 = [

    //    ACE3_mod_Medical

//    "ACE_atropine",
    "ACE_fieldDressing",
//    "ACE_elasticBandage",
//    "ACE_quikclot",
    "ACE_bloodIV",
//    "ACE_bloodIV_500",
//    "ACE_bloodIV_250",
//    "ACE_bodyBag",
//    "ACE_bodyBagObject",
    "ACE_epinephrine",
    "ACE_morphine",
//    "ACE_packingBandage",
//    "ACE_personalAidKit",
    "ACE_plasmaIV",
//    "ACE_plasmaIV_500",
//    "ACE_plasmaIV_250",
    "ACE_salineIV"
//    "ACE_salineIV_500",
//    "ACE_salineIV_250",
//    "ACE_surgicalKit",
//    "ACE_tourniquet"
];


GF_AL_Custom_array_3 = [

    //    ACE3_mod_items_array
    //    AtragMX
//    "ACE_ATragMX",

    //    Captive
//    "ACE_CableTie",

    //    Chemlights
//    "ACE_Chemlight_HiOrange",
//    "ACE_Chemlight_HiRed",
//    "ACE_Chemlight_HiYellow",
//    "ACE_Chemlight_HiWhite",
//    "ACE_Chemlight_Orange",
//    "ACE_Chemlight_White",
//    "ACE_Chemlight_IR",

    //    Common
//    "ACE_Banana",

    //    Concertina Wire
//    "ACE_ConcertinaWireCoil",
//    "ACE_ConcertinaWire",

    //    DAGR
//    "ACE_DAGR",

    //    Explosives
//    "ACE_Cellphone",
//    "ACE_Clacker",
//    "ACE_M26_Clacker",
//    "ACE_DefusalKit",
//    "ACE_DeadManSwitch",

    //    Flashlights
//    "ACE_Flashlight_MX991",
//    "ACE_Flashlight_KSF1",
//    "ACE_Flashlight_XL50",

    //    Grenades
//    "ACE_HandFlare_White",
//    "ACE_HandFlare_Red",
//    "ACE_HandFlare_Green",
//    "ACE_HandFlare_Yellow",
    "ACE_M14",
    "ACE_M84",

    //    Gun Bag
    "ACE_gunbag",
    "ACE_gunbag_Tan",

    //    Hearing
    "ACE_EarPlugs",

    //    HuntIR
    "ACE_HuntIR_monitor",
    "ACE_HuntIR_M203",
    "ACE_HuntIR_Box",

    //    Kestrel
//    "ACE_Kestrel4500",

    //    Laser Pointers
    "acc_pointer_IR",
    "ACE_acc_pointer_red",
    "ACE_acc_pointer_green_IR",
    "ACE_acc_pointer_green",

    //    ACE_acc_pointer_green
//    "ACE_UAVBattery",
//    "ACE_wirecutter",            

    //    Map Tools
    "ACE_MapTools",

    //    MicroDAGR
//    "ACE_microDAGR",

    //    Mine Detector
//    "ACE_VMH3",
//    "ACE_VMM3",

    //    MX2A    Binocular
//    "ACE_MX2A",

    //    Nightvision
//    "ACE_NVG_Gen1",
//    "ACE_NVG_Gen2",
//    "ACE_NVG_Gen4",
//    "ACE_NVG_Wide",

    //    Optics
    "ACE_optic_Arco_2D",
    "ACE_optic_Arco_PIP",
    "ACE_optic_LRPS_2D",
    "ACE_optic_LRPS_PIP",
    "ACE_optic_SOS_2D",
    "ACE_optic_SOS_PIP",
    "ACE_optic_MRCO_2D",
    "ACE_optic_MRCO_PIP",
    "ACE_optic_Hamr_2D",
    "ACE_optic_Hamr_PIP"

    //    Rangecard
//    "ACE_RangeCard",

    //    ACE_Track
//    "ACE_Track",
//    "ACE_Wheel",

    //    Sandbag
//    "ACE_Sandbag_empty",
//    "ACE_SandbagObject",

    //    Spotting Scope
//    "ACE_SpottingScope",
//    "ACE_SpottingScopeObject",

    //    Tactical Ladder
//    "ACE_TacticalLadder_Pack",
    //    "ACE_Tactical_Ladder",

    //    ACE_Tactical_Ladder
//    "ACE_SpraypaintBlack",
//    "ACE_SpraypaintBlue",
//    "ACE_SpraypaintGreen",
//    "ACE_SpraypaintRed",

    //    Trenches
//    "ACE_EntrenchingTool",

    //    Tripod
//    "ACE_Tripod",
//    "ACE_TripodObject",

    //    Vehicle Lock
//    "ACE_key_master",
//    "ACE_key_lockpick",
//    "ACE_key_west",
//    "ACE_key_east",
//    "ACE_key_indp",
//    "ACE_key_civ",

    //    Vector
//    "ACE_Vector",
//    "ACE_VectorDay",

    //    Yardage 450
//    "ACE_Yardage450"
];

    
//________________    case    ________________
    
_Array_Loaded = false;
_Select_items_Loaded = false;

private ["_items_case"];

switch (GF_AL_Select) do {


case 1 : {

//________________    Load every Mod + Bohemia items    ________________

GF_AL_primaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_secondaryWeapon_array = ("getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_handgunWeapon_array = ("getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_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_AL_Uniform_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Vests_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Headgear_array = ("getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Backpacks_array = ("getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x};
GF_AL_Goggles_array = ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x};

GF_AL_Items_array = ("getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Attachments_array = ("getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};

GF_AL_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_AL_Binocular_and_Nvg_array;


_items_case = "Load every Mod + Bohemia items";
_Select_items_Loaded = true;
};


case 2 : {

//________________    Load every Mod / No Bohemia items    ________________

GF_AL_primaryWeapon_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_secondaryWeapon_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_handgunWeapon_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Magazines_array = ("(!(getText( _x >> 'author' ) isEqualto '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_AL_Uniform_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Vests_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Headgear_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Backpacks_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x};
GF_AL_Goggles_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x};

GF_AL_Items_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Attachments_array = ("(!(getText( _x >> 'author' ) isEqualto 'Bohemia Interactive')) && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};

GF_AL_Binocular_and_Nvg_array = (
    "(!(getText( _x >> 'author' ) isEqualto '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_AL_Binocular_and_Nvg_array;

_items_case = "Load every Mod - No Bohemia items";
_Select_items_Loaded = true;    
};


case 3 : {

//________________    Bohemia items Only    ________________

GF_AL_primaryWeapon_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 1 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_secondaryWeapon_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_handgunWeapon_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 2 && getNumber (_x>> 'scope') isEqualTo 2" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Magazines_array = ("getText( _x >> 'author' ) isEqualto '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_AL_Uniform_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 801 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Vests_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 701 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Headgear_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'itemInfo' >> 'type') isEqualTo 605 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Backpacks_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'isbackpack') isEqualTo 1 && getNumber (_x>> 'scope') >1 && getNumber (_x>> 'maximumLoad') != 0" configClasses (configfile >> "CfgVehicles")) apply {configName _x};
GF_AL_Goggles_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgGlasses")) apply {configName _x};

GF_AL_Items_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 4096 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};
GF_AL_Attachments_array = ("getText( _x >> 'author' ) isEqualto 'Bohemia Interactive' && getNumber (_x >> 'type') isEqualTo 131072 && getNumber (_x>> 'scope') >1" configClasses (configfile >> "CfgWeapons")) apply {configName _x};

GF_AL_Binocular_and_Nvg_array = (
    "getText( _x >> 'author' ) isEqualto 'Bohemia Interactive'
    && (!(getText( _x >> 'DLC' ) in GF_AL_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_AL_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_AL_cfgArray = [];
But then delete the arrays and their count below
*/

//    add the classnames (as many you want ex : ["classnames","classnames"];    ex:
GF_AL_primaryWeapon_array  = ["arifle_MX_SW_F"];
GF_AL_secondaryWeapon_array = ["launch_NLAW_F"];
GF_AL_handgunWeapon_array = ["hgun_P07_F"];
GF_AL_Magazines_array = ["100Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"];
GF_AL_Uniform_array = ["U_B_CombatUniform_mcam_tshirt"];
GF_AL_Vests_array = ["V_PlateCarrier2_rgr"];
GF_AL_Headgear_array = ["H_HelmetB_grass"];
GF_AL_Backpacks_array = ["B_AssaultPack_mcamo"];
GF_AL_Goggles_array = ["G_Combat"];
GF_AL_Items_array = ["FirstAidKit"];
GF_AL_Attachments_array = ["acc_pointer_IR"];
GF_AL_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_AL_Hintsilent_info) then {
hintsilent format ["%1",_items_case];
};

if (GF_AL_diag_log_info) then {
diag_log format ["%1",_items_case];
};


GF_AL_cfgArray =
    GF_AL_primaryWeapon_array
    + GF_AL_secondaryWeapon_array
    + GF_AL_handgunWeapon_array
    + GF_AL_Magazines_array
//    + GF_AL_Uniform_array
    + GF_AL_Vests_array
    + GF_AL_Headgear_array
    + GF_AL_Backpacks_array
//    + GF_AL_Goggles_array
//    + GF_AL_Items_array
    + GF_AL_Attachments_array
//    + GF_AL_Binocular_and_Nvg_array
    
    //    + Custom arrays    
    + GF_AL_Custom_array_1        //    Ravage_items
    + GF_AL_Custom_array_2        //    ACE3_mod_Medical
    + GF_AL_Custom_array_3;        //    ACE3_mod_items_array

waituntil {_Array_Loaded};

//________________    GF_AL    ________________


GF_AL = {


_ok = false;
while {!(_ok)} do{
GF_AL_allPlayers = [];
{if(alive _x && isPlayer _x) then{GF_AL_allPlayers pushBack _x;};}forEach allUnits;

if(count GF_AL_allPlayers > 0)then{
    _ok = true;
    }else{
    if (GF_AL_Systemchat_info) then {
    //    systemchat "Waiting a Player to enter";            
    };    

    if (GF_AL_diag_log_info) then {
    //    diag_log "//________________ Waiting a Player to enter ________________";
    };
    uisleep 1;
    };
};


waituntil{_ok};

if (GF_AL_Systemchat_info) then {
//    systemchat "a Player entered";            
};    

if (GF_AL_diag_log_info) then {
//    diag_log "//________________ a Player entered ________________";
};

GF_AL_allPlayers = [];
{if(alive _x && isPlayer _x) then{GF_AL_allPlayers pushBack _x;};}forEach allUnits;


_a = 0;
    
while {(_a < GF_AL_items_number) && (count GF_AL_allPlayers > 0)} do {
    
GF_AL_allPlayers = [];
{if(alive _x && isPlayer _x) then{GF_AL_allPlayers pushBack _x;};}forEach allUnits;


////////////////////////////
_array = selectRandom[    
            "lm1",        //loot marker 1
            "lm2",        //loot marker 2
            "lm3"          //loot marker 3
            ];
GF_AL_centerPosition = getmarkerPos _array;
GF_AL_size = 500; // meters

_Buildings = nearestObjects [GF_AL_centerPosition, ["House", "Building"], GF_AL_size];
///////////////////////////////////////////////////////////////////////////////////////////


if (typeName _Buildings != "ARRAY") exitWith {};
if (count _Buildings > 0) then {

_Building = selectRandom _Buildings;

if (!(typeOf _Building in GF_AL_Exclude_List)) then {

    _buildingPositions = [_Building] call BIS_fnc_buildingPositions;
    _count = count _buildingPositions;
    
    if (_count > 0) then {
    _buildingpos = selectRandom _buildingPositions;

    if !(_buildingpos isEqualTo [0,0,0]) then {

    _Pos = getPos _Building;

    GF_AL_Distance_Check_initialized = false;
    GF_AL_Distance_Check_Ok = false;

    [_Pos] call GF_AL_Distance_Check;    
    waituntil{GF_AL_Distance_Check_initialized};
    
    if (GF_AL_Distance_Check_Ok isEqualTo true)then {

    
    //________________    _Loot    ________________

    private ["_Loot","_Item","_magazines","_Item_magazines","_getText","_Color","_Marker","_Text"];
    
    _Item = selectrandom GF_AL_cfgArray;
    _getText = getText (configFile >> "cfgVehicles" >> _Item >> "vehicleClass");    
    
    
    _Loot = createVehicle ["WeaponHolderSimulated",[_buildingpos select 0, _buildingpos select 1,_buildingpos select 2], [], 0, "CAN_COLLIDE"];
    _Color = "Default";    //   https://community.bistudio.com/wiki/CfgMarkerColors_Arma_3
    _Text =  "Empty";
    
    _Loot setVariable ["Var_GF_AL_Loot",true];
    
    
    //   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") isEqualto 801) : {
//    _Loot addItemCargoGlobal [ _Item, 1 ];
//    _Color = "ColorGUER";_Text = "Uniforms";
//    };
    
case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") isEqualto 701) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "ColorKhaki";_Text = "Vests";
    };

case(getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") isEqualto 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") isEqualto 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") isEqualto 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") isEqualto 4) : {
    _Loot addWeaponCargoGlobal [ _Item, 1 ];
    private _magazines = getArray (configFile >> "CfgWeapons" >> _Item >> "magazines");
    if (count _magazines > 0) then {
    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") isEqualto 616): {
//    _Loot addItemCargoGlobal [ _Item, 1 ];
//    _Color = "ColorBlue";_Text = "Nvg";
//    };    
    
case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") isEqualto 4096) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "ColorWEST";_Text = "Items";
    };        

case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") isEqualto 131072) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "ColorWhite";_Text = "Weapon Attachments";
    };        
    
case(getNumber (configFile >> "CfgWeapons" >> _item >> "type") isEqualto 0) : {
    _Loot addItemCargoGlobal [ _Item, 1 ];
    _Color = "colorBLUFOR";_Text = "Inventory Items";
    };    
    
};

    _a = _a + 1;
    };
    
//________________    GF_AL_Debug    ________________
    
if (GF_AL_Debug && {!(isNull _Loot)}) then {

    _Marker_Number = format ["%1",_buildingpos];
    _Marker = createMarker [_Marker_Number,getpos _Loot];        
    _Marker setMarkerShape "ICON";
    _Marker setMarkerType "mil_dot";
    _Marker setMarkerColor _Color;
    _Marker setMarkerText _Text;    
    _Marker setMarkerSize [0.6,0.6];
    };        


    if (GF_AL_Systemchat_info_count_items) then {
    systemchat format ["Items : %1",_a];
    };

    if (GF_AL_diag_log_info_count_items) then {
    diag_log format ["Items : %1",_a];
    };

    };
};
};
};
};
};
};


if (GF_AL_Cleaner_Spawn_Enabled) then {


[] spawn GF_AL;


if (GF_AL_Systemchat_info) then {
systemchat "Cleaner and Spawn Enabled";            
};    

if (GF_AL_diag_log_info) then {
diag_log "//________________ Cleaner and Spawn Enabled ________________";
};


[]spawn    {
    while {true} do {


        //___________________    MP    ___________________
        
        if (isMultiplayer) then {
        
        waitUntil{uisleep GF_AL_Cleaner_Spawn_Loop;

        if (GF_AL_Hintsilent_info) then {
        hintsilent "Deleting and Spawning";            
        };    

        if (GF_AL_diag_log_info) then {
        diag_log "//________________ Deleting and Spawning ________________";
        };
        
        
        _list = nearestObjects [GF_AL_centerPosition, [
        //    "WeaponHolder"
        //    "groundWeaponHolder",
            "WeaponHolderSimulated"
        ], worldSize];    

        {    
        _object = _x;
        if (
    
            (isNull(attachedTo _object))
            && (_x getVariable ["Var_GF_AL_Loot",false])
            && ({_x distance _object > GF_AL_Distance}count GF_AL_allPlayers > 0)
            
        )then{
        _list = _list - [_x];    
        deleteVehicle _x;    
        };
        }forEach _list;
        
        
        if (GF_AL_Debug) then {
        {deleteMarker _x;}forEach allMapMarkers;
        };
        
        uisleep 2;
        [] call GF_AL;
        
        
        };
        
        }else{

        //___________________    SP    ___________________
        
        waitUntil{uisleep GF_AL_Cleaner_Spawn_Loop;

        if (GF_AL_Hintsilent_info) then {
        hintsilent "Deleting and Spawning";            
        };    

        if (GF_AL_diag_log_info) then {
        diag_log "//________________ Deleting and Spawning ________________";
        };
        
        _list = nearestObjects [GF_AL_centerPosition, [
        //    "WeaponHolder"
        //    "groundWeaponHolder",
            "WeaponHolderSimulated"
        ], worldSize];    
        
        {    
        _object = _x;
        if (
    
            (isNull(attachedTo _object))  
            && (_x getVariable ["Var_GF_AL_Loot",false])
            && ((_x distance player) > GF_AL_Distance)
            
        ) then {
        _list = _list - [_x];        
        deleteVehicle _x;    
        };
        }forEach _list;
        
        
        if (GF_AL_Debug) then {
        {deleteMarker _x;}forEach allMapMarkers;
        };
        
        uisleep 3;
        [] call GF_AL;
        };
        
        };
    };    
};

}else{

[] spawn GF_AL;
};


if (GF_AL_Systemchat_info) then {
systemchat "GF Auto Loot Script initialized";            
};    

if (GF_AL_diag_log_info) then {
diag_log "//________________ GF Auto Loot Script initialized ________________";
};

 

 

If it's anything more tell me ok ?!

Share this post


Link to post
Share on other sites

I just notice that after the loop to despawn the items and spawn the new ones , the script stops and i can't find the problem on right now.

Once it's ok i'll post it here.

  • Like 1

Share this post


Link to post
Share on other sites

George,you should package all your scripts into an AIO pbo.A one-stop script mart.Just a suggestion.

  • Thanks 1

Share this post


Link to post
Share on other sites

thanks for the reply man, and the help

unfortunately its a massive MASSIVE resource hog...lost about 30+ fps from the game that only gives me 40 to begin with...

 

thanks for the effort though

 

  • Like 1

Share this post


Link to post
Share on other sites
On 7/16/2019 at 2:25 AM, miasdad said:

George,you should package all your scripts into an AIO pbo.A one-stop script mart.Just a suggestion.

 

Thanks miasdad !

I had this in mind to be honest and i started doing it , but didn't finished and i forgot this actually.

I need sometime to check about it !

 

17 hours ago, Marius U said:

unfortunately its a massive MASSIVE resource hog...lost about 30+ fps

Thanks might this be because of settings etc ?

because i haven't got any report ever about it.

  • Like 1

Share this post


Link to post
Share on other sites

I was wondering....if there's a way to not have the items visible on the map...so that players dont see them or their location.

 

Also...i want the standard arma 3 and cup items to spawn (the free stuff)...but i dont want anything from a paid DLC....is one of your 4 options for that?

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, Marius U said:

I was wondering....if there's a way to not have the items visible on the map...

 

The debug is enabled by default , just turn it of from the settings !

For the spawned items of the bohemia you need to edit the code further as i have the examples in the script and add the dlc that you don't want.

Share this post


Link to post
Share on other sites

Hi! First of all, awesome job! 😄

 

There is any way, to hide the loot position from the map?  Basically I would like to blind search the loot. 

 

Thank you!

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Flybikes Bmx said:

Thank you!

 

Hello there Flybikes Bmx and thank you very much !

 

You just need to turn of the debug from the settings of the script.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Flybikes Bmx said:

It worked! Thank you 😄

 

You're welcome !

and welcome also to Bis Forums !

  • Like 1

Share this post


Link to post
Share on other sites

I know this is an old thread and GF isn't around any more, but wondering if anyone is able to help me out.

I have a mission that is using GFs Auto Loot script which works fine on my PC in single player and when hosting from my PC.  However, when I run my mission on my server, it closes and returns to the mission selection screen.

Lines from when my mission loads on the server

11:55:14 Mission [Ravage]Encerrados_en_V25.prei_khmaoch_luong: Number of roles (22) is different from 'description.ext::Header::maxPlayer' (16)
11:55:18 Starting mission:
11:55:18  Mission file: [Ravage]Encerrados_en_V25 (__cur_mp)
11:55:18  Mission world: prei_khmaoch_luong
11:55:18  Mission directory: mpmissions\__cur_mp.prei_khmaoch_luong\
11:55:18 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:18 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:18 Warning Message: No entry '.gridNumbersOverLines'.
11:55:18 Warning Message: '/' is not a value
11:55:18 Warning Message: No entry '.centerPosition'.
11:55:18 Warning Message: []: '/' not an array
11:55:18 Cannot evaluate '' - no file
11:55:18 Warning Message: []: '/' not an array
11:55:18 Cannot evaluate '' - no file
11:55:18 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:18 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:18 Warning Message: No entry '.gridNumbersOverLines'.
11:55:18 Warning Message: '/' is not a value
11:55:18 Warning Message: No entry '.centerPosition'.
11:55:18 Warning Message: []: '/' not an array
11:55:18 Cannot evaluate '' - no file
11:55:18 Warning Message: []: '/' not an array
11:55:18 Cannot evaluate '' - no file
11:55:18 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:18 [CBA] (xeh) INFO: [6121,140.976,0] PreInit started. v3.15.8.220912
11:55:18 [CBA] (xeh) WARNING: One or more children of class CAManBase do not support Extended Event Handlers. Fall back to loop.
11:55:18 [CBA] (settings) INFO: Reading settings from settings file.
11:55:18 [CBA] (settings) INFO: Finished reading settings from settings file.
11:55:19 [ACE] (common) INFO: Parsed Settings Configs [1.0 ms]
11:55:19 [CBA] (settings) WARNING: Value true is invalid for setting ace_cookoff_enable.
11:55:19 [CBA] (xeh) INFO: [6121,141.388,0] PreInit finished.
11:55:19 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:19 Warning Message: No entry '.gridNumbersOverLines'.
11:55:19 Warning Message: '/' is not a value
11:55:19 Warning Message: No entry '.centerPosition'.
11:55:19 Warning Message: []: '/' not an array
11:55:19 Cannot evaluate '' - no file
11:55:19 Warning Message: []: '/' not an array
11:55:19 Cannot evaluate '' - no file
11:55:19 Warning Message: No entry 'bin\config.bin/CfgWorlds.prei_khmaoch_luong'.
11:55:20 Strange convex component145 in a3\plants_f\tree\t_pinuss2s_b_f.p3d:geometryView
11:55:20 Strange convex component149 in a3\plants_f\tree\t_pinuss2s_b_f.p3d:geometryView
11:55:20 mainturret - unknown animation source mainturret
11:55:20 maingun - unknown animation source maingun
11:55:20 leg_01 - unknown animation source fold_legs
11:55:20 leg_02 - unknown animation source fold_legs
11:55:20 leg_03 - unknown animation source fold_legs
11:55:20 hidetube - unknown animation source damage
11:55:20 mainturret - unknown animation source mainturret
11:55:20 maingun - unknown animation source maingun
11:55:20 leg_01 - unknown animation source fold_legs
11:55:20 leg_02 - unknown animation source fold_legs
11:55:20 leg_03 - unknown animation source fold_legs
11:55:20 hidetube - unknown animation source damage
11:55:20 Strange convex component24 in a3\structures_f\households\house_small02\u_house_small_02_v1_dam_f.p3d:geometryView
11:55:22 Unexpected stringtable format inside <Text ID="STR_ATM_Main"><Key>
11:55:22 Unexpected stringtable format inside <Text ID="STR_ATM_Main"><Key>
11:55:22 Unsupported language English in stringtable
11:55:22  ➥ Context: Operation_Zues.brf_sumava.pbo
11:55:22 Unexpected stringtable format inside <Text ID="STR_ATM_Main"><Key>
11:55:22 Unexpected stringtable format inside <Text ID="STR_ATM_Main"><Key>
11:55:22 Unsupported language English in stringtable
11:55:22  ➥ Context: Valr_Zeus.NorthTakistan.pbo
11:55:22 Unexpected stringtable format inside <Text ID="STR_ATM_Main"><Key>
11:55:22 Unexpected stringtable format inside <Text ID="STR_ATM_Main"><Key>
11:55:22 Unsupported language English in stringtable
11:55:22  ➥ Context: VSOG_Sumava_Zeus_Mission.brf_sumava.pbo
11:55:24 Creation of object L Multiplayer:2 failed, state LOGGED IN
11:55:24 Client: Nonnetwork object 4ee477e0.
11:55:24 Creation of object L Zeus:2 failed, state LOGGED IN
11:55:24 Client: Nonnetwork object 4ee47ce0.
11:55:25 Creation of object L Remnant:2 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee472e0.
11:55:25 Creation of object L Remnant:3 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee47e20.
11:55:25 Creation of object L Remnant:4 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee47ba0.
11:55:25 Creation of object L Remnant:5 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee479c0.
11:55:25 Creation of object L Remnant:6 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee47560.
11:55:25 Creation of object L Remnant:7 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee47880.
11:55:25 Creation of object L Remnant:8 failed, state LOGGED IN
11:55:25 Client: Nonnetwork object 4ee46de0.
11:55:25 "rvg : AI spawn initialised: 147.644"
11:55:25 Error in expression <tem\mission_routine.sqf";
rvg_locals = nearestLocations [_center, ["Namelocal"]>
11:55:25   Error position: <nearestLocations [_center, ["Namelocal"]>
11:55:25   Error 0 elements provided, 3 expected
11:55:25 File ravage\code\scripts\system\mission_init.sqf..., line 161
11:55:25 Trying to call RemoteExec(Call) with 0 targets for func 'werthles_fnc_whkdebughint'. Maximum is 1000
11:55:25 Error in expression <};
rvg_dynamicWrecks = [];
_locals = nearestLocations [_center, ["Namelocal"]>
11:55:25   Error position: <nearestLocations [_center, ["Namelocal"]>
11:55:25   Error 0 elements provided, 3 expected
11:55:25 File ravage\code\scripts\system\wrecks_init.sqf..., line 134
11:55:28 [CBA] (xeh) INFO: [6340,150.261,0] PostInit started. MISSIONINIT: missionName=[Ravage]Encerrados_en_V25, missionVersion=54, worldName=prei_khmaoch_luong, isMultiplayer=true, isServer=true, isDedicated=true, CBA_isHeadlessClient=false, hasInterface=false, didJIP=false
11:55:28 [CBA] (versioning) INFO: [6340,150.332,0] VERSIONING:cba=3.15.8.220912, zen=1.14.0.34, ace=3.15.2.69
11:55:28 [ACE] (common) INFO: ACE is version 3.15.2.69 - CBA is version 3.15.8.220912 (min required 3.15.7)
11:55:28 [CBA] (xeh) INFO: [6340,150.495,0] PostInit finished.
11:55:28 [ACE] (common) INFO: Settings initialized.
11:55:28 [ACE] (common) INFO: 10 delayed functions running.
11:55:28 "//________________ GF_Fog_Change_spotDistance.sqf _____________"
11:55:29 RHS_Mi8MTV3_vvs: mi8_hook_hide - unknown animation source mi8_hook_hide
11:55:29 RHS_Mi8MTV3_vvs: reardoors_hide - unknown animation source reardoors_hide
11:55:29 RHS_Mi8MTV3_vvs: reardoors_hide_left - unknown animation source reardoors_hide
11:55:29 Creation of object O Alpha 1-1 failed, state LOGGED IN
11:55:29 Creation of object O Alpha 1-1:<Empty main subgroup> failed, state LOGGED IN
11:55:29 Client: Nonnetwork object 4f4a6520.
11:55:29 Client: Nonnetwork object 4f494900.
11:55:29 Ref to nonnetwork object O Alpha 1-1:1
11:55:29 Creation of object O Alpha 1-1:1 failed, state LOGGED IN
11:55:29 Client: Nonnetwork object 4f494900.
11:55:29 Ref to nonnetwork object O Alpha 1-1:2
11:55:29 Creation of object O Alpha 1-1:2 failed, state LOGGED IN
11:55:29 Ref to nonnetwork object O Alpha 1-1:3
11:55:29 Creation of object O Alpha 1-1:3 failed, state LOGGED IN
11:55:29 Ref to nonnetwork object O Alpha 1-1:4
11:55:29 Creation of object O Alpha 1-1:4 failed, state LOGGED IN
11:55:29 Ref to nonnetwork object O Alpha 1-1:5
11:55:29 Creation of object O Alpha 1-1:5 failed, state LOGGED IN
11:55:29 Ref to nonnetwork object O Alpha 1-1:1
11:55:29 Ref to nonnetwork object O Alpha 1-1:2
11:55:29 Ref to nonnetwork object O Alpha 1-1:3
11:55:29 Ref to nonnetwork object O Alpha 1-1:4
11:55:29 Ref to nonnetwork object O Alpha 1-1:5
11:55:29 "//________________ GF_AL_Distance_Check initializing ________________"
11:55:29 "//______________________ GF_AL_Distance_Check initialized	___________________"
11:55:29 Error in expression <k _x;};}forEach allUnits;
_Buildings = nearestObjects [GF_AL_centerPosition, [">
11:55:29   Error position: <nearestObjects [GF_AL_centerPosition, [">
11:55:29   Error 0 elements provided, 3 expected
11:55:29 File mpmissions\__cur_mp.prei_khmaoch_luong\GF_Auto_Loot\GF_Auto_Loot.sqf..., line 586

line 586 and 587 from GF_Auto_Loot.sqf script:


_Buildings = nearestObjects [GF_AL_centerPosition, ["House", "Building"], GF_AL_size];
_a = 0;


 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×