senpai jinkusu Posted August 28, 2015 Share Posted August 28, 2015 i know how to do simple interaction with entity.interact(); however how would you interact with entities such as a furnace that bring up a menu afterwards? Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted August 28, 2015 Share Posted August 28, 2015 It's similar to http://osbot.org/forum/topic/79422-cook-all-option/ Quote Link to comment Share on other sites More sharing options...
senpai jinkusu Posted August 28, 2015 Author Share Posted August 28, 2015 (edited) It's similar to http://osbot.org/forum/topic/79422-cook-all-option/ thanks! one more question, how do i check if the player is currently performing the action stated by the widget, ie. if i smelt 10 bars how can i check if the action was completed?, or if the player is currently smelting ( i could simply make a routine to count for the items created in the inventory but is there an easier way?) edit: ill just store in a boolean to see if the player is currently smelting for now Edited August 28, 2015 by senpai jinkusu Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted August 28, 2015 Share Posted August 28, 2015 thanks! one more question, how do i check if the player is currently performing the action stated by the widget, ie. if i smelt 10 bars how can i check if the action was completed? ( i could simply make a routine to count for the items created in the inventory but is there an easier way?) I think this would help http://osbot.org/forum/topic/80839-isanimating/ try to put the two things together Quote Link to comment Share on other sites More sharing options...
senpai jinkusu Posted August 28, 2015 Author Share Posted August 28, 2015 I think this would help http://osbot.org/forum/topic/80839-isanimating/ try to put the two things together ill give that a try, however the widget doesn't seem to be working, this is my code for steel bars RS2Widget smeltMenu = widgets.get(311,30); if(smeltMenu != null && smeltMenu.isVisible()) smeltMenu.interact("Smelt 10"); i can successfully interact with the furnace, however it doesn't interact with the steel bar widget, is there anything I could be missing? Quote Link to comment Share on other sites More sharing options...
Chris Posted August 28, 2015 Share Posted August 28, 2015 ill give that a try, however the widget doesn't seem to be working, this is my code for steel bars RS2Widget smeltMenu = widgets.get(311,30); if(smeltMenu != null && smeltMenu.isVisible()) smeltMenu.interact("Smelt 10"); i can successfully interact with the furnace, however it doesn't interact with the steel bar widget, is there anything I could be missing? make sure you got the correct widget #'s Quote Link to comment Share on other sites More sharing options...
senpai jinkusu Posted August 28, 2015 Author Share Posted August 28, 2015 make sure you got the correct widget #'s I am almost sure im using the correct one https://gyazo.com/3283400a03e61ea57100240ab3cd20c1 Quote Link to comment Share on other sites More sharing options...
Chris Posted August 28, 2015 Share Posted August 28, 2015 RS2Widget smeltMenu = widgets.get(311,30); if(smeltMenu != null && smeltMenu.isVisible()) smeltMenu.interact("Smelt 10"); smeltMenu.interact("Smelt 10"); "Smelt 10" is what the menu says? it has to be exact wording Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted August 28, 2015 Share Posted August 28, 2015 (edited) The correct action is actually Smelt 10 <col=ff9040>Steel Edited August 28, 2015 by Flamezzz 1 Quote Link to comment Share on other sites More sharing options...
senpai jinkusu Posted August 28, 2015 Author Share Posted August 28, 2015 The correct action is actually Smelt 10 <col=ff9040>Steel is that what i type as the argument then? Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted August 28, 2015 Share Posted August 28, 2015 is that what i type as the argument then? Ye you could do that. I remember this was discussed somewhere and there might be a better solution. Quote Link to comment Share on other sites More sharing options...
senpai jinkusu Posted August 28, 2015 Author Share Posted August 28, 2015 (edited) Ye you could do that. I remember this was discussed somewhere and there might be a better solution. i don't know where this was discussed, also not even this seems to work so i think all hope is lost for this method lol. for now i will stick with the following code mouse.move(260,410); mouse.click(true); mouse.click(253,460,false); isSmelting = true; Edited August 28, 2015 by senpai jinkusu Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted August 28, 2015 Share Posted August 28, 2015 i don't know where this was discussed, also not even this seems to work so i think all hope is lost for this method lol. for now i will stick with the following code mouse.move(260,410); mouse.click(true); mouse.click(253,460,false); isSmelting = true; Oh well it really should work. If you post some of your code I can take a look at it. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted August 29, 2015 Share Posted August 29, 2015 try using something like.. List<RS2Widget> smeltOpts = getWidgets().containingText("Smelt 10"); if(!smeltOpts.isEmpty()) { RS2Widget opt = smeltOpts.get(0); getMouse().click(new WidgetDestination(getBot(), opt)); } 1 Quote Link to comment Share on other sites More sharing options...
senpai jinkusu Posted August 29, 2015 Author Share Posted August 29, 2015 (edited) try using something like.. List<RS2Widget> smeltOpts = getWidgets().containingText("Smelt 10");if(!smeltOpts.isEmpty()) { RS2Widget opt = smeltOpts.get(0); getMouse().click(new WidgetDestination(getBot(), opt));} Nifty, I will look further into this when I get the chance Edited August 29, 2015 by senpai jinkusu Quote Link to comment Share on other sites More sharing options...