actor "Walther WA 2000" : RGUWeapon
{
  obituary "%k gives %o a WA 2000 collecter's item."
  inventory.pickupmessage "You got the priceless Walther WA 2000 sniper rifle."
  //attacksound "wa2000/fire"
  weapon.selectionorder 16
  weapon.ammotype "WA2000Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "WA2000Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    TNT1 A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    W20A ABCDE 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	W20A FGHIJKLMNO 2 A_WeaponReady(WRF_ALLOWZOOM)
	M4CD A 0 A_JumpIfInventory("WA2000Token",1,"Reload")
    W20A O 0 A_JumpIfNoAmmo("Reload")
	M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    W20A O 0 A_JumpIfInventory("Aiming",1,5)
    W20A O 0 A_JumpIfInventory("Reloading",1,"Reload")
    W20A O 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    W20A O 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20A O 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+20
    SCOP A 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    SCOP A 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    SCOP A 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    SCOP A 0 A_JumpIfInventory("GZCheck",1,4)
    SCOP A 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
    SCOP A 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP A 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP C 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
    SCOP C 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP C 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
  Deselect:
    W20A O 0 A_PlaySoundEx("weapon/down","SoundSlot5")
    W20A O 0 A_TakeInventory("Aiming",1)
    W20A O 0 A_TakeInventory("Reloading",1)
    W20A O 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    W20A O 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20A O 0 A_Lower
    W20A O 1 A_Lower
    Goto Deselect+5
  Select:
    W20A A 0 A_Raise
    Loop
  Fire:
    "####" "#" 0 A_JumpIfInventory("Aiming",1,"FireAim")
    W20A O 1 A_JumpIfNoAmmo("ReloadStart")
    W20B A 0 A_JumpIfInventory("CoopCheck",1,2)
    W20B A 0 A_TakeInventory("PowerInvisibility",500)
    W20B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    W20B A 0 A_PlayWeaponSound("wa2000/fire")
    W20B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,6,2)
    W20B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,6,2)
    W20B A 1 BRIGHT A_FireCustomMissile("HHCBWA2000A", frandom(-10.00,10.00), 1, 0, 4, 0, frandom(-10.00,10.00))
	W20B A 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    W20B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    W20B A 0 A_JumpIfNoAmmo("FireEmpty")
    W20B B 1 BRIGHT A_GunFlash
    W20B C 1
    W20B DEF 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    W20B A 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+20
    W20B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+20
  FireEmpty:
    W20B B 1 BRIGHT A_GunFlash
    W20B C 1 A_GiveInventory("WA2000Bolt",1)
    W20B DEF 1
    W20B A 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+20
    W20B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+20
  FireAim:
    "####" "#" 1 A_JumpIfNoAmmo("ReloadStart")
    "####" "#" 0 A_JumpIfInventory("CoopCheck",1,2)
    "####" "#" 0 A_TakeInventory("PowerInvisibility",500)
    "####" "#" 0 A_PlayWeaponSound("wa2000/fire")
    "####" "##" 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,2)
    "####" "#" 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,2)
    "####" "#" 0 A_JumpIf((MomX*MomX)+(MomY*MomY) > 15,"FireAimMoving")
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 0, 0, 4, 0, frandom(-0.05,0.05))
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 1, 0, 4, 0, frandom(-0.05,0.05))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
  FireAimCont:
    "####" "#" 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfNoAmmo("FireAimEmpty")
    "####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,"FireAimSteady")
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "#" 1
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    "####" "#" 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+26
    "####" "#" 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+26
  FireAimSteady:
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "#" 1
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
	Goto FireAimCont+8
  FireAimMoving:
    "####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,3)
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000C", frandom(-6.00,6.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    Goto FireAimCont
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-1.00,1.00), 0, 0, 4, 0, frandom(-1.00,1.00))
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-1.00,1.00), 1, 0, 4, 0, frandom(-1.00,1.00))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    Goto FireAimCont
  FireAimEmpty:
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "#" 1 A_GiveInventory("WA2000Bolt",1)
    "####" "###" 1
    "####" "#" 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+26
    "####" "#" 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+26
  Reload: //AltFire:
    W20D A 0 A_JumpIfInventory("WA2000Clip",6,2)
    W20D A 0 A_JumpIfInventory("WA2000Ammo",1,"ReloadStart")
    W20D A 0 A_TakeInventory("Reloading",1)
    W20D A 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+23
  ReloadStart:
    W20D A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    W20D A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    W20D A 3 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	W20D A 0 A_JumpIfInventory("WA2000Token",1,"Reload2")
    W20D BCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D F 3 A_PlaySoundEx("m4a1/clipout","SoundSlot5")
	W20D GHIJK 3 
	W20D F 0 A_FireCustomMissile("EmptyBoxMagSpawner2",0,0,0,-4)
	W20D F 0 A_GiveInventory("WA2000Token",1)
	goto Reload2
  Reload2:
    W20D LMN 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D OPQRST 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D UVWX 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D Y 3 A_TakeInventory("Reloading",1)
    W20D Z 3 A_PlaySoundEx("m4a1/clipin","SoundSlot5")
    Goto ReloadAmmo
  ReloadAmmo:
    W20D Z 0 A_JumpIfInventory("WA2000Clip",6,"ReloadEnd")
	W20D Z 0 A_TakeInventory("WA2000Token",1)
    W20D Z 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto ReloadEnd
    W20D Z 0 A_GiveInventory("WA2000Clip",1)
    W20D Z 0 A_TakeInventory("WA2000Ammo",1)
    Goto ReloadAmmo
  ReloadEnd:
    W20E ABC 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E D 3 A_JumpIfInventory("WA2000Bolt",1,"ReloadEndBolt")
    W20E EFGH 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E IJKL 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+20
  ReloadEndBolt:
    W20F ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20F E 3 A_PlaySoundEx("m14/bolt","SoundSlot5")
    W20F F 3 A_TakeInventory("WA2000Bolt",1)
    W20F GHIJKLMN 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20F OP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    Goto Ready+20
  Zoom:
  PostReloadAlt:
    W20D A 0 A_JumpIfInventory("WA2000Token",1,"Reload")
    W20C D 0 A_GiveInventory("Aiming",1)
	W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    W20C ABCDE 1
	"####" "#" 0 ACS_NamedExecuteAlways("RefKick",0,0,0,2)
	M14C F 0 A_ZoomFactor(3.0,ZOOM_INSTANT)
    Goto AltHold
  ReloadBreak:
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  ClearRefire: 
    SCOP C 1 A_ClearReFire
	Goto AltHold
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("WA2000Clip",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
    "####" "#" 0 A_JumpIfInventory("CoopCheck",1,2)
    "####" "#" 0 A_TakeInventory("PowerInvisibility",500)
    "####" "#" 0 A_PlayWeaponSound("wa2000/fire")
	"####" "#" 0 A_TakeInventory("WA2000Clip",1)
    "####" "##" 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,2)
    "####" "#" 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,2)
    //"####" "#" 0 A_JumpIf((MomX*MomX)+(MomY*MomY) > 15,"FireAimMoving")
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 0, 0, 4, 0, frandom(-0.05,0.05))
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 1, 0, 4, 0, frandom(-0.05,0.05))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    "####" "#" 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    //"####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,"FireAimSteady")
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    "####" "#" 0 A_JumpIfInventory("WA2000Clip",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
	TNT1 A 0
    Goto AltHold
  AltHold:
    "####" "#" 0 A_JumpIfInventory("FireHeld",1,"ClearRefire")
    SCOP C 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	"####" "#" 0 A_JumpIfInventory("FireHeld",1,"FireAimAltHold")
	"####" "#" 0 A_JumpIfInventory("Reloading",1,"ReloadBreak")
	"####" "#" 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    "####" "#" 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	//"####" "#" 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
	"####" "#" 0 A_Refire("AltHold")
	"####" "#" 0 A_JumpIfInventory("Aiming",1,"AltFire2")
	Goto Ready+22
  AltFire:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    M4CD A 0 A_JumpIfInventory("WA2000Token",1,"Reload")
	"####" "#" 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    W20C A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    W20C AB 1
    W20C B 0 A_GiveInventory("Aiming",1)
    W20C CDE 1
    W20C E 0 A_ZoomFactor(3.0,ZOOM_INSTANT)
    W20C E 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    W20C E 0 ACS_NamedExecuteAlways("RefKick",0,0,0,2)
	"####" "##" 0 A_Refire("AltHold")
    Goto Ready+26
  AltFire2:
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto Ready+20
  ReloadStartAim:
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEP2 C 0
    WEP2 C 0 A_SpawnItem("WA2000Drop")
    stop
  ReloadStart_SOH:
    W20D A 0 A_JumpIfInventory("WA2000Token",1,"Reload3")
    W20D A 2
    W20D BCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D F 2 A_PlaySoundEx("m4a1/clipout","SoundSlot5")
	W20D GHIJK 2
	W20D F 0 A_FireCustomMissile("EmptyBoxMagSpawner2",0,0,0,-4)
	W20D F 0 A_GiveInventory("WA2000Token",1)
	goto Reload3
  Reload3:
    W20D LMN 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D OPQRST 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D UVWX 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D Y 2 A_TakeInventory("Reloading",1)
    W20D Z 2 A_PlaySoundEx("m4a1/clipin","SoundSlot5")
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    W20D Z 0 A_JumpIfInventory("WA2000Clip",6,"ReloadEnd_SOH")
	W20D Z 0 A_TakeInventory("WA2000Token",1)
    W20D Z 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto ReloadEnd_SOH
    W20D Z 0 A_GiveInventory("WA2000Clip",1)
    W20D Z 0 A_TakeInventory("WA2000Ammo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    W20E ABC 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E D 2 A_JumpIfInventory("WA2000Bolt",1,"ReloadEndBolt_SOH")
    W20E EFGH 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E IJKL 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+20
  ReloadEndBolt_SOH:
    W20F ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20F E 2 A_PlaySoundEx("m14/bolt","SoundSlot5")
    W20F F 2 A_TakeInventory("WA2000Bolt",1)
    W20F GHIJKLMN 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20F OP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    Goto Ready+20
  Fire_SteadyAim:
    W20B A 0 A_PlayWeaponSound("wa2000/fire")
    W20B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,6,2)
    W20B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,6,2)
    W20B A 1 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-8.00,8.00), 1, 0, 4, 0, frandom(-8.00,8.00))
	W20B A 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    W20B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    W20B A 0 A_JumpIfNoAmmo("FireEmpty")
    W20B B 1 BRIGHT A_GunFlash
    W20B C 1
    W20B DEF 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    W20B A 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+20
    W20B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+20
  FragGrenade:
    U45F A 0 ACS_NamedExecuteAlways("RefSpeak",0,1,0,0)
    U45F A 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	M4CA J 0 A_JumpIfInventory("ThrowingStun",1,"StunGrenade")
	M4CA J 0 A_JumpIfInventory("ThrowingIncd",1,"IncGrenade")
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("GrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  FragGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("GrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    U45F A 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_Commando:
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",160)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 10
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",160)
    KNFA DEFGHIJKL 1
    TNT1 A 10
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  StunGrenade:
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"StunGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("StunAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("StunGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  IncGrenade:
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"IncGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("IncdAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("IncGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  StunGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("StunAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("StunGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  IncGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("IncdAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("IncGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  DropWeapon:
    W20A NMLKJIHGFEDCB 2 A_WeaponReady(WRF_NOPRIMARY)
	W20A A 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CC F 0 A_JumpIfInventory("weapondropper",2,"ThrowWeapon")
    KNFA A 0 ACS_NamedExecuteAlways("RefDropW",0,0,0,0)
	GRNA L 0 A_TakeInventory("weapondropper",1)
	M4CB A 0 A_FireCustomMissile("WA2000Dropped",0,0,7,2)
	stop
  ThrowWeapon:
    GRNA IKMN 1
	KNFA B 0 A_PlaySound("knife/swing")
    KNFA A 0 ACS_NamedExecuteAlways("RefDropW",0,0,0,0)
	GRNA L 0 A_TakeInventory("weapondropper",2)
	M4CB A 0 A_FireCustomMissile("WA2000Thrown",0,0,7,2)
	stop
  }
}

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

actor WA2000Bolt : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor "Walther WA 2000 Thermal" : "Walther WA 2000"
{
  inventory.pickupmessage "Barrett 50cal"
  //attacksound "barrett/fire"
  weapon.selectionorder 28
  weapon.ammotype "WA2000Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "WA2000Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    TNT1 A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    W20A ABCDE 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	W20A FGHIJKLMNO 2 A_WeaponReady(WRF_ALLOWZOOM)
	M4CD A 0 A_JumpIfInventory("WA2000Token",1,"Reload")
    W20A O 0 A_JumpIfNoAmmo("Reload")
	M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    W20A O 0 A_JumpIfInventory("Aiming",1,5)
    W20A O 0 A_JumpIfInventory("Reloading",1,"Reload")
    W20A O 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    W20A O 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20A O 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+20
    SCOP A 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    SCOP A 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    SCOP A 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    SCOP A 0 A_GiveInventory("SniperInfrared",1)
    SCOP A 0 A_JumpIfInventory("GZCheck",1,4)
    SCOP A 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
    SCOP A 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP A 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP C 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
    SCOP C 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP C 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
  Deselect:
    W20A O 0 A_PlaySoundEx("weapon/down","SoundSlot5")
    W20A O 0 A_TakeInventory("PowerLightAmp",500)
    W20A O 0 A_TakeInventory("Aiming",1)
    W20A O 0 A_TakeInventory("AimingFar",1)
    W20A O 0 A_TakeInventory("Reloading",1)
    W20A O 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    W20A O 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20A O 0 A_Lower
    W20A O 1 A_Lower
    Goto Deselect+7
  Zoom:
  PostReloadAlt:
    W20D A 0 A_JumpIfInventory("WA2000Token",1,"Reload")
    W20C D 0 A_GiveInventory("Aiming",1)
	W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    W20C ABCDE 1
	"####" "#" 0 ACS_NamedExecuteAlways("RefKick",0,0,0,2)
	"####" "#" 0 A_GiveInventory("SniperInfrared",1)
	"####" "#" 0 A_GiveInventory("AimingFar",1)
	M14C F 0 A_ZoomFactor(3.0,ZOOM_INSTANT)
    Goto AltHold
  ReloadBreak:
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
	M14C F 0 A_TakeInventory("PowerLightAmp",500)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  ClearRefire: 
    SCOP C 1 A_ClearReFire
	Goto AltHold
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("WA2000Clip",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
    "####" "#" 0 A_JumpIfInventory("CoopCheck",1,2)
    "####" "#" 0 A_TakeInventory("PowerInvisibility",500)
    "####" "#" 0 A_PlayWeaponSound("wa2000/fire")
	"####" "#" 0 A_TakeInventory("WA2000Clip",1)
    "####" "##" 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,2)
    "####" "#" 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,2)
    //"####" "#" 0 A_JumpIf((MomX*MomX)+(MomY*MomY) > 15,"FireAimMoving")
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 0, 0, 4, 0, frandom(-0.05,0.05))
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 1, 0, 4, 0, frandom(-0.05,0.05))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    "####" "#" 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    //"####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,"FireAimSteady")
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    "####" "#" 0 A_JumpIfInventory("WA2000Clip",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
	TNT1 A 0
    Goto AltHold
  AltHold:
    "####" "#" 0 A_GiveInventory("SniperInfrared",1)
	"####" "#" 0 A_GiveInventory("AimingFar",1)
    "####" "#" 0 A_JumpIfInventory("FireHeld",1,"ClearRefire")
    SCOP C 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	"####" "#" 0 A_JumpIfInventory("FireHeld",1,"FireAimAltHold")
	"####" "#" 0 A_JumpIfInventory("Reloading",1,"ReloadBreak")
	"####" "#" 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    "####" "#" 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	//"####" "#" 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
	"####" "#" 0 A_Refire("AltHold")
	"####" "#" 0 A_JumpIfInventory("Aiming",1,"AltFire2")
	Goto Ready+22
  AltFire:
    "####" "#" 0 A_TakeInventory("weapondropper",2)
    "####" "#" 0 A_JumpIfInventory("WA2000Token",1,"Reload")
	"####" "#" 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    "####" "#" 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    W20C AB 1
    W20C B 0 A_GiveInventory("Aiming",1)
    W20C B 0 A_TakeInventory("AimingFar",1)
    W20C CDE 1
    W20C E 0 A_ZoomFactor(3.0,ZOOM_INSTANT)
    W20C E 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    W20C E 0 ACS_NamedExecuteAlways("RefKick",0,0,0,2)
	"####" "##" 0 A_Refire("AltHold")
    Goto Ready+26
  AltFire2:
    "####" "#" 0 A_JumpIfInventory("AimingFar",1,"AltFire3")
    "####" "#" 0 A_PlaySoundEx("weapon/down","SoundSlot5")
    "####" "#" 0 A_GiveInventory("AimingFar",1)
    "####" "#" 5 A_ZoomFactor(7.5)
    Goto Ready+26
  AltFire3:
    W20C E 0 A_TakeInventory("PowerLightAmp",500)
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C D 0 A_TakeInventory("AimingFar",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto Ready+20
  ReloadStartAim:
    W20C E 0 A_TakeInventory("PowerLightAmp",500)
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C D 0 A_TakeInventory("AimingFar",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  FragGrenade:
    U45F A 0 ACS_NamedExecuteAlways("RefSpeak",0,1,0,0)
    U45F A 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    U45F A 0 A_TakeInventory("PowerLightAmp",500)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	M4CA J 0 A_JumpIfInventory("ThrowingStun",1,"StunGrenade")
	M4CA J 0 A_JumpIfInventory("ThrowingIncd",1,"IncGrenade")
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("GrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    U45F A 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    U45F A 0 A_TakeInventory("PowerLightAmp",500)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  }
}
actor WA2000Thermal : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor "Walther WA 2000 Ex Mags" : "Walther WA 2000"
{
  obituary "%k gives %o a WA 2000 collecter's item."
  inventory.pickupmessage "You got the priceless Walther WA 2000 sniper rifle."
  //attacksound "wa2000/fire"
  weapon.selectionorder 16
  weapon.ammotype "WA2000Clip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "WA2000Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    TNT1 A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    W20A ABCDE 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	W20A FGHIJKLMNO 2 A_WeaponReady(WRF_ALLOWZOOM)
	M4CD A 0 A_JumpIfInventory("WA2000Token",1,"Reload")
    W20A O 0 A_JumpIfNoAmmo("Reload")
	M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    W20A O 0 A_JumpIfInventory("Aiming",1,5)
    W20A O 0 A_JumpIfInventory("Reloading",1,"Reload")
    W20A O 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    W20A O 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20A O 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+20
    SCOP A 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    SCOP A 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    SCOP A 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    SCOP A 0 A_JumpIfInventory("GZCheck",1,4)
    SCOP A 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
    SCOP A 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP A 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP C 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
    SCOP C 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
    SCOP C 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+26
  Reload: //AltFire:
    W20D A 0 A_JumpIfInventory("WA2000Clip2",12,2)
    W20D A 0 A_JumpIfInventory("WA2000Ammo",1,"ReloadStart")
    W20D A 0 A_TakeInventory("Reloading",1)
    W20D A 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+23
  ReloadStart:
    W20D A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    W20D A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    W20D A 3 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	W20D A 0 A_JumpIfInventory("WA2000Token",1,"Reload2")
    W20D BCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D F 3 A_PlaySoundEx("m4a1/clipout","SoundSlot5")
	W20D GHIJK 3 
	W20D F 0 A_FireCustomMissile("EmptyBoxMagExtSpawner2",0,0,0,-4)
	W20D F 0 A_GiveInventory("WA2000Token",1)
	goto Reload2
  Reload2:
    W20D LMN 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D OPQRST 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D UVWX 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D Y 3 A_TakeInventory("Reloading",1)
    W20D Z 3 A_PlaySoundEx("m4a1/clipin","SoundSlot5")
    Goto ReloadAmmo
  ReloadAmmo:
    W20D Z 0 A_JumpIfInventory("WA2000Clip2",12,"ReloadEnd")
	W20D Z 0 A_TakeInventory("WA2000Token",1)
    W20D Z 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto ReloadEnd
    W20D Z 0 A_GiveInventory("WA2000Clip2",1)
    W20D Z 0 A_TakeInventory("WA2000Ammo",1)
    Goto ReloadAmmo
  ReloadEnd:
    W20E ABC 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E D 3 A_JumpIfInventory("WA2000Bolt",1,"ReloadEndBolt")
    W20E EFGH 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E IJKL 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+20
  ReloadEndBolt:
    W20F ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20F E 3 A_PlaySoundEx("m14/bolt","SoundSlot5")
    W20F F 3 A_TakeInventory("WA2000Bolt",1)
    W20F GHIJKLMN 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20F OP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    Goto Ready+20
  ReloadStartAim:
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  ReloadStart_SOH:
    W20D A 0 A_JumpIfInventory("WA2000Token",1,"Reload3")
    W20D A 2
    W20D BCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D F 2 A_PlaySoundEx("m4a1/clipout","SoundSlot5")
	W20D GHIJK 2
	W20D F 0 A_FireCustomMissile("EmptyBoxMagExtSpawner2",0,0,0,-4)
	W20D F 0 A_GiveInventory("WA2000Token",1)
	goto Reload3
  Reload3:
    W20D LMN 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D OPQRST 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20D UVWX 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20D Y 2 A_TakeInventory("Reloading",1)
    W20D Z 2 A_PlaySoundEx("m4a1/clipin","SoundSlot5")
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    W20D Z 0 A_JumpIfInventory("WA2000Clip2",12,"ReloadEnd_SOH")
	W20D Z 0 A_TakeInventory("WA2000Token",1)
    W20D Z 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto ReloadEnd_SOH
    W20D Z 0 A_GiveInventory("WA2000Clip2",1)
    W20D Z 0 A_TakeInventory("WA2000Ammo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    W20E ABC 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E D 2 A_JumpIfInventory("WA2000Bolt",1,"ReloadEndBolt_SOH")
    W20E EFGH 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20E IJKL 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+20
  ReloadEndBolt_SOH:
    W20F ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    W20F E 2 A_PlaySoundEx("m14/bolt","SoundSlot5")
    W20F F 2 A_TakeInventory("WA2000Bolt",1)
    W20F GHIJKLMN 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    W20F OP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    Goto Ready+19
  ReloadBreak:
    W20C E 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    W20C ED 1
    W20C D 0 A_TakeInventory("Aiming",1)
    W20C CBA 1
    W20C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("WA2000Clip2",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
    "####" "#" 0 A_JumpIfInventory("CoopCheck",1,2)
    "####" "#" 0 A_TakeInventory("PowerInvisibility",500)
    "####" "#" 0 A_PlayWeaponSound("wa2000/fire")
	"####" "#" 0 A_TakeInventory("WA2000Clip2",1)
    "####" "##" 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,2)
    "####" "#" 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,2)
    //"####" "#" 0 A_JumpIf((MomX*MomX)+(MomY*MomY) > 15,"FireAimMoving")
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 0, 0, 4, 0, frandom(-0.05,0.05))
    "####" "#" 0 BRIGHT A_FireCustomMissile("HHCBWA2000D", frandom(-0.05,0.05), 1, 0, 4, 0, frandom(-0.05,0.05))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTac",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    "####" "#" 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    //"####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,"FireAimSteady")
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    "####" "#" 0 A_JumpIfInventory("WA2000Clip2",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
	TNT1 A 0
    Goto AltHold
  }
}

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

actor WA2000ExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor "Walther WA 2000 Explosive" : "Walther WA 2000"
{
  obituary "%k gives %o a quite explosive WA 2000 collecter's item."
  inventory.pickupmessage "You got the priceless Walther WA 2000 sniper rifle."
  //attacksound "wa2000/fire"
  +WEAPON.EXPLOSIVE
  weapon.selectionorder 16
  weapon.ammotype "WA2000Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "WA2000Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Fire:
    "####" "#" 0 A_JumpIfInventory("Aiming",1,"FireAim")
    W20A O 1 A_JumpIfNoAmmo("ReloadStart")
    W20B A 0 A_JumpIfInventory("CoopCheck",1,2)
    W20B A 0 A_TakeInventory("PowerInvisibility",500)
    W20B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    W20B A 0 A_PlayWeaponSound("wa2000/fire")
    W20B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,6,2)
    W20B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,6,2)
    W20B A 1 BRIGHT A_FireCustomMissile("HHCBWA2000AE", frandom(-10.00,10.00), 1, 0, 4, 0, frandom(-10.00,10.00))
	W20B A 0 A_SpawnItemEx("RifleCasingCheyTacEXP",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    W20B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    W20B A 0 A_JumpIfNoAmmo("FireEmpty")
    W20B B 1 BRIGHT A_GunFlash
    W20B C 1
    W20B DEF 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    W20B A 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+20
    W20B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+20
  FireEmpty:
    W20B B 1 BRIGHT A_GunFlash
    W20B C 1 A_GiveInventory("WA2000Bolt",1)
    W20B DEF 1
    W20B A 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+20
    W20B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+20
  FireAim:
    "####" "#" 1 A_JumpIfNoAmmo("ReloadStart")
    "####" "#" 0 A_JumpIfInventory("CoopCheck",1,2)
    "####" "#" 0 A_TakeInventory("PowerInvisibility",500)
    "####" "#" 0 A_PlayWeaponSound("wa2000/fire")
    "####" "##" 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,2)
    "####" "#" 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,2)
    "####" "#" 0 A_JumpIf((MomX*MomX)+(MomY*MomY) > 15,"FireAimMoving")
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000BE", frandom(-0.05,0.05), 1, 0, 4, 0, frandom(-0.05,0.05))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTacEXP",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
  FireAimCont:
    "####" "#" 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfNoAmmo("FireAimEmpty")
    "####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,"FireAimSteady")
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "#" 1
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    "####" "#" 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+26
    "####" "#" 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+26
  FireAimSteady:
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "#" 1
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
	Goto FireAimCont+8
  FireAimMoving:
    "####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,3)
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000CE", frandom(-6.00,6.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTacEXP",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    Goto FireAimCont
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000BE", frandom(-1.00,1.00), 1, 0, 4, 0, frandom(-1.00,1.00))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTacEXP",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    Goto FireAimCont
  FireAimEmpty:
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "#" 1 A_GiveInventory("WA2000Bolt",1)
    "####" "###" 1
    "####" "#" 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+26
    "####" "#" 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+26
  Fire_SteadyAim:
    W20B A 0 A_PlayWeaponSound("wa2000/fire")
    W20B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,6,2)
    W20B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,6,2)
    W20B A 1 BRIGHT A_FireCustomMissile("HHCBWA2000DE", frandom(-8.00,8.00), 1, 0, 4, 0, frandom(-8.00,8.00))
	W20B A 0 A_SpawnItemEx("RifleCasingCheyTacEXP",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    W20B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    W20B A 0 A_JumpIfNoAmmo("FireEmpty")
    W20B B 1 BRIGHT A_GunFlash
    W20B C 1
    W20B DEF 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    W20B A 0 A_JumpIfInventory("WA2000Ammo",1,1)
    Goto Ready+20
    W20B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+20
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("WA2000Clip",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
    "####" "#" 0 A_JumpIfInventory("CoopCheck",1,2)
    "####" "#" 0 A_TakeInventory("PowerInvisibility",500)
    "####" "#" 0 A_PlayWeaponSound("wa2000/fire")
	"####" "#" 0 A_TakeInventory("WA2000Clip",1)
    "####" "##" 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,2)
    "####" "#" 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,2)
    //"####" "#" 0 A_JumpIf((MomX*MomX)+(MomY*MomY) > 15,"FireAimMoving")
    "####" "#" 1 BRIGHT A_FireCustomMissile("HHCBWA2000BE", frandom(-0.05,0.05), 1, 0, 4, 0, frandom(-0.05,0.05))
	"####" "#" 0 A_SpawnItemEx("RifleCasingCheyTacEXP",Cos(Pitch)*30,3,34-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    "####" "#" 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    //"####" "#" 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,"FireAimSteady")
    "####" "#" 1 BRIGHT A_GunFlash
    "####" "###" 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    "####" "#" 0 A_JumpIfInventory("WA2000Clip",1,2)
	TNT1 A 0 A_GiveInventory("WA2000Bolt",1)
	Goto ReloadBreak
	TNT1 A 0
    Goto AltHold
  }
}

