Jump to content
  • 0

Loot Crates only spawning sometimes


js2k6

Question

Hi, 

 

I've been having some issues with a testing server i'm running on my LAN

I have a whole bunch of map additions, and in three of these locations i have loot crates that are supposed to spawn.

 

sometimes these spawn, other times they do not

 

currently the map additions are in the server .pbo and the crates are in the mission files. 

I call the server side map additions from server_functions.sqf like so...

// Map Additions 
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\balota.sqf";				// balota barracks
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\tikhaya.sqf";				// tikhaya city near kamenka
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\zelebarracks.sqf";			// zelenogorsk barracks
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_SI_Zelenogorsk.sqf"; 	// GOC Zeleno Rehab Center
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_SI_Grishino.sqf";		// Grishino Construction Site
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_TE_htlh.sqf"; 			// Hero Trader Overhaul
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_TE_btcc.sqf";			// Bandit Trader Overhaul
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\zonealpha.sqf";				// Zone Alpha
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\blklakecamp.sqf";			// Black Lake Campsite
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\ne_airstrip.sqf"; 			// NEAF Additions
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\lopatino.sqf";				// Lopatino Barracks
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\novylugbase.sqf";			// Novy Lug Base
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_TE_bash.sqf";			// Bash Trader City Overhaul
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\NWAF.sqf";					// NWAF Military Compound
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\otmelvil.sqf";				// Otmel Village
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\Mine_grotte.sqf";			// Kamenka Mine
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\skalisty.sqf";				// Skalisty Island Village and Bridge
// The Following Addons were made by 21DMD
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\solnichbike.sqf";			// Solnichiy Bike Dealer (made by jedish3ep aka jakehekesfists)
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\NWAFtrader.sqf";			// NWAF Trader (made by jedish3ep aka jakehekesfists)
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\smoosestaryfinal.sqf";		// Stary Trader (made by Smooose) 
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\balotaimproved.sqf";		// Balota Improvements by jedish3ep aka jakehekesfists
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\berezimproved.sqf";			// Berezino Improvements by jedish3ep aka jakehekesfists
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\superhero.sqf";				// super hero trader by jedish3ep aka jakehekesfists
call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\superbandit.sqf";			// super bandit trader by jedish3ep aka jakehekesfists

and then i call the loot crates from init.sqf like so

// Map Additions Loot
[] execVM "map_additions\box_la_grotte.sqf";
[] execVM "map_additions\nwafcrates.sqf";
[] execVM "map_additions\zonealpha_loot.sqf";

// Map Additions, Map Markers - New Method - easier to clean
[] execVM "custom\markers.sqf";

Previously I had tried to load all the additions serverside but the crates rarely spawned. 

 

I'm at a loss now as they only spawn sometimes. Does anyone have any tips to make these crates always spawn?

 

in case required, heres one of my crates files

