Jump to content
Sign in to follow this  
matthew2112

Simple Gnome Agility Script

Recommended Posts

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.

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...