actor OilSliderBoss : Megabuster
{
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "%o was rammed by %k's Oil Slider."
weapon.ammotype "OilClassAmmo"
weapon.ammotype2 "OilChargeAmmo"
inventory.pickupsound "weapon/weaponup"
+WEAPON.AMMO_OPTIONAL
Scale 2.0 
states
{
Spawn:
WEA7 J 1
loop
Ready:
OILL A 0 A_TakeInventory("OilCheck", 999)
OILL A 0 ACS_ExecuteAlways (998,0,119)
OILL A 0 A_JumpIfInventory("OilCheck",1,"Charge")
OILA A 1 A_WeaponReady
goto Ready+2
Deselect:
OILA A 0 A_TakeInventory("OilSliderBoss")
OILA A 0 A_GiveInventory("OilSliderBoss")
OILA A 1 A_SelectWeapon("OilSliderBoss")
Loop
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
OILA A 1 A_Raise
Loop
Fire:
OILA A 0 A_TakeInventory("WeaponCharge",999)
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
goto Hold
Hold:
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
OILA A 0 A_JumpIfInventory("WeaponCharge",20,"WCharge2") 
OILA A 0 A_JumpIfInventory("WeaponCharge",10,"WCharge1")
OILA A 0 A_GiveInventory("WeaponCharge",1)
OILA A 3
OILA A 0 A_ReFire
goto Fire1
WCharge1:
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
OILA A 0 A_GiveInventory("WeaponCharge",1)
OILA B 3
OILA A 0 A_ReFire
goto Fire2
WCharge2:
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
OILA A 0 A_GiveInventory("WeaponCharge",1)
OILA C 3
BUST C 0 ACS_ExecuteAlways(974,0)
OILA A 0 A_ReFire
goto Fire3
Fire1:
OILA A 0 A_TakeInventory("WeaponCharge",999)
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
//OILA A 0 A_JumpIfNoAmmo ("NoAmmo")
OILA A 0 A_PlaySoundEx("weapon/oilshot","Weapon")
OILA A 0 A_FireCustomMissile("OilShot",0,1,8,0)
OILA ABC 5
OILA A 0 A_Refire
goto Ready+2
Fire2:
OILA A 0 A_TakeInventory("WeaponCharge",999)
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
//OILA A 0 A_JumpIfNoAmmo ("NoAmmo")
OILA A 0 A_PlaySoundEx("weapon/oilshot","Weapon")
OILA A 0 A_FireCustomMissile("OilShot2",random(-3,3),1,8,0)
OILA B 3
OILA A 0 A_FireCustomMissile("OilShot2",random(-3,3),1,8,0)
OILA B 3
OILA A 0 A_FireCustomMissile("OilShot2",random(-3,3),1,8,0)
OILA BA 5
OILA A 0 A_Refire
goto Ready+2
Fire3:
OILA A 0 A_TakeInventory("WeaponCharge",999)
OILA A 0 A_JumpIfInventory("OilCheck",1,"Charge")
//OILA A 0 A_JumpIfNoAmmo ("NoAmmo")
OILA A 0 A_PlaySoundEx("weapon/oilshot","Weapon")
OILA A 0 A_FireCustomMissile("OilShot3",random(-6,6),1,8,0)
OILA C 3
OILA A 0 A_FireCustomMissile("OilShot3",random(-6,6),1,8,0)
OILA C 3
OILA C 0 A_FireCustomMissile("OilShot3",random(-6,6),1,8,0)
OILA C 3
OILA A 0 A_FireCustomMissile("OilShot3",random(-6,6),1,8,0)
OILA C 3
OILA C 0 A_FireCustomMissile("OilShot3",random(-6,6),1,8,0)
OILA CBA 5
OILA A 0 A_Refire
goto Ready+2

Charge:
OILA A 0 A_JumpIfInventory("OilJump",1,"OilPogo")
OILA A 0 A_GiveInventory("OilChargeAmmo",30)
OILA A 0 //A_TakeInventory("OilAmmo",4)
OILA A 0 A_JumpIfInventory("OilCheck",1,1)
Goto NoAmmo2
OILA A 0 A_JumpIfInventory("OilChargeAmmo",1,"Charge2")
Goto NoAmmo2
Charge2:
OILA A 0 A_GiveInventory("OilJump", 1)
OILA A 0 A_GiveInventory("OilBoat", 1)
OILA A 0 SetPlayerProperty(0,1,0)
OILA A 0 A_JumpIf(z-floorz>0,"ChargeAir")
OILA A 0 A_Recoil (-8)
Charge3:
OILA A 0 A_PlaySoundEx("weapon/OilSlider","Weapon")
OILA A 0 A_SpawnItemEx("SliderDamage", 24, 0, 2, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
OILA A 4 A_WeaponReady (WRF_NOSWITCH)
OILA A 0 A_TakeInventory ("OilChargeAmmo",1)
OILA A 0 SetPlayerProperty(0,0,0)
goto Charge+3
ChargeAir:
OILA A 0 A_Recoil (-5)
OILA A 0 A_JumpIf(z-floorz<48,"Charge3")
OILA A 0 A_JumpIf(ACS_ExecuteWithResult(250)==1, "UnderWater")
Goto Charge3
UnderWater:
OILA A 0 SetPlayerProperty(0,1,3)
OILA A 0 A_JumpIf(momz<=0,3)
OILA A 0 ThrustThingZ(0, 5, 0, 1)
OILA A 0 A_Jump(256,2)
OILA A 0 ThrustThingZ(0, 7, 0, 0)
OILA A 0 SetPlayerProperty(0,0,3)
goto Charge3
OilPogo:
OILA A 0
//OILA A 0 A_JumpIf(ACS_ExecuteWithResult(254)==1,"Charge2")
OILA A 0 A_JumpIfInventory("IsBotFlag",1,"Charge2")
OILA A 0 SetPlayerProperty(0,0,0)
OILA A 0 A_Recoil(5)
OILA A 0 A_TakeInventory ("OilChargeAmmo",32)
OILA A 0 A_TakeInventory("OilCheck", 1)
OILA A 0 ThrustThingZ(0, 40, 0, 0)
OILA A 20
Goto NoAmmo2+3

NoAmmo:
OILA A 0
//OILA A 1 ACS_Execute(979,0)
goto Ready+2
NoAmmo2:
OILA A 0 SetPlayerProperty(0,0,0)
OILA A 1 A_TakeInventory ("OilChargeAmmo",32)
OILA A 1 A_TakeInventory("OilCheck", 1)
OILA A 0 A_TakeInventory ("OilBoat",1)
OILA A 0 A_TakeInventory ("OilJump",1)
goto Ready+2
}
}

actor OilClassAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor OilShot2 : OilShot
{
Damage (15)
speed 36
}

actor OilShot3 : OilShot2
{
Damage (15)
speed 52
}