Jump to content
na_palm

Lootspawner, configurable building loot system

Recommended Posts

Good job, sir.

1 Suggestion to save more fps.

Store all the loot you spawned in an array server side like this

[[lootObject, timestamp], [lootObject, timestamp]]

And then when you want to clean the loot, you loop through the array, looking mainly at the timestamps.

Then you exit the loop when it finds the first array which didn't expire according to it's timestamp (since all following elements will be newer timestamps)

So only for those elements which expired, you check the player distance etc. (I think it will shorten the loop by a great deal)

A loop with allMissionObjects will run maybe like 1000 times, where a loop through an array as explained above will run only maybe like 50 times.

There are many other ideas I have regarding the loot spawning to gain performance, but that will require a wiki on it's own. I will study your code over the weekend and come up with more suggestions.

I can add you on steam later if you want to discuss.

Share this post


Link to post
Share on other sites

hi guys cant seem to get this to work on my A3 epoch server. all the scripts are in, i sorted the battleye filters for the launching but no loot seems to spawn, any ideas?

Share this post


Link to post
Share on other sites

Great script, has anyone tried getting this to work with spawning ammo along with the appropriate weapon?

Share this post


Link to post
Share on other sites

I have unpacked the .PBO ,but where does the mission.sqm go there is already a mission.sqm in the root of my mission folder and it is encrypted and came with the epoch server files.

Share this post


Link to post
Share on other sites
Great script, has anyone tried getting this to work with spawning ammo along with the appropriate weapon?

I made this working , Please look here:

http://epochmod.com/forum/index.php?/topic/30746-mas-weapons-lootspawner-script-more-weapons/page-13#entry197637

regards

---------- Post added at 12:00 ---------- Previous post was at 11:58 ----------

As far as i can see the "Lootpiles" never get deleted. Has anyone a fix for it ?

Share this post


Link to post
Share on other sites

Is there a way to give buildings that do not have buildingpositions spots to spawn loot?

I am no coder, I just tinker around copying others :)

["Land_A_FuelStation_Build", 2],
["Land_A_FuelStation_Build_EP1", 2
_spwnPos = {{-1.31885,-0.655273,-1.57446},{1.82349,0.769531,-1.57458},{1.67871,-0.918945,-1.57458},{-1.23218,1.26758,-1.57458}}],		//wes
["Land_A_Castle_Gate", 0],
["Land_A_Castle_Bergfrit", 0],

Share this post


Link to post
Share on other sites

Exist there a known issue if a server has more then 50 player?

If there are less then 50 players on my server the script works like a charm. With more than 50 players there spawns no loot.

Share this post


Link to post
Share on other sites

Well... i wanted to build a Mission around landing without Gear in enemy Territory, and i want to use ur lootspawn script so the players could scavage altis for weapons to retake the Island...

