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
  • WebNode Path Builder


    Pyfa

    Recommended Posts

    This is a little side project I worked on that allows me to build WebNode paths that automatically connect into the existing WebNode map.

    You just click to create the path and it'll auto create code for you to use in building your script, the auto connection it shows visually use the same algorithm the client uses to find the nearest node.

    You can take a look at the website here:
    https://map.pyfa.dev/webnodes

    Link to comment
    Share on other sites

    • 1 month later...

    just used this to map a completely unmapped area. so much easier then doing it manually, plus useful for checking if areas are mapped or not. great tool. thoughts about open sourcing it? Oh also it appears to load very slowly for me. not really sure what causes that, although on a refresh it appears to be fine so it appears to cache whatever the issue is.

    Edited by TheHero
    Link to comment
    Share on other sites

    10 hours ago, TheHero said:

    just used this to map a completely unmapped area. so much easier then doing it manually, plus useful for checking if areas are mapped or not. great tool. thoughts about open sourcing it? Oh also it appears to load very slowly for me. not really sure what causes that, although on a refresh it appears to be fine so it appears to cache whatever the issue is.

    It's basically open source as is, I don't do any obfuscating of the code when it's delivered to the client but I may put it up on Github.

    Yeah loading times are iffy, it loads a large number of items (the image tiles) and most browsers limit the number of simultaneous connections. On top of that I'm using Cloudflare R2 which aggressively purges its cache.

     

    The only non open source bit right now is how I extract the webnodes, here's the snippet of how I do that.

     

    FileWriter fw = new FileWriter("webnodes.json", true);
    BufferedWriter bw = new BufferedWriter(fw);
    JsonObject jsObj = new JsonObject();
    JsonArray extractedNodes = new JsonArray();
    
    Iterator<AbstractWebNode> allWebNodes = WebFinder.getWebFinder().getAll().iterator();
    while (allWebNodes.hasNext()) {
        AbstractWebNode webNode = allWebNodes.next();
        JsonObject extractedNode = new JsonObject();
        extractedNode.addProperty("type", webNode.getType().toString());
        extractedNode.addProperty("x", webNode.getX());
        extractedNode.addProperty("y", webNode.getY());
        extractedNode.addProperty("z", webNode.getZ());
        JsonArray connectedNodes = new JsonArray();
        for (AbstractWebNode connectingNode : webNode.getConnections()) {
            JsonObject connectedNode = new JsonObject();
            connectedNode.addProperty("type", connectingNode.getType().toString());
            connectedNode.addProperty("x", connectingNode.getX());
            connectedNode.addProperty("y", connectingNode.getY());
            connectedNode.addProperty("z", connectingNode.getZ());
            connectedNodes.add(connectedNode);
        }
        extractedNode.add("connections", connectedNodes);
        extractedNodes.add(extractedNode);
    }
    jsObj.add("nodes", extractedNodes);
    bw.write(jsObj.toString());
    bw.close();

     

    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
    ×
    ×
    • 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.