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
  • Adding web nodes


    Genius

    Recommended Posts

    I did a search and didn't find much info on how to add nodes to the web walker for unmapped areas.

     

    If anyone would like to point me in the right direction, it would be greatly appreciated.

     

    Thank you =)

    Link to comment
    Share on other sites

     

    Wow, I can't believe that didn't pop up. Thanks Roka!

     

    Edit: I believe I've mapped my whole area, now I'm having trouble getting it to walk properly.

     

    Yellow shapes represent each node, green lines represent each connection.

     

    344ujgx.png

     

    My code for the first node is as follows (NW ROOM) - all other nodes are coded according to the image.

        @Override
        public void onStart() {
            createWeb();
        }
    
        private void createWeb() {
            AbstractWebNode webNode1 = new BasicWebNode(3535, 9712);    
            webNode1.addConnections(webNode29, webNode10, webNode2, webNode4); //NW NODE
            WebFinder webFinder = getWalking().getWebPathFinder();
            AbstractWebNode[] webNodes = {webNode1};
            for (AbstractWebNode webNode : webNodes) {
                webFinder.addWebNode(webNode);
            }
        }
    

    Now, when using getWalking().walkOnScreen(), the walker attempts to walk directly to the tile (off screen) instead of using the web. For instance, if I'm in a tunnel and tell it to walk to a static tile at the other end of the tunnel (for testing), the script turns the camera low and puts the cursor over where the tile is (~40 tiles away) rather than walking on screen using the nodes.

     

    If someone has experience with this I would appreciate the help big time! This is all that is holding me back from releasing this script.

    Link to comment
    Share on other sites

    Wow, I can't believe that didn't pop up. Thanks Roka!

     

    Edit: I believe I've mapped my whole area, now I'm having trouble getting it to walk properly.

     

    Yellow shapes represent each node, green lines represent each connection.

     

    344ujgx.png

     

    My code for the first node is as follows (NW ROOM) - all other nodes are coded according to the image.

        @Override
        public void onStart() {
            createWeb();
        }
    
        private void createWeb() {
            AbstractWebNode webNode1 = new BasicWebNode(3535, 9712);    
            webNode1.addConnections(webNode29, webNode10, webNode2, webNode4); //NW NODE
            WebFinder webFinder = getWalking().getWebPathFinder();
            AbstractWebNode[] webNodes = {webNode1};
            for (AbstractWebNode webNode : webNodes) {
                webFinder.addWebNode(webNode);
            }
        }
    

    Now, when using getWalking().walkOnScreen(), the walker attempts to walk directly to the tile (off screen) instead of using the web. For instance, if I'm in a tunnel and tell it to walk to a static tile at the other end of the tunnel (for testing), the script turns the camera low and puts the cursor over where the tile is (~40 tiles away) rather than walking on screen using the nodes.

     

    If someone has experience with this I would appreciate the help big time! This is all that is holding me back from releasing this script.

     

    Did you check whether the tile is on screen before you tell it to walkonscreen?

    Link to comment
    Share on other sites

    Did you check whether the tile is on screen before you tell it to walkonscreen?

     

    I did not. My understanding was that with the above code, the web walker will use the nodes added to the web to get to tiles that are off screen. Is that not right?

    Link to comment
    Share on other sites

    I did not. My understanding was that with the above code, the web walker will use the nodes added to the web to get to tiles that are off screen. Is that not right?

    walkOnScreen() method performs a check on whether the Tile is within the RS camera's viewport,

     i'd suggest simply using the walk() to make it easier.

    Link to comment
    Share on other sites

    So I assume you want to walk using the screen if possible. With regards to the post above, you can use walk when the tile is not on screen and if its on screen, use walkonscreen

    Link to comment
    Share on other sites

    walkOnScreen() method performs a check on whether the Tile is within the RS camera's viewport,

     i'd suggest simply using the walk() to make it easier.

     

     

    So I assume you want to walk using the screen if possible. With regards to the post above, you can use walk when the tile is not on screen and if its on screen, use walkonscreen

     

    Is there a way to generate an on screen path using the nodes I defined? I can't use .walk() because the minimap is blacked out in those tunnels. 

     

    I wonder if I could do something fancy with .walk() and getMinimapDestination(). Maybe a better idea would be just to define local paths for the long tunnels?

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

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