There should not be guards that shoot you with bows for huge unavoidable damage just because you are near the town. You should only get attacked by guards if you are inside town or at the entrance. Players farm resources next to the town so that they can simply run away and anyone who is chasing them will die to guards long before that player enters the town safezone.