None of these variables update more than once (at the start), and are probably causing the NPE.
boolean gotCopperAndTinOre = getInventory().contains("Copper ore", "Tin ore");
boolean isSmeltScreenVisible = getWidgets().get(270,14).isVisible();
boolean inSmeltArea = smeltArea.contains(myPosition());
RS2Widget bronzeBarsButton = getWidgets().get(270,14);
RS2Object smelter = getObjects().closest("Furnace");
You'll want to have a function for each.
Also, you need to check for !null before .isVisible()