Jump to content

Check for when webwalker interacts with an object?


Recommended Posts

Posted

Currently I'm having some issues with webwalker in combination with the Stronghold of Security. It will use one of the gates, however it will then just keep using the gate over and over again. This leads me to believe that the Stronghold of Secuirty is not yet supported by the webholder, or at-least solving it is not. 

 

Is it possible to figure out when the webwalker interacts with an object, pause the webwalker, do whatever you need to do with the object (In this case, solve the gate's question.. which is simple) and then resume the webwalker. 

 

As of right now I'm just spam clicking a gate and that's not acceptable.

 

Posted (edited)
public static void webWalkEvent(final INodeRouteFinder routeFinder, final Position position, final int treshold, final MethodProvider script) {
    WebWalkEvent event = new WebWalkEvent(routeFinder, position);
    event.setBreakCondition(new Condition() {

        @Override
        public boolean evaluate() {
// Return when you want the event to break.
            return script.getMap().distance(position) <= treshold;

        }
    });

    script.execute(event);
}

use Webwalkevent.

 

treshold is when you break the webwalking once it's close. if you set it to 1 it will break the webwalker once its in a radius of 1 tile.

 

so walk to the gate, automatic break, solve question, open next gate

 

you can also check if you're in dialoge(door's dialoge)

 

got it from @Khaleesi

 

 

Edited by The Hero of Time
  • Like 1
Posted (edited)

 

If you're using

 

getWalking()
getLocalWalker()

I think you're out of luck but if you're using the snippet, that I believe originates from @Khaleesi but posted by hero (can't tag you for some reason)

(feel free to correct me there you two)

You could do 

 

  public void webWalkEvent(final INodeRouteFinder routeFinder, final Position position, final Area area, final MethodProvider script) {
        WebWalkEvent event = new WebWalkEvent(routeFinder, position);

        event.setBreakCondition(new Condition() {
            @Override
            public boolean evaluate() {  
                return getDialogues().inDialogue();
            }
        });

        script.execute(event);
    }

which'd break walking when in dialogue, so you can handle it and it'd continue happy.png

Edited by Isolate
Posted (edited)

 

This was exactly what I was thinking I would have to do, I was just hoping I wouldn't have to have so many waypoints. Alright, thanks guys. I'll finish this off in the morning then. CBA writing all the different waypoints out tonight. 

 

EDIT: As for the confusion on webwalkers ability to solve SS, it came from this thread: http://osbot.org/forum/topic/67374-web-walking-in-progress/

Didn't notice it wasn't the official. 

Edited by XenoTools

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