Actor MP5AMMO : ammo
{
 inventory.maxamount 30
 inventory.icon "MP5IA0"
}

Actor MP5burst : Inventory
{
 inventory.maxamount 1
}

Actor MP5burstHistorial : Inventory
{
 inventory.maxamount 3
}

Actor MP5RELOAD : Inventory
{
 inventory.maxamount 1
}

Actor MP5 : FIST1
{
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive 0
	Weapon.AmmoType1 "ClipL"
	Weapon.AmmoType2 "MP5AMMO"
	Weapon.SlotNumber 4
	Scale 0.7
	Obituary "$OB_MPPISTOL"
	Inventory.Pickupmessage "got a SMG"
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOALERT
	Tag "Smg"
	States
{
Spawn:
		tnt1 a 1
		boss a 0 A_SpawnItemEx("MP5I",0,0,0,FRANDOM(2,4),0,5,FRANDOM(350,370),SXF_NOCHECKPOSITION)
	Stop
	

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


ALASPINASWACHO:
		MP5R a 1 offset(-2,34)
		MP5R a 1 offset(-10,42)
		MP5R a 1 offset(-21,54)
		MP5R a 1 offset(-31,66)
		MP5R a 1 offset(-41,82)
		tnt1 a 2
		tnt1 a 0 offset(2,32)
		boss x 0 A_Takeinventory("PUNCHIN",1)
		boss a 0 a_gunflash("Puchin")
		tnt1 aaaa 5
		MP5R a 1 offset(-10,69)
		MP5R a 1 offset(-8,66)
		MP5R a 1 offset(-6,48)
		MP5R a 1 offset(-4,42)
		MP5R a 1 offset(-2,36)
		MP5R a 1 offset(0,34)
		MP5R a 1 offset(0,33)
		MP5R a 1 offset(0,32)
		boss x 0 A_Takeinventory("PUNCHIN",1)
		boss a 0 A_Gunflash("CrossHair")
	goto ready

grenadetr:
		boss x 0 A_Takeinventory("lanzalaputog",1)
		fast a 0 A_JumpIfInventory("GrenadeItem",1,1)
	Goto Ready
		boss x 0 A_TakeInventory("GrenadeItem",1)
		MP5R a 1 offset(0,33)
		MP5R a 1 offset(0,34)
		MP5R a 1 offset(0,36)
		MP5R a 1 offset(0,42)
		MP5R a 1 offset(0,48)
		MP5R a 1 offset(0,54)
		MP5R a 1 offset(0,60)
		MP5R a 1 offset(0,66)
		MP5R a 1 offset(0,72)
		MP5R a 1 offset(0,82)
		tnt1 a 4
		boss x 0 A_Takeinventory("lanzalaputog",1)
		tmt1 a 0 offset(0,32)
		boss a 0 a_gunflash("thorwgrenadewacho")
		tnt1 aaaaaa 8
		MP5R a 1 offset(0,69)
		MP5R a 1 offset(0,66)
		MP5R a 1 offset(0,48)
		MP5R a 1 offset(0,42)
		MP5R a 1 offset(0,36)
		MP5R a 1 offset(0,34)
		MP5R a 1 offset(0,33)
		MP5R a 1 offset(0,32)
		boss x 0 A_Takeinventory("lanzalaputog",1)
		boss a 0 A_Gunflash("CrossHair")
	goto ready

DawnForDaRoll:
		MP5R a 1 offset(0,33)
		MP5R a 1 offset(0,34)
		MP5R a 1 offset(0,36)
		MP5R a 1 offset(0,48)
		MP5R a 1 offset(0,54)
		MP5R a 1 offset(0,66)
		MP5R a 1 offset(0,82)
		fast a 0 A_Jumpifinventory("RunCheckItem",1,"startrun")
		fast a 0 A_Jumpifinventory("MakeARoll",1,"RollingStones")
	Goto AltoLevanteTieneElGil
		
SosReDawnWacho:
		MP5R a 1 offset(0,33)
		MP5R a 1 offset(0,34)
		MP5R a 1 offset(0,36)
		MP5R a 1 offset(0,42)
		MP5R a 1 offset(0,48)
		MP5R a 1 offset(0,54)
		MP5R a 1 offset(0,60)
		MP5R a 1 offset(0,66)
		MP5R a 1 offset(0,72)
		MP5R a 1 offset(0,82)
	Goto ItemCheck
	
AltoLevanteTieneElGil:
		boss a 0 ACS_NamedExecuteAlways("SetPlayerSpeed",0,15)
		MP5R a 1 offset(0,69)
		MP5R a 1 offset(0,66)
		MP5R a 1 offset(0,48)
		MP5R a 1 offset(0,42)
		MP5R a 1 offset(0,36)
		MP5R a 1 offset(0,34)
		MP5R a 1 offset(0,33)
		MP5R a 1 offset(0,32)
		boss x 0 A_Takeinventory("MakeARoll",1)
		boss a 0 A_Gunflash("CrossHair")
	Goto Ready


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

Select:
		boss a 0 a_zoomfactor(1)
		boss a 0 A_Gunflash("CrossHair")
		MP5R A 1 A_Raise
		boss a 0 a_setpitch(pitch-0.02)
		boss x 0 A_TakeInventory("ZOOMED",1)
		boss x 0 A_Takeinventory("PUNCHIN",1)
		boss x 0 A_Takeinventory("lanzalaputog",1)
	Loop
	
Deselect:
		boss a 0 a_zoomfactor(1)
		boss a 0 a_setpitch(pitch+0.02)
		boss x 0 A_Takeinventory("MP5RELOAD",1)
		MP5R A 1 A_Lower
	Loop
	
Ready:
		boss a 0 ACS_NamedExecuteAlways("SetPlayerSpeed",0,35)
		fast a 0 A_JumpIfInventory("Zoomed",1,"Zoomed")
		fast a 0 A_JumpIfInventory("UsoBASE",1,"SosReDawnWacho")
		fast a 0 A_JumpIfInventory("MakeARoll",1,"DawnForDaRoll")
		fast a 0 A_Jumpifinventory("RunCheckItem",1,"DawnForDaRoll")
		fast a 0 A_JumpIfInventory("PUNCHIN",1,"ALASPINASWACHO")
		fast a 0 A_Jumpifinventory("lanzalaputog",1,"grenadetr")
		MP5R A 5 A_WeaponReady(WRF_AllowReload|WRF_AllowZoom)
		boss a 0 ACS_NamedExecute("RCorrectorACS")
	Loop

Zoomed:
		boss a 0 ACS_NamedExecuteAlways("SetPlayerSpeed",0,15)
		ZMP5 H 5 A_WeaponReady(WRF_AllowZoom|WRF_AllowReload)
		boss a 0 A_ZoomFactor(1.4)
		boss a 0 ACS_NamedExecute("RCorrectorACS")
	Loop
	
	
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


AltFire:
		fast a 0 A_JumpIfInventory("MP5RELOAD",1,"RELLENA")
		boss a 0 A_playsound("SGCLICK",6,1.0)
		boss a 0 offset(0,34)
		fast a 0 A_JumpIfInventory("MP5burst",1,3)
		boss y 0 A_GiveInventory("MP5burst",1)
		boss a 0 A_Print("Burst Fire")
	Goto Ready
		boss x 0 A_TakeInventory("MP5burst",1)
		boss a 0 A_Print("Auto Fire")
	Goto Ready
	
	
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


Reload:
		boss a 0 ACS_NamedExecuteAlways("SetPlayerSpeed",0,35)
		boss a 0 A_ZoomFactor(1)
		boss x 0 A_TakeInventory("Zoomed",1)
		fast a 0 A_JumpIfInventory("MP5AMMO",30,"Ready")
		fast a 0 A_JumpIfInventory("ClipL",1,1)
	Goto Ready
		MP5R A 3 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		MP5R A 1 offset(0,33)
		boss a 0 A_playsound("SGCLICK",6,1.0)
		MP5R A 2 offset(0,34)
		MP5R A 5 offset(0,33)
selasaca:
		fast a 0 A_Jumpifinventory("MP5AMMO",0,0)
	goto continua
		boss x 0 A_Takeinventory("MP5AMMO",1)
		boss y 0 A_Giveinventory("ClipL",1)
		fast a 0 A_Jumpifinventory("MP5AMMO",1,"selasaca")
continua: 
		RMP5 ABCD 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss y 0 A_Giveinventory("CrossHairUnt",12)
		boss a 0 A_playsound("SGPUMP1",7,1.0)
		RMP5 EFG 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_FireCustomMissile("MPEclip",0,0,0,-18)
		RMP5 HHIIJ 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_playsound("MOVE",5,2.0)
		RMP5 KKKKKKKKKKK 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss y 0 A_GiveInventory("MP5RELOAD",1)
		boss a 0 A_playsound("SGCLICK",6,1.0)
ESPERA:
		RMP5 KK 1 A_WeaponReady
	Loop
	
RELLENA:
		fast a 0 A_JumpIfInventory("ClipL",1,1)
	Goto TERMINA
		boss x 0 A_TakeInventory("ClipL",1)
		boss y 0 A_GiveInventory("MP5AMMO",1)
		fast a 0 A_JumpIfInventory("MP5AMMO",30,"TERMINA")
		fast a 0 A_JumpIfInventory("ClipL",1,"RELLENA")
	Goto Ready
	Goto RELLENA
	
TERMINA:
		boss y 0 A_Giveinventory("CrossHairUnt",22)
		IMP5 AABBCCDDEFGHIIJJJKK 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_playsound("SGPUMP2",7,1.0)
		IMP5 KKLLLLLMMMMMMMM 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_playsound("SGCLICK",6,1.0)
		boss x 0 A_TakeInventory("MP5RELOAD",1)
		boss x 0 A_TakeInventory("ZOOMED",1)
		boss x 0 A_Takeinventory("PUNCHIN",1)
		boss x 0 A_Takeinventory("MakeARoll",1)
		boss x 0 A_Takeinventory("lanzalaputog",1)
		IMP5 NOPQRS 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		IMP5 TUVWXYZ 1 A_WeaponReady
	Goto Ready


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


ZOOM:
		fast a 0 A_JumpIfInventory("Zoomed",1,"SACAELZOOMSALAME")
		boss y 0 A_GiveInventory("Zoomed",1)
PONEELZOOMPRRO:
		boss a 0 A_playsound("MOVE",5,2.0)
		ZMP5 ABC 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		ZMP5 DEFG 1 A_ZoomFactor(1.5)
	Goto Zoomed

Zoomed:
		boss a 0 ACS_NamedExecuteAlways("SetPlayerSpeed",0,15)
		ZMP5 H 5 A_WeaponReady(WRF_AllowZoom|WRF_AllowReload)
		boss a 0 A_ZoomFactor(1.5)
		boss a 0 ACS_NamedExecute("RCorrectorACS")
	Loop
	
SACAELZOOMSALAME:
		boss a 0 A_playsound("MOVE",1,2.0)
		boss a 0 A_ZoomFactor(1)
		ZMP5 GFEDCBA 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss x 0 A_TakeInventory("ZOOMED",1)
		boss x 0 A_Takeinventory("PUNCHIN",1)
		boss x 0 A_Takeinventory("MakeARoll",1)
		boss x 0 A_Takeinventory("lanzalaputog",1)
	Goto Ready


////////////////////////////////////////////////////////////////////////////////
	
ZFire:
		ZMP5 H 1
		fast a 0 A_JumpIfInventory("MP5AMMO",1,1)
	Goto Ready
		ZFIREC:
		fast a 0 A_JumpIfInventory("MP5AMMO",1,1)
	Goto Ready
		fast a 0 A_JumpIfInventory("MP5burst",1,"ZFburst")	
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
		boss a 0 A_ZoomFactor(1.55)
		boss a 0 Radius_Quake(2,5,0,3,0)
		fast a 0 A_JumpIfInventory("CrouchCheck",1,"ZAuto_Crouch")
ZAuto_NoCrouch:
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", (FRandom(-0.1,0.1)), 0, 0, 10 , 0 ,(FRandom(-0.2,0.1)))
	Goto ContinueZAuto
ZAuto_Crouch:
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", (FRandom(-0.1,0.1)), 0, 0, 2 , 0 ,(FRandom(-0.2,0.1)))
ContinueZAuto:
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss a 0 A_playsound("MP5F",1,1.0)
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_ZoomFactor(1.5)
		boss a 0 A_SetPitch(Pitch-4.0)
		boss y 0 A_Giveinventory("RCorrector",2)
		boss a 0 A_AlertMonsters
		ZFMP BC 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_Refire("ZFIREC")
		ZFMP D 1 A_WeaponReady
	Goto Ready

ZFburst:
		fast a 0 A_Jumpifinventory("MP5AMMO",3,1)
goto ready
		boss a 0 Radius_Quake(7,4,0,2,0)
		boss a 0 A_playsound("MP5F",1,1.0)
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
		boss a 0 A_ZoomFactor(1.55)
		fast a 0 A_JumpIfInventory("CrouchCheck",1,"ZBurst_Crouch")
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", 0, 0, 0, 6 , 0 , 0)
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_SetPitch(Pitch-0.11)
		boss y 0 A_Giveinventory("RCorrector",11)
		ZFMP B 1
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_playsound("MP5F",5,1.0)
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
		boss a 0 A_ZoomFactor(1.6)
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", (FRandom(-0.1,0.1)), 0, 0, 7 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_ZoomFactor(1.5)
		boss a 0 A_SetPitch(Pitch-0.11)
		boss y 0 A_Giveinventory("RCorrector",11)
		ZFMP B 1
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_playsound("MP5F",6,1.0)
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
		boss a 0 A_ZoomFactor(1.65)
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", (FRandom(-0.2,0.2)), 0, 0, 8, 0 ,(FRandom(-0.3,0.3)))
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_ZoomFactor(1.5)
		boss a 0 A_SetPitch(Pitch-0.33)
		boss y 0 A_Giveinventory("RCorrector",33)
		ZFMP B 1
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_AlertMonsters
		ZFMP B 1 A_WeaponReady(WRF_NOSWITCH)
		ZFMP CD 1 A_WeaponReady
	Goto Ready

ZBurst_Crouch:
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", 0, 0, 0, 0 , 2 , 0)
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_SetPitch(Pitch-0.11)
		boss y 0 A_Giveinventory("RCorrector",11)
		ZFMP B 1
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_playsound("MP5F",5,1.0)
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
		boss a 0 A_ZoomFactor(1.6)
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", (FRandom(-0.1,0.1)), 0, 0, 2 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_ZoomFactor(1.5)
		boss a 0 A_SetPitch(Pitch-0.11)
		boss y 0 A_Giveinventory("RCorrector",11)
		ZFMP B 1
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_playsound("MP5F",6,1.0)
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
		boss a 0 A_ZoomFactor(1.65)
		ZFMP A 1 A_FireCustomMissile("MP5Tracer", (FRandom(-0.2,0.2)), 0, 0, 2, 0 ,(FRandom(-0.3,0.3)))
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss x 0 A_TakeInventory("MP5AMMO",1)
		boss a 0 A_ZoomFactor(1.5)
		boss a 0 A_SetPitch(Pitch-0.33)
		boss y 0 A_Giveinventory("RCorrector",33)
		ZFMP B 1
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,-3,13)
		boss a 0 A_AlertMonsters
		ZFMP B 1 A_WeaponReady(WRF_NOSWITCH)
		ZFMP CD 1 A_WeaponReady
	Goto Ready
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


burstFire:
		boss y 0 A_Giveinventory("MP5burstHistorial",3)
BurstFireStart:
		fast a 0 A_Jumpifinventory("MP5AMMO",1,1)
	goto ready
		boss a 0 A_PlaySound("MP5F",1,1.0)
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
        boss a 0 A_FireCustomMissile("BREAKERBASE1")
		fast x 0 A_JumpIfInventory("MP5burstHistorial",1,"RecoilChecker")
		boss a 0 A_AlertMonsters
		MP5F CDE 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	Goto Ready
BurstFireAnim:
		boss a 0 radius_quake(2,4,0,3,0)
		boss a 0 A_ZoomFactor(0.94)
		boss x 0 A_TakeInventory("MP5AMMO",1)
		MP5F AB 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,0,3)
		boss a 0 A_ZoomFactor(1)
	Goto BurstFireStart
	
	
