So I bought a truck yesterday from an older couple that had had it since new 98 Dodge Ram 2500 24 valve cummins with 190,000 miles on it. I got the truck for a really good price the ad did say it had an intermediate issue of losing power. I test drove the truck about 16 miles and I did experience the power loss, driving down the road everything would be acting fine and all of a sudden the truck would lose power kind of like it was running out of fuel. The further you push the pedal the more the engine would bog and slow down. I let off of the pedal and the truck picked right back up and felt fine. Then went back paid for the truck started to head home I stopped at a stop sign went to take off and the truck wouldn't shift out of first gear. I stopped on the side of the road and did some looking around online found some information that said to check the seven wire plug on top of the transmission, I unplugged it cleaned it off plugged it back in. I got in started the truck crossed my fingers and took off and the transmission seemed to shift just fine. I had a couple hour drive home and these issues kept coming in and out during my drive. When I got closer to home it started to get dark so I turned my headlights on and realized sometimes the headlights would get brighter and dimmer. A friend of mine told me to look into dead pedal and that sounds like it matches the power loss issue but as far as I know not the transmission problem. But then I do realize that the tps needs to be in the right parameters to work correctly and the voltage going up and down could effect this. This morning when I went to start the truck back up it did blow a little white smoke. The truck is all original absolutely nothing has been altered or changed, I just don't know if these 3 issues could have a common solution or if I'm dealing with 3 separate things and what I should tackle first.