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.

How to check if a certain area is accessible

Featured Replies

I am having a problem with figuring out if a player can access an Area.
Talking webwalk wise, like quests, items, teleports...

How can I check if the webwalk has found a path without acually executing the walk?

WebWalkEvent wwe = new WebWalkEvent(area);

wwe.prefetchRequirements(this);

wwe.getDestination(); //returns the walkable position in the area if one was found

Edited by Team Cape

  • Author
19 minutes ago, Team Cape said:

 

wwe.prefetchRequirements(this);

 

Could you explain this line?
I tried without it and it didnt work.

5 minutes ago, HunterRS said:

Could you explain this line?
I tried without it and it didnt work.

Check the docs: https://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html#prefetchRequirements-org.osbot.rs07.script.MethodProvider-

Quote

public boolean prefetchRequirements(MethodProvider provider)


Generates the directions for this WebWalkEvent based on the requirements of PathPreferenceProfile. If no PathPreferenceProfile is declared, a default profile is set. If this method is not called prior to execution, it is called on event execution. You may only prefetch once for the event's instance.


Returns:
True if a destination was found and directions were created.

 

Edited by harrypotter

1 hour ago, HunterRS said:

Ya saw this, still think I dont understand it fully

just creating the webwalkevent means nothing because the webwalkevent has no reference to your instance of script (this is why it does not do it on instantiation). do it with every line it provided, and it will work because prefetchRequirements() is what does that even if the webwalkevent isn't executed.

  • Author
9 hours ago, Team Cape said:

just creating the webwalkevent means nothing because the webwalkevent has no reference to your instance of script (this is why it does not do it on instantiation). do it with every line it provided, and it will work because prefetchRequirements() is what does that even if the webwalkevent isn't executed.

Ahhh I get it, ty very much :)

 

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.