P1399 = ramdom misfire detected.
Items to check are :
1. Ignition coil.
2. spark plugs and wires.
3. distributor cap and rotor.
4. Fuel injectors, pressure and filter.
P1399 is a temporary DTC for random misfires and is equivalent to P0300. It would become P0301, 0302, 0303 and 0304, which are specific misfires for the respective cylinders.
Lots of carbon deposits means inefficient combustion and that could be due to poor or missing sparks.
It could be due to weak ignition coil, bad plug wires or distributor rotor or cap.
Pull out a spark plug wire and attach a spark plug to it. Crank the engine and watch the sparks, they should be bright blue. If it is dull orange, the coil is weak.
Get the spark plug wires checked. There should be continuity with resistance less than 25k ohms.
Were the spark plugs replaced?
Guess the ignition coil is due for replacement.