Jump to content

Recommended Posts

2 hours ago, chernaruski said:

I was trying to implement it on Exilemod+Ravage server,  it seems Ravage zombies don't drop any loot...

 

Hello chernaruski !

 

I created this , in order to work for Ravage.

Did you noticed that is not working?

I haven't test this with exile , but it should be working as well.

As for the cleanup , you can use ravage cleanup or i have also created a very configurable script here :

Did you tested with ravage or exile ?

Share this post


Link to post
Share on other sites
4 hours ago, chernaruski said:

it seems Ravage zombies don't drop any loot...

 

Just tested & working :

 

# as it's should

MNKmldI.jpg

rHJ25fV.jpg

Share this post


Link to post
Share on other sites
On 12/26/2018 at 12:03 PM, GEORGE FLOROS GR said:

 

Hello chernaruski !

 

I created this , in order to work for Ravage.

Did you noticed that is not working?

I haven't test this with exile , but it should be working as well.

As for the cleanup , you can use ravage cleanup or i have also created a very configurable script here :

Did you tested with ravage or exile ?



Yeah, I've tested on Ravage+Exile.   I use zombie module from Ravage and Exilemod based server and was wondering if someone uses your script to drop loot from zombies. 
Didn't work for me, just needed confirmation . In a meantime I'll try to figure why it doesn't at the moment.   Exile have its own loot drop/cleanup system built in, so maybe need to alter a client code (or merge with your script) for it to work properly.


Maybe its even better to intergrate this loot drop script via the  "killed" event handler that is built in Ravage's Ambient Zombies module.... need to sleep on it.

  • Like 1

Share this post


Link to post
Share on other sites

Couldn't make it work with Exile.  Event handlers changed somewhere... Until I find out what exactly causing this, maybe there is a way to call for your script via built-in Ravage Ambient Zombies module?

PS: I'll just add the whole code to Killed EH and see what happens ))
 

  • Like 1

Share this post


Link to post
Share on other sites
16 minutes ago, chernaruski said:

PS: I'll just add the whole code to Killed EH and see what happens ))

 

You can try also to execute the script with the EH and add the code from here:

 

