If I have done 18 month CPT and no OPT in 1st masters am I eligilble for OPT in my second masters

I intend to do MBA in US and have applied to a university. The program has CPT of 18 months and no OPT. Once I complete my MBA degree and have done a 18 month CPT in MBA, I may want to do a second Masters in the field of Computer Science, since I have completed my B.Tech in India. At the time of this Masters in Computer Science which is a STEM degree, which will be my second masters, will I be eligible for 12 month OPT and extension of 17 months as I would have done only 18 month CPT and no OPT in my First Masters MBA

Technically you will not get OPT, if you do CPT for over 12 months. Your question is about a very tricky situation, I suggest you speak to the DSO at the school you plan to apply for Masters with CPT of 18 months and seek his/her advice. You may check out : Do you get OPT for Second Masters ?