We'd recommend getting the vacuum lines in order first. NOx emissions on your Toyota pickup are controlled mainly by proper fuel control and the EGR valve. The EGR valve runs off of manifold vacuum. There is a good chance that the defective vacuum system is rendering the EGR valve inoperable. Correcting the vacuum system may get the EGR valve to start working, therefore lowering NOx. Repair the vacuum lines/connections and get a smog check retest for new baseline smog test results.