Fire:
		fast a 0 A_JumpIfInventory("MP5RELOAD",1,"ESPERA")
        boss a 0 A_playsound("SGCLICK",6,1.0)
		fast a 0 A_JumpIfInventory("Zoomed",1,"ZFire")
		MP5R A 1
FireC:
		fast a 0 A_JumpIfInventory("MP5AMMO",1,1)
	Goto Ready
		fast a 0 A_JumpIfInventory("MP5burst",1,"burstFire")	
		boss a 0 A_playsound("MP5F",1,1.0)
		NULL A 0 A_FireCustomMissile("WeaponFireLight")
        boss a 0 A_ZoomFactor(0.97)
		MP5F A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		GOTO RecoilChecker
///RecoilChecker
		ContinueFire:
		boss x 0 A_Takeinventory("MP5burstHistorial",1)
		fast a 0 A_JumpIfInventory("MP5burst",1,"BurstFireAnim")	
		boss a 0 A_FireCustomMissile("esmouc", (FRandom(-0.1,0.1)), 0, 0, 0 , 0 ,(FRandom(-0.1,0.1)))
		boss a 0 A_SetPitch(Pitch-5.0)
        boss a 0 A_FIRECUSTOMMISSILE("BREAKERBASE1")
		boss a 0 A_ZoomFactor(1)
		boss a 0 A_AlertMonsters
		boss x 0 A_TakeInventory("MP5AMMO",1)
		MP5F BC 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		boss a 0 A_FireCustomMissile("CasingLCDropperLEFT",0,0,0,3)
		boss a 0 A_Refire("FireC")
		MP5F DE 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	Goto Ready


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

