Jump to content
  • 0

Question

As some of you know the newest WAI update no longer supports static ammo crates. I was wondering if anyone knew of a way to pull certain scripts/files from the older version to make a system made to just spawn in a few static crates throughout the map?

 or a way to merge and edit some files from old to new to make it work again? i tried the 1st but i dont really know what im doing so it was a fail lol. I need this to work for my Bandit/Hero ai camps. without the crates its really not worth people risking heli/vehicle patrols and a 12 man paradrop to raid the camps. Im ok with editing out the missions from the original as well if there is a way to make them work alonside one and other. ANY help is appreciated, thank you in advance!

Share this post


Link to post
Share on other sites

18 answers to this question

Recommended Posts

  • 0

Best bet is to use another script to spawn the box's with what loot you want inside them at the spot you pick.

 

First make a folder named crates then a sqf file named crates.sqf and place the folder inside the root of your server pbo and the crates.sqf  inside the crates folder

 

Put this code inside the crates.sqf. (Change the loot to what you want, the type of box to spawn and the cords to the spot you want)

//* 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 {

//Bandit Base
_vehicle_103768 = objNull;
if (true) then
{
  _this = createVehicle ["USSpecialWeaponsBox", [13182.3, 10739.8, 0.00457960], [], 0, "CAN_COLLIDE"];
  _vehicle_103768 = _this;
  _this setDir -182.5;
  _vehicle_103768 setVariable ["ObjectID","1",true];
  _vehicle_103768 setVariable ["permaLoot",true];
  //Clear Cargo
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["vil_SR25",1];
  _this addWeaponCargoGlobal ["FHQ_ACR_WDL_CCO_SD",1];
  _this addWeaponCargoGlobal ["RH_m1911sd",1];
  _this addWeaponCargoGlobal ["RH_hk416sdaim",1];
  _this addWeaponCargoGlobal ["Binocular_Vector",1];
  _this addWeaponCargoGlobal ["RH_HK416_Aim",1];
  _this addWeaponCargoGlobal ["RH_m14aim",1];

  _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",3];
  _this addmagazineCargoGlobal ["FHQ_rem_30Rnd_680x43_ACR_SD",2];
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",3];
  _this addmagazineCargoGlobal ["RH_8Rnd_45cal_m1911",2];  
  _this addmagazineCargoGlobal ["30Rnd_556x45_StanagSD",2];  
  _this addmagazineCargoGlobal ["ItemGoldBar",5];
  _this addmagazineCargoGlobal ["ItemWaterbottleBoiled",5];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["Skin_Sniper1_DZ",2];  
  _this addmagazineCargoGlobal ["ItemAntibiotic",5];
  _this addmagazineCargoGlobal ["ItemPainkiller",5];  
  _this addmagazineCargoGlobal ["FoodMRE",5];
  _this addmagazineCargoGlobal ["ItemBandage",10];
  _this addmagazineCargoGlobal ["ItemBloodbag",5];
  _this addmagazineCargoGlobal ["ItemMorphine",5];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  _this setPos [13182.3, 10739.8, 0.00457960];
};

};

Next go inside your server pbo inside init\server_Functions.sqf and place this at the very bottom.

execVM "\z\addons\dayz_server\crates\crates.sqf";

That's it the box will spawn and refill every server restart.

 

To add another box to spawn it will look like this inside your crates.sqf

//* 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 {

//Bandit Base
_vehicle_103768 = objNull;
if (true) then
{
  _this = createVehicle ["USSpecialWeaponsBox", [13182.3, 10739.8, 0.00457960], [], 0, "CAN_COLLIDE"];
  _vehicle_103768 = _this;
  _this setDir -182.5;
  _vehicle_103768 setVariable ["ObjectID","1",true];
  _vehicle_103768 setVariable ["permaLoot",true];
  //Clear Cargo
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["vil_SR25",1];
  _this addWeaponCargoGlobal ["FHQ_ACR_WDL_CCO_SD",1];
  _this addWeaponCargoGlobal ["RH_m1911sd",1];
  _this addWeaponCargoGlobal ["RH_hk416sdaim",1];
  _this addWeaponCargoGlobal ["Binocular_Vector",1];
  _this addWeaponCargoGlobal ["RH_HK416_Aim",1];
  _this addWeaponCargoGlobal ["RH_m14aim",1];

  _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",3];
  _this addmagazineCargoGlobal ["FHQ_rem_30Rnd_680x43_ACR_SD",2];
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",3];
  _this addmagazineCargoGlobal ["RH_8Rnd_45cal_m1911",2];  
  _this addmagazineCargoGlobal ["30Rnd_556x45_StanagSD",2];  
  _this addmagazineCargoGlobal ["ItemGoldBar",5];
  _this addmagazineCargoGlobal ["ItemWaterbottleBoiled",5];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["Skin_Sniper1_DZ",2];  
  _this addmagazineCargoGlobal ["ItemAntibiotic",5];
  _this addmagazineCargoGlobal ["ItemPainkiller",5];  
  _this addmagazineCargoGlobal ["FoodMRE",5];
  _this addmagazineCargoGlobal ["ItemBandage",10];
  _this addmagazineCargoGlobal ["ItemBloodbag",5];
  _this addmagazineCargoGlobal ["ItemMorphine",5];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  _this setPos [13182.3, 10739.8, 0.00457960];
};

