I actually need this myself but have not got round to scripting it yet, I will do very soon though as almost done most of the other stuff I wanted to do
its not that difficult, check smallg's thread, there are some functions there for getting distance to entities, a table to store objective values and a variable to indicate the current objective index.... that's about it, a few functions to add, remove and update objectives ..... the script is already written in my head lol