RecoilChecker:
		fast a 0 A_JumpIfInventory("CrossHairUnt",9,"FireR9")
		fast a 0 A_JumpIfInventory("CrossHairUnt",8,"FireR8")
		fast a 0 A_JumpIfInventory("CrossHairUnt",7,"FireR7")
		fast a 0 A_JumpIfInventory("CrossHairUnt",6,"FireR6")
		fast a 0 A_JumpIfInventory("CrossHairUnt",5,"FireR5")
		fast a 0 A_JumpIfInventory("CrossHairUnt",4,"FireR4")
		fast a 0 A_JumpIfInventory("CrossHairUnt",3,"FireR3")
		fast a 0 A_JumpIfInventory("CrossHairUnt",2,"FireR2")
FireR0:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.2)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",3)
		boss y 0 A_Giveinventory("RCorrector",20)
	Goto ContinueFire
	
FireR1:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.3)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",3)
		boss y 0 A_Giveinventory("RCorrector",30)
	Goto ContinueFire
	
FireR2:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.4)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",3)
		boss y 0 A_Giveinventory("RCorrector",40)
	Goto ContinueFire
	
FireR3:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.5)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",3)
		boss y 0 A_Giveinventory("RCorrector",50)
	Goto ContinueFire
	
FireR4:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.7)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",4)
		boss y 0 A_Giveinventory("RCorrector",70)
	Goto ContinueFire
	
