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.

Defining a path and walking

Featured Replies

RSPath should be built into the API, it comes in really handing for trying to walk to a tile that is in a region which isn't loaded.
For instance:

 

 

 

if (Location.equals("bankVW")) {

WalkPath = new Position [] {

new Position(3180, 3381, 0),

new Position(3174, 3391, 0),

new Position(3170, 3404, 0),

new Position(3170, 3415, 0),

new Position(3173, 3425, 0),

new Position(3182, 3431, 0),

new Position(3183, 3436, 0),

 

};

}

walkPath(Location String); - Clicks on a new tile as soon as it becomes available.

walkPathWait(Location String); - Waits until idle between every tile.


 

 

 

  • Author

I was told the same thing about making my own method for RSArea on Advertising other bots isn't allowed.. It's not about being hard, it's about improving the API.

  • Author

@Rawr -  because it's in the API. I'm assuming you never scripted for a bot other than OSBot. Here is what you need to do to make an RSArea on Advertising other bots isn't allowed.:
 

 

public class RSArea {

 

private final Polygon area;

private final int plane;

 

public RSArea(final RSTile[] tiles, final int plane) {

area = tilesToPolygon(tiles);

this.plane = plane;

}

 

 

public RSArea(final RSTile[] tiles) {

this(tiles, 0);

}

 

public RSArea(final RSTile southwest, final RSTile northeast) {

this(southwest, northeast, 0);

}

 

 

public RSArea(final int swX, final int swY, final int neX, final int neY) {

this(new RSTile(swX, swY), new RSTile(neX, neY), 0);

}

 

public RSArea(final int swX, final int swY, final int neX,

final int neY, final int plane) {

this(new RSTile(swX, swY), new RSTile(neX, neY), plane);

}

 

public RSArea(final RSTile southwest, final RSTile northeast,

final int plane) {

this(new RSTile[] { southwest,

new RSTile(northeast.getX() + 1, southwest.getY()),

new RSTile(northeast.getX() + 1, northeast.getY() + 1),

new RSTile(southwest.getX(), northeast.getY() + 1) }, plane);

}

 

public boolean contains(final RSTile... tiles) {

final RSTile[] areaTiles = getTiles();

for (final RSTile check : tiles) {

for (final RSTile space : areaTiles) {

if (check.equals(space)) {

return true;

}

}

}

return false;

}

 

public boolean contains(final int x, final int y) {

return this.contains(new RSTile(x, y));

}

 

public boolean contains(final int plane, final RSTile... tiles) {

return this.plane == plane && this.contains(tiles);

}

 

public Rectangle getDimensions() {

return new Rectangle(area.getBounds().x + 1,

area.getBounds().y + 1, getWidth(), getHeight());

}

 

public RSTile getNearestTile(final RSTile base) {

RSTile tempTile = null;

for (final RSTile tile : getTiles()) {

if (tempTile == null

|| distanceBetween(base, tile) < distanceBetween(

tempTile, tile)) {

tempTile = tile;

}

}

return tempTile;

}

 

public int getPlane() {

return plane;

}

 

public Polygon getPolygon() {

return area;

}

 

@SuppressWarnings({ "unchecked", "rawtypes" })

public RSTile[] getTiles() {

ArrayList tiles = new ArrayList();

for (int x = getX(); x <= getX() + getWidth(); x++) {

for (int y = getY(); y <= getY() + getHeight(); y++) {

if (area.contains(x, y)) {

tiles.add(new RSTile(x, y));

}

}

}

return (RSTile[]) tiles.toArray(new RSTile[tiles.size()]);

}

 

public int getWidth() {

return area.getBounds().width;

}

 

public int getHeight() {

return area.getBounds().height;

}

 

public int getX() {

return area.getBounds().x;

}

 

public int getY() {

return area.getBounds().y;

}

 

public Polygon tilesToPolygon(final RSTile[] tiles) {

final Polygon polygon = new Polygon();

for (final RSTile t : tiles) {

polygon.addPoint(t.getX(), t.getY());

}

return polygon;

}

 

public double distanceBetween(RSTile curr, RSTile dest) {

return Math.sqrt((curr.getX() - dest.getX())

* (curr.getX() - dest.getX()) + (curr.getY() - dest.getY())

* (curr.getY() - dest.getY()));

}

 

}

 

 

 

Edited by Alek

  • Author

@Sponsor, it's exactly what I am looking after. Would be nice if it was included in the API though :)
I'm not lazy since all I need to do is copy and paste it, however it would be nice to have it included as an official API feature.
 

Yeah I understand that, I think OSBot devs are actually releasing a brand new API when they release the offical OSBot V2 as the api atm is only beta one. So maybe they'll have it in there, who knows? :\

I support this suggestion. The suggestion is completely noob friendly and that should be the purpose of the API. 

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.