if (_killed isKindOf "CAManBase" 

 

Have you tried to execute the script from the initserver ?

 

Share this post


Link to post
Share on other sites
11 hours ago, GEORGE FLOROS GR said:

Have you tried to execute the script from the initserver ?

 

Yeah, of course.  Didn't work for me for some reason.

Yesssss! It works via Ravage module - EH . I've just copy pasted code directly , you must delete all the commented stuff first of course. 
Now its time to do some tweaking....   config the items , its randomness to spawn or not (I don't want every zed to drop items), and remove the unneeded stuff such as weapons/vests/etc cause I want zombies to drop only basic items.

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, chernaruski said:

Yesssss! It works via Ravage module - EH .

 

It's good to hear this !  :thumb:

Share this post


Link to post
Share on other sites
13 minutes ago, chernaruski said:

I've just copy pasted code directly

 

Just do me a favour and after you finish with your code , write your case , ( that this is used with exile , etc ) with your example here :

 

 

 

Thanks chernaruski !

  • Like 1

Share this post


Link to post
Share on other sites

Hey @GEORGE FLOROS GR, I'm loving the droop loot script! 

I've modified it a little bit; I've disabled all the vanilla items, only Ravage stuff + I've added a couple of times empty cans so the rarity of the useful item is less frequent! Also, I've excluded toolkits, Geiger counters, and canisters from the drop loot.

However I have a question, if I kill a bandit who potentially carries a toolbox/geiger/canister, these items remain his inventory because of
_1_Remove_Everything_from_Unit            = false;

Right? Only extra items are added from the list?
 

Spoiler


//________________  Author : [GR]GEORGE F ___________ 28.06.18 _____________

/*
________________ GF Drop Loot Script ________________

https://forums.bohemia.net/forums/topic/215771-drop-loot-gf-script/

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 colours 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 Drop Loot Script _____________";

systemchat "GF Drop Loot Script    I n i t i a l i z e d";


//________________ Enemies , will drop items or add to their inventory , when killed , configurable ________________

addMissionEventHandler ["EntityKilled", 
{
    params ["_killed", "_killer"];    
    if (_killed isKindOf "CAManBase"  

//________________ you can select to enable the script with the side of the killed persons ________________    

/*    
    && {(    
        (side group _killed) == east || 
        (side group _killed) == independent ||
        (side group _killed) == civilian ||          
        (side group _killed) == west)    
        }
*/
        
        ) then
    {
    //systemChat format ["killed"];

    //________________ Just a kill notification ________________    
    _distance = _killer distance2D _killed;
    
    [[
    [ format ["HIT %1m", floor _distance,"align = 'center' size = '1' font='PuristaBold'","#FBFCFE"]]
    ]]spawn BIS_fnc_typeText2;        


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

_Systemchat_Enabled                        = false;            //    Show spawn selections


_1_Remove_Everything_from_Unit            = false;         //    Remove Everything from Unit , else comment with //
_2_Clear_Unit_Items                        = false;         //    Clear Unit's items

_3_Link_Items_to_their_inventory        = false;         //    Link items to their inventory

_4_Add_a_random_side_weapon_in_hands    = false;         //    Add a random side weapon in hands 
_5_Add_a_random_weapon_in_hands            = false;         //    Add a random weapon in hands

_6_Add_a_random_uniform                    = false;         //    Add a random uniform 
_7_Add_a_random_item_in_uniform         = true;         //    Add a random item in their uniform

_8_Add_a_random_vest                    = false;         //    Add a random vest
_9_Add_a_random_item_in_vest            = false;         //    Add a random item in their vest

_10_Add_a_random_backpack                = false;         //    Add a random backpack
_11_Add_a_random_item_in_backpack        = false;         //    Add a random item in their backpack

_12_Drop_Items                            = false;         //    Add a random item in their backpack
_13_Drop_Magazines_Side_Weapon            = false;         //    Drop Magazines for Side Weapon
_14_Drop_Magazines_Primary_Weapons        = false;         //    Drop Magazines for Primary Weapons


_unit = _this select 0;


//________________ Clear Unit's items ________________

if (_1_Remove_Everything_from_Unit) then {

if (_Systemchat_Enabled) then {
systemchat "_1_Remove_Everything_from_Unit";
};

    removeallweapons _unit;
    removeAllItems _unit;
    removeAllAssignedItems _unit;
    removeUniform _unit;
    removeVest _unit;
    removeBackpack _unit;
    removeHeadgear _unit;
    removeGoggles _unit;
    
};

            
//________________ Clear Unit's items ________________

if (_2_Clear_Unit_Items) then {

if (_Systemchat_Enabled) then {
systemchat "_2_Clear_Unit_Items";
};

clearWeaponCargoGlobal _unit;
clearMagazineCargoGlobal _unit;
clearItemCargoGlobal _unit;
clearBackpackCargoGlobal _unit;

};    


//________________    Link items to their inventory    ________________            

if (_3_link_Items_to_their_inventory) then {

if (_Systemchat_Enabled) then {
systemchat "_3_link_Items_to_their_inventory";
};                        
                        
    //    you link a certain item
    _unit linkItem "ItemMap";        
    _unit linkItem "ItemCompass";
    _unit linkItem "ItemRadio";
    _unit linkItem "NVGoggles_OPFOR";
    _unit linkItem "ItemGPS";
            
    //    OR add rarity 
    //    if (floor (random 20) < 2) then {_unit linkItem "ItemRadio"};
    
};            

//________________    Amount of items spawned    ________________
_Random_Amount =   round (1 + random 0);

            
//________________    Items Pool    ________________

_sideweapons_loot = selectRandom [
            //Pistols
            
            //Apex
            
            //SubMachineGuns
            
            ];
            

_weapons_Loot = selectRandom [
            //LightMachineGuns
            
            //Apex
            

            //AssaultRifles
            
            //Apex AssaultRifles
            
            //
            

            //SniperRifles
            
            //Apex SniperRifles
            
            
            // Launchers
            
            ];
            

_items_loot1 = selectRandom [
            //for RyanZombies
            //"RyanZombiesAntiVirusTemporary_Item",
            //"RyanZombiesAntiVirusCure_Item",
            
            //Vanilla            
            
            //Tools

            ];
    
    
_items_loot2 = selectRandom [
            //Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG[compass.map]

            //x2

            //PointerAttachments

            //BipodAttachments

            //Apex

            //MuzzleAttachments

            //Apex

            //OpticAttachments

            //Apex

            
            //NVG

            ];

    
_items_loot3 = selectRandom [
            //Flares

            //Smokes


            ];
            

_Clothes_array = selectRandom [

            ];  
            

_Vests_array = selectRandom [
        
            ]; 


_Backpacks_array = selectRandom [
            "B_AssaultPack_blk",
            "B_AssaultPack_cbr",
            "B_AssaultPack_dgtl",
            "B_AssaultPack_khk",
            "B_AssaultPack_mcamo",
            "B_AssaultPack_rgr",
            "B_AssaultPack_sgg",
            "B_Bergen_blk",
            "B_Bergen_mcamo",
            "B_Bergen_rgr",
            "B_Bergen_sgg",
            "B_Carryall_cbr",
            "B_Carryall_khk",
            "B_Carryall_mcamo",
            "B_Carryall_ocamo",
            "B_Carryall_oli",
            "B_Carryall_oucamo",
            "B_FieldPack_blk",
            "B_FieldPack_cbr",
            "B_FieldPack_ocamo",
            "B_FieldPack_oucamo",
            "B_HuntingBackpack",
            "B_Kitbag_cbr",
            "B_Kitbag_mcamo",
            "B_Kitbag_sgg",
            "B_OutdoorPack_blk",
            "B_OutdoorPack_blu",
            "B_OutdoorPack_tan",
            "B_TacticalPack_blk",
            "B_TacticalPack_mcamo",
            "B_TacticalPack_ocamo",
            "B_TacticalPack_oli",
            "B_TacticalPack_rgr",

            "B_Bergen_mcamo_F",
            "B_Bergen_dgtl_F",
            "B_Bergen_hex_F",
            "B_Bergen_tna_F",
            "B_AssaultPack_tna_F",
            "B_Carryall_ghex_F",
            "B_FieldPack_ghex_F",
            "B_ViperHarness_blk_F",
            "B_ViperHarness_ghex_F",
            "B_ViperHarness_hex_F",
            "B_ViperHarness_khk_F",
            "B_ViperHarness_oli_F",
            "B_ViperLightHarness_blk_F",
            "B_ViperLightHarness_ghex_F",
            "B_ViperLightHarness_hex_F",
            "B_ViperLightHarness_khk_F",
            "B_ViperLightHarness_oli_F",
            
            "O_HMG_01_high_weapon_F",
            "O_HMG_01_weapon_F",
            "O_GMG_01_high_weapon_F",
            "O_GMG_01_weapon_F",
            "O_Mortar_01_support_F",
            "O_Mortar_01_weapon_F",
            "O_HMG_01_support_high_F",
            "O_HMG_01_support_F",
            "O_AA_01_weapon_F",
            "O_AT_01_weapon_F",
            "O_Static_Designator_02_weapon_F",
            "B_Static_Designator_01_weapon_F",
            
            "B_LegStrapBag_black_F",
            "B_LegStrapBag_coyote_F",
            "B_LegStrapBag_olive_F",
            "B_Messenger_Black_F",
            "B_Messenger_Coyote_F",
            "B_Messenger_IDAP_F",
            "I_UAV_06_backpack_F",
            "O_UAV_06_backpack_F",
            "B_UAV_06_backpack_F"
            ];  

            
_Ravage_items = selectRandom [        
            // Ravage_items
            //x1
            "rvg_plasticBottleEmpty",
            "rvg_canteenEmpty",
            "rvg_hose",
            "rvg_rustyCanEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_rustyCanEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "ItemFirstAidKit",
            "rvg_rustyCan",
            //x2 Vital            
            "rvg_money", 
            "rvg_notepad", 
            "rvg_docFolder",
            "rvg_canOpener",
            "rvg_guttingKnife", 
            "rvg_matches",
            "rvg_plasticBottle",
            "rvg_plasticBottlePurified", 
            "rvg_spirit", 
            "rvg_rustyCanEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_rustyCanEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_franta",
            "rvg_beans", 
            "rvg_bacon", 
            "rvg_milk", 
            "rvg_rice",
            "ItemFirstAidKit",
            "rvg_antiRad",
            "rvg_purificationTablets",                        
            //x2 Vital
            "rvg_money", 
            "rvg_notepad", 
            "rvg_docFolder",
            "rvg_canOpener",
            "rvg_guttingKnife", 
            "rvg_matches",
            "rvg_plasticBottle",
            "rvg_plasticBottlePurified", 
            "rvg_rustyCanEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "ItemFirstAidKit",
            "ItemFirstAidKit",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_rustyCanEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_beansEmpty",
            "rvg_baconEmpty",
            "rvg_spiritEmpty",
            "rvg_frantaEmpty",
            "rvg_spirit", 
            "rvg_franta",
            "rvg_beans", 
            "rvg_bacon", 
            "rvg_milk", 
            "rvg_rice",
            "rvg_antiRad",
            "rvg_purificationTablets",
            
            //addon Ravage
            "Mask_M40_OD",
            "Mask_M40"
            ];
            

            
            
//________________    MAGS    ________________


//________________    sideweapon's mag    ________________
_magazines_sideweapon = getArray (configFile / "CfgWeapons" / _sideweapons_loot / "magazines");
_magazineClass_sideweapon = _magazines_sideweapon call bis_fnc_selectRandom; 
//________________    Amount of sideweapon's mag spawned    ________________
_magazines_sideweapon_Amount =   round (1 + random 1);


//________________    weapon's mags    ________________
_magazines_weapon = getArray (configFile / "CfgWeapons" / _weapons_Loot / "magazines");
_magazineClass_weapon = _magazines_weapon call bis_fnc_selectRandom; 
//________________    Amount of weapon's mags spawned    ________________
_magazines_weapon_Amount =   round (1 + random 1);


//________________ Item Pool End    ________________


//________________    Add random items in containers ( uniform , vest and backpack )    ________________
//________________    You can adjust here the arrays
_addItemCargoGlobal_Array_1 = selectRandom[    

    _sideweapons_loot,
    _weapons_Loot,
    
    _magazineClass_sideweapon,
    _magazineClass_weapon,
    
    _items_loot1,
    _items_loot2,
    _items_loot3,
    _Clothes_array,
    _Vests_array,
    _Backpacks_array,
    
    _Ravage_items
];    


_addItemCargoGlobal_Array_2 = selectRandom[    

    _sideweapons_loot,
    _weapons_Loot,
    
    _magazineClass_sideweapon,
    _magazineClass_weapon,
    
    _items_loot1,
    _items_loot2,
    _items_loot3,
    
    _Ravage_items
];    


_addItemCargoGlobal_Array_3 = selectRandom[    

    _magazineClass_sideweapon,
    _magazineClass_weapon,
    
    _items_loot1,
    _items_loot2,
    _items_loot3,
    
    _Ravage_items
];


_addItemCargoGlobal_Array_4 = selectRandom[    

    _items_loot1,
    _items_loot2,
    _items_loot3,
    
    _Ravage_items
];


_addMagazineCargoGlobal_Array = selectRandom[    
    
    _magazineClass_sideweapon,
    _magazineClass_weapon
];    


//________________ Add a random side weapon in hands    ________________

if (_4_Add_a_random_side_weapon_in_hands) then {    

if (_Systemchat_Enabled) then {
systemchat "_4_Add_a_random_side_weapon_in_hands";
};    
    
_unit addWeaponGlobal _sideweapons_loot;

//    you can add a certain weapon
//    _unit addWeaponGlobal    "SMG_05_F";
            
//    you can add attachments to the weapon
//    _unit addPrimaryWeaponItem    "acc_flashlight";

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

_unit addmagazines [_magazineClass_sideweapon, _magazines_sideweapon_Amount];    //    or write 5 mags
        
};    


//________________ Add a random weapon in hands on random ________________

if (_5_Add_a_random_weapon_in_hands) then {

if (_Systemchat_Enabled) then {
systemchat "_5_Add_a_random_weapon_in_hands";
};
            
_unit addWeaponGlobal _weapons_Loot;

//    you can add a certain weapon
//    _unit addWeaponGlobal    "SMG_05_F";
            
//    you can add attachments to the weapon
//    _unit addPrimaryWeaponItem    "acc_flashlight";

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

_unit addmagazines [_magazineClass_weapon, _magazines_weapon_Amount];        //    or write 5 mags    
        
};    


//________________    Add a random uniform    ________________

if (_6_Add_a_random_uniform) then {

if (_Systemchat_Enabled) then {
systemchat "_6_Add_a_random_uniform";
};

_unit forceAddUniform  _Clothes_array;

};


//________________    Add a random item in their uniform    ________________

if (_7_Add_a_random_item_in_uniform) then {

if (_Systemchat_Enabled) then {
systemchat "_7_Add_a_random_item_in_uniform";
};

_uniform    = uniformContainer _unit;

//________________    you can add a certain item in their uniform ________________
//_uniform addMagazineCargoGlobal ["FirstAidKit", 2];
//_uniform addMagazineCargoGlobal ["Chemlight_blue", 2];

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

_uniform addItemCargoGlobal [_addItemCargoGlobal_Array_3, _Random_Amount];    
_uniform addItemCargoGlobal [_addItemCargoGlobal_Array_4, _Random_Amount];
_uniform addMagazineCargoGlobal [_addMagazineCargoGlobal_Array, _Random_Amount];    

//________________    OR more certain    ________________
/*    
    
//    items 1
_uniform addItemCargoGlobal [_items_loot1, _Random_Amount];    //    or write 5 Items

//    items 2 Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
_uniform addItemCargoGlobal [_items_loot2, _Random_Amount];

//    items 2 Here ONLY :Flares , Smokes , Explosives
_uniform addItemCargoGlobal [_items_loot3, _Random_Amount];    

//    sideweapon's mag            
_uniform addMagazineCargoGlobal [_magazineClass_sideweapon, _magazines_sideweapon_Amount];    //    or write 5 mags
//    weapon's mags
_uniform addMagazineCargoGlobal [_magazineClass_weapon, _magazines_weapon_Amount];        //    or write 5 mags    
*/

};


//________________ Add a random vest ________________

if (_8_Add_a_random_vest) then {

if (_Systemchat_Enabled) then {
systemchat "_8_Add_a_random_vest";
};

    //    you can add a vest 
    //    _unit addVest "V_Rangemaster_belt";
            
_unit addVest _Vests_array;    
            
};


//________________ Add a random item in their vest ________________

if (_9_Add_a_random_item_in_vest) then {

if (_Systemchat_Enabled) then {
systemchat "_9_Add_a_random_item_in_vest";
};

_vest        = vestContainer _unit;

//    you can add a certain item in their vest 
//    _vest addMagazineCargoGlobal ["30Rnd_9x21_Mag_SMG_02", 3];

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

_vest addItemCargoGlobal [_addItemCargoGlobal_Array_2, _Random_Amount];
_vest addItemCargoGlobal [_addItemCargoGlobal_Array_3, _Random_Amount];
_vest addItemCargoGlobal [_addItemCargoGlobal_Array_4, _Random_Amount];
_vest addMagazineCargoGlobal [_addMagazineCargoGlobal_Array, _Random_Amount];    

//________________    OR more certain    ________________
/*    
    
_vest addMagazineCargoGlobal [_backpack_addMagazineCargoGlobal_Array, _Random_Amount];    

            
//    items 1
_vest addItemCargoGlobal [_items_loot1, _Random_Amount];    //    or write 5 Items

//    items 2 Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
_vest addItemCargoGlobal [_items_loot2, _Random_Amount];

//    items 2 Here ONLY :Flares , Smokes , Explosives
_vest addMagazineCargoGlobal [_items_loot3, _Random_Amount];    


//    sideweapon's mag            
_vest addMagazineCargoGlobal [_magazineClass_sideweapon, _magazines_sideweapon_Amount];    //    or write 5 mags
//    weapon's mags
_vest addMagazineCargoGlobal [_magazineClass_weapon, _magazines_weapon_Amount];        //    or write 5 mags    
*/
};

            
//________________ Add a random item in their backpack ________________

if (_10_Add_a_random_backpack) then {            

if (_Systemchat_Enabled) then {
systemchat "_10_Add_a_random_backpack";
};
            
_unit addBackpack _Backpacks_array;                
                        
};


//________________ Add a random item in their vest ________________

if (_11_Add_a_random_item_in_backpack) then {

if (_Systemchat_Enabled) then {
systemchat "_11_Add_a_random_item_in_backpack";
};

_backpack    = BackpackContainer _unit;

//    you can add a certain item in their vest 
//    _backpack addMagazineCargoGlobal ["30Rnd_9x21_Mag_SMG_02", 3];
        
//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

_backpack addItemCargoGlobal [_addItemCargoGlobal_Array_1, _Random_Amount];
_backpack addItemCargoGlobal [_addItemCargoGlobal_Array_2, _Random_Amount];
_backpack addItemCargoGlobal [_addItemCargoGlobal_Array_3, _Random_Amount];
_backpack addItemCargoGlobal [_addItemCargoGlobal_Array_4, _Random_Amount];
_backpack addMagazineCargoGlobal [_addMagazineCargoGlobal_Array, _Random_Amount];    


//________________    OR more certain    ________________
/*    

//    items 1
_backpack addItemCargoGlobal [_items_loot1, _Random_Amount];    //    or write 5 Items

//    items 2 Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
_backpack addItemCargoGlobal [_items_loot2, _Random_Amount];

//    items 2 Here ONLY :Flares , Smokes , Explosives
_backpack addMagazineCargoGlobal [_items_loot3, _Random_Amount];    


//    sideweapon's mag            
_backpack addMagazineCargoGlobal [_magazineClass_sideweapon, _magazines_sideweapon_Amount];    //    or write 5 mags
//    weapon's mags
_backpack addMagazineCargoGlobal [_magazineClass_weapon, _magazines_weapon_Amount];        //    or write 5 mags    
*/


//________________    OR For more Random you can enable this    ________________
/*

_backpack_Items_Array = selectRandom[    

    _sideweapons_loot,
    _weapons_Loot,
    
    _magazineClass_sideweapon,
    _magazineClass_weapon,
    
    _items_loot1,
    _items_loot2,
    _items_loot3,
    _Clothes_array,
    _Vests_array,
    _Backpacks_array,
    
    _Ravage_items
];        
                        
_backpack_Items_Amount =   round (1 + random 1);
_backpack addItemCargoGlobal [_backpack_Items_Array, _backpack_Items_Amount];
*/

};

            
//________________    Drop Items    ________________            


if (_12_Drop_Items) then {    

if (_Systemchat_Enabled) then {
systemchat "_12_Drop_Items";
};
            

//_Drop_Items = "groundWeaponHolder" createVehicle (getpos _unit);
                        
_Drop_Items_Amount =   round (1 + random 0);
_Drop_Items = "WeaponHolderSimulated" createVehicle (getpos _unit); 

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

_Drop_Items addItemCargoGlobal [_addItemCargoGlobal_Array_1, _Drop_Items_Amount];
            
};            


//________________ Drop Magazines Side Weapons    ________________

if (_13_Drop_Magazines_Side_Weapon) then {    

if (_Systemchat_Enabled) then {
systemchat "_13_Drop_Magazines_Side_Weapons";
};
        

//_Drop_Magazines_Side_Weapon = "groundWeaponHolder" createVehicle (getpos _unit);
//_Drop_Magazines_Side_Weapon addMagazineCargoGlobal [_magazineClass_Extra, _magazines_Extra_Amount];        //    or write 5 mags

//_Drop_Magazines_Side_Weapon attachTo [_unit, [0,0,0.6]]; 
//detach _Drop_Magazines_Side_Weapon;   


_Drop_Magazines_Side_Weapon = "WeaponHolderSimulated" createVehicle (getpos _unit); 

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

//    sideweapon's mag            
_Drop_Magazines_Side_Weapon addMagazineCargoGlobal [_magazineClass_sideweapon, _magazines_sideweapon_Amount];    //    or write 5 mags    

};            

            
//________________    Drop Magazines Primary Weapons    ________________

if (_14_Drop_Magazines_Primary_Weapons) then {    

if (_Systemchat_Enabled) then {
systemchat "_14_Drop_Magazines_Primary_Weapons";
};
            

//_Drop_Magazines_Primary_Weapons = "groundWeaponHolder" createVehicle (getpos _unit);
//_Drop_Magazines_Primary_Weapons addMagazineCargoGlobal [_magazineClass_Extra, _magazines_Extra_Amount];        //    or write 5 mags

//_Drop_Magazines_Primary_Weapons attachTo [_unit, [0,0,0.6]]; 
//detach _Drop_Magazines_Primary_Weapons;   


_Drop_Magazines_Primary_Weapons = "WeaponHolderSimulated" createVehicle (getpos _unit); 

//    OR add rarity 
//    if (floor (random 20) < 2) then {    the code below here    };

//    weapon's mags
_Drop_Magazines_Primary_Weapons addMagazineCargoGlobal [_magazineClass_weapon, _magazines_weapon_Amount];        //    or write 5 mags
                
};


            
};}];