FireR5:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.9)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",4)
		boss y 0 A_Giveinventory("RCorrector",90)
	Goto ContinueFire
	
FireR6:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-0.9)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",4)
		boss y 0 A_Giveinventory("RCorrector",90)
	Goto ContinueFire
	
FireR7:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-1)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",4)
		boss y 0 A_Giveinventory("RCorrector",100)
	Goto ContinueFire
	
FireR8:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-1)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",5)
		boss y 0 A_Giveinventory("RCorrector",100)
	Goto ContinueFire
	
FireR9:
		boss a 0 A_FireCustomMissile("MP5Tracer", (FRandom(-7.1,6.1)), 0, 0, 6 , 0 ,(FRandom(-7.1,6.1)))
		boss a 0 A_SetPitch(Pitch-1)	
		boss y 0 A_GiveINVENTORY("CrossHairUnt",5)
		boss y 0 A_Giveinventory("RCorrector",100)
	Goto ContinueFire
	
		
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


CrossHair:		
		fast a 0 A_JumpIfInventory("ZOOMED",1,"SinCross")
		fast a 0 A_JumpIfInventory("CrossHairUnt",18,"R30")
		fast a 0 A_JumpIfInventory("CrossHairUnt",17,"R29")
		fast a 0 A_JumpIfInventory("CrossHairUnt",16,"R28")
		fast a 0 A_JumpIfInventory("CrossHairUnt",15,"R27")
		fast a 0 A_JumpIfInventory("CrossHairUnt",14,"R26")
		fast a 0 A_JumpIfInventory("CrossHairUnt",13,"R25")
		fast a 0 A_JumpIfInventory("CrossHairUnt",12,"R24")
		fast a 0 A_JumpIfInventory("CrossHairUnt",11,"R23")
		fast a 0 A_JumpIfInventory("CrossHairUnt",10,"R22")
		fast a 0 A_JumpIfInventory("CrossHairUnt",9,"R21")
		fast a 0 A_JumpIfInventory("CrossHairUnt",8,"R20")
		fast a 0 A_JumpIfInventory("CrossHairUnt",7,"R19")
		fast a 0 A_JumpIfInventory("CrossHairUnt",6,"R18")
		fast a 0 A_JumpIfInventory("CrossHairUnt",5,"R17")
		fast a 0 A_JumpIfInventory("CrossHairUnt",4,"R16")
		fast a 0 A_JumpIfInventory("CrossHairUnt",3,"R15")
		fast a 0 A_JumpIfInventory("CrossHairUnt",2,"R14")
		TNT1 A 1 A_SetCrossHair(13)
		Loop
		
