02 Supercrew P0305,p0307,p0174,p0171
I have a 02 F-150 supercrew with 79,600 miles. A week ago I had code P0305 come up and the truck started idling rough at a stop. This was worse after it warmed up and was ran for a bit. I replaced the plugs but now I have codes p0305,p0307,p0171,and p0174 coming up. I figured it might be the coil pack but now the new cylinder and the other codes this threw me a little. Has anyone had this problem or know what might be causing this as well as the cheapest way to fix. I replaced the EGR valve and Sensor last April due to a code and the vehicle ran fine after that. I did noticed while replacing the plugs that the EGR gasket did not seat properly and am going to replace that(could this be part of the problem).
Any advice would be greatly appreciated.