Jump 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 and stairs / obstacles

Featured Replies

So I got banking working, fighting and other things, but I come across a problem, walking to stairs and then going up them. 


			localWalker.walkPath(fromBankToStairs);
			Player player = myPlayer();
			int x = player.getPosition().getX();
			int y = player.getPosition().getY();

			if ((x > 3205) && (x < 3207) && (y > 3209) && (y < 3211)) {
				log("x : " + x + " y : " + y);
				log("we are at the stairs!");
				objects.closest("Staircase").interact("Climb-down");
			
				int z = player.getPosition().getZ();
				if (z == 1) {
					objects.closest("Staircase").interact("Climb-down");
				}
			} else {
				log("we are lost again..");
			}

What I did is walk to the stairs and if the player is near the stairs it should go down, but this does not working, does localWalker have a callback to see if the path is fully walked and then continue the script? 

So I got banking working, fighting and other things, but I come across a problem, walking to stairs and then going up them. 


			localWalker.walkPath(fromBankToStairs);
			Player player = myPlayer();
			int x = player.getPosition().getX();
			int y = player.getPosition().getY();

			if ((x > 3205) && (x < 3207) && (y > 3209) && (y < 3211)) {
				log("x : " + x + " y : " + y);
				log("we are at the stairs!");
				objects.closest("Staircase").interact("Climb-down");
			
				int z = player.getPosition().getZ();
				if (z == 1) {
					objects.closest("Staircase").interact("Climb-down");
				}
			} else {
				log("we are lost again..");
			}

What I did is walk to the stairs and if the player is near the stairs it should go down, but this does not working, does localWalker have a callback to see if the path is fully walked and then continue the script? 

 

 

if ((x > 3205) && (x < 3207) && (y > 3209) && (y < 3211)) {

Use area pls

 

+ getLocalWalker().waitUntilidle() is your best bet for the walking.

  • Author
if ((x > 3205) && (x < 3207) && (y > 3209) && (y < 3211)) {

Use area pls

 

+ getLocalWalker().waitUntilidle() is your best bet for the walking.

 

 

Fixed the areas, but still seem to have a problem with walking, I get the bot to start walking when it is at the bank with an empty inventory  but once it is at the stairs it stops 

	localWalker.walkPath(fromBankToStairs);
			localWalker.waitUntilIdle();
			Player player = myPlayer();
			log(localWalker.toString());
			if (UPPER_STAIRCASE_AREA.contains(myPlayer())) {
				log("we are at the stairs!");
				objects.closest("Staircase").interact("Climb-down");

				int z = player.getPosition().getZ();
				if (z == 1) {
					objects.closest("Staircase").interact("Climb-down");
				}
			} else {
				log("we are lost again..");
			}

Edited by KlaAz0r

 

Fixed the areas, but still seem to have a problem with walking, I get the bot to start walking when it is at the bank with an empty inventory  but once it is at the stairs it stops 

	localWalker.walkPath(fromBankToStairs);
			localWalker.waitUntilIdle();
			Player player = myPlayer();
			log(localWalker.toString());
			if (UPPER_STAIRCASE_AREA.contains(myPlayer())) {
				log("we are at the stairs!");
				objects.closest("Staircase").interact("Climb-down");

				int z = player.getPosition().getZ();
				if (z == 1) {
					objects.closest("Staircase").interact("Climb-down");
				}
			} else {
				log("we are lost again..");
			}

 

try changing

 

if (UPPER_STAIRCASE_AREA.contains(myPlayer())) {

to

 

if (UPPER_STAIRCASE_AREA.contains(myPosition().getX(), myPosition().getY())) {

This ignores whatever Z value the area might have (probably 0)

  • Author

try changing

to

This ignores whatever Z value the area might have (probably 0)

 

figured that out, what I did was:

		if (BANK_AREA.contains(myPlayer().getPosition().getX(), myPlayer()
				.getPosition().getY(), 0)
				&& inventory.isEmpty())
			return State.WALKING_TO_UPPER_STAIRS;

		if (myPlayer().getPosition().getZ() == 1 && inventory.isEmpty())
			return State.GOING_DOWN_STAIRS;

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.