Drop all ammo bind

RoLo

Veteran XV
Using Grooves Basic 1.40. Need the line of code for a bind to drop all ammo on all weapons in my current loadout. (But not drop the weapons themselves, beacons, mines, or repair kit)

The bind in that config "Drop Items Not in Current Loadout" is below and is not what I want because it drops the weapons (with the ammo in those weapons) so it doesn't show the ammo dropped. (It also drops the stuff above I don't want dropped.)

bindCommand(keyboard0, make, "p", TO, "AutoBuy:: DumpNonLoadoutItems();");

In Annihilation mod ammo acts like grenades, it can blow up, so you can see what use this would have for dropping it all at one time.

Help, and thanks in advance.
 
Last edited:
I did find this Juggle.cs script in the TE Library. Like the previous mentioned line of code in my first post, it drops everything. Can I edit this to do what I want?



//////////////////////////////////////////////////////////////////////////
// //
// File Name: juggle.cs //
// Config Name: Juggle //
// Author: >:-< Plague! modified version of Mjr.Phule et al. script//
// Description: Drops everything ! //
// //
//////////////////////////////////////////////////////////////////////////

EditActionMap("playMap.sae");

// tables from KillerBunny

$WeaponRealName[Blaster] = "Blaster";
$WeaponRealName[PlasmaGun] = "Plasma Gun";
$WeaponRealName[Chaingun] = "Chaingun";
$WeaponRealName[DiscLauncher] = "Disc Launcher";
$WeaponRealName[GrenadeLauncher] = "Grenade Launcher";
$WeaponRealName[Mortar] = "Mortar";
$WeaponRealName[LaserRifle] = "Laser Rifle";
$WeaponRealName[EnergyRifle] = "ELF gun";
$WeaponRealName[TargetingLaser] = "Targeting Laser";

$Ammo[Blaster] = "";
$Ammo[Chaingun] = "Bullet";
$Ammo[PlasmaGun] = "Plasma Bolt";
$Ammo[DiscLauncher] = "Disc";
$Ammo[TargetingLaser] = "";
$Ammo[EnergyRifle] = "";
$Ammo[LaserRifle] = "";

// This fixes the problem when playing on older
// server builds. No more problems firing grenades
// and mortars! Code by Defiant (Modified by KB after 1.3)

if($ServerVersion == 1.0)
{
$Ammo[GrenadeLauncher] = "GrenadeAmmo";
$Ammo[Mortar] = "MortarAmmo";
}
else
{
$Ammo[GrenadeLauncher] = "Grenade Ammo";
$Ammo[Mortar] = "Mortar Ammo";
}

$Weap[0] = "Chaingun";
$Weap[1] = "PlasmaGun";
$Weap[2] = "GrenadeLauncher";
$Weap[3] = "Mortar";
$Weap[4] = "DiscLauncher";
$Weap[5] = "Blaster";
$Weap[6] = "LaserRifle";
$Weap[7] = "EnergyRifle";
$Weap[8] = "TargetingLaser";

function DropAll()
{
drop(BackPack);
drop("Repair Kit");
for(%i = getItemCount("Mine"); %i > -1; %i--)
drop(mine);
for(%i = getItemCount("Grenade"); %i > 0; %i--)
drop(grenade);
for(%i = getItemCount("Beacon"); %i > 0; %i--)
drop(beacon);
$old = $WeaponSlot[getMountedItem(0)];
for(%i = 0; %i < 9; %i++)
{
for(%j = 50; %j > 0; %j--)
{
if(getItemCount($Ammo[$Weap[%i]]) > 0)
drop($Ammo[$Weap[%i]]);
else
%j = 0;
}
drop($WeaponRealName[$Weap[%i]]);
}
}

bindCommand(keyboard0, make, "numpad7", TO, "DropAll();");
 
yes

Code:
//////////////////////////////////////////////////////////////////////////
//	 //
// File Name:	juggle.cs	 //
// Config Name:	Juggle	 //
// Author: >:-< Plague! modified version of Mjr.Phule et al. script//	
// Description: Drops everything !	 //
//	 //
//////////////////////////////////////////////////////////////////////////

EditActionMap("playMap.sa e");

// tables from KillerBunny

$WeaponRealName[Blaster] = "Blaster";
$WeaponRealName[PlasmaGun] = "Plasma Gun";
$WeaponRealName[Chaingun] = "Chaingun";
$WeaponRealName[DiscLauncher] = "Disc Launcher";
$WeaponRealName[GrenadeLauncher] = "Grenade Launcher";
$WeaponRealName[Mortar] = "Mortar";
$WeaponRealName[LaserRifle] = "Laser Rifle";
$WeaponRealName[EnergyRifle] = "ELF gun";
$WeaponRealName[TargetingLaser] = "Targeting Laser";

$Ammo[Blaster] = "";
$Ammo[Chaingun] = "Bullet";
$Ammo[PlasmaGun] = "Plasma Bolt";
$Ammo[DiscLauncher] = "Disc";
$Ammo[TargetingLaser] = "";
$Ammo[EnergyRifle] = "";
$Ammo[LaserRifle] = "";

// This fixes the problem when playing on older
// server builds. No more problems firing grenades
// and mortars! Code by Defiant (Modified by KB after 1.3)

if($ServerVersion == 1.0)
{
	$Ammo[GrenadeLauncher] = "GrenadeAmmo";
	$Ammo[Mortar] = "MortarAmmo";
}
else
{
	$Ammo[GrenadeLauncher] = "Grenade Ammo";
	$Ammo[Mortar] = "Mortar Ammo";
}	

$Weap[0] = "Chaingun";
$Weap[1] = "PlasmaGun";
$Weap[2] = "GrenadeLauncher";
$Weap[3] = "Mortar";
$Weap[4] = "DiscLauncher";
$Weap[5] = "Blaster";
$Weap[6] = "LaserRifle";
$Weap[7] = "EnergyRifle";
$Weap[8] = "TargetingLaser";

function DropAll()
{
	//drop(BackPack);
	//drop("Repair Kit");
	//for(%i = getItemCount("Mine"); %i > -1; %i--)
		//drop(mine);
	//for(%i = getItemCount("Grenade"); %i > 0; %i--)
		//drop(grenade);
	//for(%i = getItemCount("Beacon"); %i > 0; %i--)
		//drop(beacon);
	$old = $WeaponSlot[getMountedItem(0)];	
	for(%i = 0; %i < 9; %i++)
	{
		for(%j = 50; %j > 0; %j--)
		{
			if(getItemCount($Ammo[$Weap[%i]]) > 0)
				drop($Ammo[$Weap[%i]]);
			else
				%j = 0;
		}
		//drop($WeaponRealName[$Weap[%i]]);
	}
}

bindCommand(keyboard0, make, "numpad7", TO, "DropAll();");
 
Last edited:
Alarik you fucker help me :(

p.s. KTFlash if you ran this mod you'd know that if you throw more than one ammo unit it would blow up automatically.

No need for your hand nade.
 
Did anyone ever find the shit out of that old viking config where it made noise when you were hitting ur target with cg?

i remember cheater iblis showing me this.
 
Back
Top