log("BEGIN BALLS");
RS2Object furnace = objects.closest("Furnace");
RS2Widget smithFace = getWidgets().getWidgetContainingText(270, "How many");
if (furnace != null && furnace.interact("Smelt")) {
sleep(2000);
if (!myPlayer().isAnimating() && smithFace != null) {
getKeyboard().pressKey(32);
new ConditionalSleep(30000, 5000) {
@Override
public boolean condition() throws InterruptedException {
getMouse().moveOutsideScreen();
return getDialogues().isPendingContinuation() || !getInventory().contains("Steel bar") || !myPlayer().isAnimating();
}
}.sleep();
}
}
break;
Instead of this, what u can do, ur logic is a bit off here, if some1 or u started script with smith interface open, it would interact for no reason again with furnace, u can try using what i posted below, to fix this issue.
if smithface is not null and is visible
interact smith face or whatever
else
if furnace is not null and interact with furnace, sleep until widget x is not null and widget x is visible