Actor ChainsawPickup : CustomInventory replaces Chainsaw {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]Chainsaw - 1\c-"
	States {
		Spawn:
			CSAW A -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 1, 1), "WeaponStay")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory(" Chainsaw ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
		Stop
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 1, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 0)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory(" Chainsaw ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
		Fail
	}
}

Actor ShotgunPickup : CustomInventory replaces Shotgun {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]Shotgun - 3\c-"
    XScale 0.8
    YScale 0.9
	States {
		Spawn:
			SGN1 Z -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 3, 1), "WeaponStay")
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 3, 0), "GiveAmmo")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory(" Shotgun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Shell", 8 + ACS_ExecuteWithResult(918, 0, 1, 8))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Shell", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Shell", 8 + ACS_ExecuteWithResult(918, 0, 1, 8))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 3, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 1)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory(" Shotgun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Shell", 8 + ACS_ExecuteWithResult(918, 0, 1, 8))
		Fail
	}
}

Actor ShotgunPickup_Drop : ShotgunPickup {
	+NEVERRESPAWN
	States {
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 3, 0), "GiveAmmo")
		Success:
			TNT1 A 0 A_GiveInventory(" Shotgun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Shell", 4 + ACS_ExecuteWithResult(918, 0, 1, 4))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Shell", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Shell", 4 + ACS_ExecuteWithResult(918, 0, 1, 4))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
	}
}

Actor SuperShotgunPickup : CustomInventory replaces SuperShotgun {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]Super Shotgun - 3\c-"
	States {
		Spawn:
			SHS1 Z -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 4, 1), "WeaponStay")
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 4, 0), "GiveAmmo")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory(" Super Shotgun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Shell", 8 + ACS_ExecuteWithResult(918, 0, 1, 8))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Shell", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Shell", 8 + ACS_ExecuteWithResult(918, 0, 1, 8))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 4, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 2)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory(" Super Shotgun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Shell", 8 + ACS_ExecuteWithResult(918, 0, 1, 8))
		Fail
	}
}

Actor SuperShotgunPickup_Drop : SuperShotgunPickup {
	+NEVERRESPAWN
	States {
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 4, 0), "GiveAmmo")
		Success:
			TNT1 A 0 A_GiveInventory(" Super Shotgun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Shell", 4 + ACS_ExecuteWithResult(918, 0, 1, 4))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Shell", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Shell", 4 + ACS_ExecuteWithResult(918, 0, 1, 4))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
	}
}

Actor MachinegunPickup : CustomInventory replaces Chaingun {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]Machine Gun - 4\c-"
	States {
		Spawn:
			WASG A -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 5, 1), "WeaponStay")
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 5, 0), "GiveAmmo")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory(" Machine gun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Clip", 20 + ACS_ExecuteWithResult(918, 0, 1, 20))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Clip", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Clip", 20 + ACS_ExecuteWithResult(918, 0, 1, 20))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 5, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 3)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory(" Machine gun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Clip", 20 + ACS_ExecuteWithResult(918, 0, 1, 20))
		Fail
	}
}

Actor MachinegunPickup_Drop : MachinegunPickup {
	+NEVERRESPAWN
	States {
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 5, 0), "GiveAmmo")
		Success:
			TNT1 A 0 A_GiveInventory(" Machine gun ", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Clip", 10 + ACS_ExecuteWithResult(918, 0, 1, 10))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Clip", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Clip", 10 + ACS_ExecuteWithResult(918, 0, 1, 10))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
	}
}

Actor RocketLauncherPickup : CustomInventory replaces RocketLauncher {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]Rocket Launcher - 5\c-"
	States {
		Spawn:
			LAUN A -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 6, 1), "WeaponStay")
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 6, 0), "GiveAmmo")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory("Rocket Launcher", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("RocketAmmo", 2 + ACS_ExecuteWithResult(918, 0, 1, 2))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("RocketAmmo", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("RocketAmmo", 2 + ACS_ExecuteWithResult(918, 0, 1, 2))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 6, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 4)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory("Rocket Launcher", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("RocketAmmo", 2 + ACS_ExecuteWithResult(918, 0, 1, 2))
		Fail
	}
}

Actor PlasmaRiflePickup : CustomInventory replaces PlasmaRifle {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]Plasma Rifle - 6\c-"
	States {
		Spawn:
			NRAI E -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 7, 1), "WeaponStay")
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 7, 0), "GiveAmmo")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory("Plasma Rifle", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Cell", 40 + ACS_ExecuteWithResult(918, 0, 1, 40))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Cell", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Cell", 40 + ACS_ExecuteWithResult(918, 0, 1, 40))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 7, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 5)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory("Plasma Rifle", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Cell", 40 + ACS_ExecuteWithResult(918, 0, 1, 40))
		Fail
	}
}

Actor BFGPickup : CustomInventory replaces BFG9000 {
	inventory.maxamount 1
	Inventory.PickupSound "weapons/pickup"
    Inventory.pickupmessage "\ccWeapon Pickup : \c[Y5]BFG 9000 - 7\c-"
	States {
		Spawn:
			PRDC X -1
		Stop
		Pickup:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 8, 1), "WeaponStay")
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 8, 0), "GiveAmmo")
		Goto Success
		Success:
			TNT1 A 0 A_GiveInventory("BFG 9000", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Cell", 40 + ACS_ExecuteWithResult(918, 0, 1, 40))
		Stop
		GiveAmmo:
			TNT1 A 0 A_JumpIfInventory("Cell", 0, "NoPickup")
			TNT1 A 0 A_GiveInventory("Cell", 40 + ACS_ExecuteWithResult(918, 0, 1, 40))
		Stop
		NoPickup:
			TNT1 A 0
		Fail
		WeaponStay:
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(988, 8, 0) == 0, "Success2")
		Fail
		Success2:
			TNT1 A 0 ACS_ExecuteAlways(985, 0, 1, 6)
			TNT1 A 0 A_PlaySound("weapons/pickup", 5)
			TNT1 A 0 A_SetBlend("25 99 25", 0.6, 17)
			TNT1 A 0 A_GiveInventory("BFG 9000", 1)
			TNT1 A 0 ACS_NamedExecuteAlways("DND Mugshot Grin")
			TNT1 A 0 A_GiveInventory("Cell", 40 + ACS_ExecuteWithResult(918, 0, 1, 40))
		Fail
	}
}