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

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

  • Similar Content

    • By Tanita-Corp
      Hello guys)
      Tell me please how to make 
      spawned veh. unused 4 day deleted
      with key veh. unused 14 day deleted
       
      I broke my head
    • By JakeQue
      Is there anyway to add a disable footsteps for admins?
       
      Also I would love to be able to spawn a mission in from the admin menu, I tried some code but it just breaks Infistar, it would seem it is executing it automatically.
       
       
      Thank you!
    • By Hanse
      Hello i am knew to this and i need someone to show me the ropes
      Steam
      IGN:Hanse
    • By Kovicson
      Hey guys, I was looking through my RPT for the server and seen this
      I have no idea what it is... but infistar seems to not like it.
      Any ideas?
      Thank you
      18:39:58 "<infiSTAR.de> CONNECTLOG: CONNECT - Bob Stookee(PLAYER ID)" 18:39:58 "<infiSTAR.de> KickLog: SERVER kicked Bob Stookee(PLAYER ID) - TempBanned" 18:40:03 "INFO - Player: PID#16(Bob Stookee)(UID:PLAYER ID/CID:141) Status: LOGGING IN" 18:40:04 "INFO - Player: PID#16(Bob Stookee)(UID:PLAYER ID/CID:141) Status: LOGIN PUBLISHING, Location factory [132079]" 18:40:10 "<infiSTAR.de> BAN: Bob Stookee (PLAYER ID) | BadFile: blah.sqf - #line 1 "blah.sqf" player addWeapon "M16A2"; player addMagazine "20Rnd_556x45_Stanag"; " 18:40:10 "<infiSTAR.de> BAN: Bob Stookee (PLAYER ID) | BadFile: blah.sqf - #line 1 "blah.sqf" player addWeapon "M16A2"; player addMagazine "20Rnd_556x45_Stanag"; " 18:40:10 "<infiSTAR.de> KickLog: SERVER kicked Bob Stookee(PLAYER ID) - Bob Stookee (PLAYER ID) | BadFile: blah.sqf - #line 1 "blah.sqf" player addWeapon "M16A2"; player addMagazine "20Rnd_556x45_Stanag"; " 18:40:10 "["PVAHR_0_p8c4d7f43821237871843",["Bob Stookee","PLAYER ID","BAN",[66,97,100,70,105,108,101,58,32,98,108,97,104,46,115,113,102,32,45,32,35,108,105,110,101,32,49,32,34,98,108,97,104,46,115,113,102,34,10,112,108,97,121,101,114,32,97,100,100,87,101,97,112,111,110,32,34,77,49,54,65,50,34,59,32,10,112,108,97,121,101,114,32,97,100,100,77,97,103,97,122,105,110,101,32,34,50,48,82,110,100,95,53,53,54,120,52,53,95,83,116,97,110,97,103,34,59,32]]]" 18:40:10 "Player UID#PLAYER ID CID#141 PID#16(Bob Stookee) as Survivor2_DZ died at Wilderness [813895]" 18:40:10 "DeathMessage: Bob Stookee died from blood loss." 18:40:16 "<infiSTAR.de> KickLog: SERVER kicked Bob Stookee(PLAYER ID) - TempBanned" 18:40:20 "<infiSTAR.de> CONNECTLOG: DISCONNECT - Bob Stookee(PLAYER ID)" 18:40:20 "INFO: OnPlayerDisconnect exiting. Player is near respawn_west. This is normal after death. [PLAYER ID","Bob Stookee"]" 18:40:20 Client: Remote object 16:4 not found 18:40:21 Client: Object 6:425 (type Type_149) not found. 18:40:21 Client: Object 10:552 (type Type_149) not found. 18:40:21 Client: Object 17:11 (type Type_149) not found. 18:42:22 Server: Object 6:444 not found (message 70) 18:42:22 Server: Object 6:443 not found (message 89) 18:42:24 Server: Object 10:672 not found (message 70) 18:42:24 Server: Object 6:445 not found (message 94) 18:42:28 Server: Object 6:408 not found (message 221) 18:42:30 "<infiSTAR.de> CONNECTLOG: CONNECT - Bob Stookee(PLAYER ID)" 18:42:30 "<infiSTAR.de> KickLog: SERVER kicked Bob Stookee(PLAYER ID) - TempBanned"  
    • By JakeQue
      Hi guys,
       
      I can't seem to find the heli fast rope / rappell script, I know it was active on the 1.0.5.1 and for arma 2 but not seen anything for recent.
       
      If anyone has a working plugin I would be much obliged! 
  • Advertisement
  • Advertisement
  • Supporters
  • Advertisement
  • Discord

×