Actor Cyberprapor 
{
 scale 1.0
  obituary "%o was mowed down by the augmented enemy commander"
  health 435
  radius 15
  height 54
  mass 800
  speed 10
  +BOSSDEATH
  +NODROPOFF
  MaxDropOffHeight 69
  painchance 25
  BloodType "DASBLUT"
  Species "ARAC"
+DONTHARMSPECIES
  SeeSound "CyberPrapor/See"
  PainSound "CyberPrapor/Pain"
  DeathSound "CyberPrapor/Death"
  ActiveSound "CyberPrapor/Active"
  dropitem "Chaingun"
  Tag "Cyberprapor"
  MONSTER
  +FLOORCLIP
  States
       {
	    Spawn:
		   TNT1 A 0
		   TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult ("VanJumpCheck") == 1, "VanJump")
		 Spawn2:  
		   PRAP A 3 A_Look
		   Loop
		 See:
	  "####" A random(1,4)	 
    TNT1 A 0 A_Jump (70, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	TNT1 A 0 A_Jump (180, "MissileCheck")
  SeeLoop:
	TNT1 A 0 A_Jump (199, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
    PRAP AABBCCDD 3 A_Chase
    loop
  VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    PRAP AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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))
	    PRAP AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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))
	    PRAP AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    PRAP AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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)) 
	    PRAP AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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)) 
	    PRAP AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
  MissileCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile", 0, JLOSF_DEADNOJUMP)
	Goto SeeLoop
  Missile:
	PRAP E 12 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("CloseQuarters", 0, JLOSF_DEADNOJUMP, 500)
	TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 950)
  MissileLoop:
    PRAP E 2 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-1,1))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
   Loop
  CloseQuarters:
    PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-1,1))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (6,8))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (14,16))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (24,26))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (14,16))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (6,8))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-1,1))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-8,-6))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-16,-14))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-26,-24))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
   Goto SeeLoop
  LongRange:
    PRAP E 8 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLos ("SeeLoop", 2)
	PRAP E 8 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-1,1))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-2,2))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-3,3))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-4,4))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	PRAP E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("PRAMGFIR")
	TNT1 A 0 A_PlaySound ("HLMGFF", 6, 0.5, 0)
	PRAP F 2 BRIGHT A_CustomMissile ("FragMachinegunTracer", 32, 9, random (-5,5))
	TNT1 A 0 A_GiveInventory ("HMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("HMGShotCounter", 250, "Reload")
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
   Loop	
  Pain:
    PRAP H 3
    PRAP H 3 A_Pain
    goto SeeLoop
  Reload:
    PRAP E 30 A_Playsound ("M60Open")
	TNT1 A 0 A_TakeInventory ("HMGShotCounter", 250)
	PRAP D 25 A_Playsound ("M60Load")
	PRAP E 34 A_Playsound ("M60Clos")
	Goto SeeLoop	
  Death:
    TNT1 A 0 A_Jump (81, "D2", "D3")
    PRAP I 5 A_Scream
    PRAP J 3
    PRAP K 5 A_NoBlocking
    PRAP L 5
	PRAP M 5
	PRAP N 4
	PRAP O 4
	PRAP P 4 A_Playsound ("FallingBodyGear", CHAN_BODY)
	PRAP Q -1
    stop
 D2:
   PRD2 A 5 A_Scream
   PRD2 B 4 A_NoBlocking
   PRD2 C 4
   PRD2 D 4 A_Playsound ("FallingBodyGear", CHAN_BODY)
   PRD2 E -1
  Stop
 D3:
   PRD2 F 3 A_Scream
   PRD2 G 4 A_NoBlocking
   PRD2 H 4 A_Playsound ("FallingBodyGear", CHAN_BODY)
   PRD2 I -1
  Stop 
  //Raise:
    //TNT1 A 0 
    //TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    //PRAP QPONMLKJIH 5
   //Goto See	
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    PRAP R 2 A_XScream
    PRAP S 3 A_NoBlocking
    PRAP TUVWX 5
    PRAP Y -1
    Stop
    }
}



   




    
	
	
	Actor FragMachinegunTracer 
{
Projectile
Damage (6)
+FORCEXYBILLBOARD
+DONTSPLASH
+SKYEXPLODE
+BLOODSPLATTER 
+NOEXTREMEDEATH
radius 2
height 2
speed 24
renderstyle Add
alpha 0.9
scale .21
 States
     {
	  Spawn:
	    TNT1 A 0
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("PotentialProjectileHider", 0,0,0)
	  Spawn2:
	    TRAC A 1 Bright A_PlaySound ("Bullet/Fly", 0, 1.0, true)
		Loop
	  Crash:	
	  Death:
	    TNT1 A 0
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("ProjectileIsDead", 0,0,0)
	    TNT1 A 0 A_Playsound ("Bullet/Impact")
		TNT1 A 0 A_Explode ((6), 15)
		TNT1 A 0 A_SpawnItemEx ("NailSparks", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		FX57 CDEFGHI 1 A_Playsound ("Bullet/Impact")
		Stop
	  XDeath:
	    TNT1 A 0
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("ProjectileIsDead", 0,0,0)
		TNT1 A 0 A_Explode ((3), 30)
		TNT1 A 0 A_SpawnItemEx ("NailSparks", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 1
		Stop	
	 }
} 