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
  • Selecting spell for autocasting


    jarred788
     Share

    Recommended Posts

    I'm still confused, can u gimme an example of what u mean.

            WidgetChild spell = getWidgets().getWidgetChild(593,23);
            WidgetChild spell1 = getWidgets().getWidgetChild(201,0);
            if (getTabs().open(Tab.COMBAT)) {
                sleep(2000);
                if (spell.interact("Choose spell")) {
                    spell1.interact("Wind strike");
    
                }
    
            }
    

    that is what i got.

    Edited by jarred788
    Link to comment
    Share on other sites


    if (getTabs().getOpen() != Tab.COMBAT)
    getTabs().open(Tab.COMBAT);
    else {
    WidgetChild panel = getWidgets().getWidgetChild(593, 24);
    WidgetChild spell = getWidgets().getWidgetChild(201, 0, 1);
    if (panel != null && panel.isVisible() && panel.interact())
    sleepUntil(() -> !panel.isVisible(), 4000);
    else if (spell != null && spell.isVisible() && spell.interact())
    sleepUntil(() -> !spell.isVisible(), 4000);
    }
    Link to comment
    Share on other sites

    I'm still confused, can u gimme an example of what u mean.

            WidgetChild spell = getWidgets().getWidgetChild(593,23);
            WidgetChild spell1 = getWidgets().getWidgetChild(201,0);
            if (getTabs().open(Tab.COMBAT)) {
                sleep(2000);
                if (spell.interact("Choose spell")) {
                    spell1.interact("Wind strike");
    
                }
    
            }
    

    that is what i got.

    Look at the classes that implement Spell

    t7gfG1V.png

    They represent the spell books. So in your case you should be looking at Normal https://dreambot.org/javadocs/org/dreambot/api/methods/magic/Normal.html

    To get the wind strike widget child you can do this: Normal.WIND_STRIKE.getChild()

    Link to comment
    Share on other sites

            if (getTabs().getOpen() != Tab.COMBAT)
                getTabs().open(Tab.COMBAT);
            else {
                WidgetChild panel = getWidgets().getWidgetChild(593, 24);
                WidgetChild spell = getWidgets().getWidgetChild(201, 0, 1);
                if (panel != null && panel.isVisible() && panel.interact())
                    sleepUntil(() -> !panel.isVisible(), 4000);
                else if (spell != null && spell.isVisible() && spell.interact())
                    sleepUntil(() -> !spell.isVisible(), 4000);
            }
    

    thanks alot :)

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     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.