hmm, another thing wrong with that script, it would hurt the player the same if the pker was using a sword or an axe.
you'd have to do something along the lines of
NPC Code:
if (playerhearts<playerfullhearts||playerhurt) {
this.hptake=playerfullhearts-playerhearts;
this.hp=strtofloat(#s(client.hp));
this.hp-=this.hptake;
setstring client.hp,#v(this.hp);
if (strtofloat(#s(client.hp))<=0) {
<dying stuff here>
}
}
that should work, but a lot of the time its more efficient if you have things like that in a timeout loop.