Engine light on my 1999 Honda civic is flashing?

I had my check engine light come on about 6 months ago and it said all 4 of my Pistons were misfiring. That problem was easily solved by replacing my vtec solenoid. However two days ago when I was coasting down a hill I saw my rpm's keep fluctuating from 2000-1000. I thought maybe it was just an old Honda thing that I never noticed before. Then my engine light came on today and was flashing. My friend looked at my engine about 3 weeks ago and said my spark plugs look like they need to be replaced soon. Is it as easy as that? I literally just checked my car yesterday. I put coolant and oil in (it's the right kind and amount, and it wasn't too low to start with) and I checked my transmission fluid. I got that changed less than a year ago. That was also good. I know I have a few oil leaks but none are too bad. My car idles weird for sure tho. When my Vetc S. Was going out it was an obvious misfire and the car was shaking. Now it doesn't feel quite as harsh, more like just weird idles. What do you suggest I do? Obviously get the problem fixed but a lot of places require a diagnostic check first. What are the most common things this can be?
1999 Honda civic ex
165000 miles
Timing belts just replaced along with distributor o ring, vetc solenoid (used), and battery.

Sounds like it's probably an ignition coil failing, but I'd replace the plugs first, as they are cheap and could easily cause a misfire if they are very old.
As for the coils, I'm not sure of the exact setup on your car. You could have one coil for each cylinder, or a coil pack that supplies all of the cylinders via HT leads.
Best thing to do would be to plug it in to a diagnostic machine it will tell you exactly what the fault is.
If you haven't got a diagnostic machine and you have got individual coils rather than a coilpack, then you could try unplugging the electrical connector from one coil at a time (with the ignition and engine OFF) and then try starting the car… If you've disconnected a good one, then your idle will be worse or the car might not start at all. Plug it back in and unplug the next one… When you disconnect the faulty one, the idle will stay the same as it is now, and that's the coil that needs replacing! Hope that's some help