Jump to content

How can I Interrupt a webwalk?


Paradox68

Recommended Posts

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
Link to comment
Share on other sites

 

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.

 

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Recently Browsing   0 members

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