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.

How to determine if interaction was successful

Featured Replies

Alright,

So for interacting with entity/position we can do this for event;

                
                			if (getMouse().getCrossHairColor().equals(CrossHairColor.YELLOW)) { //OR RED
                				setFinished();
                			}

But how am i supposed to do it for inventory items/widgets ?

Am i supposed to use CrossHairColor.NONE ?

I need this for my custom interaction method.

 

Edited by iJodix

for the invent could you not check the top left hand corner? Not looked from coding POV but you can see it changes from / 2 more options to ''->"16f39e846d520350e0bdec0d717ed078.gif

Edited by Goaks

Why wouldn't it be successful? Those things are static, so you can safely say success iff mouse.click is successful, right?

  • Author

Why wouldn't it be successful? Those things are static, so you can safely say success iff mouse.click is successful, right?

I'd rather double check as i don't want script to eff up.

But what for CrossHairColor.NONE is ? Am i supposed to use it for cases like this ?

Edited by iJodix

I'd rather double check as i don't want script to eff up.

But what for CrossHairColor.NONE is ? Am i supposed to use it for cases like this ?

 

Could you just use the isItemSelected() from the inventory API class?

click.item;
sleep(600);
if (item.isItemSelected()) {
do stuff
}

Or am I missing what your asking?

  • Author

Could you just use the isItemSelected() from the inventory API class?

click.item;
sleep(600);
if (item.isItemSelected()) {
do stuff
}

Or am I missing what your asking?

This would work for items that you don't have to equip/wield/drop,

Everyone wondering why i need this is because i'm writing my own custom interaction method.

This would work for items that you don't have to equip/wield/drop,

Everyone wondering why i need this is because i'm writing my own custom interaction method.

Got it I mean the interact boolean as stated would work however there is always a way to notice a change. equip something the character would change equipment wise and so on. I cant say I fully understand your end goal so it's harder to help out.

  • Author

>doesn't trust the interact() boolean doge.png

I need this for my custom interaction method :p

Got it I mean the interact boolean as stated would work however there is always a way to notice a change. equip something the character would change equipment wise and so on. I cant say I fully understand your end goal so it's harder to help out.

Alright, let me try to elobrate;

If you click on any entity successfully, a red crosshair appears, if you missclick, a yellow one appears,

But when you need to interact with widgets/inventory items like equip/drop/ etc no crosshair appears.

I need this for my custom interaction method tongue.png

Alright, let me try to elobrate;

If you click on any entity successfully, a red crosshair appears, if you missclick, a yellow one appears,

But when you need to interact with widgets/inventory items like equip/drop/ etc no crosshair appears.

 if you equip/drop it will disapear from invent. so take a count of item before and after. the difference should be 1. Else it failed

  • Author

 if you equip/drop it will disapear from invent. so take a count of item before and after. the difference should be 1. Else it failed

Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this.

Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this.

I was about to suggest this. I'm glad it worked out tho.

Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this.

 

Another idea might simply be to check if the mouse is within a slightly shrunken bounding box.

Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this.

The crosshair color is always None, unless you click somewhere (that triggers either red/yellow color). Checking for none does not solve your issue here.

 

There is no way to really confirm a click when you are interacting with interfaces/inventory/equipment.

 

https://dl.dropboxusercontent.com/s/e3znjjxqw0tht27/2016-02-27_18-04-54.mp4?dl=0

Edited by Krulvis

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.