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.

BetterBarrows progress

Featured Replies

As anyone that browses the questions forum knows, I've been working on a Barrows script.  It's not pretty, and I intentionally added extra-long sleeps for testing purposes, so it's pretty slow. It currently can map from the ladder to the chest room. 

 

Here's what I've got so far.

https://www.youtube.com/watch?v=DEMIy_M1LeI

 

 

 

 

 

Thank you everyone who has helped me thus far smile.png

 

 

 

edit: I should probably mention that this project is on indefinite hold due to my main/test account being banned, if anyone has an account that's Barrows-ready that I could buy for a reasonable price it would help speed up the process.

Edited by adc

Looks decent so far man.

 

Hopefully can be the next big thing to look forward to :)

Are you doing the tunnels via simulation?

 

When I was solving the tunnels, I would make a map in the program and run about 200 scenarios where it would pick random directions. After the simulation was done, it would go with the shortest route to the chest that it found.

Are you doing the tunnels via simulation?

 

When I was solving the tunnels, I would make a map in the program and run about 200 scenarios where it would pick random directions. After the simulation was done, it would go with the shortest route to the chest that it found.

 

You can clearly see the bot think in each room.

I doubt it.

You can clearly see the bot think in each room.

I doubt it.

 

You can run a new simulation in every room if you want.

It prevents Jagex from messing with your bot.

You can run a new simulation in every room if you want.

It prevents Jagex from messing with your bot.

 

How does it prevent jagex from messing with your bot :o

How does it prevent jagex from messing with your bot ohmy.png

 

Most players don't think too far ahead when they get in the tunnel.

The bot can solve the whole tunnel as soon as it comes down the ladder.

 

All they need to do is re-scramble some far off rooms after you open the first door and it could mess up your bot.

Most players don't think too far ahead when they get in the tunnel.

The bot can solve the whole tunnel as soon as it comes down the ladder.

 

All they need to do is re-scramble some far off rooms after you open the first door and it could mess up your bot.

 

Do they seriously do that ?

Do they seriously do that ?

Back when I played legit I remember that happened. Can't remember if it was a timeout, failing the puzzle, or a mixture of both.

  • Author

If you fail the puzzle it re-scrambles the rooms. I've set it up to guess what the best next room to take is by blacklisting dead ends and avoiding long tunnels. Since there's only 8 rooms along the perimeter, the logic works out pretty well no matter where you are.

there is a config for a path you can manually code the path from the config or you could write a method to determine the path

 

 

i did it the noob way and manually hand coded paths got like 20 deep but there is like like 100+ paths can't remember


here is some code to help you

 

with this project

 

		private final int TUNNEL_PATH_CONFIG_ID = 452;

        private int getSpawnAreaValue() {
		return methodProvider.getConfigs().get(TUNNEL_PATH_CONFIG_ID) & 0b1111000000;
	}

	public String getSpawnLocation() {
		switch (getSpawnAreaValue()) {
		case 64:
			return "North west";
		case 128:
			return "North east";
		case 256:
			return "South west";
		case 512:
			return "South east";
		}
		return null;
	}

this will determine which side the puzzle is on

	public List<Integer> getBlockedDoors() {
		List<Integer> list = new ArrayList<Integer>();
		for (int pathNo = 1; pathNo <= 16; pathNo++) {
			int bitPos = pathNo + 9;
			if ((methodProvider.getConfigs().get(TUNNEL_PATH_CONFIG_ID) & (1 << bitPos)) != 0) {
				list.add(pathNo);
			}
		}
		return list;
	}

	public String getPuzzleDoorLocation() {
		if (!getBlockedDoors().contains(5)) {
			return "North";
		}
		if (!getBlockedDoors().contains(10)) {
			return "East";
		}
		if (!getBlockedDoors().contains(12)) {
			return "South";
		}
		if (!getBlockedDoors().contains(9)) {
			return "West";
		}
		return "Unknown";
	}

// an enum for the brothers

package core.barrows.brothers;

import org.osbot.script.MethodProvider;

public class BarrowsBrothers {
	private final int KILL_COUNT_CONFIG_ID = 453;
	private final int TUNNEL_PATH_CONFIG_ID = 452;

	private MethodProvider methodProvider;

	public BarrowsBrothers(MethodProvider methodProvider) {
		this.methodProvider = methodProvider;
	}

	
	private final int SKELETON_CONFIG_VALUE = 136000;
	private final int BLOODWORM_CONFIG_VALUE = 134400;
	private final int CHEST_OPENED_CONFIG_VALUE = 65536;
	enum Brothers {
		AHRIMS("Ahrim the Blighted", 98, "Magic", 137345), DHAROKS(
				"Dharok the Wretched", 115, "Melee", 138434), GUTHANS(
				"Guthan the Infested", 115, "Melee", 138436), KARILS(
				"Karil the Tainted", 98, "Ranged", 137352), TORAGS(
				"Torag the Corrupted", 115, "Melee", 138448), VERACS(
				"Verac the Defiled", 115, "Melee", 138464);

		private String name;
		private int combatLevel;
		private String attackStyle;
		private int configValue;

