Jump to content

Item on a Table


BrownBird

Recommended Posts

Having issues with interacting with a groundObject on a table, of course when you use grountItem to interact with it'll look for it on the tile but what if it's on a table? Is there a work around for this? :huh:

There has to be some work around, especially with all these new event handler. Interaction event, all these mouse methods that let you move and click shit at different location. It's possible

Link to comment
Share on other sites

	public boolean interactWithTableItem(GroundItem tableItem, String action,
			int tableHeight) throws InterruptedException {
		Point p = org.osbot.script.rs2.utility.Utilities.getScreenCoordinates(
				bot, tableItem.getGridX(), tableItem.getGridY(), tableHeight);
		int height = (int) tableItem.getMouseDestination().getBoundingBox()
				.getHeight();
		int width = (int) tableItem.getMouseDestination().getBoundingBox()
				.getWidth();
		return selectOption(null, new RectangleDestination(p.x - width / 2, p.y
				- height / 2, width, height), action, false);
	}

this was old code i used in osbot 1, with a little tinkering it should work

Link to comment
Share on other sites

	public boolean interactWithTableItem(GroundItem tableItem, String action,
			int tableHeight) throws InterruptedException {
		Point p = org.osbot.script.rs2.utility.Utilities.getScreenCoordinates(
				bot, tableItem.getGridX(), tableItem.getGridY(), tableHeight);
		int height = (int) tableItem.getMouseDestination().getBoundingBox()
				.getHeight();
		int width = (int) tableItem.getMouseDestination().getBoundingBox()
				.getWidth();
		return selectOption(null, new RectangleDestination(p.x - width / 2, p.y
				- height / 2, width, height), action, false);
	}

this was old code i used in osbot 1, with a little tinkering it should work

 

 

Thanks I'll try it out :)

 

I'll look into making a fix for this.

 

Sweet Thanks biggrin.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...