actor GrenadeAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 2
    inventory.maxamount 2
    ammo.backpackamount 2
    ammo.backpackmaxamount 4
    inventory.pickupmessage "Picked up some grenades!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor FamasAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 13
    inventory.maxamount 125
    ammo.backpackamount 25
    ammo.backpackmaxamount 225
    inventory.pickupmessage "Picked up some FAMAS-F1 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor FALAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 10
    inventory.maxamount 100
    ammo.backpackamount 20
    ammo.backpackmaxamount 160
    inventory.pickupmessage "Picked up some FAL rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor ACRAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 150
    ammo.backpackamount 30
    ammo.backpackmaxamount 240
    inventory.pickupmessage "Picked up some ACR rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor P90Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 25
    inventory.maxamount 200
    ammo.backpackamount 50
    ammo.backpackmaxamount 400
    inventory.pickupmessage "Picked up some P90 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor UMP45Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 13
    inventory.maxamount 125
    ammo.backpackamount 25
    ammo.backpackmaxamount 275
    inventory.pickupmessage "Picked up some UMP45 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor MiniUziAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 16
    inventory.maxamount 160
    ammo.backpackamount 32
    ammo.backpackmaxamount 320
    inventory.pickupmessage "Picked up some Mini-UZI rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor VectorAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 150
    ammo.backpackamount 30
    ammo.backpackmaxamount 300
    inventory.pickupmessage "Picked up some Vector rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor InterventionAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 7
    inventory.maxamount 28
    ammo.backpackamount 12
    ammo.backpackmaxamount 35
    inventory.pickupmessage "Picked up some Intervention rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor BarrettAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 5
    inventory.maxamount 20
    ammo.backpackamount 10
    ammo.backpackmaxamount 40
    inventory.pickupmessage "Picked up some Barrett rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor WA2000Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 6
    inventory.maxamount 30
    ammo.backpackamount 12
    ammo.backpackmaxamount 42
    inventory.pickupmessage "Picked up some WA 2000 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}
actor M14Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 5
    inventory.maxamount 30
    ammo.backpackamount 10
    ammo.backpackmaxamount 60
    inventory.pickupmessage "Picked up some M14 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor USP45Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 6
    inventory.maxamount 48
    ammo.backpackamount 12
    ammo.backpackmaxamount 48
    inventory.pickupmessage "Picked up some USP45 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor 44MagnumAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 3
    inventory.maxamount 24
    ammo.backpackamount 6
    ammo.backpackmaxamount 24
    inventory.pickupmessage "Picked up some .44 Magnum rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}
actor M9Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 8
    inventory.maxamount 60
    ammo.backpackamount 15
    ammo.backpackmaxamount 60
    inventory.pickupmessage "Picked up some M9 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor DeagleAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 4
    inventory.maxamount 28
    ammo.backpackamount 7
    ammo.backpackmaxamount 28
    inventory.pickupmessage "Picked up some Desert Eagle rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor SPAS12Ammo : Ammo
{
    inventory.icon "SHELA0"
    inventory.amount 4
    inventory.maxamount 24
    ammo.backpackamount 8
    ammo.backpackmaxamount 48
    inventory.pickupmessage "Picked up some SPAS-12 shells!"
    States
    {
    Spawn:
      SHEL A -1
      Stop
    }
}

actor AA12Ammo : Ammo
{
    inventory.icon "SHELA0"
    inventory.amount 6
    inventory.maxamount 36
    ammo.backpackamount 12
    ammo.backpackmaxamount 68
    inventory.pickupmessage "Picked up some AA-12 shells!"
    States
    {
    Spawn:
      SHEL A -1
      Stop
    }
}

actor RangerAmmo : Ammo
{
    inventory.icon "SHELA0"
    inventory.amount 6
    inventory.maxamount 24
    ammo.backpackamount 12
    ammo.backpackmaxamount 48
    inventory.pickupmessage "Picked up some Ranger shells!"
    States
    {
    Spawn:
      SHEL A -1
      Stop
    }
}

actor StrikerAmmo : Ammo
{
    inventory.icon "SHELA0"
    inventory.amount 6
    inventory.maxamount 32
    ammo.backpackamount 12
    ammo.backpackmaxamount 64
    inventory.pickupmessage "Picked up some Striker shells!"
    States
    {
    Spawn:
      SHEL A -1
      Stop
    }
}

