Jump to content

How can I Interrupt a webwalk?


Recommended Posts

Posted (edited)

AHHHHHHHHH i had .29 or something


Make sure your library is the latest osbot (dev build too probably)?

Works fine for me:

eef7ccccc2c6a23a7b2e61514751d710.png

		INodeRouteFinder nodeFinder = INodeRouteFinder.createSimple();
		if (!getArea(location).contains(myPlayer())) {
			try {
				WebWalkEvent evt = new WebWalkEvent(nodeFinder, destination);
				evt.setBreakCondition(new Condition() {

					@Override
					public boolean evaluate() {
						if (getObjects().closest("Gate") != null) {
							if (getObjects().closest("Gate").hasAction("Pay-toll(10gp)")) {
								getObjects().closest("Gate").interact("Pay-toll(10gp)");
							} else {
								getObjects().closest("Gate").interact("Open");
							}
							return false;
						}
						return true;
					}
				});
		                execute(evt);
			} catch (Exception e) {
				log(e);
			}

bby pls. it doesn't walk at all anymore. I tried removing the condition and just setting the WebWalk Event and execute(evt);

but it still doesnt walk....

java.lang.NoClassDefFoundError: org/osbot/rs07/api/webwalk/INodeRouteFinder
	at main.onLoop(main.java:163)
	at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(we:22)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.osbot.rs07.api.webwalk.INodeRouteFinder
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 3 more

Edited by Paradox68
Posted

 

AHHHHHHHHH i had .29 or something

		INodeRouteFinder nodeFinder = INodeRouteFinder.createSimple();
		if (!getArea(location).contains(myPlayer())) {
			try {
				WebWalkEvent evt = new WebWalkEvent(nodeFinder, destination);
				evt.setBreakCondition(new Condition() {

					@Override
					public boolean evaluate() {
						if (getObjects().closest("Gate") != null) {
							if (getObjects().closest("Gate").hasAction("Pay-toll(10gp)")) {
								getObjects().closest("Gate").interact("Pay-toll(10gp)");
							} else {
								getObjects().closest("Gate").interact("Open");
							}
							return false;
						}
						return true;
					}
				});
		                execute(evt);
			} catch (Exception e) {
				log(e);
			}

bby pls. it doesn't walk at all anymore. I tried removing the condition and just setting the WebWalk Event and execute(evt);

but it still doesnt walk....

java.lang.NoClassDefFoundError: org/osbot/rs07/api/webwalk/INodeRouteFinder
	at main.onLoop(main.java:163)
	at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(we:22)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.osbot.rs07.api.webwalk.INodeRouteFinder
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 3 more

 

Run it on the same client version as you're compiling against.

 

Also please don't perform actual interactions within a condition. Do it after the condition interrupts the walker.

 

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