//Hero Base
_vehicle_103769 = objNull;
if (true) then
{
  _this = createVehicle ["USSpecialWeaponsBox", [13230.2, 10739.8, 0.395582], [], 0, "CAN_COLLIDE"];
  _vehicle_103769 = _this;
  _this setDir -182.5;
  _vehicle_103769 setVariable ["ObjectID","1",true];
  _vehicle_103769 setVariable ["permaLoot",true];
  //Clear Cargo
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["FHQ_MSR_DESERT",2];
  _this addWeaponCargoGlobal ["RH_deagle",2];
  _this addWeaponCargoGlobal ["RH_hk417sdeotech",2];
  _this addWeaponCargoGlobal ["RH_masbsdaim",2];
  _this addWeaponCargoGlobal ["FHQ_ACR_WDL_RCO",2];
  _this addWeaponCargoGlobal ["FHQ_ACR_BLK_G33_SD",2];
  _this addWeaponCargoGlobal ["SCAR_L_STD_HOLO",2];

  _this addmagazineCargoGlobal ["FHQ_rem_7Rnd_338Lapua_MSR_NT",5];
  _this addmagazineCargoGlobal ["RH_7Rnd_50_AE",4];
  _this addmagazineCargoGlobal ["30Rnd_556x45_StanagSD",6];
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",5];  
  _this addmagazineCargoGlobal ["FHQ_rem_30Rnd_680x43_ACR",4];
  _this addmagazineCargoGlobal ["FHQ_rem_30Rnd_680x43_ACR_SD",4];

  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  _this setPos [13230.2, 10739.8, 0.395582];
};

};

Share this post


Link to post
Share on other sites
  • 0

Thanks, will be trying this once i get off of work tomorrow! Tried something similar earlier with no luck. Coding didn't look nearly as clean nor was the installatiion very clear.  If this works ill definitely use as a temp fix. I do like the randomness of the WAI crates. Same stuff every time gets boring and played out. I just figured there is a way to run both side by side as someone did this with DZMS to add ai roadblocks and vehicle patrols as well as the usual missions by changing a bunch of text in all of the DZMS files. pretty much just changed everywhere it said DZMS in the calls as well as the folder name in the pbo and ran both. one as DZMS and other as DZMShotspots

Share this post


Link to post
Share on other sites
  • 0

Hi Syco,

 

I believe I have entered your script correctly, but after a restart the server sits at waiting for host.  After I take it out the server fuctions properly again.  If you could offer any help that would be great.

 

 

Thanks 

 

Post your crates.sqf and the bottom part of your server_Functions.sqf where you added the call line. I will take a look at it for you.

Share this post


Link to post
Share on other sites
  • 0

What version of WAI are you running? If I remember correctly I think the static crates broke with version 2.1.4. I don't know if I have the beta version 2.2.0 or not. If they worked in 2.1.4 and broke with 2.2.0 then I have it working for 2.2.0. How would I find out for sure what version i do have?

Anyways, It took me like 2 weeks to get all the static ai and crates working just a week or so before whatever version it was that broke the crates came out so I was pretty pissed that it was broke and made it a mission to make them work. It was a while ago but all I think I did was copy the code from the static crates file and paste it into default.sqf in the static folder. Again, it was awhile ago so there may have been a few other things that had to be copied. I am no scripter and I don't remember it being too difficult.

 

Also, instead of using WAI couldn't you just use the dynamic_crate.sqf from WAI, make a whatever.sqf with an array:

This is an example from my WAI/config.sqf:

 