5

 

  • Thanks 1

Share this post


Link to post
Share on other sites
26 minutes ago, RZNUNKWN said:

remain his inventory

 

Hello there RZNUNKWN !

 

Thank you very much !

 

You need to enable the :

26 minutes ago, RZNUNKWN said:

_2_Clear_Unit_Items                        = false;         //    Clear Unit's items

 

and you can also comment something that you don't want.

  • Thanks 1

Share this post


Link to post
Share on other sites

But I do want AI items to remain in his inventory + additional items spawned from your script
So should: _2_Clear_Unit_Items                        = false;         //    Clear Unit's items - remain unchanged?

Everything else is working perfectly!

  • Like 1

Share this post


Link to post
Share on other sites
42 minutes ago, RZNUNKWN said:

a toolbox/geiger/canister,

 

These items are spawned from the ravage scripts and if you select clear the items , it will clear all the default items and the scripts bellow will add the new items.

 

If you want to keep the default items and remove a toolbox for example , then you should enable this and comment everything except :

clearBackpackCargoGlobal _unit;

 

If i find something more then i will post this here.

I'm thinking of something that might work.

  • Thanks 1

Share this post


Link to post
Share on other sites

Well, so far I've whacked a bandit who had a Geiger counter in his inventory + he had some more empty cans, so my conclusion is that both of the scripts (ravage + yours) are working good so far! Ravage created the Geiger, and yours spawned more cans (of course, in my scenario, your script is intended for zombies, hence the removal of Geiger/Canisters/Toolboxes). 

