do you mean
NPC Code:
// NPC made by Prozac if (playerenters) {show;}
if (playertouchsme) {toweapons throw thing;}
if (weaponfired) {
this.distance=10; //how far to throw
this.dir=playerdir;
this.x=playerx+vecx(this.dir)*2;
this.y=playery+.5+vecy(this.dir)*2;
for (this.i=0; this.i<this.distance; this.i++) {
this.x+=vecx(this.dir);
this.y+=vecy(this.dir);
putexplosion 0,this.x,this.y;
sleep .1;
}
}