actor M1014Ammo : Ammo
{
    inventory.icon "SHELA0"
    inventory.amount 5
    inventory.maxamount 28
    ammo.backpackamount 10
    ammo.backpackmaxamount 56
    inventory.pickupmessage "Picked up some M1014 shells!"
    States
    {
    Spawn:
      SHEL A -1
      Stop
    }
}

actor M1887Ammo : Ammo
{
    inventory.icon "SHELA0"
    inventory.amount 4
    inventory.maxamount 28
    ammo.backpackamount 7
    ammo.backpackmaxamount 49
    inventory.pickupmessage "Picked up some Model 1887 shells!"
    States
    {
    Spawn:
      SHEL A -1
      Stop
    }
}

actor MG4Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 50
    inventory.maxamount 200
    ammo.backpackamount 100
    ammo.backpackmaxamount 300
    inventory.pickupmessage "Picked up some MG4 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor AUGHBARAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 36
    inventory.maxamount 210
    ammo.backpackamount 72
    ammo.backpackmaxamount 336
    inventory.pickupmessage "Picked up some AUG HBAR rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor M240Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 50
    inventory.maxamount 200
    ammo.backpackamount 100
    ammo.backpackmaxamount 500
    inventory.pickupmessage "Picked up some M240 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor L86Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 42
    inventory.maxamount 252
    ammo.backpackamount 84
    ammo.backpackmaxamount 378
    inventory.pickupmessage "Picked up some L86 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor G18Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 16
    inventory.maxamount 66
    ammo.backpackamount 33
    ammo.backpackmaxamount 66
    inventory.pickupmessage "Picked up some Glock 18 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor PP2000Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 10
    inventory.maxamount 60
    ammo.backpackamount 20
    ammo.backpackmaxamount 40
    inventory.pickupmessage "Picked up some PP-2000 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor SCARHAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 10
    inventory.maxamount 120
    ammo.backpackamount 20
    ammo.backpackmaxamount 180
    inventory.pickupmessage "Picked up some SCAR-H rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor M4A1Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 150
    ammo.backpackamount 30
    ammo.backpackmaxamount 240
    inventory.pickupmessage "Picked up some M4A1 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor F2000Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 150
    ammo.backpackamount 30
    ammo.backpackmaxamount 240
    inventory.pickupmessage "Picked up some F2000 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor MP5Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 150
    ammo.backpackamount 30
    ammo.backpackmaxamount 300
    inventory.pickupmessage "Picked up some MP5K rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor M93RAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 10
    inventory.maxamount 80
    ammo.backpackamount 20
    ammo.backpackmaxamount 80
    inventory.pickupmessage "Picked up some M93 Raffica rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

actor M16Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 150
    ammo.backpackamount 30
    ammo.backpackmaxamount 240
    inventory.pickupmessage "Picked up some M16A4 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}
actor AKMAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 15
    inventory.maxamount 120
    ammo.backpackamount 30
    ammo.backpackmaxamount 210
    inventory.pickupmessage "Picked up some AK47 rounds!"
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

