RS2Object furnace = s.objects.closest("Furnace");
if (furnace != null && furnace.exists()) {
if (s.inventory.getItem("Gold bar").interact("Use")) {
if (furnace.interact("Use")) {
new ConditionalSleep(5500, 500) {
@Override
public boolean condition() throws InterruptedException {
return s.widgets
.getWidgetContainingText("would you like to make") != null;
}
}.sleep();
}
RS2Widget goldAmmy = s.widgets.get(446, 34);
if (goldAmmy != null && goldAmmy.isVisible()) {
goldAmmy.interact("Make-X");
Script.sleep(Script.random(1000, 2000));
if (isAmountPromptVisible()) {
if (s.getKeyboard().typeString("" + Script.random(27, 99), true)) {
new ConditionalSleep(60000, 1000) {
@Override
public boolean condition() throws InterruptedException {
return !s.inventory.contains("Gold bar") || mustContinue();
}
}.sleep();
}
}
}
}
}