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.

deselect inventory item snippet

Featured Replies

  • Author

Doesn't have anything to do with misclicks. But dw about it :P

(unless you were talking about deadspace in the chatbox, which I don't think exists, but I could be wrong..)

Fair nuf

Put it to a test, tell someone to trade you and click on an item and trade to deselect it

Put it to a test, tell someone to trade you and click on an item and trade to deselect it

 

If the trade option is in the mouse destination's area it will result in a trade, no need for a test :p

  • Author

If the trade option is in the mouse destination's area it will result in a trade, no need for a test :p

I highly doubt it

  • Author

I'm talking about having sn item selected and trying to accept a trade. I don't think it's possible. I'll test my theory out tomorrow and report back

I'm talking about having sn item selected and trying to accept a trade. I don't think it's possible. I'll test my theory out tomorrow and report back

 

You are right, it will deselect and would only accept the trade if it double clicks for some reason :p

I kinda forgot about the context, my bad ph34r.png  <3

You are right, it will deselect and would only accept the trade if it double clicks for some reason tongue.png

I kinda forgot about the context, my bad ph34r.png  QwPha8E.png

 

Thus what I was arguing before. Due to the fact that I have no internet at home at the moment, I couldn't prove it. Like I was saying, if the client misclicks, ie. double clicks, then it could mess up. Otherwise, it would be a safe area to click in. :P

Thus what I was arguing before. Due to the fact that I have no internet at home at the moment, I couldn't prove it. Like I was saying, if the client misclicks, ie. double clicks, then it could mess up. Otherwise, it would be a safe area to click in. tongue.png

 

Yeah sorry I thought you meant another kind of misclick :p

My bad brochachos

Yeah sorry I thought you meant another kind of misclick tongue.png

My bad brochachos

 

Haha, its all good man. Im just mad that I dont have internet at my house. t.t

Here's how I do it (edited):

	/**
	 * @author Botrepreneur 
	 * @throws InterruptedException 
	 * @Version: 00.11 
	 */
	
	public static boolean deselect(Script script) throws InterruptedException {
		Timer timer = new Timer();
		while (script.inventory.isItemSelected() && timer.getElapsed() < 30000L) {
			// GET ALL OPENABLE TABS:
			List<Tab> openableTabs = new ArrayList<Tab>();
			for (Tab tab : Tab.values()) {
				if (!tab.isOpen(script.bot) && !tab.isDisabled(script.bot)) {
					openableTabs.add(tab);
				}
			}
			if (openableTabs != null && !openableTabs.isEmpty()) {
				int i = MethodProvider.random(0, openableTabs.size() - 1);
				if (openableTabs.get(i) != null && script.tabs.open(openableTabs.get(i))) {
					MethodProvider.sleep(MethodProvider.random(600, 900));
				}
			} else {
				// DEAD SPACE, could use interface values instead
				Rectangle deadSpaceLeftColumn = new Rectangle(520, 205, 25, 260);
				Rectangle deadSpaceRightColumn = new Rectangle(740, 205, 25, 260);
				Rectangle deadSpaceRightFromMap = new Rectangle(720, 10, 45, 155);
				Rectangle[] deadSpaceAll = new Rectangle[] { deadSpaceLeftColumn, deadSpaceRightColumn, deadSpaceRightFromMap };
				int i = MethodProvider.random(0, deadSpaceAll.length - 1);
				if (deadSpaceAll[i] != null && MoveMouse.toRectangle(script, deadSpaceAll[i], true, 3)) {
					MethodProvider.sleep(MethodProvider.random(600, 900));
				}
			}
		}
		return !script.inventory.isItemSelected();
	}

Edited by Botrepreneur

  • Author

                        else {
				// DEAD SPACE
				Rectangle deadSpaceLeftColumn = new Rectangle(520, 205, 25, 260);
				Rectangle deadSpaceRightColumn = new Rectangle(740, 205, 25, 260);
				Rectangle deadSpaceRightFromMap = new Rectangle(720, 10, 45, 155);
				Rectangle[] deadSpaceAll = new Rectangle[] { deadSpaceLeftColumn, deadSpaceRightColumn, deadSpaceRightFromMap };
				int i = MethodProvider.random(0, deadSpaceAll.length - 1);
				if (deadSpaceAll[i] != null && MoveMouse.toRectangle(script, deadSpaceAll[i], true, 3)) {
					MethodProvider.sleep(MethodProvider.random(600, 900));
				}
			}

where you have this at is a bit useless since. The code below will never be empty nor null

if (openableTabs != null && !openableTabs.isEmpty()) {

So you should add a boolean to switch between both methods.

 

Also, rather then putting the tabs in an arraylist couldnt you loop through all tab, add a boolean that check to see if it isnt open. Interact with it and add a break statement to end the loop.

 

Plus, why does the method return item is selected true

		return script.inventory.isItemSelected();
 where you have this at is a bit useless since. The code below will never be empty nor null

 

For situations where no tab is openable (randomevents  for example).

The openableTabs array will be empty when nothing is added to it (if all tabs are disabled).

 

 

 Also, rather then putting the tabs in an arraylist couldnt you loop through all tab, add a boolean that check to see if it isnt open. Interact with it and add a break statement to end the loop.

 

You absolutely could, the reason I add all openable tabs to an array is so that I can open a random one from that list. I like randomization tongue.png

 

 Plus, why does the method return item is selected true

 

Should be !script.inventory.isItemSelected() indeed, thanks.

 

Edit: second time I fuck up a boolean return value today facep.gif

Edited by Botrepreneur

  • Author

For situations where no tab is openable (randomevents  for example).

The openableTabs array will be empty when nothing is added to it (if all tabs are disabled).

 

 

 

You absolutely could, the reason I add all openable tabs to an array is so that I can open a random one from that list. I like randomization tongue.png

 

 

Should be !script.inventory.isItemSelected() indeed, thanks.

 

Edit: second time I fuck up a boolean return value today facep.gif

correct me if im wrong, but i havent seen any random that disable all tabs. and i love randomization

am i missing something? why not just click the item again so then it is deselected? seems a bit much, that is all ^_^

  • Author

am i missing something? why not just click the item again so then it is deselected? seems a bit much, that is all happy.png

check the op wink.png

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.