perhaps its because the image hasn't loaded into the memory yet? Thus makeing your wraptext size a negitive number and making a near infinite (or negitive, just as bad) number of tokens. I would make it more defined.
like
NPC Code:
this.width = (imgwidth(dk_window.png)-16 > 0? imgwidth(dk_window.png)-16 : 128);
wraptext2 this.width,1,,@Trebuchet MS@Use the Arrow Keys...etc;
Or maybe just put in the acual width of dk_window.png, since its never gunna change anyway. (I would recommend this option over the previous)