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.

Spam clicking the minimap

Featured Replies

None of my script use the bult-in interact(""), but when ever i get in a random, it spam click the minimap when it try to click an entity

Here is the method that I use, you can use it if you like

 


	public static boolean interact(Entity entity, Script script, String str)
			throws InterruptedException {
		if (entity.getPosition().isVisible(script.bot)) {
			MouseDestination loc = entity.getMouseDestination();
			script.client.moveMouse(loc, false);
			if (loc.destinationReached(script.client.getMousePosition())) {
				click(script, str);
			}
		} else if (isTileOnMiniMap(entity.getPosition(), script.bot)) {
			// script.walking.walk(entity.getPosition(), true); Use what ever
			// walking method you like here, Pm if you like my
			script.sleep(1000);
		}
		return false;
	}

	private static int ySetOff = 18;
	private static int indexOffSet = 14;

	public static boolean isTileOnMiniMap(final Position tile, Bot bot) {
		return !org.osbot.script.rs2.utility.Utilities.getMinimapScreenCoordinate(bot,
				tile.getX(), tile.getY()).equals(new Point(-1, -1));
	}

	public static boolean click(Script methods, String str) throws InterruptedException {
		if (contains(methods, str)) {
			if (methods.client.getMenu().get(0).action.contains(str)) {
				methods.client.clickMouse(false);
				return true;
			} else {
				if (!methods.client.isMenuOpen())
					methods.client.clickMouse(true);
				if (methods.client.isMenuOpen()) {
					int i = getIndex(methods, str);
					MouseDestination click = new RectangleDestination(new Rectangle(
							methods.client.getMenuX(), methods.client.getMenuY()
									+ ySetOff + (i * indexOffSet + 1),
							methods.client.getMenuWidth(), indexOffSet));
					methods.client.moveMouse(click, false);
					methods.sleep(100);
					if (click.destinationReached(methods.client.getMousePosition())) {
						methods.client.clickMouse(false);
						return true;
					}
				}
			}
		}
		return false;
	}

	public static int getIndex(Script methods, String str) {
		List<Option> s = methods.client.getMenu();
		for (int i = 0; i < s.size(); i++) {
			if (s.get(i).action.contains(str)) {
				return i;
			}

		}
		return -1;
	}

	public static boolean contains(Script methods, String str) {
		for (Option n : methods.client.getMenu()) {
			if (n.action.contains(str))
				return true;
		}
		return false;
	}

Random event you mean? I think the random event solver may be causing that as your script pauses when a Random event take a place. Correct me if im wrong.

  • Author

Random event you mean? I think the random event solver may be causing that as your script pauses when a Random event take a place. Correct me if im wrong.

 

when ever the script try to click  something that moving, it try to move by using the minimap even thought the npc/entily is on the screen.

 

My script do not use the built-in method for the entily.interact("");, Also, my script stop if it out of the areas.

 

 

 

  • Author

I dont know.. check your methods again. I dont have any idea what could be causing that.

 

The method i use is fine, It the built-in method that spam click the minimap

Guest
This topic is now closed to further replies.

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.