actor WA2000Explosive : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor WA2000Pickup : CustomInventory
{
  inventory.pickupmessage "You got the priceless Walther WA 2000 sniper rifle."
  inventory.pickupsound "barrett/bolt"
  +INVENTORY.AUTOACTIVATE
  //inventory.respawntics 70
  scale 0.15
  States
  {
  Spawn:
    WEP2 C -1
    stop
  Pickup:
    WEP2 C 0
    WEP2 C 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",0,0,0)) == 1, "PickupStay")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Ex Mags",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Thermal",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Explosive",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 C 0 A_JumpIfInventory("MaxWeaponsFilled",67,"FailPickup2")
	WEP2 C 0 A_GiveInventory("MaxWeaponsFilled",34)
    WEP2 C 0 ACS_NamedExecuteWithResult("RefPickU",29,0,0)
    stop
  PickupStay:
    WEP2 C 0
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Ex Mags",1,"FailPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Thermal",1,"FailPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Explosive",1,"FailPickup")
    WEP2 C 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 C 0 A_JumpIfInventory("MaxWeaponsFilled",67,"FailPickup2")
	WEP2 C 0 A_GiveInventory("MaxWeaponsFilled",34)
    WEP2 C 0 ACS_NamedExecuteWithResult("RefPickU",29,0,0)
    WEP2 C 0 ACS_NamedExecuteWithResult("RefPickC",29,0,0)
    WEP2 C 0 A_PlaySound("barrett/bolt")
    fail
  AmmoPickup:
    WEP2 C 0
    WEP2 C 0 A_JumpIfInventory("WA2000Ammo",0,"FailPickup")
    WEP2 C 0 A_GiveInventory("WA2000Ammo",6)
    stop
  OneManArmy:
    WEP2 C 0
	WEP2 C 0 A_JumpIfInventory("MaxWeaponsFilled",104,"FailPickup2")
	WEP2 C 0 A_GiveInventory("MaxWeaponsFilled",34)
	WEP2 C 0 ACS_NamedExecuteWithResult("RefPickU",29,0,0)
	stop
  FailPickup:
    WEP2 C 1
    fail
  FailPickup2:
    WEP2 C 1
    WEP2 C 0 ACS_NamedExecuteAlways("RefSlots",0,28,0,0)
    fail
  }
}

