Jump to content

Simple Gnome Agility Script


Recommended Posts

Posted
RS2Object logbalance = getObjects().closest("Log balance");
RS2Object logbalance2 = getObjects().closest(new Filter<RS2Object>() {
    @Override
    public boolean match(RS2Object rs2Object) {
        return rs2Object != null && rs2Object.getName().equals("Log balance");
    }
});
RS2Object obstaclenet = getObjects().closest("Obstacle net");
RS2Object treebranch = getObjects().closest("Tree branch");
RS2Object treebranch2 = getObjects().closest(new Filter<RS2Object>() {
    @Override
    public boolean match(RS2Object rs2Object) {
        return rs2Object != null && rs2Object.getName().equals("Tree branch");
    }
});
RS2Object balancingrope = getObjects().closest("Balancing rope");
RS2Object obstaclepipe = getObjects().closest("Obstacle pipe");



/*if (logbalance2 != null){
    log("logbalance2 exists");
    if (logbalance2.interact("Walk-across")) {
        new ConditionalSleep(10000, 1000) {
            @Override
            public boolean condition() throws InterruptedException {
                return myPlayer().isAnimating();
            }
        }.sleep();
        log("Walking logbalance2");
    }

    if (obstaclenet !=null){
        log("obstaclenet exists");
        if (obstaclenet.interact("Climb-over"))
            new ConditionalSleep(10000, 1000) {
            @Override
            public boolean condition() throws InterruptedException {
                return myPlayer().isMoving();
            }
        }.sleep();
        log("Climb-over obstaclenet");
    }

    if (treebranch2 !=null){
        log("treebranch2 exists");
        if (treebranch2.interact("Climb"))
            new ConditionalSleep(10000, 1000) {
                @Override
                public boolean condition() throws InterruptedException {
                    return myPlayer().isAnimating();
                }
            }.sleep();
        log("Climb Treebranch");
    }
}*/

The problem i am running into is with treebranch2.  This is the 3rd obstacle in the gnome agility course.  You cross the log then  the obstacle net then you have to climb up a tree branch.  When i run all three of the actions together it never clicks on the treebranch.  Once my player climbus op the obstacle net.  The treebranch is never identified as in the debugger doesn't log "treebranch2 exists"  So i assume the problem as to be starting here.  However, when i run just that snippet of script involving treebranch2 alone it clicks the treebranch2 just fine.

 

Any help/advice would be greatly appreciated as i am new and i think this could be a fun hobby.  Also is there some action i should be using with my conditional sleeps that is different than .isanimating.

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...