ACTOR Doom3shotgun : Weapon
{
  Game Doom
  scale 0.3
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 1
  Weapon.AmmoGive1 999
  Weapon.AmmoGive2 999
  Weapon.AmmoType "D3Clip"
  Weapon.AmmoType2 "D3ammo"
  Obituary "$OB_MPPISTOL"
  States
  {
  Ready:
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
	D3SH A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade")
	D3SH A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife")
    D3SH A 1 A_WeaponReady
    Goto Ready   
  Deselect:
    D3SH A 0 A_Lower
    D3SH A 0 A_Lower
    D3SH A 1 A_Lower
    Loop
  Select:
    D3SH A 0 A_Raise
    D3SH A 0 A_Raise
    D3SH A 1 A_Raise
    Loop
  Fire: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH A 0 A_jumpifinventory("Doubletap",1,"Fire_Doubletap")
    D3SH A 0 A_jumpifinventory("deadshot",1,"Fire_deadshot")
    D3SH B 3
    D3SH C 5 A_FireBullets (5, 5, 8, random(312,312), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 4
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 3
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 2 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Fire_deadshot: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH A 0 A_jumpifinventory("Doubletap",1,"Fire_Doubletapdeadshot")
    D3SH B 3
    D3SH C 5 A_FireBullets (5, 2.5, 4, random(624,624), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 4
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 3
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 2 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Fire_Doubletap: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH A 0 A_jumpifinventory("deadshot",1,"Fire_Doubletapdeadshot")
    D3SH B 3
    D3SH C 5 A_FireBullets (5, 5, 8, random(312,312), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 2
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 2
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 1 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Fire_Doubletapdeadshot: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH B 1
    D3SH C 3 A_FireBullets (5, 2.5, 4, random(624,624), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 2
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 1
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 1 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Reload:	
    D3SR A 0 A_takeinventory("IsReloading",1)
    D3SR F 0 A_jumpifinventory("SpeedCola",1,"Reload_speed")
    D3SR F 0 A_jumpifinventory("D3clip",8,"ready")
	D3SR F 0 A_jumpifinventory("D3ammo",1,1)
	goto ready
    D3SR ABCDEFGH 4
	goto reload2
  Reload2:
    D3SR I 0 
    D3SR IJKL 3
	D3SR L 0 A_playsound("D3/load")
    D3SR O 0 A_Giveinventory("D3clip",1)
    D3SR O 0 A_Takeinventory("D3ammo",1)
	D3SR MNO 3 A_weaponready(WRF_NOBOB)
    D3SR O 0 A_Jumpifinventory("D3clip",8,"reloaddone")
    D3SR O 0 A_Jumpifinventory("D3ammo",1,"reload2")
	goto reloaddone
  Reloaddone:
    D3SR IHGFEDCBA 3 
    D3SR PQR 3
	D3SR R 0 A_playsound("D3/cock")
	D3SR STU 3
	goto ready
  Reload_speed:	
    D3SR A 0 A_takeinventory("IsReloading",1)
    D3SR F 0 A_jumpifinventory("D3clip",8,"ready")
	D3SR F 0 A_jumpifinventory("D3ammo",1,1)
	goto ready
    D3SR ABCDEFGH 2
	goto reload2_speed
  Reload2_speed:
    D3SR I 0 
    D3SR IJKL 1
	D3SR L 0 A_playsound("D3/load")
    D3SR O 0 A_Giveinventory("D3clip",1)
    D3SR O 0 A_Takeinventory("D3ammo",1)
	D3SR MNO 2 A_weaponready(WRF_NOBOB)
    D3SR O 0 A_Jumpifinventory("D3clip",8,"reloaddone_speed")
    D3SR O 0 A_Jumpifinventory("D3ammo",1,"reload2_speed")
	goto reloaddone_speed
  Reloaddone_speed:
    D3SR IHGFEDCBA 1
    D3SR PQR 2
	D3SR R 0 A_playsound("D3/cock")
	D3SR STU 1
	goto ready
  ThrowGrenade:
     HNDG BCD 1
     HNDG E 1 A_PlaySound("weapons/grenadepin")
     HNDG FGHH 1
     HNDG I 1 A_PlaySound("weapons/grenadethr") 
     HNDG J 0 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
     HNDG J 0 A_PlaySound("weapons/grenadethr")
     HNDG JKLMNOPQ 1
     HNDG Q 0 A_TakeInventory("thrownade")
     goto ready
  Useknife:
     KNFG A 0 A_jumpifinventory("Machete",1,"UseMachete")
     KNFG ABC 2
	 KNFG C 0 A_CustomPunch (110,1,0,"KnifePuff")
	 KNFG DEF 2
	 KNFG F 0 A_TakeInventory("Kinfeammo")
	 goto ready
  UseMachete:
     MHT4 ABC 2
	 MHT4 C 0 A_CustomPunch (450,1,0,"Machetepuff")
	 MHT4 DEFG 2
	 MHT4 G 0 A_TakeInventory("Kinfeammo")
	 goto ready	
  Flash:
    TNTA A 0
  Spawn:
    D3WS A -1
    Stop
  }
}

actor D3Clip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 8
    ammo.backpackamount 0
    ammo.backpackmaxamount 8
    +IGNORESKILL
}

actor D3Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 8
    inventory.maxamount 128
    ammo.backpackamount 20
    ammo.backpackmaxamount 128
    +IGNORESKILL
    inventory.pickupmessage "Got AK47 rounds!"  
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

ACTOR PAPDoom3shotgun : Weapon
{
  Game Doom
  scale 0.3
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 1
  Weapon.AmmoGive1 999
  Weapon.AmmoGive2 999
  Weapon.AmmoType "PAPD3Clip"
  Weapon.AmmoType2 "PAPD3ammo"
  Obituary "$OB_MPPISTOL"
  States
  {
  Ready:
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
	D3SH A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade")
	D3SH A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife")
    D3SH A 1 A_WeaponReady
    Goto Ready     
  Deselect:
    D3SH A 0 A_Lower
    D3SH A 0 A_Lower
    D3SH A 1 A_Lower
    Loop
  Select:
    D3SH A 0 A_Raise
    D3SH A 0 A_Raise
    D3SH A 1 A_Raise
    Loop
  Fire: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH A 0 A_jumpifinventory("Doubletap",1,"Fire_Doubletap")
    D3SH A 0 A_jumpifinventory("deadshot",1,"Fire_deadshot")
    D3SH B 3
    D3SH C 5 A_FireBullets (6, 2, 4, random(850,850), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 4
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 3
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 2 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Fire_deadshot: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH A 0 A_jumpifinventory("Doubletap",1,"Fire_Doubletapdeadshot")
    D3SH B 3
    D3SH C 5 A_FireBullets (6, 1, 2, random(1700,1700), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 4
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 3
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 2 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Fire_Doubletap: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH A 0 A_jumpifinventory("deadshot",1,"Fire_Doubletapdeadshot")
    D3SH B 3
    D3SH C 5 A_FireBullets (6, 2,4, random(850,850), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 2
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 2
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 1 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Fire_Doubletapdeadshot: 
    D3SH A 0 A_JumpIfInventory("IsReloading",1,"Reload") 
    D3SH A 0 A_jumpifnoammo("Reload")
    D3SH B 1
    D3SH C 3 A_FireBullets (6, 1, 2, random(1700,1700), "BulletPuff")
	D3SH C 0 A_PlaySound ("D3/fire")
	D3SH DEF 2
	D3SH F 0 A_PlaySound ("D3/cock")
	TNTT A 0 A_FireCustomMissile("ShellCasingSpawner",0,0,10,2)
	D3SH GHI 1
    D3SH I 0 A_jumpifnoammo("Reload")
    D3SH I 1 A_ReFire
    D3SH I 0 A_jumpifnoammo("Reload")
    Goto Ready
  Reload:	
    D3SR A 0 A_takeinventory("IsReloading",1)
    D3SR F 0 A_jumpifinventory("SpeedCola",1,"Reload_speed")
    D3SR F 0 A_jumpifinventory("PAPD3clip",12,"ready")
	D3SR F 0 A_jumpifinventory("PAPD3ammo",1,1)
	goto ready
    D3SR ABCDEFGH 3
	goto reload2
  Reload2:
    D3SR I 0 
    D3SR IJKL 2
	D3SR L 0 A_playsound("D3/load")
    D3SR O 0 A_Giveinventory("PAPD3clip",1)
    D3SR O 0 A_Takeinventory("PAPD3ammo",1)
	D3SR MNO 3 A_weaponready(WRF_NOBOB)
    D3SR O 0 A_Jumpifinventory("PAPD3clip",12,"reloaddone")
    D3SR O 0 A_Jumpifinventory("PAPD3ammo",1,"reload2")
	goto reloaddone
  Reloaddone:
    D3SR IHGFEDCBA 2
    D3SR PQR 2
	D3SR R 0 A_playsound("D3/cock")
	D3SR STU 2
	goto ready
  Reload_speed:	
    D3SR A 0 A_takeinventory("IsReloading",1)
    D3SR F 0 A_jumpifinventory("PAPD3clip",12,"ready")
	D3SR F 0 A_jumpifinventory("PAPD3ammo",1,1)
	goto ready
    D3SR ABCDEFGH 2
	goto reload2_speed
  Reload2_speed:
    D3SR I 0 
    D3SR IJKL 1
	D3SR L 0 A_playsound("D3/load")
    D3SR O 0 A_Giveinventory("PAPD3clip",1)
    D3SR O 0 A_Takeinventory("PAPD3ammo",1)
	D3SR MNO 2 A_weaponready(WRF_NOBOB)
    D3SR O 0 A_Jumpifinventory("PAPD3clip",12,"reloaddone_speed")
    D3SR O 0 A_Jumpifinventory("PAPD3ammo",1,"reload2_speed")
	goto reloaddone_speed
  Reloaddone_speed:
    D3SR IHGFEDCBA 1
    D3SR PQR 2
	D3SR R 0 A_playsound("D3/cock")
	D3SR STU 1
	goto ready
  ThrowGrenade:
     HNDG BCD 1
     HNDG E 1 A_PlaySound("weapons/grenadepin")
     HNDG FGHH 1
     HNDG I 1 A_PlaySound("weapons/grenadethr") 
     HNDG J 0 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
     HNDG J 0 A_PlaySound("weapons/grenadethr")
     HNDG JKLMNOPQ 1
     HNDG Q 0 A_TakeInventory("thrownade")
     goto ready
  Useknife:
     KNFG A 0 A_jumpifinventory("Machete",1,"UseMachete")
     KNFG ABC 2
	 KNFG C 0 A_CustomPunch (110,1,0,"KnifePuff")
	 KNFG DEF 2
	 KNFG F 0 A_TakeInventory("Kinfeammo")
	 goto ready
  UseMachete:
     MHT4 ABC 2
	 MHT4 C 0 A_CustomPunch (450,1,0,"Machetepuff")
	 MHT4 DEFG 2
	 MHT4 G 0 A_TakeInventory("Kinfeammo")
	 goto ready	
  Flash:
    TNTA A 0
  Spawn:
    D3WS A -1
    Stop
  }
}

actor PAPD3Clip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 12
    ammo.backpackamount 0
    ammo.backpackmaxamount 12
    +IGNORESKILL
}

actor PAPD3Ammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 12
    inventory.maxamount 216
    ammo.backpackamount 12
    ammo.backpackmaxamount 216
    +IGNORESKILL
    inventory.pickupmessage "Got AK47 rounds!"  
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}