Genius 50 Posted June 9, 2017 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 =)
rokaHakor 171 Posted June 9, 2017 https://dreambot.org/forums/index.php/topic/6553-adding-path-to-web-walker-do-you-like-this/ https://dreambot.org/forums/index.php/topic/7369-webtool/
Genius 50 Author Posted June 9, 2017 https://dreambot.org/forums/index.php/topic/6553-adding-path-to-web-walker-do-you-like-this/ https://dreambot.org/forums/index.php/topic/7369-webtool/ 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. 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.
Manly 879 Posted June 10, 2017 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. 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?
Genius 50 Author Posted June 11, 2017 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?
DefCon 121 Posted June 11, 2017 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.
Manly 879 Posted June 11, 2017 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
Genius 50 Author Posted June 11, 2017 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?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.