While camping Nazjak on the PvE server I was sorely missing an addon like retail _NPCScan which alerts the player when certain NPCs are nearby - so I made one.
The detection method from retail (testing if the model is in the WDB by using a unit hyperlink) doesn't work in Vanilla afaik (or if so I would love to know how). On the other hand targeting is not a protected function so that can be used instead (which means no cache clearing required, but probably a smaller detection range).
I've exactly copied the alert of the retail version (https://www.youtube.com/watch?v=iYeXY5RSPi0) but the backend is kept very simplistic.
Also, showing your target on the minimap is probably not possible in vanilla (?).
There are three commands:
/npcscan lists the current targets
/npcscan add name adds name as a target
/npcscan rem name removes name from the targets
When a target is detected it is removed and you have to add it again.
Repo: https://github.com/shirsig/npcscan