Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved failing to click on some objects?

Status
Not open for further replies.
Joined
Nov 18, 2013
Messages
126
Today, I've been having some issues with getting the client to click on specific objects. It seems to work for most objects but some just fail to click. I've tried using #interact and #click. Any ideas? Thanks

Clicking on the object's tile using #getPosition#click seems to be my workaround for now but I'd prefer to not use that.

Code:
private GameObject getLadder() {

    LocatableEntityQueryResults<GameObject> ladder = GameObjects.getLoaded("Ladder");

    if (ladder != null && ladder.size() > 0) {

        return ladder.first();
    }
    return null;
}

private void climbLadder() {

    GameObject ladder = getLadder();
    int plane = player.getPosition().getPlane();

    if (ladder != null) {

        System.out.println("Not null");
        if (ladder.interact("Climb-up", "Ladder")) {

            Execution.delayUntil(() -> player.getPosition().getPlane() != plane, 2000, 3000);
        } else {
            System.out.println("Failed to click");
        }
    }
}
 
Joined
Dec 28, 2013
Messages
190
Does it hover and just not click? If it hovers you may have the wrong interaction (pretty sure it's case sensitive).
 
Joined
Nov 18, 2013
Messages
126
Does it hover and just not click? If it hovers you may have the wrong interaction (pretty sure it's case sensitive).

Hey. The bot doesn't hover, it just returns false when I try to have it click. Even just using ladder#click does nothing.
 
I figured it out, my fault. I'm use to the the list of objects queried being in order of distance to the player. My method was returning a different ladder not on the screen, lol.
 
Status
Not open for further replies.
Top