Slight side note but you can specify ranges rather than using multiple && e.g.
PHP Code:
if (player.x in |this.x, this.x+5| && player.y in |this.y-5, this.y|)
this.chat = "FOUND YOU!";
I'd nest the y test but going off your example. Can still look neat(ish) without having to declare temp vars
