I think you could make it happen by setting up a loop that checks each vertex against all the locators and then moves that vertex to the closest locator. My MEL is a bit rusty at the moment so I'm not going to hash together pseudocode till I get home.
I suggest using //Mel string $vertices[] = `filterExpand -sm 31`; for querying the selected vertices instead. You never know if the user might select something else which should not be selected for the script. filterExpand 31 ensures you get only selected vertices, see the docs for which number is used for other components.
Thanks a lot for everybodys help on this. The script works perfectly. But now i run into another problem. First I must explain the purpose for requesting this script. This is part of the main Script Im trying to write which is Quad fill (imitating Quad-cap max plugin by obliviboy). So far Ive been sampling many mel scripts…