//Medium ammo pickup
actor MediumAmmo : CustomInventory
{
  inventory.pickupmessage "Picked up some Rifle rounds!"
  inventory.pickupsound "cursor/select"
  +INVENTORY.AUTOACTIVATE
  scale 0.22
  States
  {
  Spawn:
    NWAD A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger",1,"PickupScav")
    BKPK A 0 A_GiveInventory("FamasAmmo",6)
    BKPK A 0 A_GiveInventory("FALAmmo",5)
    BKPK A 0 A_GiveInventory("ACRAmmo",6)
    BKPK A 0 A_GiveInventory("M4A1Ammo",6)
    BKPK A 0 A_GiveInventory("SCARHAmmo",5)
    BKPK A 0 A_GiveInventory("F2000Ammo",6)
    BKPK A 0 A_GiveInventory("M16Ammo",6)
    BKPK A 0 A_GiveInventory("AKMAmmo",6)
    stop
  PickupScav:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScavProCheck")
    BKPK A 0 A_GiveInventory("FamasAmmo",12)
    BKPK A 0 A_GiveInventory("FALAmmo",10)
    BKPK A 0 A_GiveInventory("ACRAmmo",12)
    BKPK A 0 A_GiveInventory("M4A1Ammo",12)
    BKPK A 0 A_GiveInventory("SCARHAmmo",10)
    BKPK A 0 A_GiveInventory("F2000Ammo",12)
    BKPK A 0 A_GiveInventory("M16Ammo",12)
    BKPK A 0 A_GiveInventory("AKMAmmo",11)
    stop
  PickupScavProCheck:
    BKPK A 0 A_JumpIfInventory("FamasAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("FALAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("ACRAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M4A1Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("SCARHAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("F2000Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M16Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("AKMAmmo",0,1)
	goto PickupScavPro
    BKPK A 0
	stop
  PickupScavPro:
    BKPK A 0 A_GiveInventory("FamasAmmo",12)
    BKPK A 0 A_GiveInventory("FALAmmo",10)
    BKPK A 0 A_GiveInventory("ACRAmmo",12)
    BKPK A 0 A_GiveInventory("M4A1Ammo",12)
    BKPK A 0 A_GiveInventory("SCARHAmmo",10)
    BKPK A 0 A_GiveInventory("F2000Ammo",12)
    BKPK A 0 A_GiveInventory("M16Ammo",12)
    BKPK A 0 A_GiveInventory("AKMAmmo",11)
    BKPK A 0 A_GiveInventory("MP5Ammo",1)
    BKPK A 0 A_GiveInventory("MiniUziAmmo",1)
    BKPK A 0 A_GiveInventory("UMP45Ammo",1)
    BKPK A 0 A_GiveInventory("VectorAmmo",1)
    BKPK A 0 A_GiveInventory("P90Ammo",1)
    BKPK A 0 A_GiveInventory("AA12Ammo",1)
    BKPK A 0 A_GiveInventory("RangerAmmo",1)
    BKPK A 0 A_GiveInventory("SPAS12Ammo",1)
    BKPK A 0 A_GiveInventory("StrikerAmmo",1)
    BKPK A 0 A_GiveInventory("M1014Ammo",1)
    BKPK A 0 A_GiveInventory("M1887Ammo",1)
    BKPK A 0 A_GiveInventory("USP45Ammo",1)
    BKPK A 0 A_GiveInventory("44MagnumAmmo",1)
    BKPK A 0 A_GiveInventory("DeagleAmmo",1)
    BKPK A 0 A_GiveInventory("M9Ammo",1)
    BKPK A 0 A_GiveInventory("G18Ammo",1)
    BKPK A 0 A_GiveInventory("PP2000Ammo",1)
    BKPK A 0 A_GiveInventory("M93RAmmo",1)
    BKPK A 0 A_GiveInventory("MG4Ammo",2)
    BKPK A 0 A_GiveInventory("AUGHBARAmmo",1)
    BKPK A 0 A_GiveInventory("M240Ammo",2)
    BKPK A 0 A_GiveInventory("L86Ammo",2)
    BKPK A 0 A_GiveInventory("InterventionAmmo",1)
    BKPK A 0 A_GiveInventory("BarrettAmmo",1)
    BKPK A 0 A_GiveInventory("WA2000Ammo",1)
    BKPK A 0 A_GiveInventory("M14Ammo",1)
    stop
  }
}

//Subsonic ammo pickup
actor SubAmmo : CustomInventory
{
  inventory.pickupmessage "Picked up some Subsonic rounds!"
  inventory.pickupsound "cursor/select"
  +INVENTORY.AUTOACTIVATE
  scale 0.18
  States
  {
  Spawn:
    NWAM A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger",1,"PickupScav")
    BKPK A 0 A_GiveInventory("MP5Ammo",3)
    BKPK A 0 A_GiveInventory("MiniUziAmmo",4)
    BKPK A 0 A_GiveInventory("UMP45Ammo",3)
    BKPK A 0 A_GiveInventory("VectorAmmo",3)
    BKPK A 0 A_GiveInventory("P90Ammo",6)
    BKPK A 0 A_GiveInventory("USP45Ammo",1)
    BKPK A 0 A_GiveInventory("44MagnumAmmo",1)
    BKPK A 0 A_GiveInventory("DeagleAmmo",1)
    BKPK A 0 A_GiveInventory("M9Ammo",2)
    BKPK A 0 A_GiveInventory("G18Ammo",4)
    BKPK A 0 A_GiveInventory("PP2000Ammo",2)
    BKPK A 0 A_GiveInventory("M93RAmmo",2)
    stop
  PickupScav:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScavProCheck")
    BKPK A 0 A_GiveInventory("MP5Ammo",5)
    BKPK A 0 A_GiveInventory("MiniUziAmmo",6)
    BKPK A 0 A_GiveInventory("UMP45Ammo",5)
    BKPK A 0 A_GiveInventory("VectorAmmo",5)
    BKPK A 0 A_GiveInventory("P90Ammo",9)
    BKPK A 0 A_GiveInventory("USP45Ammo",3)
    BKPK A 0 A_GiveInventory("44MagnumAmmo",2)
    BKPK A 0 A_GiveInventory("DeagleAmmo",2)
    BKPK A 0 A_GiveInventory("M9Ammo",3)
    BKPK A 0 A_GiveInventory("G18Ammo",6)
    BKPK A 0 A_GiveInventory("PP2000Ammo",3)
    BKPK A 0 A_GiveInventory("M93RAmmo",3)
    stop
  PickupScavProCheck:
    BKPK A 0 A_JumpIfInventory("MP5Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("MiniUziAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("UMP45Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("VectorAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("P90Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("USP45Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("44MagnumAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("DeagleAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M9Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("G18Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("PP2000Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M93RAmmo",0,1)
	goto PickupScavPro
    BKPK A 0
	stop
  PickupScavPro:
    BKPK A 0 A_GiveInventory("MP5Ammo",5)
    BKPK A 0 A_GiveInventory("MiniUziAmmo",6)
    BKPK A 0 A_GiveInventory("UMP45Ammo",5)
    BKPK A 0 A_GiveInventory("VectorAmmo",5)
    BKPK A 0 A_GiveInventory("P90Ammo",9)
    BKPK A 0 A_GiveInventory("USP45Ammo",2)
    BKPK A 0 A_GiveInventory("44MagnumAmmo",1)
    BKPK A 0 A_GiveInventory("DeagleAmmo",1)
    BKPK A 0 A_GiveInventory("M9Ammo",3)
    BKPK A 0 A_GiveInventory("G18Ammo",6)
    BKPK A 0 A_GiveInventory("PP2000Ammo",3)
    BKPK A 0 A_GiveInventory("M93RAmmo",3)
    BKPK A 0 A_GiveInventory("AA12Ammo",1)
    BKPK A 0 A_GiveInventory("RangerAmmo",1)
    BKPK A 0 A_GiveInventory("SPAS12Ammo",1)
    BKPK A 0 A_GiveInventory("StrikerAmmo",1)
    BKPK A 0 A_GiveInventory("M1014Ammo",1)
    BKPK A 0 A_GiveInventory("M1887Ammo",1)
    BKPK A 0 A_GiveInventory("MG4Ammo",2)
    BKPK A 0 A_GiveInventory("AUGHBARAmmo",1)
    BKPK A 0 A_GiveInventory("M240Ammo",2)
    BKPK A 0 A_GiveInventory("L86Ammo",2)
    BKPK A 0 A_GiveInventory("FamasAmmo",1)
    BKPK A 0 A_GiveInventory("FALAmmo",1)
    BKPK A 0 A_GiveInventory("ACRAmmo",1)
    BKPK A 0 A_GiveInventory("M4A1Ammo",1)
    BKPK A 0 A_GiveInventory("SCARHAmmo",1)
    BKPK A 0 A_GiveInventory("F2000Ammo",1)
    BKPK A 0 A_GiveInventory("M16Ammo",1)
    BKPK A 0 A_GiveInventory("AKMAmmo",1)
    //BKPK A 0 A_GiveInventory("InterventionAmmo",1)
    //BKPK A 0 A_GiveInventory("BarrettAmmo",1)
    //BKPK A 0 A_GiveInventory("WA2000Ammo",1)
    //BKPK A 0 A_GiveInventory("M14Ammo",1)
    stop
  }
}

//Shell ammo pickup
actor ShotgunAmmo : CustomInventory
{
  inventory.pickupmessage "Picked up some Shotgun shells!"
  inventory.pickupsound "cursor/select"
  +INVENTORY.AUTOACTIVATE
  scale 0.76
  States
  {
  Spawn:
    NWBA A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger",1,"PickupScav")
    BKPK A 0 A_GiveInventory("AA12Ammo",1)
    BKPK A 0 A_GiveInventory("RangerAmmo",1)
    BKPK A 0 A_GiveInventory("SPAS12Ammo",1)
    BKPK A 0 A_GiveInventory("StrikerAmmo",1)
    BKPK A 0 A_GiveInventory("M1014Ammo",1)
    BKPK A 0 A_GiveInventory("M1887Ammo",1)
    stop
  PickupScav:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScavProCheck")
    BKPK A 0 A_GiveInventory("AA12Ammo",2)
    BKPK A 0 A_GiveInventory("RangerAmmo",2)
    BKPK A 0 A_GiveInventory("SPAS12Ammo",2)
    BKPK A 0 A_GiveInventory("StrikerAmmo",2)
    BKPK A 0 A_GiveInventory("M1014Ammo",2)
    BKPK A 0 A_GiveInventory("M1887Ammo",2)
    stop
  PickupScavProCheck:
    BKPK A 0 A_JumpIfInventory("AA12Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("RangerAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("SPAS12Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("StrikerAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M1014Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M1887Ammo",0,1)
	goto PickupScavPro
    BKPK A 0
	stop
  PickupScavPro:
    BKPK A 0 A_GiveInventory("AA12Ammo",2)
    BKPK A 0 A_GiveInventory("RangerAmmo",2)
    BKPK A 0 A_GiveInventory("SPAS12Ammo",2)
    BKPK A 0 A_GiveInventory("StrikerAmmo",2)
    BKPK A 0 A_GiveInventory("M1014Ammo",2)
    BKPK A 0 A_GiveInventory("M1887Ammo",2)
    BKPK A 0 A_GiveInventory("MP5Ammo",1)
    BKPK A 0 A_GiveInventory("MiniUziAmmo",1)
    BKPK A 0 A_GiveInventory("UMP45Ammo",1)
    BKPK A 0 A_GiveInventory("VectorAmmo",1)
    BKPK A 0 A_GiveInventory("P90Ammo",1)
    BKPK A 0 A_GiveInventory("USP45Ammo",1)
    BKPK A 0 A_GiveInventory("44MagnumAmmo",1)
    BKPK A 0 A_GiveInventory("DeagleAmmo",1)
    BKPK A 0 A_GiveInventory("M9Ammo",1)
    BKPK A 0 A_GiveInventory("G18Ammo",1)
    BKPK A 0 A_GiveInventory("PP2000Ammo",1)
    BKPK A 0 A_GiveInventory("M93RAmmo",1)
    BKPK A 0 A_GiveInventory("MG4Ammo",2)
    BKPK A 0 A_GiveInventory("AUGHBARAmmo",1)
    BKPK A 0 A_GiveInventory("M240Ammo",2)
    BKPK A 0 A_GiveInventory("L86Ammo",2)
    BKPK A 0 A_GiveInventory("FamasAmmo",1)
    BKPK A 0 A_GiveInventory("FALAmmo",1)
    BKPK A 0 A_GiveInventory("ACRAmmo",1)
    BKPK A 0 A_GiveInventory("M4A1Ammo",1)
    BKPK A 0 A_GiveInventory("SCARHAmmo",1)
    BKPK A 0 A_GiveInventory("F2000Ammo",1)
    BKPK A 0 A_GiveInventory("M16Ammo",1)
    BKPK A 0 A_GiveInventory("AKMAmmo",1)
    //BKPK A 0 A_GiveInventory("InterventionAmmo",1)
    //BKPK A 0 A_GiveInventory("BarrettAmmo",1)
    //BKPK A 0 A_GiveInventory("WA2000Ammo",1)
    //BKPK A 0 A_GiveInventory("M14Ammo",1)
    stop
  }
}


//Heavy duty ammo pickup
actor HeavyAmmo : CustomInventory
{
  inventory.pickupmessage "Picked up some Heavy duty rounds!"
  inventory.pickupsound "g2/bolt"
  +INVENTORY.AUTOACTIVATE
  scale 0.9
  States
  {
  Spawn:
    AMMO E -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger",1,"PickupScav")
    BKPK A 0 A_GiveInventory("InterventionAmmo",2)
    BKPK A 0 A_GiveInventory("BarrettAmmo",2)
    BKPK A 0 A_GiveInventory("WA2000Ammo",2)
    BKPK A 0 A_GiveInventory("M14Ammo",3)
    BKPK A 0 A_GiveInventory("MG4Ammo",12)
    BKPK A 0 A_GiveInventory("AUGHBARAmmo",9)
    BKPK A 0 A_GiveInventory("M240Ammo",12)
    BKPK A 0 A_GiveInventory("L86Ammo",10)
    stop
  PickupScav:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScavProCheck")
    BKPK A 0 A_GiveInventory("InterventionAmmo",3)
    BKPK A 0 A_GiveInventory("BarrettAmmo",3)
    BKPK A 0 A_GiveInventory("WA2000Ammo",3)
    BKPK A 0 A_GiveInventory("M14Ammo",4)
    BKPK A 0 A_GiveInventory("MG4Ammo",18)
    BKPK A 0 A_GiveInventory("AUGHBARAmmo",13)
    BKPK A 0 A_GiveInventory("M240Ammo",18)
    BKPK A 0 A_GiveInventory("L86Ammo",15)
    stop
  PickupScavProCheck:
    BKPK A 0 A_JumpIfInventory("InterventionAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("BarrettAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("WA2000Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M14Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("MG4Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("AUGHBARAmmo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("M240Ammo",0,1)
	goto PickupScavPro
    BKPK A 0 A_JumpIfInventory("L86Ammo",0,1)
	goto PickupScavPro
    BKPK A 0
	stop
  PickupScavPro:
    BKPK A 0 A_GiveInventory("InterventionAmmo",3)
    BKPK A 0 A_GiveInventory("BarrettAmmo",3)
    BKPK A 0 A_GiveInventory("WA2000Ammo",3)
    BKPK A 0 A_GiveInventory("M14Ammo",4)
    BKPK A 0 A_GiveInventory("MG4Ammo",18)
    BKPK A 0 A_GiveInventory("AUGHBARAmmo",13)
    BKPK A 0 A_GiveInventory("M240Ammo",18)
    BKPK A 0 A_GiveInventory("L86Ammo",15)
    BKPK A 0 A_GiveInventory("MP5Ammo",1)
    BKPK A 0 A_GiveInventory("MiniUziAmmo",1)
    BKPK A 0 A_GiveInventory("UMP45Ammo",1)
    BKPK A 0 A_GiveInventory("VectorAmmo",1)
    BKPK A 0 A_GiveInventory("P90Ammo",1)
    BKPK A 0 A_GiveInventory("AA12Ammo",1)
    BKPK A 0 A_GiveInventory("RangerAmmo",1)
    BKPK A 0 A_GiveInventory("SPAS12Ammo",1)
    BKPK A 0 A_GiveInventory("StrikerAmmo",1)
    BKPK A 0 A_GiveInventory("M1014Ammo",1)
    BKPK A 0 A_GiveInventory("M1887Ammo",1)
    BKPK A 0 A_GiveInventory("USP45Ammo",1)
    BKPK A 0 A_GiveInventory("44MagnumAmmo",1)
    BKPK A 0 A_GiveInventory("DeagleAmmo",1)
    BKPK A 0 A_GiveInventory("M9Ammo",1)
    BKPK A 0 A_GiveInventory("G18Ammo",1)
    BKPK A 0 A_GiveInventory("PP2000Ammo",1)
    BKPK A 0 A_GiveInventory("M93RAmmo",1)
    BKPK A 0 A_GiveInventory("FamasAmmo",1)
    BKPK A 0 A_GiveInventory("FALAmmo",1)
    BKPK A 0 A_GiveInventory("ACRAmmo",1)
    BKPK A 0 A_GiveInventory("M4A1Ammo",1)
    BKPK A 0 A_GiveInventory("SCARHAmmo",1)
    BKPK A 0 A_GiveInventory("F2000Ammo",1)
    BKPK A 0 A_GiveInventory("M16Ammo",1)
    BKPK A 0 A_GiveInventory("AKMAmmo",1)
    stop
  }
}

//Explosive ammo pickup
actor ExplosiveAmmo1 : CustomInventory
{
  inventory.pickupmessage "Picked up a grenade!"
  inventory.pickupsound "weapon/draw1"
  +INVENTORY.AUTOACTIVATE
  scale 0.53
  States
  {
  Spawn:
    NWBQ A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScav")
    BKPK A 0 A_GiveInventory("GrenadeAmmo",1)
    stop
  PickupScav:
    BKPK A 0 A_GiveInventory("GrenadeAmmo",1)
    stop
  }
}
actor ExplosiveAmmo2 : CustomInventory
{
  inventory.pickupmessage "Picked up a rocket!"
  inventory.pickupsound "weapon/draw1"
  +INVENTORY.AUTOACTIVATE
  scale 0.75
  States
  {
  Spawn:
    NWBL A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScav")
    BKPK A 0 A_GiveInventory("AT4Ammo",1)
    BKPK A 0 A_GiveInventory("RPGAmmo",1)
    stop
  PickupScav:
    BKPK A 0 A_GiveInventory("AT4Ammo",1)
    BKPK A 0 A_GiveInventory("RPGAmmo",1)
    stop
  }
}
actor ExplosiveAmmo3 : CustomInventory
{
  inventory.pickupmessage "Picked up some explosives!"
  inventory.pickupsound "weapon/draw1"
  +INVENTORY.AUTOACTIVATE
  scale 0.65
  States
  {
  Spawn:
    BROK A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScav")
    BKPK A 0 A_GiveInventory("GrenadeAmmo",1)
	BKPK A 0 A_GiveInventory("IncdAmmo",1)
	BKPK A 0 A_GiveInventory("StunAmmo",1)
    BKPK A 0 A_GiveInventory("M203Ammo",2)
    BKPK A 0 A_GiveInventory("ThumperAmmo",2)
    BKPK A 0 A_GiveInventory("AT4Ammo",1)
    BKPK A 0 A_GiveInventory("RPGAmmo",1)
    stop
  PickupScav:
    BKPK A 0 A_GiveInventory("GrenadeAmmo",2)
	BKPK A 0 A_GiveInventory("IncdAmmo",2)
	BKPK A 0 A_GiveInventory("StunAmmo",2)
    BKPK A 0 A_GiveInventory("M203Ammo",3)
    BKPK A 0 A_GiveInventory("ThumperAmmo",3)
    BKPK A 0 A_GiveInventory("AT4Ammo",1)
    BKPK A 0 A_GiveInventory("RPGAmmo",1)
    stop
  }
}
actor ExplosiveAmmo4 : CustomInventory
{
  inventory.pickupmessage "Picked up a stun grenade!"
  inventory.pickupsound "weapon/draw1"
  +INVENTORY.AUTOACTIVATE
  scale 0.63
  States
  {
  Spawn:
    STNN A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScav")
    BKPK A 0 A_GiveInventory("StunAmmo",1)
    stop
  PickupScav:
    BKPK A 0 A_GiveInventory("StunAmmo",1)
    stop
  }
}
actor ExplosiveAmmo5 : CustomInventory
{
  inventory.pickupmessage "Picked up an incendiary grenade!"
  inventory.pickupsound "weapon/draw1"
  +INVENTORY.AUTOACTIVATE
  scale 0.77
  States
  {
  Spawn:
    INNN A -1
    stop
  Pickup:
    BKPK A 0 A_JumpIfInventory("Perk1_Scavenger_PRO",1,"PickupScav")
    BKPK A 0 A_GiveInventory("IncdAmmo",1)
    stop
  PickupScav:
    BKPK A 0 A_GiveInventory("IncdAmmo",1)
    stop
  }
}
actor ExplosiveAmmo6 : RandomSpawner
{
    DropItem "ExplosiveAmmo5", 255, 200
    DropItem "ExplosiveAmmo1", 255, 250
	DropItem "ExplosiveAmmo1", 255, 250
	DropItem "ExplosiveAmmo1", 255, 200
	DropItem "ExplosiveAmmo1", 255, 200
	DropItem "ExplosiveAmmo1", 255, 200
	DropItem "ExplosiveAmmo1", 255, 200
	DropItem "ExplosiveAmmo4", 255, 200
	DropItem "ExplosiveAmmo4", 255, 200
}

actor ExplosiveAmmo : RandomSpawner
{
    DropItem "HeavyAmmo", 255, 2
    DropItem "ExplosiveAmmo6", 255, 250
	DropItem "ExplosiveAmmo2", 255, 250
	DropItem "ExplosiveAmmo3", 255, 100
}