move npc funtionality to server side