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
  • Can not get Widgets working


    bigbotbud

    Recommended Posts

    - I have my widget defined:

    private final WidgetChild TEST = getWidgets().getChildWidget(Parent, Child); (actual numbers not names).

     

    - I then used the widget in an if statement: 

    if(TEST != null && TEST.isVisible()){

    TEST.interact("Make X");

    getKeyboard().type("28");

    }

    sleepUntil(new Condition(){

    public boolean verify(){

    return !getInventory().contains(item);

    }

    },2000);

     

    }

    else {

    getInventory().interact("item", "Use");

    GameObject furnace = getGameObjects().closest("Entity");

    Entity.interact("use");

    }

     

    All that happens, is the script keeps using the item onto the entity and once the interface pops up it uses the item and puts it up where the entity would be, it does not recognize the interface.

    Link to comment
    Share on other sites

    - I have my widget defined:

    private final WidgetChild TEST = getWidgets().getChildWidget(Parent, Child); (actual numbers not names).

     

    - I then used the widget in an if statement: 

    if(TEST != null && TEST.isVisible()){

    TEST.interact("Make X");

    getKeyboard().type("28");

    }

    sleepUntil(new Condition(){

    public boolean verify(){

    return !getInventory().contains(item);

    }

    },2000);

     

    }

    else {

    getInventory().interact("item", "Use");

    GameObject furnace = getGameObjects().closest("Entity");

    Entity.interact("use");

    }

     

    All that happens, is the script keeps using the item onto the entity and once the interface pops up it uses the item and puts it up where the entity would be, it does not recognize the interface.

    Have you logged anything to see if it's returning what you want? Try logging the widget, I've personally never logged a widget, but it may come back with something different.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.