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.

Easy walking with TilePaths

Featured Replies

Hello,

 

I've made a TilePath class very fast to walk some distances by walking on tilepaths:

CODE:

import org.osbot.script.Script;
import org.osbot.script.rs2.map.Position;

public class TilePath {

     private Script script;
     private Position[] path;
     private int[] distance;

    public TilePath(Script s, Position[] pos) {
         script = s;
         path = pos;
         distance = new int[path.length];
    }

     public void traverse() throws InterruptedException {
          initPath();
          script.walk(getNextPos());
     }

     private Position getNextPos() {
          Position pos = null;
          for (int i = (path.length - 1); i >= 0; i++) {
               if (distance[i] < 15) {
                    return path[i];
               }
          }
    return pos;
    }

     private void initPath() {
         for (int i = 0; i < path.length; i++) {
              distance[i] = script.realDistance(path[i]);
         }
     }
}

 

So now you can easy do:

Position[] testpath = {new Position(3012,3357,0),new Position(3007,3354,0),new Position(3007,3331,0)};
TilePath path = new TilePath(this, testpath);
path.traverse();

Pretty easy to use and its walks very smooth.

Kind regards
H0ppy

 

Edited by H0ppy

     private void initPath() {
         for (int i = 0; i < path.length; i++) {
              distance[0] = script.realDistance(path[0]);
         }
     }

?

  • Author
     private void initPath() {
         for (int i = 0; i < path.length; i++) {
              distance[0] = script.realDistance(path[0]);
         }
     }

?

 

 

My bad. I typed some manually in here -_-

  • Author

So your other code was generated?

generated from where? some AI robot I made?

what a question ...

No i copied a piece of it and manaully typed the last part becaus ei didn't copied it whole by accident...

wow man. Like you never make mistakes ...

You so hostile.

Just because i turned down your offer to make tutorials together?

grtz

hoppy

Edited by H0ppy

generated from where? some AI robot I made?

what a question ...

No i copied a piece of it and manaully typed the last part becaus ei didn't copied it whole by accident...

wow man. Like you never make mistakes ...

You so hostile.

Just because i turned down your offer to make tutorials together?

grtz

hoppy

Could you explain to me how to add this into my script, because this walking is killing me -.-"

Could you explain to me how to add this into my script, because this walking is killing me -.-"

 

I would also like to know how to actually implement this.

Guest
This topic is now closed to further replies.

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.