Jump to content
  • 0

Custom Loot Box, for Custom Spawn WAI


demarotu

Question

Having trouble creating a custom loot spawn, with my custom static spawns. In my default.sqf the examples dont give anything about spawning a loot box with the AI position.

[4149.62,2777.39,0.00149536],	        // Position that units will be dropped by
		[0,0,0],							// Starting position of the heli
		4000,								// Radius from drop position a player has to be to spawn chopper
		"CH_47F_EP1_DZ",							// Classname of chopper (Make sure it has 2 gunner seats!)
		25,									// Number of units to be para dropped
		"easy",							// Skill level of units (easy, medium, hard, extreme, Random)
		"Random",							// Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher
		4,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Bandit2_DZ",						// Skin classname, use "Random" or classname here
		"Random",							// Gearset number. "Random" for random gear set.
		"Bandit",							// AI Type, "Hero" or "Bandit".
		false								// true: Aircraft will stay at position and fight. false: Heli will leave if not under fire. 
	] spawn heli_para;

would it accept a custom loot box, and if so, what is the best way to make a custom loot box or 7 lol

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Here is a ex. of a box.
 

//****************** Custom Lootboxes *******************\\
//* Breaks Server If To Much Is Added To The Crate   *\\
//*    Anything More Can Cause Server To Crash       *\\
//* Max Weapons = 100 * Max Mags = 520 * Max Bag = 1 *\\
//************************************************************\\
if (isServer) then {
 
//BoX 1
_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["TKVehicleBox_EP1", [749.509, 9289.79], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir -182.5;
  _vehicle_1 setVariable ["ObjectID","1",true];
  _vehicle_1 setVariable ["permaLoot",true];
  //Clear Cargo
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["DMR_DZ",3];
  _this addWeaponCargoGlobal ["M8_sharpshooter",3];
  _this addWeaponCargoGlobal ["M16A2",3];
  _this addWeaponCargoGlobal ["M9SD",3];
  _this addWeaponCargoGlobal ["M40A3",3];
  _this addWeaponCargoGlobal ["ItemGPS",3];
  _this addWeaponCargoGlobal ["Binocular_Vector",3];
  _this addWeaponCargoGlobal ["Pecheneg_DZ",3];
  _this addWeaponCargoGlobal ["M14_EP1",3];
  _this addWeaponCargoGlobal ["SCAR_H_LNG_Sniper_SD",3];
 
  _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",5];
  _this addmagazineCargoGlobal ["ItemGoldBar",5];
  _this addmagazineCargoGlobal ["ItemWaterbottleBoiled",5];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",3];
  _this addmagazineCargoGlobal ["Skin_Sniper1_DZ",2];
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",10];
  _this addmagazineCargoGlobal ["ItemAntibiotic",5];
  _this addmagazineCargoGlobal ["100Rnd_762x54_PK",3];  
  _this addmagazineCargoGlobal ["15Rnd_9x19_M9SD",5];  
  _this addmagazineCargoGlobal ["FoodMRE",5];
  _this addmagazineCargoGlobal ["ItemFuelBarrel",2];
  _this addmagazineCargoGlobal ["ItemBandage",10];
  _this addmagazineCargoGlobal ["ItemBloodbag",5];
  _this addmagazineCargoGlobal ["20Rnd_762x51_SB_SCAR",5];   
  _this addmagazineCargoGlobal ["ItemVault",2];
  _this addmagazineCargoGlobal ["ItemMorphine",5];
 
  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  _this setPos [749.509, 9289.79];
};
};

 
  _this = createVehicle ["TKVehicleBox_EP1", What kind of box.
[749.509, 9289.79], [], 0, "CAN_COLLIDE"]; Cords, the 0 is the height of it.
  _vehicle_1 = _this;
  _this setDir -182.5; Direction of the box.
  _vehicle_1 setVariable ["ObjectID","1",true];
  _vehicle_1 setVariable ["permaLoot",true];
  //Clear Cargo
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["DMR_DZ",3]; What kind of item/weapon, and how many of them.
  _this addWeaponCargoGlobal ["M8_sharpshooter",3];
  _this addWeaponCargoGlobal ["M16A2",3];
  _this addWeaponCargoGlobal ["M9SD",3];
  _this addWeaponCargoGlobal ["M40A3",3];
  _this addWeaponCargoGlobal ["ItemGPS",3];
  _this addWeaponCargoGlobal ["Binocular_Vector",3];
  _this addWeaponCargoGlobal ["Pecheneg_DZ",3];
  _this addWeaponCargoGlobal ["M14_EP1",3];
  _this addWeaponCargoGlobal ["SCAR_H_LNG_Sniper_SD",3];
 
  _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",5];
  _this addmagazineCargoGlobal ["ItemGoldBar",5];
  _this addmagazineCargoGlobal ["ItemWaterbottleBoiled",5];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",3];
  _this addmagazineCargoGlobal ["Skin_Sniper1_DZ",2];
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",10];
  _this addmagazineCargoGlobal ["ItemAntibiotic",5];
  _this addmagazineCargoGlobal ["100Rnd_762x54_PK",3];  
  _this addmagazineCargoGlobal ["15Rnd_9x19_M9SD",5];  
  _this addmagazineCargoGlobal ["FoodMRE",5];
  _this addmagazineCargoGlobal ["ItemFuelBarrel",2];
  _this addmagazineCargoGlobal ["ItemBandage",10];
  _this addmagazineCargoGlobal ["ItemBloodbag",5];
  _this addmagazineCargoGlobal ["20Rnd_762x51_SB_SCAR",5];   
  _this addmagazineCargoGlobal ["ItemVault",2];
  _this addmagazineCargoGlobal ["ItemMorphine",5];
 
  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  _this setPos [749.509, 9289.79, 0]; The cords again, the 0 is the height of it.

 

 

 

Just save it in a sqf and put it in your server pbo. And then put this in your server_functions.sqf 

 

[] execVM "\z\addons\dayz_server\??folder??\??Name??.sqf";

 

or your init.sqf for your WAI, then this

 

execVM "\z\addons\dayz_server\WAI\??Name??.sqf";

 

But I sent you a PM.

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...