June 25, 20169 yr I'm unable to import this, am i doing something wrong? I think i need to use this for webwalkevent, Can someone please teach me how to import this. Thanks
June 25, 20169 yr Author Why do you need this for webwalkevent? I need it to set a break condition so i can exit out of my webwalk, to make it less bot like i guess. Any ideas how? Such as webwalk(bank) if bank.isVisible interact with bank.
June 25, 20169 yr I need it to set a break condition so i can exit out of my webwalk, to make it less bot like i guess. Any ideas how? Such as webwalk(bank) if bank.isVisible interact with bank. Yes, you don't need the inoderoutefinder to set a break condition, all you have to use is the setbreakcondition method
June 25, 20169 yr Author Yes, you don't need the inoderoutefinder to set a break condition, all you have to use is the setbreakcondition method Any example snippets u can give me?
June 25, 20169 yr Any example snippets u can give me? Look at the api docs, it's quite a simple method
June 25, 20169 yr protected abstract static class WebWalk { private static WebWalkEvent e = null; private static boolean teleports = true; private static boolean skills = false; private static boolean quests = false; public static void allowTeleports(boolean b) { teleports = b; } public static void allowSkillLinked(boolean b) { skills = !b; } public static void allowQuestLinked(boolean b) { quests = !b; } public static void walk(Area bounds, Area walkArea, int thresh) { if (e == null || e.hasFailed() || e.hasFinished()) { e = new WebWalkEvent(walkArea); PathPreferenceProfile profile = new PathPreferenceProfile(); profile.setAllowTeleports(teleports); profile.ignoreAllSkillLinks(skills); profile.ignoreAllQuestLinks(quests); e.setPathPreferenceProfile(profile); e.setBreakCondition(new Condition() { @Override public boolean evaluate() { if (bounds.contains(s.myPlayer().getPosition()) && s.myPlayer().getPosition().distance(e.getDestination()) <= thresh) { return true; } return false; } }); s.execute(e); } } public static void walk(Position pos) { if (e == null || e.hasFailed() || e.hasFinished()) { e = new WebWalkEvent(pos); PathPreferenceProfile profile = new PathPreferenceProfile(); profile.setAllowTeleports(teleports); profile.ignoreAllSkillLinks(skills); profile.ignoreAllQuestLinks(quests); e.setPathPreferenceProfile(profile); e.setBreakCondition(new Condition() { @Override public boolean evaluate() { if (s.myPlayer().getPosition().equals(pos)) { return true; } return false; } }); s.execute(e); } } } I have static instances like this for various classes and helper methods so then I can just do WebWalk.walk(area, area, int); You can make them nonstatic / protected / abstract but I have this in an abstract class that all my tasks extend Edited June 25, 20169 yr by LoudPacks
Create an account or sign in to comment