Another one! I'm not the only one :rock:
Pop the throttle butterflies open and shine a flashlight down the bore into the intake. The plenum gaskets go on these motors and suck oil out of the lifter valley. Oftentimes that oil can cause rough idling. Also check the coolant temp sensor, sometimes it'll still read on the dash but cause issues and keep the computer in closed loop as it defaults to thinking the motor is -40 degrees.
I've dealt with the Magnum motors a lot, if you have any questions about the motor or the trans shoot me a message! Also, do yourself a favor and look into swapping out that 249 with either a 242 (the better option) or a 231. The viscous coupling in the 249's goes in the early models and can creep while in park and/or just fail altogether. 242 is the better option with the V8, despite what 99% of unibody people will tell you. You'll need to make sure the donor case is from a 95 or older, as the input shaft lengths changed in 96. There's ways to back-half the case and reuse your 249 front housing with a newer 242, there's a writeup I can point you towards.