I suppose I could try to implement the other door handling snippet that somebody posted but to be honest I can't really be bothered and I can see it causing some problems for example, if you wanted to walk from across Varrock from one corner to another, if one of the tiles it walks to is inside a building, it would go through opening that door and then by the time the door is open, it would probably be trying to walk inside a different building. I think it would be better to just code in doors yourself. A good way to detect if you need to open a door is using realDistance(Position). it will return -1 if the position is unreachable so make it a position on the side of the door you want to be on and it will return -1 if you need to open the door.