BrownBird Posted September 22, 2014 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?
Joseph Posted September 22, 2014 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
zScripz Posted September 22, 2014 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
BrownBird Posted September 22, 2014 Author 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
Alek Posted September 26, 2014 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
BrownBird Posted September 27, 2014 Author Posted September 27, 2014 Sweet, can't wait for the release! thanks