actor WA2000Drop : WA2000Pickup
{
  States
  {
  Spawn:
    WEP2 C -1
    stop
  Pickup:
    WEP2 C 0
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Ex Mags",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Thermal",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Explosive",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 C 0 A_JumpIfInventory("MaxWeaponsFilled",67,"FailPickup2")
	WEP2 C 0 A_GiveInventory("MaxWeaponsFilled",34)
    WEP2 C 0 ACS_NamedExecuteWithResult("RefPickU",29,0,0)
    stop
  }
}

actor WA2000Drop2 : WA2000Drop
{
  States
  {
  Spawn:
    WEP2 C -1
    stop
  Pickup:
    WEP2 C 0
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Ex Mags",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Thermal",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Walther WA 2000 Explosive",1,"AmmoPickup")
    WEP2 C 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 C 0 A_JumpIfInventory("MaxWeaponsFilled",67,"FailPickup2")
	WEP2 C 0 A_GiveInventory("MaxWeaponsFilled",34)
    WEP2 C 0 ACS_NamedExecuteWithResult("RefPickU",29,0,0)
    stop
  AmmoPickup:
    WEP2 C 0
    stop
  }
}

actor HHCBWA2000A : HHBullet
{
  damage (130)
  damagetype "Sniper"
  States
  {
  Spawn:
    TNT1 A 2
    Loop
  Death:
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff", 0, 0, 0, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
	TNT1 A 10 A_AlertMonsters(136)
    stop
  XDeath:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 5 A_PlaySound("generic/ricochets")
	TNT1 A 10 A_AlertMonsters(136)
    stop
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff_2", 0, 0, 0, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
	TNT1 A 10 A_AlertMonsters(136)
    stop
  }
}
actor HHCBWA2000B : HHCBWA2000A
{
  damage (130)
}
actor HHCBWA2000C : HHCBWA2000A
{
  damage (110)
}
actor HHCBWA2000D : HHCBWA2000A
{
  damage (65)
}

