I have noticed that there are some weird npc bugs.
I dont know exactly but here is an example..
there was a door
if (playertouchsme) {
setlevel bla.graal,30,30;
}
when you tried to warp back to the level in which the door was in from bla.graal, it would warp you back into bla.graal, thinking that you are still touching the door.
I even tried playerchats instead of playertouchsme and it still happened.
So I guess when you change levels from a npc its not unsetting the action flag..