Jump to content

Web Walking banking???


Recommended Posts

Posted

I want to use web walking to walk from falador west bank to yanille bank. I expect the web walking to search the bank, withdraw a ring of dueling, teleport to castle wars, and then walk to yanille. Using the code below I tested a few scenarios. 

Quote

@Override
public int onLoop() throws InterruptedException {
    webWalk(Banks.YANILLE);
    return 240;
}

public void webWalk(Area area) throws InterruptedException {
    Utils.log("[WebWalk] - walk to area");
    WebWalkEvent event = new WebWalkEvent(area);
    PathPreferenceProfile ppp = new PathPreferenceProfile();
    ppp.checkBankForItems(true);
    ppp.checkInventoryForItems(true);
    ppp.checkEquipmentForItems(true);
    ppp.setAllowTeleports(true);
    event.setPathPreferenceProfile(ppp);
    boolean prefetch = event.prefetchRequirements(bot.getMethods());
    Utils.log("[WebWalk] - Done fetching requirements (" + prefetch + ")");
    execute(event);
    Utils.log("Done executing");
    sleep(300);
}

Scenario 1: In falador bank with nothing in inventory/equipment and bank closed. RESULT: Tries walking up and over white wolf mountain. Does not attempt to check bank.

Scenario 2: In falador bank with nothing in inventory/equipment and bank opened. RESULT: Sits at bank, does not try to withdraw ring of dueling. Logs spamming: 

Quote

WebWalkingEvent; Terminated! Exceeded attempt threshold.

Scenario 3: In falador bank with ring of dueling either in inventory or equipped.  RESULT: Successfully teleports to castle wars, then walks to yanille. 

 

Am I doing something wrong here, or is the code broken? Thanks for any help you can provide, tried figuring it out on my own first. 

Posted
18 minutes ago, Juggles said:

if (FallyBank.contains(myPlayer) {

       if (!getInvent.contains(duel ring) {
              withdraw

      } else {
         teleport 
      }

 } else {

        walking.webWalk(Yanille)

}

 

Thanks but not what I'm looking for. Trying to make use of the PathPreferenceProfile#checkBankForItems method, would be much more flexible.

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...