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.

walker can't walk

Featured Replies

Hi, i've been facing this problem lately. i'm trying to make my player walk to a certain area, wich is called YEW_AREA, but it shows me a null pointer exception.

when i'm using the same code to walk to the BANK_AREA, it works great. 

here's the code :

@Override
	public int onLoop() throws InterruptedException 
	{
		if(!getInventory().isFull())
		{
			if(YEW_AREA.contains(myPlayer()))
			{
				antiBan();
				Entity yew = getObjects().closest("Yew");
				if(yew != null)
				{
					if(yew.isVisible())
					{
						if(!myPlayer().isAnimating() && !myPlayer().isMoving())
						{
							
							yew.interact("Chop Down");
							sleep(random(700, 800));
						}
					} else {
						getCamera().toEntity(yew);
					}
				} else {
					if(random(1, 100) == 1)
					{
						if(!myPlayer().isAnimating() && !myPlayer().isMoving())
						{
							this.getTabs().open(Tab.EMOTES);
							doEmote(random(1, 21));
							this.getTabs().open(Tab.INVENTORY);
						}
					}
				}
			} else {
				this.getLocalWalker().walk(YEW_AREA, true);
			}
		} else {
			if(BANK_AREA.contains(myPlayer()))
			{
				Entity banker = getObjects().closest("Bank booth");
				if(bank.isOpen())
				{
					bank.depositAll();
				} else {
					if(banker != null)
					{
						if(banker.isVisible())
						{
							banker.interact("Bank");
							bank.depositAll();
						} else {
							getCamera().toEntity(banker);
						}
					} 
				}
			} else {
				this.getLocalWalker().walk(BANK_AREA, true);
				
			}
		}
		return 150;
	} 

the problem is on the line 102, where the walker have to walk to the YEW_AREA. 

Thanks!

 

- Nic 

Edited by Nic2555

perhaps the distance is too far.

 

 

Instead of relying on localwalker.walk to walk that distance, perhaps record a static path between the bank and the yew area, and walk the path using 


Position[] path = new Positoin{}[ new Position(0,0,0), new Position(0,0,0) ]; //etc. (Use the pathrecording tool available on the sdn written by josedpays)
 

localWalker.walkPath(Position[] p); 

apa

Edited by Apaec

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.