But here is my Problem, i want to include th Guns from the HLC modset to get spawned in the houses, but whenever i add the weapons to the LSlootlist.sqf it doesnt spawn them or doesnt spawn anything anymore :(

And I couldnt bring the Spawn system to work with any of the missions i started. So pls guys Help me, im very new to mission Building but I really want this to work.

//	Lootspawner junction lists for classes to spawn-/lootable items
//	Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
//here place Weapons an usable items (ex.: Binocular, ...)
//used with addWeaponCargoGlobal
//"lootWeapon_list" array of [class, [weaponlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								weaponlist	: list of weapon class names
lootWeapon_list = [
[ 0, [							// CIVIL
"hlc_rifle_ak74",
"hlc_rifle_aks74u",
"hlc_rifle_ak47",
"hlc_rifle_aks74",
"hlc_rifle_saiga12k",
"hlc_rifle_M14",
"hlc_rifle_M21",
"hlc_rifle_g3a3",
"hlc_rifle_aks74_GL",
"hlc_rifle_hk51",
"hlc_rifle_c1A1",
"hlc_rifle_Colt727",
"hlc_rifle_Colt727_GL",
"hlc_smg_mp5a4",
"hlc_smg_mp5n",
"hlc_smg_mp510",
"hlc_smg_mp5sd5",
"hlc_smg_mp5sd6",
"hlc_smg_9mmar",
"hlc_rifle_auga1_t",
"hlc_rifle_auga1carb",
"hlc_rifle_auga2para",
"Binocular",
"hgun_ACPC2_F",
"hgun_P07_F",
"hgun_PDW2000_F",
"hgun_Rook40_F",
"SMG_01_F",							// Vermin .45 ACP
"SMG_02_F",							// Sting 9mm
"arifle_SDAR_F"
]],[ 1, [						// MILITARY
"hlc_rifle_ak12",
"hlc_rifle_akm",
"hlc_rifle_rpk",
"hlc_rifle_bcmjack",
"hlc_rifle_Bushmaster300",
"hlc_rifle_falosw",
"hlc_rifle_g3ka4",
"HLC_Rifle_g3ka4_GL",
"hlc_rifle_honeybadger",
"hlc_rifle_m14dmr",
"hlc_rifle_m14sopmod",
"hlc_rifle_osw_GL",
"hlc_rifle_psg1",
"hlc_rifle_RU556",
"hlc_rifle_RU5562",
"hlc_rifle_SAMR",
"hlc_rifle_vendimus",
"hlc_rifle_SLRchopmod",
"hlc_lmg_m60",
"hlc_lmg_M60E4",
"hlc_rifle_honeybase",
"hlc_rifle_auga3",
"hlc_rifle_auga3_bl",
"hlc_rifle_auga3_b",
"hlc_rifle_auga3_GL",
"hlc_rifle_auga3_GL_BL",
"hlc_rifle_auga3_GL_B",
"hlc_rifle_augsr",
"hlc_rifle_augsrcarb",
"hlc_rifle_auga1carb_t",
"hlc_rifle_aughbar_t",
"arifle_Katiba_C_F",
"arifle_Katiba_F",
"arifle_Katiba_GL_F",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_Mk20_GL_F",
"arifle_MXC_F",
"arifle_MXM_F",
"arifle_MX_F",
"arifle_MX_GL_F",
"arifle_MX_SW_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"arifle_TRG21_GL_F",
"Binocular",
"hgun_ACPC2_snds_F",
"hgun_P07_snds_F",
"hgun_PDW2000_F",
"hgun_Rook40_snds_F",
"Laserdesignator",
"launch_NLAW_F",
"launch_RPG32_F",
"launch_Titan_F",
"launch_Titan_short_F",
"LMG_Mk200_F",
"LMG_Zafir_F",
"Rangefinder",
"SMG_01_F",							// Vermin .45 ACP
"SMG_02_F",							// Sting 9mm
"srifle_EBR_F",
"srifle_GM6_F",
"srifle_LRR_F"
]],[ 2, [						// INDUSTRIAL
"arifle_Katiba_C_F",
"hlc_rifle_ak47",
"hlc_rifle_akm",
"hlc_rifle_aks74",
"hlc_rifle_rpk",
"hlc_rifle_saiga12k",
"hlc_rifle_SLR",
"hlc_rifle_STG58F",
"hlc_rifle_m14dmr",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_MXC_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"Binocular",
"SMG_01_F",							// Vermin .45 ACP
"SMG_02_F"							// Sting 9mm
]],[ 3, [						// RESEARCH
"arifle_Katiba_GL_F",
"arifle_MXC_F",
"arifle_MXM_F",
"arifle_MX_GL_F",
"hlc_rifle_ak12",
"hlc_rifle_bcmjack",
"hlc_rifle_falosw",
"hlc_rifle_g3ka4",
"hlc_rifle_honeybadger",
"hlc_rifle_m14sopmod",
"hlc_rifle_psg1",
"hlc_lmg_m60",
"hlc_lmg_M60E4",
"Laserdesignator",
"launch_NLAW_F",
"launch_RPG32_F",
"launch_Titan_F",
"launch_Titan_short_F",
"Rangefinder",
"srifle_GM6_F",
"srifle_LRR_F"
]]];

//here place magazines, weaponattachments and bodyitems(ex.: ItemGPS, ItemMap, Medikit, FirstAidKit, Binoculars, ...)
//used with addMagazineCargoGlobal
//"lootMagazine_list" array of [class, [magazinelist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								magazinelist: list of magazine class names
lootMagazine_list = [
[ 0, [							// CIVIL
"16Rnd_9x21_Mag",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"hlc_optic_kobra",
"hlc_optic_kobra",
"RH_ta31rco",
"RH_compm4s", 
"RH_t1", 
"RH_eotech553", 
"RH_shortdot", 
"RH_reflex",
"hlc_optic_LRT_m14",
"hlc_optic_artel_m14",
"hlc_muzzle_snds_M14",
"hlc_muzzle_762SUP_AK",
"hlc_muzzle_545SUP_AK",
"HLC_Optic_PSO1",
"hlc_optic_goshawk",
"hlc_optic_PVS4FAL",
"hlc_optic_suit",
"hlc_muzzle_snds_fal",
"hlc_muzzle_snds_HK33",
"hlc_muzzle_snds_G3",
"HLC_Optic_ZFSG1",
"hlc_optic_accupoint_g3",
"hlc_muzzle_Agendasix",
"hlc_muzzle_Agendasix10mm",
"hlc_muzzle_snds_AUG",
"hlc_muzzle_snds_a6AUG",
"hlc_30Rnd_762x39_b_ak",
"hlc_45Rnd_762x39_m_rpk",
"hlc_30Rnd_762x39_t_ak",
"hlc_30Rnd_545x39_B_AK",
"hlc_30Rnd_545x39_T_AK", 
"hlc_30Rnd_545x39_EP_AK",
"hlc_30Rnd_762x39_b_ak",
"hlc_30Rnd_762x39_t_ak",
"hlc_10rnd_12g_buck_S12",
"hlc_10rnd_12g_slug_S12",
"hlc_20Rnd_762x51_B_M14",
"hlc_20Rnd_762x51_T_M14",
"hlc_20rnd_762x51_b_G3",
"hlc_20rnd_762x51_T_G3",
"hlc_50rnd_762x51_M_G3",
"hlc_VOG25_AK",
"hlc_20Rnd_762x51_B_fal",
"hlc_20Rnd_762x51_t_fal",
"30Rnd_556x45_Stanag_Tracer_Red", 
"hlc_30rnd_556x45_EPR",
"hlc_30Rnd_556x45_B_AUG",
"hlc_30Rnd_556x45_T_AUG",
"hlc_25Rnd_9x19mm_M882_AUG",
"1Rnd_HE_Grenade_shell",
"1Rnd_Smoke_Grenade_shell",
"UGL_FlareRed_F",
"hlc_30Rnd_9x19_B_MP5",
"hlc_30Rnd_10mm_B_MP5",
"hlc_30Rnd_9x19_GD_MP5",
"30Rnd_556x45_Stanag",
"30Rnd_9x21_Mag",
"9Rnd_45ACP_Mag",
"HandGrenade",
"HandGrenade_Stone"
]],[ 1, [						// MILITARY
"100Rnd_65x39_caseless_mag",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"hlc_optic_kobra",
"hlc_optic_kobra",
"RH_ta31rco",
"RH_compm4s", 
"RH_t1", 
"RH_eotech553", 
"RH_shortdot", 
"RH_reflex",
"hlc_optic_LRT_m14",
"hlc_optic_artel_m14",
"hlc_muzzle_snds_M14",
"hlc_muzzle_762SUP_AK",
"hlc_muzzle_545SUP_AK",
"HLC_Optic_PSO1",
"hlc_optic_goshawk",
"hlc_optic_PVS4FAL",
"hlc_optic_suit",
"hlc_muzzle_snds_fal",
"hlc_muzzle_snds_HK33",
"hlc_muzzle_snds_G3",
"HLC_Optic_ZFSG1",
"hlc_optic_accupoint_g3",
"hlc_muzzle_Agendasix",
"hlc_muzzle_Agendasix10mm",
"hlc_muzzle_snds_AUG",
"hlc_muzzle_snds_a6AUG",
"hlc_30Rnd_762x39_b_ak",
"hlc_45Rnd_762x39_m_rpk",
"hlc_30Rnd_762x39_t_ak",
"hlc_30Rnd_545x39_B_AK",
"hlc_30Rnd_545x39_T_AK", 
"hlc_30Rnd_545x39_EP_AK",
"hlc_30Rnd_762x39_b_ak",
"hlc_30Rnd_762x39_t_ak",
"hlc_10rnd_12g_buck_S12",
"hlc_10rnd_12g_slug_S12",
"hlc_20Rnd_762x51_B_M14",
"hlc_20Rnd_762x51_T_M14",
"hlc_20rnd_762x51_b_G3",
"hlc_20rnd_762x51_T_G3",
"hlc_50rnd_762x51_M_G3",
"hlc_VOG25_AK",
"hlc_20Rnd_762x51_B_fal",
"hlc_20Rnd_762x51_t_fal",
"hlc_30Rnd_556x45_B_AUG",
"hlc_30Rnd_556x45_T_AUG",
"hlc_25Rnd_9x19mm_M882_AUG",
"29rnd_300BLK_STANAG",
"29rnd_300BLK_STANAG_T",
"hlc_30rnd_556x45_EPR",
"hlc_100Rnd_762x51_B_M60E4",
"hlc_100Rnd_762x51_M_M60E4",
"hlc_100Rnd_762x51_T_M60E4",
"hlc_75Rnd_762x39_m_rpk",
"HLC_45rnd_762x39_T_RPK",
"100Rnd_65x39_caseless_mag_Tracer",
"150Rnd_762x51_Box",
"150Rnd_762x51_Box_Tracer",
"16Rnd_9x21_Mag",
"1Rnd_HE_Grenade_shell",
"1Rnd_SmokeBlue_Grenade_shell",
"1Rnd_SmokeGreen_Grenade_shell",
"1Rnd_SmokeOrange_Grenade_shell",
"1Rnd_SmokePurple_Grenade_shell",
"1Rnd_SmokeRed_Grenade_shell",
"1Rnd_SmokeYellow_Grenade_shell",
"1Rnd_Smoke_Grenade_shell",
"200Rnd_65x39_cased_Box",
"200Rnd_65x39_cased_Box_Tracer",
"20Rnd_556x45_UW_mag",
"20Rnd_762x51_Mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Yellow",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag",
"3Rnd_HE_Grenade_shell",
"3Rnd_SmokeBlue_Grenade_shell",
"3Rnd_SmokeGreen_Grenade_shell",
"3Rnd_SmokeOrange_Grenade_shell",
"3Rnd_SmokePurple_Grenade_shell",
"3Rnd_SmokeRed_Grenade_shell",
"3Rnd_SmokeYellow_Grenade_shell",
"3Rnd_Smoke_Grenade_shell",
"5Rnd_127x108_Mag",
"7Rnd_408_Mag",
"9Rnd_45ACP_Mag",
"APERSBoundingMine_Range_Mag",
"APERSMine_Range_Mag",
"APERSTripMine_Wire_Mag",
"ATMine_Range_Mag",
"ClaymoreDirectionalMine_Remote_Mag",
"HandGrenade",
"MiniGrenade",
"NLAW_F",
"RPG32_F",
"RPG32_HE_F",
"SatchelCharge_Remote_Mag",
"SLAMDirectionalMine_Wire_Mag",
"Titan_AA",
"Titan_AP",
"Titan_AT"
]],[ 2, [						// INDUSTRIAL
"20Rnd_556x45_UW_mag",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"hlc_optic_kobra",
"hlc_optic_kobra",
"RH_ta31rco",
"RH_compm4s", 
"RH_t1", 
"RH_eotech553", 
"RH_shortdot", 
"RH_reflex",
"hlc_optic_LRT_m14",
"hlc_optic_artel_m14",
"hlc_muzzle_snds_M14",
"hlc_muzzle_762SUP_AK",
"hlc_muzzle_545SUP_AK",
"HLC_Optic_PSO1",
"hlc_optic_goshawk",
"hlc_optic_PVS4FAL",
"hlc_optic_suit",
"hlc_muzzle_snds_fal",
"hlc_muzzle_snds_HK33",
"hlc_muzzle_snds_G3",
"HLC_Optic_ZFSG1",
"hlc_optic_accupoint_g3",
"hlc_muzzle_Agendasix",
"hlc_muzzle_Agendasix10mm",
"hlc_muzzle_snds_AUG",
"hlc_muzzle_snds_a6AUG",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Yellow",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag",
"hlc_30Rnd_762x39_b_ak",
"hlc_45Rnd_762x39_m_rpk",
"hlc_30Rnd_762x39_t_ak",
"hlc_30Rnd_545x39_B_AK",
"hlc_30Rnd_545x39_T_AK", 
"hlc_30Rnd_545x39_EP_AK",
"hlc_30Rnd_762x39_b_ak",
"hlc_30Rnd_762x39_t_ak",
"hlc_10rnd_12g_buck_S12",
"hlc_10rnd_12g_slug_S12",
"hlc_20Rnd_762x51_B_M14",
"hlc_20Rnd_762x51_T_M14",
"hlc_20rnd_762x51_b_G3",
"hlc_20rnd_762x51_T_G3",
"hlc_50rnd_762x51_M_G3",
"hlc_VOG25_AK",
"hlc_20Rnd_762x51_B_fal",
"hlc_20Rnd_762x51_t_fal",
"hlc_30Rnd_556x45_B_AUG",
"hlc_30Rnd_556x45_T_AUG",
"hlc_25Rnd_9x19mm_M882_AUG",
"29rnd_300BLK_STANAG",
"29rnd_300BLK_STANAG_T",
"hlc_30rnd_556x45_EPR",
"hlc_100Rnd_762x51_B_M60E4",
"hlc_100Rnd_762x51_M_M60E4",
"hlc_100Rnd_762x51_T_M60E4",
"hlc_75Rnd_762x39_m_rpk",
"HLC_45rnd_762x39_T_RPK",
"Chemlight_blue",
"Chemlight_green",
"Chemlight_red",
"Chemlight_yellow"
]],[ 3, [						// RESEARCH
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green",
"5Rnd_127x108_Mag",
"7Rnd_408_Mag",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"hlc_optic_kobra",
"hlc_optic_kobra",
"RH_ta31rco",
"RH_compm4s", 
"RH_t1", 
"RH_eotech553", 
"RH_shortdot", 
"RH_reflex",
"hlc_optic_LRT_m14",
"hlc_optic_artel_m14",
"hlc_muzzle_snds_M14",
"hlc_muzzle_762SUP_AK",
"hlc_muzzle_545SUP_AK",
"HLC_Optic_PSO1",
"hlc_optic_goshawk",
"hlc_optic_PVS4FAL",
"hlc_optic_suit",
"hlc_muzzle_snds_fal",
"hlc_muzzle_snds_HK33",
"hlc_muzzle_snds_G3",
"HLC_Optic_ZFSG1",
"hlc_optic_accupoint_g3",
"hlc_muzzle_Agendasix",
"hlc_muzzle_Agendasix10mm",
"hlc_muzzle_snds_AUG",
"hlc_muzzle_snds_a6AUG",
"hlc_30Rnd_762x39_b_ak",
"hlc_45Rnd_762x39_m_rpk",
"hlc_30Rnd_762x39_t_ak",
"hlc_30Rnd_545x39_B_AK",
"hlc_30Rnd_545x39_T_AK", 
"hlc_30Rnd_545x39_EP_AK",
"hlc_30Rnd_762x39_b_ak",
"hlc_30Rnd_762x39_t_ak",
"hlc_10rnd_12g_buck_S12",
"hlc_10rnd_12g_slug_S12",
"hlc_20Rnd_762x51_B_M14",
"hlc_20Rnd_762x51_T_M14",
"hlc_20rnd_762x51_b_G3",
"hlc_20rnd_762x51_T_G3",
"hlc_50rnd_762x51_M_G3",
"hlc_VOG25_AK",
"hlc_20Rnd_762x51_B_fal",
"hlc_20Rnd_762x51_t_fal",
"hlc_30Rnd_556x45_B_AUG",
"hlc_30Rnd_556x45_T_AUG",
"hlc_25Rnd_9x19mm_M882_AUG",
"29rnd_300BLK_STANAG",
"29rnd_300BLK_STANAG_T",
"hlc_30rnd_556x45_EPR",
"hlc_100Rnd_762x51_B_M60E4",
"hlc_100Rnd_762x51_M_M60E4",
"hlc_100Rnd_762x51_T_M60E4",
"hlc_75Rnd_762x39_m_rpk",
"HLC_45rnd_762x39_T_RPK",
"NLAW_F",
"RPG32_F",
"RPG32_HE_F",
"Titan_AA",
"Titan_AP",
"Titan_AT"
]]];

//here place hats, glasses, clothes, uniforms, vests
//used with addItemCargoGlobal
//"lootItem_list" array of [class, [itemlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								itemlist	: list of item class names
lootItem_list = [
[ 0, [							// CIVIL
"acc_flashlight",

"H_Bandanna_gry",
"H_Beret_red",
"H_Booniehat_dirty",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"H_Cap_blu",
"H_Cap_grn",
"H_Cap_red",
"H_Hat_brown",
"H_Hat_checker",
"H_Hat_grey",
"I_UavTerminal",
"muzzle_snds_acp", 					// .45 ACP
"muzzle_snds_L", 					// 9mm
"optic_Aco",
"optic_ACO_grn",
"optic_aco_smg",
"optic_Holosight",
"optic_Holosight_smg",
"U_C_Commoner1_1",
"U_C_Poloshirt_redwhite",
"V_BandollierB_blk",
"V_BandollierB_oli",
"V_TacVestCamo_khk",
"V_TacVestIR_blk",
"V_TacVest_blk",
"V_TacVest_blk_POLICE",
"V_TacVest_brn",
"V_TacVest_camo",
"V_TacVest_khk",
"V_TacVest_oli",
"ItemMap",
"ItemRadio",
"ItemCompass",
"ItemWatch"
]],[ 1, [						// MILITARY
"acc_flashlight",
"B_UavTerminal",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"FirstAidKit",
"H_HelmetB_camo",
"H_HelmetB_paint",
"H_HelmetIA_net",
"H_HelmetSpecB_blk",
"H_PilotHelmetFighter_I",
"ItemGPS",
"I_UavTerminal",
"Medikit",
"muzzle_snds_acp", 					// .45 ACP
"muzzle_snds_B", 					// 7.62mm
"muzzle_snds_H", 					// 6.5mm
"muzzle_snds_H_MG", 				// 6.5mm LMG
"muzzle_snds_L", 					// 9mm
"muzzle_snds_M", 					// 5.56mm
"NVGoggles",
"NVGoggles_INDEP",
"NVGoggles_OPFOR",
"optic_Aco",
"optic_ACO_grn",
"optic_aco_smg",
"optic_Arco",
"optic_Hamr",
"optic_Holosight",
"optic_Holosight_smg",
"optic_Nightstalker",
"optic_NVS",
"optic_SOS",
"O_UavTerminal",
"ToolKit",
"U_B_CombatUniform_mcam",
"U_B_GhillieSuit",
"U_B_Wetsuit",
"U_I_CombatUniform",
"U_I_GhillieSuit",
"U_I_Wetsuit",
"U_O_CombatUniform_ocamo",
"U_O_GhillieSuit",
"U_O_Wetsuit",
"V_Chestrig_blk",
"V_HarnessOGL_brn",
"V_HarnessOSpec_brn",
"V_HarnessO_brn",
"V_PlateCarrier1_blk",
"V_PlateCarrier2_rgr",
"V_PlateCarrier3_rgr",
"V_PlateCarrierGL_rgr",
"V_PlateCarrierIA1_dgtl",
"V_PlateCarrierIA2_dgtl",
"V_PlateCarrierIAGL_dgtl",
"V_PlateCarrierSpec_rgr",
"V_RebreatherB",
"V_RebreatherIA",
"V_RebreatherIR"
]],[ 2, [						// INDUSTRIAL
"FirstAidKit",
"FirstAidKit",
"ItemCompass",
"ItemMap",
"ItemWatch",
"ToolKit",
"ToolKit",
"U_B_Wetsuit",
"U_I_Wetsuit",
"U_O_Wetsuit",
"V_RebreatherB",
"V_RebreatherIA",
"V_RebreatherIR"
]],[ 3, [						// RESEARCH
"B_UavTerminal",
"AGM_Box_Medical",
"AGM_Bandage",
"AGM_Morphine",
"AGM_Epipen",
"AGM_Bloodbag",
"FirstAidKit",
"FirstAidKit",
"FirstAidKit",
"ItemGPS",
"I_UavTerminal",
"Medikit",
"NVGoggles",
"NVGoggles_INDEP",
"NVGoggles_OPFOR",
"optic_Nightstalker",
"optic_NVS",
"optic_SOS",
"O_UavTerminal"
]]];

//here place backpacks, parachutes and packed drones/stationary
//used with addBackpackCargoGlobal
//"lootBackpack_list" array of [class, [backpacklist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								backpacklist: list of backpack class names
lootBackpack_list = [
[ 0, [							// CIVIL
"B_AssaultPack_blk",				// 34 Mags
"B_AssaultPack_cbr",
"B_AssaultPack_dgtl",
"B_AssaultPack_khk",
"B_AssaultPack_mcamo",
"B_AssaultPack_ocamo",
"B_AssaultPack_rgr",
"B_AssaultPack_sgg",
"B_BergenC_red",					// 50 Mags
"B_Bergen_mcamo",					// 54 Mags
"B_HuntingBackpack",				// 32 Mags
"B_OutdoorPack_blu",				// 17 Mags
"B_UAV_01_backpack_F",
"I_UAV_01_backpack_F",
"O_UAV_01_backpack_F"
]],[ 1, [						// MILITARY
"B_BergenG",						// 64 Mags
"B_BergenC_red",
"B_Carryall_cbr",					// 60 Mags
"B_GMG_01_high_weapon_F",
"B_GMG_01_weapon_F",
"B_HMG_01_support_F",
"B_HMG_01_support_high_F",
"B_HMG_01_weapon_F",
"B_Mortar_01_support_F",
"B_Mortar_01_weapon_F",
"B_Kitbag_cbr",						// ? Mags
"B_Kitbag_mcamo",
"B_Kitbag_mcamo_Eng",
"B_Kitbag_rgr_Exp",
"B_Kitbag_sgg",
"B_UAV_01_backpack_F",
"I_UAV_01_backpack_F",
"O_UAV_01_backpack_F"
]],[ 2, [						// INDUSTRIAL
"B_Bergen_sgg",
"B_Carryall_cbr",					// 60 Mags
"B_HMG_01_support_F",
"B_HMG_01_support_high_F",
"B_HMG_01_weapon_F",
"B_TacticalPack_blk",				// 42 Mags
"B_TacticalPack_mcamo",
"B_TacticalPack_ocamo",
"B_TacticalPack_oli",
"B_TacticalPack_rgr",
"B_UAV_01_backpack_F",
"I_UAV_01_backpack_F",
"O_UAV_01_backpack_F"
]],[ 3, [						// RESEARCH
"B_BergenG",						// 64 Mags
"B_Bergen_mcamo",
"B_Carryall_cbr",					// 60 Mags
"B_FieldPack_blk",					// 35 Mags
"B_FieldPack_ocamo",
"B_FieldPack_oli",
"B_FieldPack_oucamo",
"B_GMG_01_high_weapon_F",
"B_GMG_01_weapon_F",
"B_HMG_01_support_F",
"B_HMG_01_support_high_F",
"B_HMG_01_weapon_F",
"B_Mortar_01_support_F",
"B_Mortar_01_weapon_F"
]]];

//here place any other objects(ex.: Land_Basket_F, Box_East_Wps_F, Land_Can_V3_F, ...)
//used with createVehicle directly
//"lootworldObject_list" array of [class, [objectlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								objectlist	: list of worldobject class names
lootworldObject_list = [
[ 0, [							// CIVIL
,				// Jerrycan
]],[ 1, [						// MILITARY
"Box_East_Wps_F",
"Box_NATO_Wps_F",
"Land_CanisterFuel_F",				// jerrycan
"Land_Can_V3_F", 					// energydrink
"Land_Suitcase_F"					// repairkit
]],[ 2, [						// INDUSTRIAL
//"Box_IND_Support_F",	//support boxes don't erease inventory
"Box_East_Ammo_F",
"Box_IND_Ammo_F",
"Box_NATO_Ammo_F",
"Land_CanisterFuel_F",				// jerrycan
"Land_CanisterOil_F", 				// syphon hose
"Land_Suitcase_F"					// repairkit
]],[ 3, [						// RESEARCH
"Box_IND_Grenades_F",
"Box_NATO_Ammo_F",
"Land_Can_V3_F", 					// energydrink
"Land_Can_V3_F", 					// energydrink
"Land_Suitcase_F",					// repairkit
"Land_Suitcase_F"					// repairkit
]]];

thx

Edited by Zeroim

Share this post


Link to post
Share on other sites

Has this been abandoned?

Reading through the thread Im seeing a lot of "things are floating" and no response from the author for some weeks.

Share this post


Link to post
Share on other sites

Of course things are floating this script is a catch all spawn system. Building has a point to spawn the loot it puts it in at a specific height that works for all buildings.

If you want the loot to not float in certain places you need to modify this system to realize what building it is in and adjust the height for the building. Oh and you will need to figure out what height that is for each building. Good luck no one wants to do it, too much work.

---------- Post added at 19:25 ---------- Previous post was at 19:10 ----------

Exist there a known issue if a server has more then 50 player?

If there are less then 50 players on my server the script works like a charm. With more than 50 players there spawns no loot.

Turn your debug variable on so you can see how long it's taking in the logs. Mine gets a couple hours in and starts to take 1000 seconds to run and that's when people start to think there is no ground loot at all.

Share this post


Link to post
Share on other sites

Hey guys been trying to get this working but i keep getting kicked due to BE Script Restriction #18. and when i check the log this is what I see.

if !("

01.03.2015 08:11:42: Knightwatcher (67.141.90.43:2304) 70552b40ba46303d57396e069a8f37e1 - #18 "le preProcessFileLineNumbers "custom\LSpawner\LSdeleter.sqf";

execVM "custom\LSpawner\Lootspawner.sqf";

};"

Thanks in advance for your help.

Share this post


Link to post
Share on other sites

i am currently having the same problem as knight 2 posts before this but instead script restriction #21

[] execVM "s"

23.03.2015 14:13:16: Adammio (151.225.95.168:2304) c1312836047f891aae652a0c2d1be902 - #21 "ocessFileLineNumbers "\q\addons\custom_server\LSdeleter.sqf";

execVM "\q\addons\custom_server\Lootspawner.sqf";

};

