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.

Checking for a valid firemaking tile

Featured Replies

Is there a way to get all of the tiles in a certain radius that are valid for lighting fires on them?

Yes.

Firstly, you need to grab a bunch of tile data to work with. You can do this by creating a new Area object and using the getPositions function to get the tiles in that range.

Then, you'll need to check those tiles' flags to see whether they can be walked on or not. You need to do this separately and still be able to filter out the 'bad tiles'.

On 04/06/2015 at 4:03 PM, Khaleesi said:

Here:


static final int UNWALKABLE = 256 | 0x200000 | 0x40000;

public static boolean isWalkable(int flag) {
   return (flag & (UNWALKABLE)) == 0;
}

XClippingPlane[] clippingPlanes = script.client.accessor.getClippingPlanes();
int[][] map = clippingPlanes[script.myPlayer().getZ()].getTileFlags();

Now just loop through all tiles and check them smile.png

 

Khaleesi

 

 

 

Not true, if you use the right values the shared flags won't matter.

 

A tile where a door is on is always walkable. but you'll have to check other flags if you can pass from 1 tile to another.

Example fence:

you can stand on both tiles, 1 tile will hold info if the tile is blocked north,east,south,west. :)

 

Khaleesi

Thirdly, when you have all those 'walkable' tiles, you then need to figure out whether there are objects situated on those tiles. Objects such as cannons, flowers, fires, and others will prevent you from being able to light a fire in that spot.

The MethodProvider has MethodProvider.objects, which links you to the Objects object. From there, you can use the Objects.get(x, y) function, or you could use a PositionFilter which filters out tiles that aren't occupied with 'bad objects.' I would chose the former, because your list of good tiles will work better if you can just check for objects at their coordinates.

Create an account or sign in to comment

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.