Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Walking issue, stuck while trying to reach unreachable positions.

Featured Replies

  • Developer

1. A description of the issue


Walking to location/object forever when it's not reachable.


 


Example:


Go inside abyss, when you finish an obstale to get to the inside, it sometimes wants to walk to an object at the outside.


Making it walk forever, but it will be unreachable... No fix for this except stopping and restarting the script :s


 


2. Are you receiving any errors in the client canvas or the logger?


No


 


3. How can you replicate the issue?


 


Try walking to a certain tile inside a room when you are inside.


Then click on the door walk outside and close it, it will keep tryign to walk inside.


This part isn't the issue^


 


The issue is that it will be stuck in a loop forever, the onLoop won't be executed anymore.


It will try walk to that same position forever until script has been stopped.


 


 


4. Has this issue persisted through multiple versions? If so, how far back?


Like a year or so, been like this forever ...


Code snippet please. I would prefer if the area doesn't require any quests (or mini-quests).

  • Author
  • Developer

Try north of edge at the wildeness ditch.

 

You'll see what I mean when you run it, the script never finishes the walking method, check logger smile.png

just a small check in your loop while walking should fix it ^^

 

Snippet:

@ScriptManifest(author = "Khaleesi", info = "Walking issue", logo = "", name = "WalkingSnippet", version = 0.01)
public class WalkingIssue extends Script {

	@Override
	public int onLoop() throws InterruptedException {
		
		log("Cross ditch");
		RS2Object ditch = getObjects().closest("Wilderness Ditch");
		if (ditch.interact("Cross")) {
			sleep(250);
			log("Try to walk");
			localWalker.walk(new Position(3088, 3500, 0));
			log("Finsihed walking");
		}
		
		return 150;

	}

}

GIF ( too short to show all :s)

7061a5c599cb61a20365c0a32dd000f1.gif

Edited by Khaleesi Scripts

I'd like to add to this problem - localWalker#walk (or #walkpath) doesn't handle interfaces. This means that if walking and it misclicks a bank booth or pollbooth, it gets stuck when trying to interact with mainscreen. Due to the nature of the loop, it gets stuck permanently.

 

Also, using the setMinimapThreshold thing (setting to 0) with walkingEvent doesn't stop it using mainscreen either. I think it should but I can't be sure.

 

Would be awesome if you could potentially look into these things while tooking into khal's bug too. < 3

 

cheers

apa

Edited by Apaec

Try north of edge at the wildeness ditch.

 

You'll see what I mean when you run it, the script never finishes the walking method, check logger smile.png

just a small check in your loop while walking should fix it ^^

 

Snippet:

@ScriptManifest(author = "Khaleesi", info = "Walking issue", logo = "", name = "WalkingSnippet", version = 0.01)
public class WalkingIssue extends Script {

	@Override
	public int onLoop() throws InterruptedException {
		
		log("Cross ditch");
		RS2Object ditch = getObjects().closest("Wilderness Ditch");
		if (ditch.interact("Cross")) {
			sleep(250);
			log("Try to walk");
			localWalker.walk(new Position(3088, 3500, 0));
			log("Finsihed walking");
		}
		
		return 150;

	}

}

GIF ( too short to show all :s)

7061a5c599cb61a20365c0a32dd000f1.gif

 

 

Looking at this briefly, it appears that the sleep of 250ms is not nearly enough time to clear the ditch. Try making a conditional sleep (or something a bit longer) in order to completely pass the obstacle. I really don't want to touch walking code for a few reasons.

 

If my solution does not solve the problem, please let me know.

I'd like to add to this problem - localWalker#walk (or #walkpath) doesn't handle interfaces. This means that if walking and it misclicks a bank booth or pollbooth, it gets stuck when trying to interact with mainscreen. Due to the nature of the loop, it gets stuck permanently.

 

Also, using the setMinimapThreshold thing (setting to 0) with walkingEvent doesn't stop it using mainscreen either. I think it should but I can't be sure.

 

Would be awesome if you could potentially look into these things while tooking into khal's bug too. < 3

 

cheers

apa

 

If you're willing to test a dev build and give some timely input, I would be more than happy to throw something in there to handle interfaces in a similar way IE does.

  • Author
  • Developer

