worked on #1251 and #1188 (feel free to test and report it)

need to take a look at npc script xD