I think functions should be at world/map/npc/functions

you also have to then add it to world/map/npc/scripts.conf