Hyp's solution on AoOs is the one that fits the most rules (but not all). If you are worried about being offical, that would be the way you want to go.
Even Hyp will agree you shouldn't get an AoO when you don't know there is an invisible person around. This is technically a house rule but one I think nearly every one agrees on.
If you see AoOs as deliberate, as I do, figure out some criteria for AoOs to act as your house rule. Here is the house rule I use. You must have your dexterity bonus in general to take an AoO. To AoO an invisble person, you must be aware of an oppent, know the location of said opponent, and know the opponent has provoked an AoO.
Spot check DC 20, or decent listen check, then you need a listen check of 25 (0 +5 for combat distraction +20 for pinpoint) to know a person is casting a spell next to you. Higher DCs for drinking potions or other AoO actions. None for certain actions like a touch attack as part of a graple.
Note this makes invisibility more powerful than it would have otherwise have been. That means a shift in balance, as people will want to be invisible more often. It does mean invisiblity will have more uses in combat for running away, which leads to more interesting encounters in the end, IMO.
If you want to see me and Hyp debate this (to no solid conclusion) you can go here
I would agree on the ruling you made on attacking a line of squares. I would also agree that you can't run through a lot space "checking" for invisible people. The best bet for the wizard is go to door, close it, and try to bar it with his staff. The invisble person is going to have to move to the door and at least open it. That is at least a full round.
Even Hyp will agree you shouldn't get an AoO when you don't know there is an invisible person around. This is technically a house rule but one I think nearly every one agrees on.
If you see AoOs as deliberate, as I do, figure out some criteria for AoOs to act as your house rule. Here is the house rule I use. You must have your dexterity bonus in general to take an AoO. To AoO an invisble person, you must be aware of an oppent, know the location of said opponent, and know the opponent has provoked an AoO.
Spot check DC 20, or decent listen check, then you need a listen check of 25 (0 +5 for combat distraction +20 for pinpoint) to know a person is casting a spell next to you. Higher DCs for drinking potions or other AoO actions. None for certain actions like a touch attack as part of a graple.
Note this makes invisibility more powerful than it would have otherwise have been. That means a shift in balance, as people will want to be invisible more often. It does mean invisiblity will have more uses in combat for running away, which leads to more interesting encounters in the end, IMO.
If you want to see me and Hyp debate this (to no solid conclusion) you can go here
I would agree on the ruling you made on attacking a line of squares. I would also agree that you can't run through a lot space "checking" for invisible people. The best bet for the wizard is go to door, close it, and try to bar it with his staff. The invisble person is going to have to move to the door and at least open it. That is at least a full round.