adding in error checks

Adding in error checks for durability and entity movement. Found a bug
in old code where even height makes bot turn wrong way.
facing and coord tracking

added in functions to keep track of distance and facing from starting
point.