Coder Social home page Coder Social logo

dreamdax's Introduction

DreamDax - Dreambot version of DaxWalker

Ported from RSPeers version of DaxWalker, this "Read me" is copied and modified from them aswell.

Fast and customizable webwalker for Dreambot. Instantly calculates a path to your destination and walks it. Accounts for path requirements (quests, items, level), teleports, and shortcuts. Handles script pauses and stops. Dynamic walking conditions and exit conditions. Features collision aware randomness when selecting which tiles to walk on.

Creating DaxWalker instance

private static DaxWalker daxWalker;

public static DaxWalker getDaxWalker() {
    return daxWalker;
}

static {
    try {
        daxWalker = new DaxWalker(new Server("key", "PUBLIC-KEY"));
    } catch (Exception e) {
        e.printStackTrace();
    }

}

or you can create it like this:

DaxWalker daxWalker = new DaxWalker(new Server("sub_DPjXXzL5DeSiPf", "PUBLIC-KEY"));

Walking to location

This will check your available teleports and use if deemed necessary. The cost of a teleport versus walking the distance is defined in org.dreambot.walker.dax.engine.definitions.Teleport

Walker.getDaxWalker().walkTo(new Tile(1, 2, 3));

Walking to bank

Walker.getDaxWalker().walkToBank();

Walking to specific bank

Walker.getDaxWalker().walkToBank(RSBank.VARROCK_EAST);

Adding Custom Stopping Conditions/Passive Actions

This condition will be checked in between walks and idle actions.

Walker.getDaxWalker().walkTo(new Tile(3145, 9914, 0), () -> {
    if (Players.localPlayer().getHealthPercent() < 20) {
        Food.eat(); // eat example
    }
    return false; // false to continue walking after check. true to exit out of walker.
});

Disabling Teleports

Walker.getDaxWalker().setUseTeleports(false);

Contributing

The following links will direct you to where to look for contributing to the Walker. Create a pull request and I'll look it over. Thanks for contributing!

package org.dreambot.walker.dax.engine.definitions;
STRONGHOLD_PROMPT(() -> Widgets.getWidgetChild(579, 17)),
WILDERNESS_PROMPT(() -> Widgets.getWidgetChild(475, 11));
VARROCK_TELEPORT(35, new Tile(3212, 3424, 0), () -> Magic.canCast(Normal.VARROCK_TELEPORT), () -> Magic.castSpell(Normal.VARROCK_TELEPORT)),
VARROCK_TELEPORT_TAB(35, new Tile(3212, 3424, 0), () -> Inventory.count(8007) > 0, () -> {
    Item item = Inventory.get(8007);
    return item != null && InventoryHandler.interactItem(item, "Break");
}),
public static final Pattern RING_OF_WEALTH_MATCHER = Pattern.compile("(?i)ring of wealth.?\\(.+");
public static final Pattern RING_OF_DUELING_MATCHER = Pattern.compile("(?i)ring of dueling.?\\(.+");
public static final Pattern NECKLACE_OF_PASSAGE_MATCHER = Pattern.compile("(?i)necklace of passage.?\\(.+");
public static final Pattern COMBAT_BRACE_MATCHER = Pattern.compile("(?i)combat brace.+\\(.+");
public static final Pattern GAMES_NECKLACE_MATCHER = Pattern.compile("(?i)game.+neck.+\\(.+");
public static final Pattern GLORY_MATCHER = Pattern.compile("(?i).+glory.*\\(.+");
private StrongHoldAnswers() {
        this.set.addAll(Arrays.asList("Use the Account Recovery System.",
                "Nobody.",
                "Don't tell them anything and click the 'Report Abuse' button.",
                "Me.",
                "Only on the RuneScape website.",
                "Report the incident and do not click any links.",
                "Authenticator and two-step login on my registered email.",
                "No way! You'll just take my gold for your own! Reported!",
                "No.",
                "Don't give them the information and send an 'Abuse Report'.",
                "Don't give them my password.",
                "The birthday of a famous person or event.",
                "Through account settings on runescape.com.",
                "Secure my device and reset my RuneScape password.",
                "Report the player for phishing.",
                "Don't click any links, forward the email to [email protected].",
                "Inform Jagex by emailing [email protected].",
                "Don't give out your password to anyone. Not even close friends.",
                "Politely tell them no and then use the 'Report Abuse' button.",
                "Set up 2 step authentication with my email provider.",
                "No, you should never buy a RuneScape account.",
                "Do not visit the website and report the player who messaged you.",
                "Only on the RuneScape website.",
                "Don't type in my password backwards and report the player.",
                "Virus scan my device then change my password.",
                "No, you should never allow anyone to level your account.",
                "Don't give out your password to anyone. Not even close friends.",
                "Report the stream as a scam. Real Jagex streams have a 'verified' mark.",
                "Read the text and follow the advice given.",
                "No way! I'm reporting you to Jagex!",
                "Talk to any banker in RuneScape.",
                "Secure my device and reset my RuneScape password.",
                "Don't share your information and report the player."));
    }
public static final PathLink KARAMJA_PORT_SARIM = new PathLink(new Tile(2953, 3146, 0), new Tile(3029, 3217, 0),
            (start, end, walkCondition) -> EntityHandler.handleWithAction(Pattern.compile("(?i)pay.fare"), start, end, walkCondition));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.