[] execVM "s"

23.03.2015 14:24:00: Saran (74.104.130.198:2304) 0d705bdb54d10cef716b5b2b0b4180d0 - #21 "ocessFileLineNumbers "\q\addons\custom_server\LSdeleter.sqf";

execVM "\q\addons\custom_server\Lootspawner.sqf";

any clue how to get around this problem?

Share this post


Link to post
Share on other sites

Is there a way to create more buildingPos entries for each building?

I assumed the spawner generates these position by testing each building, however I see the positions are already set. A these positions related to Epoch/DayZ loot positions or are they totally independent from any mod and are baked into the map.

Share this post


Link to post
Share on other sites

The positions in the buildings are totally randomized, the positions have nothing to do with Epoch.

I dont know if this is Updated but the Epoch Mod Community rebuild that script:

http://epochmod.com/forum/index.php?/topic/30746-mas-weapons-lootspawner-script-more-weapons/

or

http://epochmod.com/forum/index.php?/topic/32757-addon-lootspawner-configurable-building-loot

Edited by Salutesh

Share this post


Link to post
Share on other sites
The positions in the buildings are totally randomized, the positions have nothing to do with Epoch.

??

The positions are defined inside each building for AI unit placement - LS uses these fixed positions to spawn loot. Far from "randomizing"... Some building have many, some have none. The question was can you create additional buildingPos entries.

