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.

getCenterPosition help

Featured Replies

This code is old

public Position getCenterPosition(Area area, int height) {
        return new Position((area.getMinX() + area.getMaxX()) / 2, (area.getMinY() + area.getMaxY()) / 2, height);
    }

this gives off the error :p I know this is old API shit but i don't know the new methods ;3 Please Help :D

area.getMinX() + area.getMaxX()) / 2, (area.getMinY() + area.getMaxY()) / 2
Area example = new Area(new Position(0,0,0), new Position(0,0,0));
Position mid = example.getPositions().get((example.getPositions().size() /2));

I assume this, but never tried it

  • Author
Area example = new Area(new Position(0,0,0), new Position(0,0,0));
Position mid = example.getPositions().get((example.getPositions().size() /2));

I assume this, but never tried it

 

 

That's not the full method ;L wont help much

Position(0,0,0), new Position(0,0,0)

 isn't filled out with coords

 

also this is how it's used

script.localWalker.walk(getCenterPosition(Constants.BANK_AREA_SELECTED, 0));

I am new to this API so I am sorry to bother all of you Devs ;p I am transferring from RSPS Developing to script developing ;p

Edited by run3warfar3

baby-boy-being-fed-spoon.jpg

  private Position getMiddle(Area area, int plane){
        if(area != null){
            area.setPlane(plane);
            return area.getPositions().get((area.getPositions().size() /2));
        }
        return null;
    }

Edited by Isolate

  • Author

 

baby-boy-being-fed-spoon.jpg

  private Position getMiddle(Area area, int plane){
        if(area != null){
            area.setPlane(plane);
            return area.getPositions().get((area.getPositions().size() /2));
        }
        return null;
    }

 

xD Thanks Man, and yes I do have to get spoon fed atm lol ;p Thanks for helping ill reply if it works or not ;3

 

It works :D

 

I made an old treechopper work ;3

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.