OK, I can only answer your "lock" question as that's the only one you've posted ASL code for.
The problem is in your lock/unlock script commands, you're using something like this:
Lock the exit from "Room 1" to "Room 2"
But the exits you've defined are compass exits, not "go to" exits. In your example, the exit from room 1 which leads to room 2 is "north", so you just need to change this to:
Lock the exit from "Room 1" to "north"
If you could please put separate questions in separate threads, it will be easier to answer new questions, and easier for other people to search for later.