Well firstly you would define your area:
Area areaName = new Area(xMin,yMin,xMax,yMax);Then of course you just check if your player is in that area and walk to it:
if(!areaName.contains(myPlayer())){
localWalker.walk(areaName.getRandomPosition(0));
} else {
log("We are in that area, time to have Sex!");
}Didn't look in the API it's just off the top of my head but I think that's all the correct methods. You should take a look in the API yourself to learn.