When you say it crashes, do you get the oops error or what?
And if the offending code is in the part of the script that you removed from the post, that makes it harder for us to help.
I'll scroll through what you gave us and give you any thoughts:
1. When you Drawpic, why are you using animate. Isn't DrawPic(800 dpOPEN_CENTEREDGE) sufficient?
2. The second set of parenthesis is unnecesary ((state)) in your changestate.
3. during your changestate, you have this: (Wolf:setLoop(1) setCel(0) ... you don't have to use setLoop or setCel in situations like this, loop(1) cel(0) work just as good.
4. (Wolf:dispose()) I have always had mixed results with disposing. It doesn't work exactly like I think it should with the pnc stuff so in a situation like this I just hide() and posn(400 400) not that your way doesn't work perfectly well.
Alright, thats about all I see that raises an eyebrow, besides having two local sections in room 803, instead of just one with both variables declared in it, and the fact that nothing we see ever gets us to case 21. I don't see what I was expecting to see and nothing else jumps out at me as being wrong that I have ever come across. I have had a couple of wierd things happen on occasion while using companion, every once and a while any wondering character heads straight north. Usually if I recompile all, the situation clears itself up.