December 12, 201510 yr How do I smelt bars in a furnace? Any help is thanked. Edited December 12, 201510 yr by cheavyrun
December 12, 201510 yr 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.
December 12, 201510 yr Author Get the required ores and click on the furnace and select the bar type. I mean how to script it.
December 12, 201510 yr Author Umm, i am not sure. sorry No problem, by the way thanks for answering me.
December 12, 201510 yr 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?
December 12, 201510 yr Author 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.
December 12, 201510 yr 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.
December 12, 201510 yr Widgets? Yes something like: RS2Widget bronzeWidget = getWidgets().getWidgetContainingText("Bronze"); if(bronzeWidget != null && bronzeWidget.isVisible()) bronzeWidget.interact("Smelt 10 Bronze"); Edited December 12, 201510 yr by Explv
December 13, 201510 yr Author 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.
December 13, 201510 yr 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.
December 13, 201510 yr Author 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.
December 13, 201510 yr Thank´s for your help. By the way nice profile pic. yw, let me know when you get stuck. Edited December 13, 201510 yr by herojord
December 13, 201510 yr 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");
Create an account or sign in to comment