Actor Pumping : Inventory
{
inventory.maxamount 1
}

Actor ImpactMovesSling : Inventory
{
inventory.maxamount 1
}

Actor UseShotgunStrap : Inventory
{
inventory.maxamount 1
}

Actor ShotgunWasEmpty : Inventory
{
inventory.maxamount 1
}

ACTOR Shell2 : Ammo Replaces Shell
{
  Game Doom
  SpawnID 12
  Inventory.PickupMessage "Shotshells"
  Inventory.PickupSound "shellpick"
  Inventory.Amount 4
  Inventory.MaxAmount 50
  Ammo.BackpackAmount 4
  Ammo.BackpackMaxAmount 100
  Inventory.Icon "SHELA0"
  Scale 0.6
  States
  {
  Spawn:
    SHEL A -1
    Stop
  }
}
ACTOR Shellbox : Shell2
{
  Game Doom
  SpawnID 12
  Inventory.PickupMessage "Shotshells"
  Inventory.PickupSound "shellpick"
  Inventory.Amount 20
  Inventory.MaxAmount 50
  Ammo.BackpackAmount 4
  Ammo.BackpackMaxAmount 100
  Inventory.Icon "SHELA0"
  Scale 0.6
  States
  {
  Spawn:
    SBOX A -1
    Stop
  }
}
// --------------------------------------------------------------------------
//
// Shotgun
//
// --------------------------------------------------------------------------
ACTOR Shot_Gun : BDWeapon Replaces Shotgun
{
	Game Doom
	SpawnID 27
	Weapon.SelectionOrder 1300
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive1 4
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "Shell2"
	Weapon.AmmoType2 "ShotgunAmmo"
	Inventory.PickupMessage "$GOTSHOTGUN"
    Inventory.PickupSound "STGSEL"
	Obituary "$OB_MPSHOTGUN"
    AttackSound "None"
    +WEAPON.NOALERT
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+WEAPON.NO_AUTO_SWITCH
	+FORCEXYBILLBOARD
	yScale 0.8
	xscale 1.0
	States
	{
		Fall:
			SHTG ABCD 1
		Fall2:
			SHTG e 1
			tnt1 a 0 A_jumpifinventory("Falling",1,"Fall2")
		Fall3:
			SHTG DCBA 1
			Goto Ready+20
meatshield:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		PUNG BCD 1
        TNT1 A 0 A_PlaySound("skeleton/swing")
		PUNG A 0 A_FireCustomMissile("MeleeStrikegrab", 0, 0, 0, -9)
		PUNG E 1
		PUNG DCB 1
        PUNG AA 1
		TNT1 A 0 A_Refire("meatshield")
		tnt1 a 0 A_weaponready
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready+1
    ShakeLeft:
		tnt1 a 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "PuristGun")
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap", 1, 2)
		Goto OkToFire
		TNT1 A 0
		SHTI GH 2 A_WeaponReady
		
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		SHTI IJK 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		ShakeRight:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap", 1, 2)
		Goto OkToFire
		TNT1 A 0
		SHTI ABC 2 A_WeaponReady
	    TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeLeft")
		SHTI DEF 2 A_WeaponReady
	    TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeLeft")
	    SHTI GHK 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    SHTI ABEF 2 A_WeaponReady
		Goto Ready+20
		
	ShakeAiming:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap", 1, 2)
		Goto Ready2
		TNT1 A 0
		ST81 ABCBA 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		ST81 DEFED 2 A_WeaponReady
	    TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    ST81 AB 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    ST81 DE 2 A_WeaponReady
		Goto Ready2
		
	Steady:
		TNT1 A 1
		Goto Ready+1
		
	lowhealth:
		tnt1 a 0 A_jumpifhealthlower(30,2)
		tnt1 a 4
		loop
		tnt1 a 0
		blsc a 4
		loop
	Ready:
		tnt1 a 0 //A_gunflash("lowhealth")
		tnt1 a 0
	TNT1 A 0 A_selectweapon("Impshield")
		TNT1 A 0 A_selectweapon("ZMANshield")
		TNT1 A 0 A_selectweapon("SGUYshield")
		tnt1 a 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "PuristGun")
        TNT1 AAAA 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0
        TNT1 A 0 A_PlaySound("STGSEL")
		SHTG CBA 0
        SHSS ABCD 1 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto ShakeRight
        TNT1 AAAAAAAAAAAAAAA 0
		TNT1 A 0 A_JumpIfInventory("falling",1,"fall")
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeLeft")
	OkToFire:
		SHTG A 1 A_WeaponReady
        
		Goto Ready+20
		
	selectvanilla:
		tnt1 a 1 A_selectweapon("ClassicShotgun")
		goto ready +11
		
	Ready2:
		tnt1 a 0 A_jumpifinventory("Walking",1,"Ready2Walk")
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		//TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeAiming")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		SHT8 A 1 A_WeaponReady(wrf_nobob)
		Loop
	Ready2Walk:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "MeatShield")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		//TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeAiming")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		SHT9 ABCCBADEED 2 A_WeaponReady(wrf_nobob)
		goto ready2
	
	Deselect:
			TNT1 A 0
			TNT1 A 0 A_Takeinventory("Zoomed",1)
			TNT1 A 0 A_TakeInventory("TossGrenade", 1)
			TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("UseShotgunStrap",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		SHSS DCBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait
	
	Select:
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("SawSelected",1)
		TNT1 A 0 A_Giveinventory("ShotgunSelected",1)
		TNT1 A 0 A_Takeinventory("SSGSelected",1)
		TNT1 A 0 A_Takeinventory("MinigunSelected",1)
		TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
		TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("BFGSelected",1)
		TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
		TNT1 A 0 A_Takeinventory("RailGunSelected",1)
		TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
		TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
		TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
		TNT1 A 0 A_Takeinventory("HasBarrel",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 AAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		Goto Ready+1
		
    Fire:
	tnt1 aaaaa 0 A_custommissile("Alerter",0,0,random(-5,5),0,random(-5,5))
	tnt1 a 0 A_jumpifinventory("Walking",1,"Firewalk")
        TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",1,2)
        Goto Reload
		tnt1 a 0 A_quake(20,2,0,1,"none")
		tnt1 a 0 A_quake(5,6,0,1,"none")
		tnt1 a 0 A_quake(1,12,0,1,"none")
        TNT1 AAAA 0
		tnt1 a 0 A_SetPitch(+0.6 + pitch)
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump1")
        //TNT1 AA 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		//TNT1 A 0 A_SetAngle(random(2, -2) + angle)
		//TNT1 A 0 A_SetPitch(random(2, -2) + pitch)
        TNT1 A 0 A_AlertMonsters
        TNT1 A 0 A_PlaySound("weapons/sg", 1)
		TNT1 A 0 A_PlaySound("weapons/sg", 2,0.3)
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        TNT1 A 0
		tnt1 a 0 A_zoomfactor(0.7)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		//TNT1 AAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-15,15), 0, -1, 0, 0, random(-10,10))
		TNT1 AAA 0 A_FireCustomMissile("Tracer", random(-2,3), 0, -0, -16, 0, random(-2,3))
		//RIFF AAAAAA 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
        //TNT1 A 0 ACS_Execute(374, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("ShotgunAmmo",1)
		tnt1 a 0 A_recoil(1.3)
		tnt1 a 0 A_firebullets(random(1.0,15),random(1.0,15),random(0,3),random(10,30),"ShotgunWad",0,550)
		SHTF A 1 A_FireBullets (random(2,3),random(2,3),random(6,8),random(12,16), "ShotgunPuff")
		tnt1 a 0 A_zoomfactor(0.9)
		tnt1 a 0 radius_quake(50,3,0,2,0)
		tnt1 a 0 radius_quake(50,1,0,2,0)
		TNT1 A 0 A_SetPitch(-5.0 + pitch)
        SHTF B 1 BRIGHT
		SHTF C 1 A_SetPitch(+0.5 + pitch)
		
		SHTF D 1 A_SetPitch(+0.5 + pitch)
		tnt1 a 0 A_recoil(-0.4)
		tnt1 a 0 A_zoomfactor(1.0)
		SHTF E 1 A_SetPitch(+0.5 + pitch)
		SHTF E 1 A_SetPitch(+0.5 + pitch)
		tnt1 a 0 A_zoomfactor(1.0)
		//TNT1 A 0 A_Jump(128, "Pump1")
		Goto Pump1
		
	FireWalk:
        TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",1,2)
        Goto Reload
		tnt1 a 0 A_quake(20,2,0,1,"none")
		tnt1 a 0 A_quake(5,6,0,1,"none")
		tnt1 a 0 A_quake(1,12,0,1,"none")
        TNT1 AAAA 0
		tnt1 a 0 A_SetPitch(+0.6 + pitch)
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump1")
        //TNT1 AA 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		//TNT1 A 0 A_SetAngle(random(2, -2) + angle)
		//TNT1 A 0 A_SetPitch(random(2, -2) + pitch)
        TNT1 A 0 A_AlertMonsters
        TNT1 A 0 A_PlaySound("weapons/sg", 1)
		TNT1 A 0 A_PlaySound("weapons/sg", 2,0.3)
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        TNT1 A 0
		tnt1 a 0 A_zoomfactor(0.6)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		//TNT1 AAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-15,15), 0, -1, 0, 0, random(-10,10))
		//TNT1 A 0 A_FireCustomMissile("Tracer", random(-3,4), 0, -0, -16, 0, random(-3,4))
		//RIFF AAAAAA 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
        //TNT1 A 0 ACS_Execute(374, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("ShotgunAmmo",1)
		tnt1 a 0 A_recoil(1.3)
		tnt1 a 0 A_firebullets(random(1.0,15),random(1.0,15),random(0,3),random(10,30),"ShotgunWad",0,550)
		SHTF A 1 A_FireBullets (random(3,3.5),random(3,3.5),random(6,8),random(12,16), "ShotgunPuff")
		tnt1 a 0 A_zoomfactor(0.9)
		tnt1 a 0 radius_quake(50,3,0,2,0)
		tnt1 a 0 radius_quake(50,1,0,2,0)
		TNT1 A 0 A_SetPitch(-5.0 + pitch)
        SHTF B 1 BRIGHT
		SHTF C 1 A_SetPitch(+0.5 + pitch)
		
		SHTF D 1 A_SetPitch(+0.5 + pitch)
		tnt1 a 0 A_recoil(-0.4)
		SHTF E 1 A_SetPitch(+0.5 + pitch)
		tnt1 a 0 A_zoomfactor(1.0)
		SHTF E 1 A_SetPitch(+0.5 + pitch)
		tnt1 a 0 A_zoomfactor(1.0)
		//TNT1 A 0 A_Jump(128, "Pump1")
		Goto Pump1
		
   Pump1:	
    TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump1_2")
   TNT1 A 0 A_GiveInventory ("Pumping", 1)
   SHTG BCDE 1 A_SetPitch(+0.5 + pitch)
   pump1_2:
   SHTG FG 1
   TNT1 A 0 A_FireCustomMissile("ShotCaseSpawn",0,0,-4,-4)
   SHTG H 1 A_PlaySound("weapons/sgpump",3)
   //TNT1 A 0 A_SetPitch(+1 + pitch)
   //TNT1 A 0 A_SetPitch(-1 + pitch)
   SHTG IJKL 1
   SHTG KJIH 1
   pump1_3:
   TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
   SHTG GFEDCB 1 A_JumpIfInventory("Kicking",1,"DoKick")
   Goto ReadyToFireAgain
   
   
   Pump2:	
   TNT1 A 0 A_GiveInventory ("Pumping", 1)
   SHTG DE 1
   pump2_2:
   SHTG FG 1
   TNT1 A 0 A_FireCustomMissile("ShotCaseSpawn",0,0,-4,-4)
   SHTG H 1 A_PlaySound("weapons/sgpump",3)
   //TNT1 A 0 A_SetPitch(+1 + pitch)
   //TNT1 A 0 A_SetPitch(-1 + pitch)
   SHTG IJ 1
   SHTG KJIH 1
   pump1_3:
   TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
   SHTG GFEDC 1 A_JumpIfInventory("Kicking",1,"DoKick")
   TNT1 A 0 A_ZoomFactor(1.2)
   SHTZ ABCD 1
   Goto ready2
   
		
	ReadyToFireAgain:	
   //SHTG A 6 <-- Old frame
        SHTG A 1 Offset(10,36) // <-- New frames
        SHTG A 1 Offset(9,40) //
        SHTG A 1 Offset(4,40) //
        SHTG A 1 Offset(0,32) //
        SHTG A 0 A_Refire
        SHTG A 0 //A_Refire
		Goto ShakeLeft
		
	Fire2:
        TNT1 A 0 A_Takeinventory("Reloading",1)
        TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump1")
        //TNT1 AA 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        TNT1 A 0 A_AlertMonsters
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 2, 0, 0)
		TNT1 A 0 A_PlaySound("weapons/sg", 1)
		TNT1 A 0 A_PlaySound("weapons/sg", 2,0.2)
        TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		tnt1 a 0 A_firebullets(random(1.0,12),random(1.0,12),random(0,3),random(10,30),"ShotgunWad",0,750)
		SHTG A 0 A_FireBullets (random(0.5,1.5),random(0.5,1.5),random(6,8),random(12,16), "ShotgunPuff")
		//TNT1 AAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-15,15), 0, -1, 0, 0, random(-10,10))
		//TNT1 AAAAAAAA 0 A_FireCustomMissile("Tracer", random(-3,3), 0, -0, -10, 0, random(-5,5))
		TNT1 A 0 A_SetPitch(-12.0 + pitch)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("ShotgunAmmo",1)
        SHT8 F 1 BRIGHT A_SetPitch(+2.0 + pitch)
		SHT8 GHIH 1 A_SetPitch(+2.0 + pitch)
		TNT1 A 0 A_ZoomFactor(1.0)
        SHT8 JKLMNO 1
		Goto pump2
	
	Fire2Walk:
        TNT1 A 0 A_Takeinventory("Reloading",1)
        TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump1")
        //TNT1 AA 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        TNT1 A 0 A_AlertMonsters
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 2, 0, 0)
		TNT1 A 0 A_PlaySound("weapons/sg", 1)
		TNT1 A 0 A_PlaySound("weapons/sg", 2,0.2)
        TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		tnt1 a 0 A_firebullets(random(1.0,12),random(1.0,12),random(0,3),random(10,30),"ShotgunWad",0,750)
		SHTG A 0 A_FireBullets (random(0.5,2.5),random(0.5,2.5),random(6,8),random(12,16), "ShotgunPuff")
		//TNT1 AAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-15,15), 0, -1, 0, 0, random(-10,10))
		//TNT1 AAAAAAAA 0 A_FireCustomMissile("Tracer", random(-3,3), 0, -0, -10, 0, random(-5,5))
		TNT1 A 0 A_SetPitch(-12.0 + pitch)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("ShotgunAmmo",1)
        SHT8 FF 1 BRIGHT A_SetPitch(+2.0 + pitch)
		SHT8 GA 1 A_SetPitch(+2.0 + pitch)
		TNT1 A 0 A_ZoomFactor(1.0)
        SHTZ DCBA 1
		Goto pump2
	
	AltFire:
        TNT1 A 0
		TNT1 A 0 A_setcrosshair(7)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,10)
		TNT1 A 0 A_Giveinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.2)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
        SHTZ ABCD 1
        Goto ready2
        TNT1 AAAAAA 0
		TNT1 A 0 A_setcrosshair(0)
        SHTZ DCBA 1
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
        Goto oktofire
		
	WarmUp:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory ("NeverSelectedShotgun", 1)
   TNT1 A 0 A_TakeInventory("Reloading", 1)
	    TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
	SHSS EFGHIJKLM 1
   SHTG FG 1
   SHTG H 1 A_PlaySound("weapons/sgpump", 3)
   //TNT1 A 0 A_SetPitch(+1 + pitch)
   SHTG IJ 1
   //TNT1 A 0 A_SetPitch(-1 + pitch)
   SHTG KL 1
   SHTG KJIH 1
   TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
   SHTG GFEDC 1 A_JumpIfInventory("Kicking",1,"DoKick")
   Goto ReadyToFireAgain	
	
	Spawn:
		SHTC A -1
		Stop
    	
    DoKick:
	    TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_JumpIf (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		shki BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        shki H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		shki I 1
		shki GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+20
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		shki BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        shki H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		shki I 1
		shki GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+20
	Airflash:
		SHTG ABCDEFGGGFEDCCBBAA 1
		stop
	AirKick:
	tnt1 a 0 A_gunflash("Airflash")
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+20
		
	SuperAirKick:
	tnt1 a 0 A_gunflash("Airflash")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+20
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready+20
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready+1
		
	CheckGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfTargetInLOS("CheckDistanceGrab")
		Goto Ready+20
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+20
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+20	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready+1


    ReloadWithNoAmmoLeft:
    Reload:
	    TNT1 A 0
		TNT1 A 0 A_SetCrosshair(0)
		TNT1 A 0 A_TakeInventory("Reloading", 1)
	    TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		SHTG A 0 A_WeaponReady
		
		TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",6,"OkToFire")
		TNT1 A 0 A_JumpIfInventory("ShotgunAmmo", 1, "ReloadNormally")
		TNT1 A 0 A_GiveInventory("ShotgunWasEmpty", 1)
	ReloadNormally:	
        TNT1 A 0 A_JumpIfInventory("Shell2",1,3)
        Goto Ready+20
        TNT1 AAA 0
		SHTG B 1 //A_PlaySound("weapons/sgpump")
				TNT1 A 0 A_GiveInventory ("Pumping", 1)
		SHTG CDE 1
		SHTR A 1

        TNT1 AAAA 0
        TNT1 A 0 A_JumpIfInventory("Shell2",1,2)
        Goto Reload+54
        TNT1 AAAAA 0


		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",6,23)
		//TNT1 A 0 A_JumpIfInventory("Shell",0,23)
        TNT1 A 0
        TNT1 A 0 A_Giveinventory("ShotgunAmmo",1)
		TNT1 A 0 A_Takeinventory("Shell2",1)

tnt1 a 0 A_WeaponReady
		SSHR A 0
        SSHR ABCDEF 1 A_WeaponReady
        SSHR F 0 A_PlaySound("Shell/load")
        SSHR GHI 1 A_WeaponReady
		tnt1 a 0 A_WeaponReady
        SSHR A 1 A_Refire
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")


        Goto Reload+20
		SHTR A 1
        TNT1 AAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 AAAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump1_2")
		SHTG FEDCBA 1 A_WeaponReady
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 //A_Giveinventory("SGFullReloaded",1)
		Goto ShakeLeft


      PuristGun:
		TNT1 A 1
		TNT1 A 0 A_GiveInventory("ClassicShotgun", 1)
		TNT1 A 0 A_TakeInventory("Shot_Gun", 1)
		tnt1 a 0 A_selectweapon("ClassicShotgun")
		TNT1 A 10
		Goto Ready2
		
	TossGrenade:	
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 1)
		Goto NoGrenade
		GRTH ABCD 1
		TNT1 A 0 A_GiveInventory("FiredGrenade", 1)
		TNT1 A 0 A_PLaySound ("GRNPIN")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		TNT1 A 1 
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		Goto Ready+1	
	NoGrenade:
		TNT1 A 0
		TNT1 A 0 A_Print("No Grenades Left.")
		Goto OkToFire	
		
		
	Unload:
		SHTG A 1
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory("ShotgunWasEmpty", 1)
        TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",1,3)
        Goto OkToFire
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		SHTG ABCDEF 1
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("ShotgunAmmo",1)
		TNT1 A 0 A_Giveinventory("Shell2",1)
		
		SHTG G 1
	   SHTG H 1 A_PlaySound("weapons/sgpump", 3)
	   //TNT1 A 0 A_SetPitch(+1 + pitch)
	   SHTG IJ 1
	   //TNT1 A 0 A_SetPitch(-1 + pitch)
	   SHTG KL 1
	   SHTG KJIH 1
	   TNT1 A 0 A_Giveinventory("ShotgunWasEmpty",1)
	   SHTG GF 1
		Goto RemoveBullets
	
	FInishUnload:
		SHTG EDCBA 1
		TNT1 A 0 A_Takeinventory("Unloading",1)
		Goto OkToFire	
	}
}

ACTOR ShotgunAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 6
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 6
   Inventory.Icon "0"
}
ACTOR CShotgunAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 8
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 8
   Inventory.Icon "0"
}