		Brothers(final String name, final int combatLevel,
				final String attackStyle, final int configValue) {
			this.name = name;
			this.combatLevel = combatLevel;
			this.attackStyle = attackStyle;
			this.configValue = configValue;
		}

		public String getName() {
			return name;
		}

		public int getCombatLevel() {
			return combatLevel;
		}

		public String getAttackStyle() {
			return attackStyle;
		}

		public int getConfigValue() {
			return configValue;
		}
	}

	public boolean isMyTunnel(Brothers brother) {
		return getBoss().equals(brother);
	}


	public int getBarrowsBossValue() {
		return methodProvider.getConfigs().get(TUNNEL_PATH_CONFIG_ID) & 0b111111;
	}

	public Brothers getBoss() {
		switch (getBarrowsBossValue()) {

		case 1:
			return Brothers.AHRIMS;

		case 2:
			return Brothers.DHAROKS;

		case 4:
			return Brothers.GUTHANS;

		case 8:
			return Brothers.KARILS;

		case 16:
			return Brothers.TORAGS;

		case 32:
			return Brothers.VERACS;
		default:
			return null;
		}
	}
}

  • Author

there is a config for a path you can manually code the path from the config or you could write a method to determine the path

 

 

i did it the noob way and manually hand coded paths got like 20 deep but there is like like 100+ paths can't remember

here is some code to help you

 

with this project

 

		private final int TUNNEL_PATH_CONFIG_ID = 452;

        private int getSpawnAreaValue() {
		return methodProvider.getConfigs().get(TUNNEL_PATH_CONFIG_ID) & 0b1111000000;
	}

	public String getSpawnLocation() {
		switch (getSpawnAreaValue()) {
		case 64:
			return "North west";
		case 128:
			return "North east";
		case 256:
			return "South west";
		case 512:
			return "South east";
		}
		return null;
	}

this will determine which side the puzzle is on

	public List<Integer> getBlockedDoors() {
		List<Integer> list = new ArrayList<Integer>();
		for (int pathNo = 1; pathNo <= 16; pathNo++) {
			int bitPos = pathNo + 9;
			if ((methodProvider.getConfigs().get(TUNNEL_PATH_CONFIG_ID) & (1 << bitPos)) != 0) {
				list.add(pathNo);
			}
		}
		return list;
	}

	public String getPuzzleDoorLocation() {
		if (!getBlockedDoors().contains(5)) {
			return "North";
		}
		if (!getBlockedDoors().contains(10)) {
			return "East";
		}
		if (!getBlockedDoors().contains(12)) {
			return "South";
		}
		if (!getBlockedDoors().contains(9)) {
			return "West";
		}
		return "Unknown";
	}

// an enum for the brothers

package core.barrows.brothers;

import org.osbot.script.MethodProvider;

public class BarrowsBrothers {
	private final int KILL_COUNT_CONFIG_ID = 453;
	private final int TUNNEL_PATH_CONFIG_ID = 452;

	private MethodProvider methodProvider;

	public BarrowsBrothers(MethodProvider methodProvider) {
		this.methodProvider = methodProvider;
	}

	
	private final int SKELETON_CONFIG_VALUE = 136000;
	private final int BLOODWORM_CONFIG_VALUE = 134400;
	private final int CHEST_OPENED_CONFIG_VALUE = 65536;
	enum Brothers {
		AHRIMS("Ahrim the Blighted", 98, "Magic", 137345), DHAROKS(
				"Dharok the Wretched", 115, "Melee", 138434), GUTHANS(
				"Guthan the Infested", 115, "Melee", 138436), KARILS(
				"Karil the Tainted", 98, "Ranged", 137352), TORAGS(
				"Torag the Corrupted", 115, "Melee", 138448), VERACS(
				"Verac the Defiled", 115, "Melee", 138464);

		private String name;
		private int combatLevel;
		private String attackStyle;
		private int configValue;

		Brothers(final String name, final int combatLevel,
				final String attackStyle, final int configValue) {
			this.name = name;
			this.combatLevel = combatLevel;
			this.attackStyle = attackStyle;
			this.configValue = configValue;
		}

		public String getName() {
			return name;
		}

		public int getCombatLevel() {
			return combatLevel;
		}

		public String getAttackStyle() {
			return attackStyle;
		}

		public int getConfigValue() {
			return configValue;
		}
	}

	public boolean isMyTunnel(Brothers brother) {
		return getBoss().equals(brother);
	}


	public int getBarrowsBossValue() {
		return methodProvider.getConfigs().get(TUNNEL_PATH_CONFIG_ID) & 0b111111;
	}

	public Brothers getBoss() {
		switch (getBarrowsBossValue()) {

		case 1:
			return Brothers.AHRIMS;

		case 2:
			return Brothers.DHAROKS;

		case 4:
			return Brothers.GUTHANS;

		case 8:
			return Brothers.KARILS;

		case 16:
			return Brothers.TORAGS;

		case 32:
			return Brothers.VERACS;
		default:
			return null;
		}
	}
}

 

 

Ooh, thank you very much! I suppose this will give me a specific reason to read up on bitwise operations >_>

"Next room is Chest room because it is the chest room"

Can't argue with this

 

Good luck with the project! Maybe we'll be competing eventually :p

Edited by FrostBug

  • 3 weeks later...
  • 4 weeks later...
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.