ACTOR "Red Card" : CustomInventory Replaces RedCard
{
    Scale 0.75
    Inventory.Amount 1
    Inventory.MaxAmount 1
    Inventory.PickupMessage ""
	Inventory.PickupSound "Misc/K_PkUp"
    +NOTDMATCH
    +DONTGIB
    -INVENTORY.ALWAYSPICKUP
    States
    {
    Spawn:
	    RKEY AB 10 Bright
	    Loop
    Pickup:
	    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(297) == 1, "SharedKeys")
	    TNT1 A 0 A_JumpIfInventory("RedCard",1,"InInventory")
	    TNT1 A 0 ACS_ExecuteAlways(289,0)
	    TNT1 A 0 A_GiveInventory("RedCard")
	    Fail
    SharedKeys:
	    TNT1 A 0 ACS_ExecuteAlways(296,0,0)
	    TNT1 A 0 A_GiveInventory("RedCard")	
	    Stop
    InInventory:
	    TNT1 A 0
	    Fail
	    }
}

ACTOR "Yellow Card" : CustomInventory Replaces YellowCard
{
    Scale 0.75
    Inventory.Amount 1
    Inventory.MaxAmount 1
    Inventory.PickupMessage ""
	Inventory.PickupSound "Misc/K_PkUp"
    +NOTDMATCH
    +DONTGIB
    -INVENTORY.ALWAYSPICKUP
    States
    {
    Spawn:
	    YKEY AB 10 Bright
	    Loop
    Pickup:
	    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(297) == 1, "SharedKeys")
	    TNT1 A 0 A_JumpIfInventory("YellowCard",1,"InInventory")
	    TNT1 A 0 ACS_ExecuteAlways(290,0)	
	    TNT1 A 0 A_GiveInventory("YellowCard")
	    Fail
    SharedKeys:
	    TNT1 A 0 ACS_ExecuteAlways(296,0,1)
	    TNT1 A 0 A_GiveInventory("YellowCard")	
	    Stop
    InInventory:
	    TNT1 A 0
	    Fail	
	    }
}

ACTOR "Blue Card" : CustomInventory Replaces BlueCard
{
    Scale 0.75
    Inventory.Amount 1
    Inventory.MaxAmount 1
    Inventory.PickupMessage ""
	Inventory.PickupSound "Misc/K_PkUp"
    +NOTDMATCH
    +DONTGIB
    -INVENTORY.ALWAYSPICKUP
    States
{
    Spawn:
	    BKEY AB 10 Bright
	    Loop
    Pickup:
	    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(297) == 1, "SharedKeys")
	    TNT1 A 0 A_JumpIfInventory("BlueCard",1,"InInventory")
	    TNT1 A 0 ACS_ExecuteAlways(291,0)
	    TNT1 A 0 A_GiveInventory("BlueCard")	
	    Fail
    SharedKeys:
	    TNT1 A 0 ACS_ExecuteAlways(296,0,2)	
	    TNT1 A 0 A_GiveInventory("BlueCard")
	    Stop
    InInventory:
	    TNT1 A 0
	    Fail	
	    }
}

ACTOR "Red Skull" : CustomInventory Replaces RedSkull
{
    Scale 0.75
    Inventory.Amount 1
    Inventory.MaxAmount 1
    Inventory.PickupMessage ""
	Inventory.PickupSound "Misc/K_PkUp"
    +NOTDMATCH
    +DONTGIB
    -INVENTORY.ALWAYSPICKUP
    States
    {
    Spawn:
	    RSKU AB 10 Bright
	    Loop
    Pickup:
	    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(297) == 1, "SharedKeys")
	    TNT1 A 0 A_JumpIfInventory("RedSkull",1,"InInventory")
	    TNT1 A 0 ACS_ExecuteAlways(292,0)
	    TNT1 A 0 A_GiveInventory("RedSkull")
	    Fail
    SharedKeys:
	    TNT1 A 0 ACS_ExecuteAlways(296,0,3)
	    TNT1 A 0 A_GiveInventory("RedSkull")	
	    Stop
    InInventory:
	    TNT1 A 0
	    Fail
	    }
}

ACTOR "Yellow Skull" : CustomInventory Replaces YellowSkull
{
    Scale 0.75
    Inventory.Amount 1
    Inventory.MaxAmount 1
    Inventory.PickupMessage ""
	Inventory.PickupSound "Misc/K_PkUp"
    +NOTDMATCH
    +DONTGIB
    -INVENTORY.ALWAYSPICKUP
    States
    {
    Spawn:
	    YSKU AB 10 Bright
	    Loop
    Pickup:
	    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(297) == 1, "SharedKeys")
	    TNT1 A 0 A_JumpIfInventory("YellowSkull",1,"InInventory")
	    TNT1 A 0 ACS_ExecuteAlways(293,0)
	    TNT1 A 0 A_GiveInventory("YellowSkull")
	    Fail
    SharedKeys:
	    TNT1 A 0 ACS_ExecuteAlways(296,0,4)
	    TNT1 A 0 A_GiveInventory("YellowSkull")	
	    Stop
    InInventory:
	    TNT1 A 0
	    Fail
	    }
}

ACTOR "Blue Skull" : CustomInventory Replaces BlueSkull
{
    Scale 0.75
    Inventory.Amount 1
    Inventory.MaxAmount 1
    Inventory.PickupMessage ""
	Inventory.PickupSound "Misc/K_PkUp"
    +NOTDMATCH
    +DONTGIB
    -INVENTORY.ALWAYSPICKUP
    States
    {
    Spawn:
	    BSKU AB 10 Bright	   
	    Loop
    Pickup:
	    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(297) == 1, "SharedKeys")
	    TNT1 A 0 A_JumpIfInventory("BlueSkull",1,"InInventory")
	    TNT1 A 0 ACS_ExecuteAlways(294,0)
	    TNT1 A 0 A_GiveInventory("BlueSkull")
	    Fail
    SharedKeys:
	    TNT1 A 0 ACS_ExecuteAlways(296,0,5)
	    TNT1 A 0 A_GiveInventory("BlueSkull")	
	    Stop
    InInventory:
	    TNT1 A 0
	    Fail
	    }
}