Above advice is reasonable.

1998 Magnum V8s have computer systems that are OBD-II
Friends that had post 1996 OBD-II systems seem to be very sensitive to battery health. Batteries that were old and still able to start the truck would cause very "squirrelly" problems including an intermittent rough idle.

While troubleshooting make sure you have a good battery and clean ground connections.

On my 1995 OBD-I system the most challenging intermittent problems occurred around 180,000 miles.

I had come and then go warmed up rough idle at first.
Then the truck would suddenly die on the highway, refuse to restart for 10 to 30 minutes, then start back and run fine for hours before having the same problems again.

In the end this turned out to be a plugged up "sock filter" at the bottom of the in tank fuel pump/pressure regulator/ double fuel filter assembly.

The lowermost sock filter was causing the fuel pump suction to "cavitate" when the fuel got hot, which causes very sudden fuel flow loss,

Fuel pump, pressure regulator, and high pressure fuel filter were still good at 180,000 miles,
but the sock filter designed to protect the pump from wear was causing odd and intermittent behavior.