Whoa, high mileage
If it hasn't already been done, you'll need to replace the following:
-spark plugs (and possibly ignition coils) ... $24 ($500 with coils)
-oxygen sensors ... $400
-double check emissions system components (BMW warranty only last til 100K) ... $300 and up
-air filter ... $20
-cabin filter ... $20
Also plan on the following repairs (again if they haven't been done already):
-Camshaft position sensors (two of 'em) ... $120 each
-fuel injectors ... $113 each new ($150 for a used set of 6 on Turner Motorsport)
-brake system (rotors, pads, lines and sensors) ... $50 and up
-secondary air pump and valve ... $300
Also wouldn't be a bad idea to have the valves adjusted and the engine tuned up. If your car has the Steptronic transmission, and it was driven poorly, you could plan on repairing the transmission as well.
Good luck with it, I love my 328i. Go buy the Bentley service manual and a code-fault reader right now. Man, I hope you got that car for well below blue-book value.