jarred788 9 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!
Roma 2221 Posted September 15, 2017 https://dreambot.org/javadocs/org/dreambot/api/methods/magic/Spell.html #getChild
jarred788 9 Author 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.
LogicSoup 92 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); }
Roma 2221 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()
jarred788 9 Author 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.