if (isServer) then {

 

        crate_weapons_launchers     = [["M136","M136"],["Javelin","Javelin"],["Stinger","Stinger"],["RPG7V","PG7V"],["Strela","Strela"],["Igla","Igla"],["MetisLauncher","AT13"],["BAF_NLAW_Launcher","NLAW"],["RPG18","RPG18"],["SMAW","SMAW_HEAA"]];
        crate_weapons_twsweaps1     = ["FHQ_MSR_TWS_DESERT","FHQ_MSR_TWS_SD_DESERT","FHQ_RSASS_TWS_SD_TAN","FHQ_RSASS_TWS_TAN","FHQ_XM2010_TWS_SD_DESERT","m107_TWS_EP1","BAF_AS50_TWS","PMC_AS50_TWS","M110_TWS_EP1","BAF_L85A2_RIS_CWS","M249_TWS_EP1","SCAR_L_STD_EGLM_TWS","SCAR_H_STD_TWS_SD","m8_tws_sd","m8_tws"];
      

        crate_items_lowvalgems      = [["ItemObsidian",10],["ItemCitrine",10],["ItemGoldBar10oz",5],["ItemAmethyst",2]];
        crate_items_midvalgems      = [["ItemBriefcase100oz",5],["ItemAmethyst",10],["ItemTopaz",10],["ItemSapphire",2]];
        crate_items_hivalgems       = ["ItemVault",["ItemRuby",5],["ItemEmerald",5],["ItemSapphire",10],["ItemTopaz",10]];

};

then call the array from where you spawn the box?

This is an example from my WAI/static/default.sqf

 

if (isServer) then {

_crate76 = createVehicle ["GuerillaCacheBox",[17212.5,17841.7,0.001],[],0,"CAN_COLLIDE"];
_crate76 setVariable ["ObjectID","1",true];
_crate76 setVariable ["permaLoot",true];

[_crate76,[8,crate_weapons_launchers],0,[20,crate_items_hivalgems],0] call dynamic_crate;

_crate75 = createVehicle ["GuerillaCacheBox",[16824.9,18029.1,0.260857],[],0,"CAN_COLLIDE"];
_crate75 setVariable ["ObjectID","1",true];
_crate75 setVariable ["permaLoot",true];

[_crate75,[4,crate_weapons_launchers],0,[8,crate_items_midvalgems],0] call dynamic_crate;

};

 

Then obviously call them from the server_functions?

I was going to mess around with this a little later after I fix another thing that's bugging the hell out of me so I'll let you know the results.

Share this post


Link to post
Share on other sites
  • 0
I am using WAI, not sure what version. All I changed in this scipt were the cords.
 
if (isServer) then {
 
//Bandit Base
_vehicle_103768 = objNull;
if (true) then
{
  _this = createVehicle ["USSpecialWeaponsBox", [13182.3, 10739.8, 0.00457960], [], 0, "CAN_COLLIDE"];
  _vehicle_103768 = _this;
  _this setDir -182.5;
  _vehicle_103768 setVariable ["ObjectID","1",true];
  _vehicle_103768 setVariable ["permaLoot",true];
  //Clear Cargo
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["vil_SR25",1];
  _this addWeaponCargoGlobal ["FHQ_ACR_WDL_CCO_SD",1];
  _this addWeaponCargoGlobal ["RH_m1911sd",1];
  _this addWeaponCargoGlobal ["RH_hk416sdaim",1];
  _this addWeaponCargoGlobal ["Binocular_Vector",1];
  _this addWeaponCargoGlobal ["RH_HK416_Aim",1];
  _this addWeaponCargoGlobal ["RH_m14aim",1];
 
  _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",3];
  _this addmagazineCargoGlobal ["FHQ_rem_30Rnd_680x43_ACR_SD",2];
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",3];
  _this addmagazineCargoGlobal ["RH_8Rnd_45cal_m1911",2];  
  _this addmagazineCargoGlobal ["30Rnd_556x45_StanagSD",2];  
  _this addmagazineCargoGlobal ["ItemGoldBar",5];
  _this addmagazineCargoGlobal ["ItemWaterbottleBoiled",5];
  _this addmagazineCargoGlobal ["ItemBriefcase100oz",1];
  _this addmagazineCargoGlobal ["Skin_Sniper1_DZ",2];  
  _this addmagazineCargoGlobal ["ItemAntibiotic",5];
  _this addmagazineCargoGlobal ["ItemPainkiller",5];  
  _this addmagazineCargoGlobal ["FoodMRE",5];
  _this addmagazineCargoGlobal ["ItemBandage",10];
  _this addmagazineCargoGlobal ["ItemBloodbag",5];
  _this addmagazineCargoGlobal ["ItemMorphine",5];
 
  _this addbackpackCargoGlobal ["DZ_largeGunBag_EP1",1];
  _this setPos [13182.3, 10739.8, 0.00457960];
};
 
};
 
 
[] execVM "\z\addons\dayz_server\compile\addons\novylugbase.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\Moglevka.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\blackforestoutpost.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\basebor.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\basedichina.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\basenovy.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\skalistybase.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\kamenkaupdated.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\Eastcoast2.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\ZELCUSTOMSUPERMARKET.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\epochbalota.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\nwaf.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\stary.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\chernoelektroandberezinoenhance.sqf";
[] execVM "\z\addons\dayz_server\compile\addons\newscript1.sqf";

