Thank you Diarandor! That solved my first problem.
Now the problem is that the NPC does not move at all. I tried multiple different coordinates of x,y. Strangly, the sprite vanishes with:
pixel:set_ignore_obstacles(true)
Full code:
function map:on_started()
local pixel = sol.movement.create("pixel")
pixel:set_trajectory{{64,80},{368,384}}
pixel:set_loop(true)
pixel:set_ignore_obstacles(true)
pixel:start(gerf)
end