Stealthy-Dusty 10 Posted June 4, 2015 In need of an decent ammo box refill script, including all weapons, Im a noob to no scripter at all, have been using Riouken`s Script, but its outdated, and it needs more weapons, maybe if even somebody could edit it for me adding the weapons, like the titan at and the m320 Current lines: ///////// MP Ammo Box script ///////// By: Riouken ///////// For Arma 3 if (! isServer) exitWith {}; _crate = _this select 0; while {alive _crate} do { clearMagazineCargo _crate; clearWeaponCargo _crate; clearItemCargoGlobal _crate; ///NATO Weapons/// _crate addWeaponCargoGlobal ["arifle_MX_F", 50]; _crate addWeaponCargoGlobal ["arifle_MX_GL_F", 50]; _crate addWeaponCargoGlobal ["arifle_MXC_F", 50]; _crate addWeaponCargoGlobal ["arifle_TRG20_F", 50]; _crate addWeaponCargoGlobal ["arifle_TRG21_F", 50]; _crate addWeaponCargoGlobal ["arifle_TRG21_GL_F", 50]; //_crate addWeaponCargoGlobal ["arifle_MSM_F", 50]; _crate addWeaponCargoGlobal ["srifle_EBR_F", 50]; _crate addWeaponCargoGlobal ["LMG_Mk200_F", 50]; ///OPFOR Weapons//// _crate addWeaponCargoGlobal ["arifle_Khaybar_F", 50]; _crate addWeaponCargoGlobal ["arifle_Khaybar_C_F", 50]; _crate addWeaponCargoGlobal ["arifle_Khaybar_GL_F", 50]; _crate addWeaponCargoGlobal ["hgun_rook40_F", 50]; ///AMMO/// _crate addMagazineCargoGlobal ["30Rnd_65x39_Caseless_mag", 200]; _crate addMagazineCargoGlobal ["100Rnd_65x39_Caseless_mag", 200]; _crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag_Tracer", 200]; _crate addMagazineCargoGlobal ["100Rnd_65x39_caseless_mag_Tracer", 200]; //_crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag_green", 200]; _crate addMagazineCargoGlobal ["30Rnd_65x39_case_mag", 200]; _crate addMagazineCargoGlobal ["20Rnd_762x45_Mag", 200]; _crate addMagazineCargoGlobal ["16Rnd_9x21_Mag", 200]; _crate addMagazineCargoGlobal ["30Rnd_9x21_Mag", 200]; _crate addMagazineCargoGlobal ["20Rnd_556x45_UW_Mag", 200]; _crate addMagazineCargoGlobal ["30RND_556x45_Stanag", 200]; _crate addMagazineCargoGlobal ["200RND_65x39_Cased_box_Tracer", 200]; ////Launchers//// _crate addWeaponCargoGlobal ["launch_NLAW_F", 50]; _crate addWeaponCargoGlobal ["launch_RPG32_F", 50]; ////Launcher Ammo//// _crate addMagazineCargoGlobal ["RPG32_F", 50]; _crate addMagazineCargoGlobal ["NLAW_F", 50]; /////Explosives//// _crate addMagazineCargoGlobal ["ATMine_Range_Mag", 50]; _crate addMagazineCargoGlobal ["APERSMine_Range_Mag", 50]; _crate addMagazineCargoGlobal ["ClaymoreDirectionalMine_Remote_Mag", 50]; _crate addMagazineCargoGlobal ["DemoCharge_Remote_Mag", 50]; _crate addMagazineCargoGlobal ["APERSBoundingMine_Range_Mag", 50]; _crate addMagazineCargoGlobal ["SLAMDirectionalMine_Wire_Mag", 50]; _crate addMagazineCargoGlobal ["APERSTripMine_Wire_Mag", 50]; _crate addWeaponCargoGlobal ["ToolKit", 50]; _crate addWeaponCargoGlobal ["MineDetector", 50]; _crate addWeaponCargoGlobal ["Medikit", 50]; /////Grenades//// _crate addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["1Rnd_Smoke_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["1Rnd_SmokeGreen_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["1Rnd_SmokeYellow_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["1Rnd_SmokePurple_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["1Rnd_SmokeBlue_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["1Rnd_SmokeOrange_Grenade_shell", 50]; _crate addMagazineCargoGlobal ["SmokeShellRed", 50]; _crate addMagazineCargoGlobal ["SmokeShell", 50]; _crate addMagazineCargoGlobal ["SmokeShellGreen", 50]; _crate addMagazineCargoGlobal ["SmokeShellYellow", 50]; _crate addMagazineCargoGlobal ["SmokeShellPurple", 50]; _crate addMagazineCargoGlobal ["SmokeShellBlue", 50]; _crate addMagazineCargoGlobal ["SmokeShellOrange", 50]; ///Attachments/// _crate addItemCargoGlobal ["Zasleh2",50]; _crate addItemCargoGlobal ["muzzle_snds_H", 50]; _crate addItemCargoGlobal ["muzzle_snds_L", 50]; _crate addItemCargoGlobal ["muzzle_snds_B", 50]; _crate addItemCargoGlobal ["muzzle_snds_H_MG", 50]; _crate addItemCargoGlobal ["optic_Arco", 50]; _crate addItemCargoGlobal ["optic_Hamr", 50]; _crate addItemCargoGlobal ["optic_Aco", 50]; _crate addItemCargoGlobal ["optic_ACO_grn",50]; _crate addItemCargoGlobal ["optic_Holosight", 50]; _crate addItemCargoGlobal ["acc_flashlight", 50]; _crate addItemCargoGlobal ["acc_pointer_IR", 50]; sleep 500; }; Riouken`s: http://forums.bistudio.com/showthread.php?147962-Working-MP-ammo-box-script Share this post Link to post Share on other sites
jshock 513 Posted June 4, 2015 the boks is full No, cargo limit values are ignored when scripting it in, he could put 10,000 of each item if he wanted to. Share this post Link to post Share on other sites
loopdk 92 Posted June 4, 2015 But why cant he get in titan then?? Share this post Link to post Share on other sites
Senshi 10 Posted June 5, 2015 The Titan is not added because the script doesn't add it, obviously... Either use a script that adds weapon dynamically (which makes them also work for any addon weapons you have) like below or search armaholic and similar for other popular crate filler scripts. There are plenty, and most of them work well. /*Script by Ghost (main design by Kronzky) Will add all weapons, items, magazines to an ammo box and refill it every 1200 seconds. no more manual typing of weapon/magazine/item names. put null0 = this execVM "scripts\ammo.sqf"; in the initline of an ammo box. */ _wepcount = 10; _magcount = 30; clearweaponcargo _this; clearmagazinecargo _this; _weaponsList = []; _namelist = []; _cfgweapons = configFile >> "cfgWeapons"; for "_i" from 0 to (count _cfgweapons)-1 do { _weapon = _cfgweapons select _i; if (isClass _weapon) then { _wCName = configName(_weapon); _wDName = getText(configFile >> "cfgWeapons" >> _wCName >> "displayName"); _wModel = getText(configFile >> "cfgWeapons" >> _wCName >> "model"); _wType = getNumber(configFile >> "cfgWeapons" >> _wCName >> "type"); _wscope = getNumber(configFile >> "cfgWeapons" >> _wCName >> "scope"); _wPic = getText(configFile >> "cfgWeapons" >> _wCName >> "picture"); _wDesc = getText(configFile >> "cfgWeapons" >> _wCName >> "Library" >> "libTextDesc"); _isFake = false; _wHits=0; _mags=[]; _muzzles = getArray(configfile >> "cfgWeapons" >> _wCName >> "muzzles"); if ((_muzzles select 0)=="this") then { _muzzles=[_wCName]; _mags = getArray(configfile >> "cfgWeapons" >> _wCName >> "magazines"); } else { { _muzzle=_x; _mags = getArray(configfile >> "cfgWeapons" >> _wCName >> _muzzle >> "magazines"); }forEach _muzzles; }; { _ammo = getText(configfile >> "cfgMagazines" >> _x >> "ammo"); _hit = getNumber(configfile >> "cfgAmmo" >> _ammo >> "hit"); _wHits = _wHits + _hit; }forEach _mags; if ((_wCName!="") && (_wDName!="") && (_wModel!="") && (_wPic!="")) then { if !(_wDName in _namelist) then { _weaponsList = _weaponsList + [[_wCName,_wDName,_wPic,_wDesc]]; _namelist = _namelist + [_wDName]; }; }; }; if (_i % 10==0) then { hintsilent format["Loading Weapons List... (%1)",count _weaponsList]; sleep .0001; }; }; hint ""; _namelist=nil; _magazinesList = []; _namelist = []; _cfgmagazines = configFile >> "cfgmagazines"; for "_i" from 0 to (count _cfgmagazines)-1 do { _magazine = _cfgmagazines select _i; if (isClass _magazine) then { _mCName = configName(_magazine); _mDName = getText(configFile >> "cfgmagazines" >> _mCName >> "displayName"); _mModel = getText(configFile >> "cfgmagazines" >> _mCName >> "model"); _mType = getNumber(configFile >> "cfgmagazines" >> _mCName >> "type"); _mscope = getNumber(configFile >> "cfgmagazines" >> _mCName >> "scope"); _mPic = getText(configFile >> "cfgmagazines" >> _mCName >> "picture"); _mDesc = getText(configFile >> "cfgmagazines" >> _mCName >> "Library" >> "libTextDesc"); if ((_mCName!="") && (_mDName!="") && (_mModel!="")) then { if !(_mDName in _namelist) then { _magazinesList = _magazinesList + [[_mCName,_mDName,_mPic,_mDesc]]; _namelist = _namelist + [_mDName]; }; }; }; if (_i % 10==0) then { hintsilent format["Loading magazines List... (%1)",count _magazinesList]; sleep .0001; }; }; hint ""; _namelist=nil; while {alive _this} do { clearweaponcargo _this; clearmagazinecargo _this; for "_i" from 0 to (count _weaponsList)-1 do { _weapon = _weaponsList select _i; _this addweaponcargo [_weapon select 0,_wepcount]; }; for "_i" from 0 to (count _magazinesList)-1 do { _magazine = _magazinesList select _i; _this addmagazinecargo [_magazine select 0,_magcount]; }; sleep 1200; }; Share this post Link to post Share on other sites