I never knew that putnpc2() returned the npc object >_>
Hurray for new things.
You could even add a putnpc3() that uses a class name to join as the parameter instead of the actual script :P
with (putnpc3(this.x, this.y, "classname")) {}
For the lazy people like me.