Help!

Bought this truck from dealer with 221K on it, have 2 other F-150's but with in-line 6's that have over 300K on them. This is my first experience with a V-6.
Truck ran fine on initial drive out, then began a slight miss @ idle.
Gas consumption escalated very much!! Put on computer. Shows bad EGR valve & a miss on 2 cylinders. Exp. Mechanic bud says there's a sensor on exhaust to check the EGR valve & most of the time the EGR is OK but the sensor leads have burned away.
Anybody have any knowledge? Could this be causing the miss & poor mileage? Need to do a compression check, one guy says a cracked head, but no oil in water or water in oil, nor steam out back.
Do not have print out of codes from shop, but may can get.
Any Help on where to begin would be appreciated.

depending on what year yours is i got a 97 with a 4.2 thats got a misfire on #3 and its a bad coil pack i to got bad gas milage but the only code i get is miss fire on #3 going down the road its fine except every now and then the engine light will flash which means its miss firing all i need is a new coil pack but you might have the cop style (coil over plug) in which case find out what one it is and replace them