actor HHCBWA2000AE : HHBullet
{
  damage (90)
  +FORCERADIUSDMG
  -BLOODSPLATTER
  decal RevenantScorch
  damagetype "Sniper"
  SeeSound "generic/explosionsmall"
  AttackSound "generic/explosionsmall"
  States
  {
  Spawn:
    TNT1 A 2
	Loop
  XDeath:
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
  Death:
    TNT1 A 0 Radius_Quake(2,5,0,5,0)
    TNT1 A 0 A_Explode(28,65)
	TNT1 A 0 A_PlaySoundEx("distant/explosionsmaller","SoundSlot6")
    TNT1 AAAAAA 0 A_SpawnItemEx("ImpactSpark2", 0, 0, 0, random(-3,-1), random(-2,2), random(-2,2), 0, 128, 64)
    TNT1 AA 0 A_SpawnItemEx("ExplosionSmall2", random(-2,0), random(-1,1), random(-1,1), 0, 0, 0, 0, 128, 0)
    TNT1 A 5
    TNT1 A 15 A_AlertMonsters(260)
    stop
  }
}
actor HHCBWA2000BE : HHCBWA2000AE
{
  damage (90)
  States
  {
  XDeath:
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
  Death:
    TNT1 A 0 Radius_Quake(2,5,0,5,0)
    TNT1 A 0 A_Explode(65,65)
	TNT1 A 0 A_PlaySoundEx("distant/explosionsmaller","SoundSlot6")
    TNT1 AAAAAA 0 A_SpawnItemEx("ImpactSpark2", 0, 0, 0, random(-3,-1), random(-2,2), random(-2,2), 0, 128, 64)
    TNT1 AA 0 A_SpawnItemEx("ExplosionSmall2", random(-2,0), random(-1,1), random(-1,1), 0, 0, 0, 0, 128, 0)
    TNT1 A 5
    TNT1 A 15 A_AlertMonsters(260)
    stop
  }
}
actor HHCBWA2000CE : HHCBWA2000AE
{
  damage (85)
  States
  {
  XDeath:
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
  Death:
    TNT1 A 0 Radius_Quake(2,5,0,5,0)
    TNT1 A 0 A_Explode(55,65)
	TNT1 A 0 A_PlaySoundEx("distant/explosionsmaller","SoundSlot6")
    TNT1 AAAAAA 0 A_SpawnItemEx("ImpactSpark2", 0, 0, 0, random(-3,-1), random(-2,2), random(-2,2), 0, 128, 64)
    TNT1 AA 0 A_SpawnItemEx("ExplosionSmall2", random(-2,0), random(-1,1), random(-1,1), 0, 0, 0, 0, 128, 0)
    TNT1 A 5
    TNT1 A 15 A_AlertMonsters(260)
    stop
  }
}
actor HHCBWA2000DE : HHCBWA2000AE
{
  damage (85)
  States
  {
  XDeath:
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
  Death:
    TNT1 A 0 Radius_Quake(2,5,0,5,0)
    TNT1 A 0 A_Explode(33,65)
	TNT1 A 0 A_PlaySoundEx("distant/explosionsmaller","SoundSlot6")
    TNT1 AAAAAA 0 A_SpawnItemEx("ImpactSpark2", 0, 0, 0, random(-3,-1), random(-2,2), random(-2,2), 0, 128, 64)
    TNT1 AA 0 A_SpawnItemEx("ExplosionSmall2", random(-2,0), random(-1,1), random(-1,1), 0, 0, 0, 0, 128, 0)
    TNT1 A 5
    TNT1 A 15 A_AlertMonsters(260)
    stop
  }
}