cheavyrun Posted December 12, 2015 Share Posted December 12, 2015 (edited) How do I smelt bars in a furnace? Any help is thanked. Edited December 12, 2015 by cheavyrun Quote Link to comment Share on other sites More sharing options...
progamerz Posted December 12, 2015 Share Posted December 12, 2015 How do I smelt bars in a furnace? Any help is thanked. Get the required ores and click on the furnace and select the bar type. Quote Link to comment Share on other sites More sharing options...
cheavyrun Posted December 12, 2015 Author Share Posted December 12, 2015 Get the required ores and click on the furnace and select the bar type. I mean how to script it. Quote Link to comment Share on other sites More sharing options...
progamerz Posted December 12, 2015 Share Posted December 12, 2015 I mean how to script it. Umm, i am not sure. sorry Quote Link to comment Share on other sites More sharing options...
cheavyrun Posted December 12, 2015 Author Share Posted December 12, 2015 Umm, i am not sure. sorry No problem, by the way thanks for answering me. Quote Link to comment Share on other sites More sharing options...
Apaec Posted December 12, 2015 Share Posted December 12, 2015 what bit are you strugging with? The interfaces part? the using ore/bars on furnace part? the interaction with furnace part? the checking when smelting part? Quote Link to comment Share on other sites More sharing options...
cheavyrun Posted December 12, 2015 Author Share Posted December 12, 2015 I managed to open the furnace interface, but the part you have to choose the ingot and the quantity is the one I´m struggling. Quote Link to comment Share on other sites More sharing options...
Explv Posted December 12, 2015 Share Posted December 12, 2015 I managed to open the furnace interface, but the part you have to choose the ingot and the quantity is the one I´m struggling. You will want to use widgets. Quote Link to comment Share on other sites More sharing options...
cheavyrun Posted December 12, 2015 Author Share Posted December 12, 2015 You will want to use widgets. Widgets? Quote Link to comment Share on other sites More sharing options...
Explv Posted December 12, 2015 Share Posted December 12, 2015 (edited) Widgets? Yes something like: RS2Widget bronzeWidget = getWidgets().getWidgetContainingText("Bronze"); if(bronzeWidget != null && bronzeWidget.isVisible()) bronzeWidget.interact("Smelt 10 Bronze"); Edited December 12, 2015 by Explv Quote Link to comment Share on other sites More sharing options...
cheavyrun Posted December 13, 2015 Author Share Posted December 13, 2015 Yes something like: RS2Widget bronzeWidget = getWidgets().getWidgetContainingText("Bronze"); if(bronzeWidget != null && bronzeWidget.isVisible()) bronzeWidget.interact("Smelt 10 Bronze"); Oh that works, thank´s a lot for your help. Quote Link to comment Share on other sites More sharing options...
herojord Posted December 13, 2015 Share Posted December 13, 2015 RS2Object furnace = objects.closest("Furnace"); RS2Widget options = widgets.get(311, 8); furnace.interact("Smelt"); if (options != null) { mouse.click(random(290, 325), random(393, 420), true); sleep(random(1000, 1500)); menu.selectAction("Smelt X Gold"); sleep(random(1000,1500); keyboard.typeString("" + random(29, 99), true); } Should be something like this. Add an extra null check on the keyboard type string. Quote Link to comment Share on other sites More sharing options...
cheavyrun Posted December 13, 2015 Author Share Posted December 13, 2015 RS2Object furnace = objects.closest("Furnace"); RS2Widget options = widgets.get(311, 8); furnace.interact("Smelt"); if (options != null) { mouse.click(random(290, 325), random(393, 420), true); sleep(random(1000, 1500)); menu.selectAction("Smelt X Gold"); sleep(random(1000,1500); keyboard.typeString("" + random(29, 99), true); } Should be something like this. Add an extra null check on the keyboard type string. Thank´s for your help. By the way nice profile pic. Quote Link to comment Share on other sites More sharing options...
herojord Posted December 13, 2015 Share Posted December 13, 2015 (edited) Thank´s for your help. By the way nice profile pic. yw, let me know when you get stuck. Edited December 13, 2015 by herojord Quote Link to comment Share on other sites More sharing options...
Explv Posted December 13, 2015 Share Posted December 13, 2015 Oh that works, thank´s a lot for your help. If you want to smelt a specific quantity you can do something like: // Select smelt X option for Bronze getWidgets().getWidgetContainingText("Bronze").interact("Smelt X Bronze"); // Sleep until the widget "Enter amount:" is visible (or for 5 seconds) new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { RS2Widget amountWidget = getWidgets().get(162, 32); return amountWidget != null && amountWidget.isVisible(); } }.sleep(); // Check that the widget is visible, if it is type the number 23 and enter RS2Widget amountWidget = getWidgets().get(162, 33); if(amountWidget != null && amountWidget.isVisible()) getKeyboard().typeString("23"); Quote Link to comment Share on other sites More sharing options...