Looking at this briefly, it appears that the sleep of 250ms is not nearly enough time to clear the ditch. Try making a conditional sleep (or something a bit longer) in order to completely pass the obstacle. I really don't want to touch walking code for a few reasons.

 

If my solution does not solve the problem, please let me know.

 

If you're willing to test a dev build and give some timely input, I would be more than happy to throw something in there to handle interfaces in a similar way IE does.

 

The point about this report was that the client gets stuck in an infitnite loop :)

Ofcourse I use conditional loops in my scripts, but once in a while due lagg and other stuff this will happen.

 

Getting stuck in the infitnite walking loop spamm clicking mnimap is pretty much instant bann if that happends for and hour :s

 

Can't you just add a safety timer? break the loop every 3-5 seconds?

 

Khaleesi

If you're willing to test a dev build and give some timely input, I would be more than happy to throw something in there to handle interfaces in a similar way IE does.

 

Sure, i'm happy to do some testing :) It would be great if you could add  that.

 

apa

Sure, i'm happy to do some testing smile.png It would be great if you could add  that.

 

apa

 

2.4.17 dev build is out.

2.4.17 dev build is out.

 

Thank you! :)

 

However on my first try, when I started the script and it started walking, I enabled user input and opened the pollbooth. This is what then happened:

 

e36f77a053c0b1b2805d1bec3e339120.gif

 

It was trying to interact with the tile it was trying to walk to, yet it can't because the interface is open :) For some reason, it didn't close the interface.

 

Nothing was mentioned in the logger, and here is the code i'm using:

WalkingEvent we = new WalkingEvent(pos);
we.setMiniMapDistanceThreshold(0);
we.setOperateCamera(false);
execute(we);

Note that it still seems to use the main screen to move even tho I set the minimap distance threshold to 0?

 

Thanks for taking the time to look at the bug report! (trust me, we appreciate it :)

 

apa

Thank you! smile.png

 

However on my first try, when I started the script and it started walking, I enabled user input and opened the pollbooth. This is what then happened:

 

 

 

It was trying to interact with the tile it was trying to walk to, yet it can't because the interface is open smile.png For some reason, it didn't close the interface.

 

Nothing was mentioned in the logger, and here is the code i'm using:

WalkingEvent we = new WalkingEvent(pos);
we.setMiniMapDistanceThreshold(0);
we.setOperateCamera(false);
execute(we);

Note that it still seems to use the main screen to move even tho I set the minimap distance threshold to 0?

 

Thanks for taking the time to look at the bug report! (trust me, we appreciate it smile.png

 

apa

 

 

 

Try 2.4.18.

Try 2.4.18.

 

You did it bro, well done! works a treat! :)

 

Thank you very much, awesome work.

 

-apa

Try 2.4.18.

 

Hmm. Would it be possible to get this implemented into interaction event too?

 

seem to get this issue:

 

1e20b7b30e62aacce434f5f3041bef4b.gif

 

when trying to interact with bank booth.

 

What happens : Goes to interact with bank booth, misclicks on nearby pollbooth, then fails in an infinite loop (outside of my control) trying to interact with the bank booth which it cannot reach.

 

thanks,

 

apa

 

edit: 

 

here's the code I was testing it with:

			Timer actionTimer = new Timer(0L);
			while (!this.getBank().isOpen()
					&& actionTimer.getElapsed() < timeout) {
				if (widgets.get(310, 1, 11) != null
						&& widgets.get(310, 1, 11).isVisible())
					widgets.get(310, 1, 11).interact("Close");
				widgets.get(402, 2, 11);
				if (widgets.get(402, 2, 11) != null
						&& widgets.get(402, 2, 11).isVisible())
					widgets.get(402, 2, 11).interact("Close");
				InteractionEvent e = new InteractionEvent(bank, action);
				e.setCameraDistanceThreshold(10);
				e.setWalkTo(true);
				e.setMaximumAttempts(3);
				execute(e);
				this.tillBankIsOpen(timeout);
			}

Edited by Apaec

.19 was a revert so all the old issues will come back. .20 will have everything fixed again.

 

 

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.