    Actor FedPistol : GenericHumanScum 
 {
  scale 1.0
  obituary "%o was neutralised by corrupted federal agent"
  health 80
  radius 15
  height 54
  mass 100
    Species "IMP"
  +DONTHARMSPECIES
  speed 12
  Translation "112:127=240:247" 
  Damage 1
  painchance 150
  SeeSound "Fed/See"
  PainSound "GTS/pain"
  DeathSound "GTS/Death"
  ActiveSound "Fed/active" 
  dropitem "clip", 5
  Tag "Pistol Corrupt Fed"
  MONSTER
  +FLOORCLIP
      States
		   {
		    Spawn:
			    TNT1 A 0
				TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("STFUCheck") == 1, "STFU")
				TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult ("VanJumpCheck") == 1, "VanJump")
			    TNT1 A 0 A_SetScale (scaleX+frandom(-0.02, 0.02), scaleY+frandom(-0.08,0.08))
				TNT1 A 0 A_SpawnItemEx ("HumanTrails", 0, 0, 0)
            Spawn2:
			    FEDP I 10 A_Look
				Loop
			STFU:
				 TNT1 A 0
				 TNT1 A 0 ACS_NamedExecute ("STFUFed")
				 Goto Spawn+2
			VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	 
			See:
			     "####" A random(1,4)
                 TNT1 A 0 A_Jump (170, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	             TNT1 A 0 A_Jump (130, "MissileCheck")
			SeeLoop:
			    TNT1 A 0 A_Jump (170, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
			    TNT1 A 0 A_JumpIfInventory ("APistolShotCounter", 18, "Reload")
			    FEDP AAABBBCCCDDD 3 A_Chase
				Loop
	 DodgeLeft:
	    TNT1 A 0 A_FaceTarget
	    FEDP AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		TNT1 A 0 A_Jump (50, "DodgeRight")
		Goto SeeLoop+1
	DodgeLeftF:
	    TNT1 A 0 A_FaceTarget
	     TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (-8,-3))
	    FEDP AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		Goto SeeLoop+1
    DodgeLeftB:
	    TNT1 A 0 A_FaceTarget
	     TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (3,8))
	    FEDP AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		Goto SeeLoop+1
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    FEDP AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
	DodgeRightF:
	    TNT1 A 0 A_FaceTarget
	     TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (-8,-3)) 
	    FEDP AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
	DodgeRightB:
	    TNT1 A 0 A_FaceTarget
	     TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (3,8)) 
	    FEDP AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
		   MissileCheck:
		        TNT1 A 0 A_JumpIfTargetInLos ("Missile", 0, JLOSF_DEADNOJUMP)
				Goto SeeLoop
		     Missile:
			    FEDP E 8 A_FaceTarget
				TNT1 A 0 A_JumpIfCloser (600, "RapidFire")
				TNT1 A 0 A_JumpIfTargetInLos ("BurstFire", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 1200, 601)
				TNT1 A 0 A_JumpIfInventory ("APistolShotCounter", 18, "Reload")
				TNT1 A 0 A_Playsound ("PA2PISTF")
				TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
				FEDP F 3 BRIGHT A_CustomMissile ("APistolTracer", 45,0, random (-1,1))
				TNT1 A 0 A_GiveInventory ("APistolShotCounter", 1)
				Goto SeeLoop
		    BurstFire:
			    FEDP E 2 A_FaceTarget
				TNT1 A 0 A_JumpIfInventory ("APistolShotCounter", 18, "Reload")
				TNT1 A 0 A_Playsound ("PA2PISTF")
				TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
				FEDP F 1 BRIGHT A_CustomMissile ("APistolTracer", 45,0, random (-1,1))
				TNT1 A 0 A_GiveInventory ("APistolShotCounter", 1)
				FEDP E 2 A_FaceTarget
				TNT1 A 0 A_JumpIfInventory ("APistolShotCounter", 18, "Reload")
				TNT1 A 0 A_Playsound ("PA2PISTF")
				TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
				FEDP F 1 BRIGHT A_CustomMissile ("APistolTracer", 45,0, random (-2,2))
				TNT1 A 0 A_GiveInventory ("APistolShotCounter", 1)
				FEDP E 2 A_FaceTarget
				TNT1 A 0 A_JumpIfInventory ("APistolShotCounter", 18, "Reload")
				TNT1 A 0 A_Playsound ("PA2PISTF")
				TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
				FEDP F 1 BRIGHT A_CustomMissile ("APistolTracer", 45,0, random (-3,3))
				TNT1 A 0 A_GiveInventory ("APistolShotCounter", 1)
			   Goto SeeLoop	
			RapidFire:
			    FEDP E 3 A_FaceTarget
				TNT1 A 0 A_JumpIfInventory ("APistolShotCounter", 18, "Reload")
				TNT1 A 0 A_Playsound ("PA2PISTF")
				TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
				FEDP F 1 BRIGHT A_CustomMissile ("APistolTracer", 45,0, random (-3,4))
				TNT1 A 0 A_GiveInventory ("APistolShotCounter", 1)
				TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
			    Loop
			Reload:
                FEDP E 16 A_PlaySound ("GlokRel1")
	            TNT1 A 0 A_TakeInventory ("APistolShotCounter", 18)
	            FEDP D 28 A_PlaySound ("GlokRel2")
	            FEDP E 17 A_PlaySound ("GlokRel3")
				Goto SeeLoop
			Pain:
			    FEDP G 3
			    FEDP G 3 A_Pain
			Goto SeeLoop
		Death:
		    TNT1 A 0
			TNT1 A 0 A_Jump (185, "Death2")
			FEDP O 4 A_Scream
			FEDP P 4 A_Playsound ("FallingBodyGear", CHAN_BODY)
			FEDP Q random(3,4) A_NoBlocking
			FEDP R -1
			Stop
		Death2:
		    FEDP S 4 A_Scream
			FEDP T 4 A_Noblocking
			FEDP U 4
			FEDP V 4 A_Playsound ("FallingBodyGear", CHAN_BODY)
			FEDP W -1
			Stop
		 Raise:
		   TNT1 A 0 
		   TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		   FEDP RQPO 5
		  Goto See   
		XDeath:
		    TNT1 A 0
            TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			PGIB A 5 A_XScream
			PGIB B 5 A_PlaySound("gibsound")
			PGIB C 5 A_NoBlocking
			PGIB D 5
			PGIB E -1
			Stop
		   }
		   
}


 
      