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 find if you changed region?

Featured Replies

  • Author

I can only think of cheaphax ways atm, hopefully a dev posts

 

You could probably do it via getClippingPanes() but f that.

getTiles() is super confusing.

Each region should return a proper identifier / hash imo..

getRegion() always returns the same hash and equals always returns true.

Isn't there a region base x and y? If either base changes then a new region has loaded. I remember using those before.

 // on start
  int startX = pos.getX() /104;
  int startY = pos.getY() /104;
  
  int mapX = pos.getX() /104;
  int mapY = pos.getY() /104;
  if(startX != mapX || startY !=mapY)
   //moved region
 
There ya go buddy.

(might not work 100% though)


Try this as well, it should work smile.png

 

  Position pos = script.myPosition();
  
  int prevX = pos.getLocalX(script.getBot());
  int prevY = pos.getLocalY(script.getBot());
  
  sleep(250,500)
  
  int nextX = pos.getLocalX(script.getBot());
  int nextY = pos.getLocalY(script.getBot());
  
  if(Math.abs(prevX - nextX) > 20 || Math.abs(prevY - nextY) > 20)
   //move region

Edited by LeBron

  • Author

 

 // on start
  int startX = pos.getX() /104;
  int startY = pos.getY() /104;
  
  int mapX = pos.getX() /104;
  int mapY = pos.getY() /104;
  if(startX != mapX || startY !=mapY)
   //moved region
 
There ya go buddy.

(might not work 100% though)

Try this as well, it should work smile.png

 

  Position pos = script.myPosition();
  
  int prevX = pos.getLocalX(script.getBot());
  int prevY = pos.getLocalY(script.getBot());
  
  sleep(250,500)
  
  int nextX = pos.getLocalX(script.getBot());
  int nextY = pos.getLocalY(script.getBot());
  
  if(Math.abs(prevX - nextX) > 20 || Math.abs(prevY - nextY) > 20)
   //move region

 

 

Nope.

The last method could work but you'd have to check every 300 milliseconds.

The first one just doesn't work.

 

I just want an id/config/hash method.

Edited by Botre

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.