I'm still testing, but I  think it's actually working pretty good. If something comes up, I will keep you updated! 
 

  • Like 1

Share this post


Link to post
Share on other sites

Ok !

So create an array wih the items that you want to remove  and add this code before the end of the script :

 

it's not tested !

_Blacklist_items =[
//	add your list
"classname",
"classname"
]; 


{
	_unit unassignItem _x;
	_unit removeItem _x;
}foreach _Blacklist_items;

 

if you want this to happen only for the ravage zombies then you can also probably add an if then code :

 

_zombie_List = [
	//	Ravage zombies
	"zombie_bolter",
	"zombie_runner",
	"zombie_walker"
];


if(typeof _unit in _zombie_List) then {
	
	{
	_unit unassignItem _x;
	_unit removeItem _x;
	}foreach _Blacklist_items;

}; 

Try and tell me .

  • Thanks 1

Share this post


Link to post
Share on other sites

I haven't tested this one yet, because the current script is working good so far! I even managed to find a canister (but not on the zombie body!) :smileee:

But, this added script is good if I create an array of custom weapons (I'm using NIArms weapons and CUP weapons because of the compatibility of magazines), and when I use the custom array, vanilla weapons appear in the game with or without 'limited' settings on or off, it doesn't matter, so maybe I can blacklist all the vanilla guns and just have the custom array weapons! (Didn't Ravage had a weapon blacklist or just building blacklist?)

Also what I noticed, when anyone in my area, (Where AI spawns) shoots a zombie, I get noticed about the HIT distance, any solution to this? So the hit indicator is only for the player?

  • Like 1

Share this post


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

I get noticed about the HIT distance, any solution to this?

 

This is just an extra and you can just delete the code here :

	//________________ Just a kill notification ________________	
	_distance = _killer distance2D _killed;
	
	[[
	[ format ["HIT %1m", floor _distance,"align = 'center' size = '1' font='PuristaBold'","#FBFCFE"]]
	]]spawn BIS_fnc_typeText2;		

 

  • Like 1

Share this post


Link to post
Share on other sites

Well, I actually really like it, but, is there any solution that it shows only for the player?

Share this post


Link to post
Share on other sites
3 minutes ago, RZNUNKWN said:

shows only for the player?

 

Do you mean that every player can see the same notification ?

Share this post


Link to post
Share on other sites
1 minute ago, GEORGE FLOROS GR said:

every player

 


 Only me, since it's in single player :smileee:

  • Like 1

Share this post


Link to post
Share on other sites

Just to be honest i haven't understand what you want !

There is also if you want to check these two notification scripts :

 

 

 

Share this post


Link to post
Share on other sites
14 minutes ago, RZNUNKWN said:

it shows only for the player?

 

Do you mean that it shows also the ai kills ?

as i see the code it does right ?

 

Share this post


Link to post
Share on other sites

I will check the scripts, thank you.

  • Thanks 1

Share this post


Link to post
Share on other sites
if (isPlayer _killer) then { 

  [[
  [ format ["HIT %1m", floor _distance,"align = 'center' size = '1' font='PuristaBold'","#FBFCFE"]]
  ]]spawn BIS_fnc_typeText2;		
};

 

  • Thanks 1

Share this post


Link to post
Share on other sites
9 minutes ago, GEORGE FLOROS GR said:

if (isPlayer _killer) then { 

  [[
  [ format ["HIT %1m", floor _distance,"align = 'center' size = '1' font='PuristaBold'","#FBFCFE"]]
  ]]spawn BIS_fnc_typeText2;		
};

 


This is what I was looking for. Thank you so much!

  • Thanks 1

Share this post


Link to post
Share on other sites

When I shoot someone it says "HIT scalar NaNm"

should I add the code you gave me below the original one or replace the old one?

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

×