This doesn't hurt the other NPCs!?! It;s not the whole script, just the part that is effecting it.
NPC Code:
this.x = x;
this.y = y;
this.dir = dir;
this.apos = {1.5,1, -1.5,1.5, 1.5,4, 3.5,1.5};
hitobjects 1,this.x+this.apos[this.dir*2],this.y+this.apos[this.dir*2+1];