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.

Herb Ider [Find out what herb it is without Iding]

Featured Replies

So I made this thing, it does what the title says. Hover your mouse over the herb in your inventory or someones trade window to see what it is.

 

EDITED with the new script that supports trade windows.

 

Special thanks to Botrepreneur for the help in dynamically finding the slot being hovered over and making a nice enumerable list of herbs smile.png.

 

Due to popular opinion and request, the script is now back.

Any errors please post here so that I and others may see them. 

 

PLEASE LEAVE A LIKE, FEEDBACK or even a "THX"!!!!

FaysHerbs.zip

Edited by Fay

Nice one.

Here's a lil' rewrite, hopefully you'll learn something(s) from it ^^

Gl coding!

import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.Arrays;
import java.util.List;

import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.input.mouse.InventorySlotDestination;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Botrepreneur", info = "HerbIdentifier", name = "HerbIdentifier", version = 0.0, logo = "")
public class HerbIdentifier extends Script {

	private enum Herb {
		GUAM(199, 200),
		MARRENTIL(201, 202),
		TARROMIN(203, 204),
		HARRALANDER(205, 206),
		RANARR(207, 208),
		IRIT(209, 210),
		AVANTOE(211, 212),
		KWUARM(213, 214),
		CANDANTINE(215, 216),
		DWARF_WEED(217, 218),
		TORSOL(219, 220),
		LANTADYME(2485, 2486),
		SNAPDRAGON(3051, 3052);

		private final Integer[] ids;

		private Herb(final Integer... ids) {
			this.ids = ids;
		}

		public List<Integer> getIds() {
			return Arrays.asList(ids);
		}

	}

	@Override
	public int onLoop() throws InterruptedException {
		return Integer.MAX_VALUE;
	}

	public void onPaint(Graphics2D paint) {
		int slot = -1;
		Item item = null;
		Rectangle rectangle = null;
		if (getBot().getClient().isLoggedIn()) {
			Point point = getMouse().getPosition();
			for (int i = 0; i < 28; i++) {
				if ((InventorySlotDestination.getSlot(i)).contains(point)) {
					slot = i;
					break;
				}
			}
			if (slot > -1 && (item = getInventory().getItemInSlot(slot)) != null && item.getDefinition() != null && (rectangle = InventorySlotDestination.getSlot(slot)) != null) {
				int id = item.getId();
				String string = null;
				for (Herb herb : Herb.values()) {
					if (herb.getIds().contains(id)) {
						string = herb.toString();
						break;
					}
				}
				if (string != null) {
					paint.drawString(string, rectangle.x, rectangle.y);
				}
			}
		}
	}
	
}
  • Author

 

Here's a lil' rewrite, hopefully you'll learn something(s) from it ^^

Gl coding!

import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.Arrays;
import java.util.List;

import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.input.mouse.InventorySlotDestination;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Botrepreneur", info = "HerbIdentifier", name = "HerbIdentifier", version = 0.0, logo = "")
public class HerbIdentifier extends Script {

	private enum Herb {
		GUAM(199, 200),
		MARRENTIL(201, 202),
		TARROMIN(203, 204),
		HARRALANDER(205, 206),
		RANARR(207, 208),
		IRIT(209, 210),
		AVANTOE(211, 212),
		KWUARM(213, 214),
		CANDANTINE(215, 216),
		DWARF_WEED(217, 218),
		TORSOL(219, 220),
		LANTADYME(2485, 2486),
		SNAPDRAGON(3051, 3052);

		private final Integer[] ids;

		private Herb(final Integer... ids) {
			this.ids = ids;
		}

		public List<Integer> getIds() {
			return Arrays.asList(ids);
		}

	}

	@Override
	public int onLoop() throws InterruptedException {
		return Integer.MAX_VALUE;
	}

	public void onPaint(Graphics2D paint) {
		int slot = -1;
		Item item = null;
		Rectangle rectangle = null;
		if (getBot().getClient().isLoggedIn()) {
			Point point = getMouse().getPosition();
			for (int i = 0; i < 28; i++) {
				if ((InventorySlotDestination.getSlot(i)).contains(point)) {
					slot = i;
					break;
				}
			}
			if (slot > -1 && (item = getInventory().getItemInSlot(slot)) != null && item.getDefinition() != null && (rectangle = InventorySlotDestination.getSlot(slot)) != null) {
				int id = item.getId();
				String string = null;
				for (Herb herb : Herb.values()) {
					if (herb.getIds().contains(id)) {
						string = herb.toString();
						break;
					}
				}
				if (string != null) {
					paint.drawString(string, rectangle.x, rectangle.y);
				}
			}
		}
	}
	
}

 

Wow, thank you man. I was going to make an enum but I couldn't remember what it was called at 4 am, and I was having alot of trouble with dynamically setting i. This helps out alot :).

  • Author

Added in trade windows. Just start the script, turn on mouse input and hover over their item in trade for it to be identified. Also added Toadflax herbs because somehow I forgot it.

  • 4 weeks later...

Either I'm blind or there is no download link.

 

Since Herbifier isn't working atm, you should add the link. Sounds promising.

  • Author

where is the download link?

 

 

Either I'm blind or there is no download link.

 

Since Herbifier isn't working atm, you should add the link. Sounds promising.

 

 

I removed it because 36 people downloaded it and not ONE replied on the topic or said "Nice" or anything. It sucks when people just take your stuff and don't even leave a "Thx". I'll add the revised script up there soon. I currently don't have an account I am willing to sign into the client with as I only have my main so if someone wants to lend me a burner lvl 3 I'd love that too for testing and what not :).

I'll make a botting account tomorrow, you can use it for testing. Best of luck with the script.

We needed one of these badly.

  • Author

where is the download link?

 

 

I'll make a botting account tomorrow, you can use it for testing. Best of luck with the script.

 

 

We needed one of these badly.

 

 

Added the link back. You are all welcome to download it! :) I have not tested this with the newest version but it is compiled with the newest version of OSBot. So shouldn't have any problems.

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.