Well, that explains a lot. The car is running in what's generally known as "limp mode"... it's a fail safe mode where the ECU, in response to certain diagnostic failures, imposes a low RPM rev limit, adds a lot of fuel and pulls spark advance.
Now, did you clear the codes after checking the first time, then take it for a drive and recheck?
You need to handle the error codes one at a time. The code 52 is rather common and is generally resolved by rewiring the sensors; see the MKIII FAQ section for a writeup on it.
24 and 31 are both AFM related codes. Inspect the harness and contacts for damage and signs of corrosion. Then reconnect and make sure the connection is solid.
After each of these you may reset the ECU and take the car for a medium distance drive and recheck for recurring codes when you get back home.
If the AFM related codes continue follow the instructions here:
http://www.cygnusx1.net/Supra/Librar...ection=FI&P=96