Added AJAX to dynamically update NPCs