actor JetBusterC : BaseMM8BDMWep_CBM 
{
dropitem "JetUpgradeGiverDropped"
//weapon.preferredskin "PowerMegaman"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "$OB_JETADAPTOR"
weapon.ammotype "JetFuel"
States
{
Spawn:
C_00 B 1
loop
Ready:
JETB A 0 A_JumpIfInventory("BusterGiven",1,"TakeBusters")
Goto Ready2
TakeBusters:
JETB A 0 A_GiveInventory("TakeBusterC", 1)
Goto Ready2
Ready2:
JETB A 0 ACS_ExecuteAlways(998,0,680)
JETB A 0 A_GiveInventory("JetTriggerF",1)
JETB A 0 A_GunFlash
goto Fall
Ready2a:
JETB A 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==2,"Ready2L")
JETB A 6 A_WeaponReady
JETB A 0 A_GiveInventory("JetFuel",1)
Goto Ready2a
Ready2L:
JETB A 12 A_WeaponReady
JETB A 0 A_GiveInventory("JetFuel",1)
Goto Ready2L
Deselect:
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_TakeInventory("JetTrigger",999)
TNT1 A 0 A_TakeInventory("JetTriggerF",999)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
JETB A 1 A_Lower
Loop
Select:
JETB A 0 A_TakeInventory("JetTrigger",999)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
JETB A 1 A_Raise
Loop
Fire:
JETB A 0 SetPlayerProperty(0, 0, 3)
JETB A 0 A_TakeInventory("JetTrigger",999)
//JETB A 0 A_SpawnItemEx("JetWings1",-8,0,28,momx,momy,momz,0,9)
JETB A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
JETB A 0 A_GiveInventory("JetMegaMain_CI",1)
JETB BC 3
JETB A 2
//JETB BBBCCCBB 1 A_SpawnItemEx("JetWings1",-8,0,28,momx,momy,momz,0,9)
JETB A 0 A_JumpIfInventory("JetTriggerEx",1,"Fall")
JETB B 0 A_Refire
goto Ready2a
Altfire:
JETB A 1 A_JumpIfInventory("JetFuel", 1, "Fly")
JETB A 0 A_GiveInventory("JetTriggerF",1)
JETB A 0 A_TakeInventory("JetTrigger",999)
JETB A 0 A_GunFlash
JETB A 0 ACS_ExecuteAlways(999,0)
JETB A 0 SetPlayerProperty(0, 0, 3)

goto Fall
Fly:
JETB A 0 A_TakeInventory("JetTriggerF",99)
JETB A 0 A_GiveInventory("JetTrigger",1)
JETB A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
JETB A 0 SetPlayerProperty(0,1,3)
JETB A 0 A_GiveInventory("JetTriggerEx",1)
JETB A 0 A_TakeInventory("JetFuel",1)

JETB A 0 A_PlaySoundEx("weapon/Jetfly","Body")
JETB A 0 ThrustThingZ(0,7,0,1)

JETB AA 1 A_SpawnItemEx("JetWings2",-8,0,28,momx,momy,momz,0,9)
JETB AA 1 A_SpawnItemEx("JetWings3",-8,0,28,momx,momy,momz,0,9)
JETB A 0 A_ReFire
JETB A 0 A_GiveInventory("JetTriggerF",1)
JETB A 1 A_SpawnItemEx("JetWings2",-8,0,28,momx,momy,momz,0,9)
JETB A 0 A_SpawnItemEx("JetWings2",-8,0,28,momx,momy,momz,0,9)
JETB A 0 A_GunFlash
JETB A 0 A_TakeInventory("JetTrigger",999)
JETB A 0 SetPlayerProperty(0, 0, 3)
Goto Fall
Fall:
JETB A 0 A_JumpIf(z-floorz==0, "ICanFly")
JETB A 1 A_WeaponReady
JETB A 0 A_JumpIf(momz==0, "FallCheck")
loop
FallCheck:
JETB A 0 A_JumpIf(z-floorz==0, "ICanFly")
JETB A 1 A_WeaponReady
JETB A 0 A_JumpIf(momz==0, "ICanFly")
goto Fall
ICanFly:
JETB A 0 SetPlayerProperty(0,0,3)
JETB A 1 A_TakeInventory("JetTriggerEx",999)
goto Ready2a

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash") 
TNT1 A 1 A_SpawnItemEx("JetWings1",-8,0,28,momx,momy,momz,0,9)
TNT1 A 0 A_JumpIfInventory("JetTriggerF",1,"Flash")
Goto NoFlash
}
}

actor JetFuel : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor JetTrigger : OnceC{}
actor JetTriggerF : OnceC{}

actor JetTriggerEx : OnceC{}

actor JetMegaShot : MegaShot
{
Translation "204:204=210:210"
-SKYEXPLODE
Obituary "$OB_JETADAPTOR"
States
{
Spawn:
TNT1 A 2
BUST T 1
goto spawn+1
Death:
BUST T 1
stop
}
}

actor JetMegaShotB : JetMegaShot{translation "204:204=205:205"}
actor JetMegaShotR : JetMegaShot{translation "204:204=171:171"}
actor JetMegaShotO : JetMegaShot{translation "204:204=104:104"}
actor JetMegaShotP : JetMegaShot{translation "204:204=229:229"}


actor JetWings1 : AdaptorWings
{
+DONTBLAST
+NOINTERACTION
+NOTIMEFREEZE
States
{
Spawn:
MMJT A 0
MMJT A 1
stop
}
}

actor JetWings2 : JetWings1
{
States
{
Spawn:
MMJT B 0
MMJT B 1
stop
}
}

actor JetWings3 : JetWings1
{
States
{
Spawn:
MMJT C 0
MMJT C 1
stop
}
}

actor JetMegaMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("JetMegaShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("JetMegaShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("JetMegaShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("JetMegaShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("JetMegaShotP",0,0,8,0)
goto Done
}
}