jarred788 9 Share Posted September 15, 2017 Hello, I have been trying to make Wind strike my auto cast spell but i can find the Wind strike widget. Any help would be nice! Thanks! Link to comment Share on other sites More sharing options...
Roma 2219 Share Posted September 15, 2017 https://dreambot.org/javadocs/org/dreambot/api/methods/magic/Spell.html #getChild Link to comment Share on other sites More sharing options...
jarred788 9 Author Share Posted September 15, 2017 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. Link to comment Share on other sites More sharing options...
LogicSoup 92 Share Posted September 15, 2017 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 More sharing options...
Roma 2219 Share Posted September 15, 2017 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 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 More sharing options...
jarred788 9 Author Share Posted September 15, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.