Share this post


Link to post
Share on other sites
??

The positions are defined inside each building for AI unit placement - LS uses these fixed positions to spawn loot. Far from "randomizing"... Some building have many, some have none. The question was can you create additional buildingPos entries.

The short answer to this is yes. However I think it would take quite a bit of code to produce this. I know that Zenophon has a framework and one of his functions is to find building positions that aren't the BIS predetermined positions. You'd have to do something similar and then send the position array to the spawner. This would likely take alot of CPU cycles as it has to compute and build the positions array rather than just read a pre-existing position array. And I'm not sure what you'd have to do to identify the surrounding buildings and filter out the ones that don't qualify! It would also have the possibility to spawn loot on top of each other as you'd be using two separate arrays for positions!

But an experienced coder could make it work I'm sure!

Share this post


Link to post
Share on other sites

Hi guys,

The original LINKS go to a website that is down.

Could someone kindly reupload the original files (not the EPOCH ones) somewhere please?

Very keen to see this script!

Thanks again!

Share this post


Link to post
Share on other sites

Hi guys,

 

As the above post has said, it seems the download servers are down...  :huh: (typical...)

 

I managed to find a downloaded copy of the Altis version, as well as documentation. (SP and MP, only difference is lootspawn.sqf)

 

It may be a bit out of date, including the rifle height bug, but at least its something;  ;)

 

 

