BrownBird Posted September 22, 2014 Share Posted September 22, 2014 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? Link to comment Share on other sites More sharing options...
Joseph Posted September 22, 2014 Share Posted September 22, 2014 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 More sharing options...
zScripz Posted September 22, 2014 Share Posted September 22, 2014 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 More sharing options...
Alek Posted September 22, 2014 Share Posted September 22, 2014 I'll look into making a fix for this. Link to comment Share on other sites More sharing options...
BrownBird Posted September 22, 2014 Author Share Posted September 22, 2014 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 Link to comment Share on other sites More sharing options...
Alek Posted September 26, 2014 Share Posted September 26, 2014 OSBot 2.2.29: https://www.youtube.com/watch?v=W39uh3bCGYI For more information: http://osbot.org/forum/topic/59408-whats-new-osbot-api-developer-log-version-2229 Link to comment Share on other sites More sharing options...
BrownBird Posted September 27, 2014 Author Share Posted September 27, 2014 Sweet, can't wait for the release! thanks Link to comment Share on other sites More sharing options...