For your case, here are some suggestions:
-> /help /fopen : Opening a file once and reading sequential lines from it, then closing it is faster than opening file, read line, close file, open file, search for 2nd line, read it, close file, open file, search for 3rd line, read it, close file, ...
-> maybe /filter could be used?
-> put all quotes in a hash file (/help hash files). $hget is about as fast as you can get for getting a specific line, $hfind with some wildcards or a regex should do ok too... Don't forget to /hload at mIRC startup and /hsave at quit (and regularly if your computer crashes a lot)