Loot Spawner (Vanilla)

 

 

I would highly suggest you edit "LSlootLists.sqf", as I have done some editing with the classname spawns. (sorry about that :P )

Share this post


Link to post
Share on other sites

Hi guys,

 

As the above post has said, it seems the download servers are down...  :huh: (typical...)

 

I managed to find a downloaded copy of the Altis version, as well as documentation. (SP and MP, only difference is lootspawn.sqf)

 

It may be a bit out of date, including the rifle height bug, but at least its something;  ;)

 

 

https://www.dropbox.com/s/pgl693dgt12n4xx/Lootspawner.zip?dl=0

 

 

I would highly suggest you edit "LSlootLists.sqf", as I have done some editing with the classname spawns. (sorry about that :P )

 Ranwer, why do you always show up at spots where I need help? lol

Share this post


Link to post
Share on other sites

SP Example for Chernarus (AiA)

 

I am afraid that I do not have the MP version. But it should work with the vanilla file Lootspawner.sqf, found in the link Above.

 

 

 

The .pbo has not been altered, but it only contains the A2 Vanilla classnames. If you want specific building classnames from other maps of A2 (e.g. Takistan, Zargabad, etc.) you will need to use A3MP or AiA to look them up in the Config Viewer. (All buildings except vegetation, are found in CfgVehicles)

Share this post


Link to post
Share on other sites

Nice! Should have responded earlier xD

Any news on fixing the spawn height?

Share this post


Link to post
Share on other sites

Nice! Should have responded earlier xD

Any news on fixing the spawn height?

 

Not quite. But I do know that using a PhysX object could rid of that problem. ;)

Share this post


Link to post
Share on other sites

can I use this with modded weapons? I am using the Lingor A3 terrain. I got fed up with the store system since it never works for me. I want to replace the store system with the DayZ style loot system.

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

×