Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • How to interact with furnace screen Make All Moltenglass.


    jordyownn
     Share

    Recommended Posts

    Hi, i am making a molten glass smelter.

     

    This i what i have for the smelting function:

    private void smelt(){
            if(FurnaceArea.contains(getLocalPlayer())){
                GameObject Furnace = getGameObjects().closest("Furnace");
                if(getInventory().get("Bucket of sand").useOn(Furnace)) {
                    
                }
    
            } else {
                if (getWalking().walk(FurnaceArea.getCenter())) {
                    sleep(Calculations.random(3000,6000));
                }
            }
        }
    

    i want to know when if(getInventory().get("Bucket of sand").useOn(Furnace)) returns true.

     

    How do i interact with the molten glass furnace screen and select make all?

     

    Thanks in advance.

    Link to comment
    Share on other sites

    Hi there! First of all you should always null check everything. What happens when Furnace is null and you try to interact with it? It logs a bunch of NullPointerExceptions. Now those are very annoying errors to see. Luckily they are easy to fix. Simply check if Furnace is null before interacting with it.

    if (Furnace != null) {
    //continue to interact
    }
    

    To interact the glass furnace screen, use widgets. And remember to null check widgets too!

     

    Good luck =)

    Link to comment
    Share on other sites

    Hey, thanks for helping.

     

    I know i need to use widgets, but how do i use them, this is my very first script.

     

    Can somebody write my an example snippet?

     

    is it something like this?

    getWidgets().getWidgetChild().interact("Make All");
    
    Link to comment
    Share on other sites

    Try this

    WidgetChild child = getWidgets().getWidgetChildrenContainingText("Molten glass or whatever the name is").get(0);
    if(child != null) child.interact("Make All");

    Or this if you know how to find widget ids with game debugger.

    WidgetChild child = getWidgets().getWidget(parentId).getChild(childId);
    if(child != null) child.interact("Make All");
    Edited by rexas
    Link to comment
    Share on other sites

     

    Try this

    WidgetChild child = getWidgets().getWidgetChildrenContainingText("Molten glass or whatever the name is").get(0);
    if(child != null) child.interact("Make All");

    Thank you for this, this is working.

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.