public static boolean moveToTargetWithDistance(VisibleObject object,Player player,int direction,int distance){
  double radian=Math.toRadians(object.getHeading() * 3);
  float x0=object.getX();
  float y0=object.getY();
  float x1=(float)(Math.cos(Math.PI * direction + radian) * distance);
  float y1=(float)(Math.sin(Math.PI * direction + radian) * distance);
  return teleportTo(player,object.getWorldId(),x0 + x1,y0 + y1,object.getZ());
}

public static boolean moveToTargetWithDistance ( VisibleObject object , Player player , int direction , int distance ) { double radian = Math . toRadians ( object . getHeading ( ) * 3 ) ; float x0 = object . getX ( ) ; float y0 = object . getY ( ) ; float x1 = ( float ) ( Math . cos ( Math . PI * direction + radian ) * distance ) ; float y1 = ( float ) ( Math . sin ( Math . PI * direction + radian ) * distance ) ; return teleportTo ( player , object . getWorldId ( ) , x0 + x1 , y0 + y1 , object . getZ ( ) ) ; }
move player concerning object with specific conditions