Share this post


Link to post
Share on other sites
  • 0

It should be vilayercodecustom\dayz_epoch\init\server_functions.sqf

 

 

Be sure the newscript1.sqf file is in that directory, server pbo\compile\addons\. This is not a default location as you would have to make the addons folder.

Share this post


Link to post
Share on other sites
  • 0
Guest

Hi,

 

please do not call compile that script. There is really no need to load this in to the memory, as first of all it's only being executed once, second it would have no script impact and third, it will cause laggs / crashes, if this stays in server memory. Use:

 

[] execVM "PATH\TO\FILE\DOTSQF";

 

Also, you don't want to put this in server_function.sqf, but you'll want to have it in the server_monitor.sqf at the very bottom, before the closing Bracket }; . Otherwise it won't load the file under certain circumstances :)

 

PS: This is for all placed Objects, there is absolutely no need to load something in to the memory, that you will never use again, like any spawning stuff.

Share this post


Link to post
Share on other sites
  • 0

I don't use call compile for placed objects myself. I used to for this script only back in the day

 

 

Never thought about executing it from the server_monitor.sqf like that. I will have to try that out.

Share this post


Link to post
Share on other sites
  • 0

I know this is old but I'm trying to get this to work! It is not spawning the crates in my server, I have even tried adding it to the bottom of the server_monitor.sqf like above says but unsure where to add it? Anyone willing to help me out would be great thanks :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By 2DayZ2Retirement
      -PROBLEM SOLVED-
       
      G'day, Survivors.
      I am having an issue on my server where vehicles which spawn randomly around the map repair themselves upon server restart.
      I use this config in my init.sqf which successfully spawns the vehicles in damaged and with low fuel...
      DynamicVehicleDamageLow = 75;
      DynamicVehicleDamageHigh = 100;
      DynamicVehicleFuelLow = 0;
      DynamicVehicleFuelHigh = 25;
      ...However upon each server restart the vehicles repair themselves (the fuel remains low however) and for the life of me I can't figure out why this is happening. 
      DayZ Version -DayZ Epoch 1.0.6.2
      Scripts Used -DZAI | -DZMS | -Right Click Actions (Suicide, Smoke Drugs, GPS Scan)
      AntiHack - InfiSTAR
      Server Host - GTXGaming
      My HiveEXT.log and arma2oaserver.RPT logs are not showing anything out of the ordinary.
      I'm not sure if it matter, but all Planes/Helicopters and Boats have been removed from the server via the dynamic_vehicle.sqf.
      In addition, all of the traders and trader cities being removed by removing the call for the CfgServerTrader.hpp in the description.ext.
      If there is any other info I can show to assist in fixing this problem please let me know, any help would be greatly appreciated.
      Cheers.
    • By heiko33
      Downlod        
      https://ln.sync.com/dl/043e1b3c0/wkrywtzv-idjkp722-wzfqg9g6-53b7xfyj
       
       
       
    • By FG_Trap
      Made a quick static ai mission that spawns on restart. 
      12 ai patrol the compound 
      4 Static m2's
      1 Heli Patrolling the compound 
      Crate for who ever clears all the ai.
      Some screenshots of the compound 


       
      https://github.com/Trapxxgods/Wai-Static-Mission 
    • By rocalpha
      Bonjour, j’écris aujourd’hui parce que j’aimerais savoir si vous ne pourrez pas m'aider. Je loue un serveur via gportal et j’aimerais pouvoir être mon serveur en PvE, mais aussi créer des éléments de base pour la connexion et des choses simples comme . J'ai un autre problème lorsque j'achète une voiture chère à pied cela me met une flèche rouge puis rien non aucun véhicule il apparait qu'après un redémarrage du serveur
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...