August 28, 201510 yr 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?
August 28, 201510 yr Author 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, 201510 yr by senpai jinkusu
August 28, 201510 yr 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
August 28, 201510 yr Author 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?
August 28, 201510 yr 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
August 28, 201510 yr Author make sure you got the correct widget #'s I am almost sure im using the correct one https://gyazo.com/3283400a03e61ea57100240ab3cd20c1
August 28, 201510 yr 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
August 28, 201510 yr The correct action is actually Smelt 10 <col=ff9040>Steel Edited August 28, 201510 yr by Flamezzz
August 28, 201510 yr Author The correct action is actually Smelt 10 <col=ff9040>Steel is that what i type as the argument then?
August 28, 201510 yr 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.
August 28, 201510 yr Author 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, 201510 yr by senpai jinkusu
August 28, 201510 yr 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.
August 29, 201510 yr 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)); }
August 29, 201510 yr Author 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, 201510 yr by senpai jinkusu
Create an account or sign in to comment