if (isServer) then {
		_vehicle_999991 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["TKVehicleBox_EP1", [7909.4,13691.2], [], 0, "CAN_COLLIDE"];
		  _vehicle_999991 = _this;
		  _this setDir 20;

		  clearweaponcargoGlobal _this;
		  clearmagazinecargoGlobal _this;

		  
		  _this addWeaponCargoGlobal ["NVGoggles",2];
		  _this addWeaponCargoGlobal ["Binocular_Vector",2];
		  _this addWeaponCargoGlobal ["ItemGPS",2];
		  _this addWeaponCargoGlobal ["ItemEtool", 2];
		  _this addWeaponCargoGlobal ["ItemFlashlightRed", 2];
		  _this addMagazineCargoGlobal ["Skin_Camo1_DZ", 2];

		  GunRandomizerA=floor(random 4);

				if (GunRandomizerA == 0) then {
					_this addWeaponCargoGlobal ["MakarovSD", 2];
					_this addMagazineCargoGlobal ["8Rnd_9x18_MakarovSD", 25];
					_this addWeaponCargoGlobal ["FN_FAL",2];
					_this addmagazineCargoGlobal ["20Rnd_762x51_FNFAL",20];
					_this addWeaponCargoGlobal ["DMR_DZ",2];
					_this addmagazineCargoGlobal ["20Rnd_762x51_DMR",20];
					_this addWeaponCargoGlobal ["M4A1_HWS_GL", 2];
					_this addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 30];
					_this addWeaponCargoGlobal ["AK_107_kobra", 1];
					_this addMagazineCargoGlobal ["30Rnd_545x39_AK", 30];
					_this addWeaponCargoGlobal ["M4A1_AIM_SD_camo",2];
					_this addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 30];	
					_this addWeaponCargoGlobal ["BAF_L85A2_RIS_SUSAT",2];
				};
				
				if (GunRandomizerA == 1) then {
					_this addWeaponCargoGlobal ["M9SD", 1];
					_this addMagazineCargoGlobal ["15Rnd_9x19_M9SD", 25];
					_this addWeaponCargoGlobal ["SVD_CAMO",2];
					_this addmagazineCargoGlobal ["10Rnd_762x54_SVD",20];
					_this addWeaponCargoGlobal ["M107_DZ",2];
					_this addmagazineCargoGlobal ["10Rnd_127x99_m107",20];
					_this addWeaponCargoGlobal ["G36K_camo",2];
					_this addmagazineCargoGlobal ["30Rnd_556x45_G36",30];
					_this addWeaponCargoGlobal ["M4A1_HWS_GL_SD_camo",2];
					_this addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 30];
					_this addWeaponCargoGlobal ["AKS_74_U", 1];
					_this addMagazineCargoGlobal ["30Rnd_545x39_AK", 30];
					_this addWeaponCargoGlobal ["BAF_L85A2_RIS_SUSAT",2];
				};
				
				if (GunRandomizerA == 2) then {
					_this addWeaponCargoGlobal ["UZI_SD_EP1", 1];
					_this addMagazineCargoGlobal ["30Rnd_9x19_UZI_SD", 25];
					_this addWeaponCargoGlobal ["SCAR_H_LNG_Sniper_SD",2];
					_this addmagazineCargoGlobal ["20Rnd_762x51_SB_SCAR",20];
					_this addWeaponCargoGlobal ["M4A1_AIM_SD_camo", 2];
					_this addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 30];
					_this addWeaponCargoGlobal ["RPK_74", 2];
					_this addMagazineCargoGlobal ["75Rnd_545x39_RPK", 25];
					_this addWeaponCargoGlobal ["AK_74_GL", 2];
					_this addMagazineCargoGlobal ["30Rnd_545x39_AK", 30];
					_this addWeaponCargoGlobal ["BAF_L85A2_RIS_Holo",2];
				};
		  
				if (GunRandomizerA == 3) then {
					_this addWeaponCargoGlobal ["MakarovSD", 2];
					_this addMagazineCargoGlobal ["8Rnd_9x18_MakarovSD", 25];
					_this addWeaponCargoGlobal ["VSS_vintorez",1];
					_this addmagazineCargoGlobal ["20Rnd_9x39_SP5_VSS",20];
					_this addWeaponCargoGlobal ["M40A3",2];
					_this addmagazineCargoGlobal ["5Rnd_762x51_M24",20];
					_this addWeaponCargoGlobal ["SVD", 2];
					_this addMagazineCargoGlobal ["10Rnd_762x54_SVD", 20];
					_this addWeaponCargoGlobal ["FN_FAL", 2];
					_this addMagazineCargoGlobal ["20Rnd_762x51_FNFAL", 30];
					_this addWeaponCargoGlobal ["MP5A5", 2];
					_this addMagazineCargoGlobal ["30rnd_9x19_MP5", 30];
					_this addWeaponCargoGlobal ["M240_DZ", 2];
					_this addMagazineCargoGlobal ["100Rnd_762x51_M240", 25];
				};

		  _this addbackpackCargoGlobal ["DZ_LargeGunBag_EP1",5];
		  _this setPos [7909.4,13691.2];
		};


		_vehicle_999992 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["USVehicleBox", [8020.13,13633.4], [], 0, "CAN_COLLIDE"];
		  _vehicle_999992 = _this;
		  _this setDir 130;

		  clearweaponcargoGlobal _this;
		  clearmagazinecargoGlobal _this;

		  _this addmagazineCargoGlobal ["PartEngine",5];
		  _this addmagazineCargoGlobal ["PartGeneric",10];
		  _this addmagazineCargoGlobal ["PartVRotor",5];
		  _this addmagazineCargoGlobal ["PartWheel",10];
		  _this addmagazineCargoGlobal ["PartFueltank",3];
		  _this addmagazineCargoGlobal ["PartGlass",10];
		  _this addmagazineCargoGlobal ["ItemJerrycan",3];
		  
		  _this addmagazineCargoGlobal ["50Rnd_127x107_DSHKM",5];
		  _this addmagazineCargoGlobal ["100Rnd_127x99_M2",5];
		  _this addmagazineCargoGlobal ["4000Rnd_762x51_M134",5];
		  _this addmagazineCargoGlobal ["100Rnd_762x51_M240",5];
		  
		  GunCrateSRandomizer=floor(random 3);

				if (GunCrateSRandomizer == 0) then {
					_this addmagazineCargoGlobal ["ItemGoldBar10oz",6];
				};
				if (GunCrateSRandomizer == 1) then {
					_this addmagazineCargoGlobal ["ItemSilverBar10oz",12];
				};
				if (GunCrateSRandomizer == 2) then {
					_this addmagazineCargoGlobal ["ItemBriefcase10oz",1];
				};
		  
		  _this setPos [8020.13,13633.4];
		};



		_vehicle_999993= objNull;
		
		if (true) then
		{
		  _this = createVehicle ["TKVehicleBox_EP1", [8007.18,13638.1], [], 0, "CAN_COLLIDE"];
		  _vehicle_999993 = _this;
		  _this setDir 90.560677;

		  clearweaponcargoGlobal _this;
		  clearmagazinecargoGlobal _this;

		  _this addWeaponCargoGlobal ["NVGoggles",1];
		  _this addWeaponCargoGlobal ["ItemGPS",1];

		  _this addmagazineCargoGlobal ["ItemBandage",10];
		  _this addmagazineCargoGlobal ["ItemPainkiller",10];
		  _this addmagazineCargoGlobal ["ItemMorphine",10];
		  _this addmagazineCargoGlobal ["ItemBloodBag",10];
		  _this addmagazineCargoGlobal ["ItemEpinephrine",10];
		  _this addmagazineCargoGlobal ["ItemAntibiotic",10];
		  _this addmagazineCargoGlobal ["FoodCanBakedBeans",2];
		  _this addmagazineCargoGlobal ["FoodCanSardines",2];
		  _this addmagazineCargoGlobal ["FoodCanFrankBeans",2];
		  _this addmagazineCargoGlobal ["FoodCanPasta",2];
		  _this addmagazineCargoGlobal ["FoodCanGriff",2];
		  _this addmagazineCargoGlobal ["FoodCanBoneboy",2];
		  _this addmagazineCargoGlobal ["FoodCanCorn",2];
		  _this addmagazineCargoGlobal ["FoodCanCurgon",2];
		  _this addmagazineCargoGlobal ["FoodCanDemon",2];
		  _this addmagazineCargoGlobal ["FoodCanFraggleos",2];
		  _this addmagazineCargoGlobal ["FoodCanHerpy",2];
		  _this addmagazineCargoGlobal ["FoodCanOrlok",2];
		  _this addmagazineCargoGlobal ["FoodCanPowell",2];
		  _this addmagazineCargoGlobal ["FoodCanTylers",2];
		  _this addmagazineCargoGlobal ["ItemSodaCoke",4];
		  _this addmagazineCargoGlobal ["ItemSodaPepsi",4];
		  _this addmagazineCargoGlobal ["ItemSodaMdew",4];
		  _this addmagazineCargoGlobal ["ItemSodaMtngreen",4];
		  _this addmagazineCargoGlobal ["ItemSodaR4z0r",4];
		  _this addmagazineCargoGlobal ["ItemSodaClays",4];
		  _this addmagazineCargoGlobal ["ItemSodaSmasht",4];
		  _this addmagazineCargoGlobal ["ItemSodaDrwaste",4];
		  _this addmagazineCargoGlobal ["ItemSodaLemonade",4];
		  _this addmagazineCargoGlobal ["ItemSodaLvg",4];
		  _this addmagazineCargoGlobal ["ItemSodaMzly",4];
		  _this addmagazineCargoGlobal ["ItemSodaRabbit",4];  
		  _this addmagazineCargoGlobal ["Skin_Drake_Light_DZ",2];
		  _this addmagazineCargoGlobal ["Skin_FR_OHara_DZ",2];
		  _this addmagazineCargoGlobal ["Skin_FR_Rodriguez_DZ",2];
		  _this addmagazineCargoGlobal ["Skin_CZ_Soldier_Sniper_EP1_DZ",2];
		  _this addmagazineCargoGlobal ["Skin_Graves_Light_DZ",2];
		  		  
		  _this addbackpackCargoGlobal ["DZ_LargeGunBag_EP1",2];
		  _this setPos [8007.18,13638.1];
		};

};

any help would be greatly appreciated. 

 

Edit: another possible thought, could it possibly be DZMS or WAI missions deleting these boxes as part of a cleanup script? 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...