R30:
TNT1 AAAA 1 A_SetCrossHair(30)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R29:
TNT1 AAAA 1 A_SetCrossHair(29)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R28:
TNT1 AAA 1 A_SetCrossHair(28)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R27:
TNT1 AA 1 A_SetCrossHair(27)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R26:
TNT1 AA 1 A_SetCrossHair(26)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R25:
TNT1 AA 1 A_SetCrossHair(25)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R24:
TNT1 AA 1 A_SetCrossHair(24)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R23:
TNT1 AA 1 A_SetCrossHair(23)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R22:
TNT1 AA 1 A_SetCrossHair(22)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R21:
TNT1 AA 1 A_SetCrossHair(21)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R20:
TNT1 AA 1 A_SetCrossHair(20)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R19:
TNT1 AA 1 A_SetCrossHair(19)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R18:
TNT1 AAA 1 A_SetCrossHair(18)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R17:
TNT1 AAA 1 A_SetCrossHair(17)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R16:
TNT1 AAA 1 A_SetCrossHair(16)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R15:
TNT1 AAA 1 A_SetCrossHair(15)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R14:
TNT1 AAA 1 A_SetCrossHair(14)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R13:
TNT1 AAAA 1 A_SetCrossHair(13)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
R12:
TNT1 AAAA 1 A_SetCrossHair(12)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair
SinCross:
TNT1 A 3 A_SetCrossHair(10)
boss x 0 A_TakeInventory("CrossHairUnt",1)
Goto CrossHair

}
}
