public void clickDoor(RSTile location, char direction) {
    if (Bot.getClient().getCameraPitch() != 3072) {
      camera.setAltitude(true);
    }

    if (location.isOnScreen()) {
      RSObject door = objects.getTopAt(location);
      if (!door.action("Open")) {
        rotateCameraRandomly();
      } else {
        if (door.distanceTo() > 0) {
          player.waitToMove(3000);
        }

        player.waitForAnim(random(2500, 3000));
        waitToStop();
      }
    } else {
      walk.to(location);
    }
  }
 private void clickObject(final int id, final String action) {
   final RSObject obj = objects.getNearestByID(id);
   if (obj != null) {
     try {
       if (tile.onScreen(obj.getLocation())) {
         if (obj.action(action)) {
           wait(random(2500, 3000));
           waitToStop();
         } else {
           rotateCameraRandomly();
         }
       } else {
         camera.turnTo(obj, random(20, 60));
         if (!tile.onScreen(obj.getLocation())) {
           walk.to(obj.getLocation());
         }
       }
     } catch (final Exception e) {
     }
   }
 }