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.

Run away if in combat.

Featured Replies

Here's some code i cooked up real quick to run a certain distance away from my current position and hopefully escape combat. Thought i'd post it in case someone eventually finds it useful.

case COMBAT:
				if(getStore().isOpen()) {
					status = "Closing store.";
					getStore().close();
					new ConditionalSleep(10000) {
						@[member='Override']

						public boolean condition() throws InterruptedException {
							return !getStore().isOpen();
						}
					}.sleep();
				}
				if(getBank().isOpen())
				{
					status = "Opening bank.";
					getBank().close();
					new ConditionalSleep(10000) {
						@[member='Override']

						public boolean condition() throws InterruptedException {
							return !bank.isOpen();
						}
					}.sleep();
				}
				int getX = myPosition().getX();
				int getY = myPosition().getY();
				int getZ = myPosition().getZ();
				Position newPos = new Position(getX + 30, getY + 30, getZ);
				getWalking().webWalk(newPos);
				break; 

Might have to do some funky stuff with the getZ value if you want it to run away up/down stairs, not sure.

 

EDIT: Will cause issues if script attempts to walk to a non walkable area.

 

Edited by PlagueDoctor

I don't think using a position given like that is good, like you said it will fuck you over if its not walkable and not do anything.

 

Usually you want to deagro with changing the Z coord aka walking up a ladder smile.png

What if you are in a small area also?

Edited by House

  • Author

I don't think using a position given like that is good, like you said it will fuck you over if its not walkable and not do anything.

 

Usually you want to deagro with changing the Z coord aka walking up a ladder smile.png

What if you are in a small area also?

ye, there are a lot of possible errors, its faaaaaaaaar from perfect. Still though, might be useful to someone. Changing z coord would probs work better in this situation for sure

Edited by PlagueDoctor

Create an account or sign in to comment

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.