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
  • Walking.walk() didnt work


    abouhanafy87

    Recommended Posts

    Walking.walk() didnt work in tazhar didnt walk to bank and didnt walk to mining area

    if(Inventory.isfull){

    if(Walking.walk(BankLocation.getnearst(getLocalPlayer()).getArea(5).getRandomTile())sleep(3000);

    }

    if(Walking.walk(miningArea.getRandomTile())sleep(3000);

     

     

    Link to comment
    Share on other sites

    The area most likely isn't mapped for the web walker. I'm sure the devs will map it for you, but you can also map it yourself.

    Refer to this guide on how to add nodes to the web walker:

     

    Link to comment
    Share on other sites

    21 hours ago, Hashtag said:

    The area most likely isn't mapped for the web walker. I'm sure the devs will map it for you, but you can also map it yourself.

    Refer to this guide on how to add nodes to the web walker:

     

    i can't understand any thing from this

    i want to make a simple local path

    Link to comment
    Share on other sites

    my try to make a random path from areas

     

     public static final Area MINING_AREA = new Area(
                new Tile(2504, 5066, 0),
                new Tile(2498, 5065, 0),
                new Tile(2498, 5064, 0),
                new Tile(2502,5059,0),
                new Tile(2504, 5059, 0),
                new Tile(2506, 5061, 0),
                new Tile(2504, 5063, 0)
        );
        public static final Area[] pathtobank = new Area[]{
                new Area(
                        new Tile(2504, 5066, 0),
                        new Tile(2498, 5065, 0),                // this is mining area pathtobank[0]
                        new Tile(2498, 5064, 0),
                        new Tile(2502,5059,0),
                        new Tile(2504, 5059, 0),
                        new Tile(2506, 5061, 0),
                        new Tile(2504, 5063, 0)
                ),
                new Area(
                        new Tile(2504, 5066,0),
                        new Tile(2504, 5063,0),
                        new Tile(2518,5071,0),
                        new Tile(2515,5074,0)
                ),
                new Area(
                        new Tile(2518,5071,0),
                        new Tile(2515,5074,0),
                        new Tile(2519, 5089,0),
                        new Tile(2524, 5084,0)
                ),
                new Area(
                        new Tile(2519, 5089,0),
                        new Tile(2524, 5084,0),
                        new Tile(2535,5096,0),
                        new Tile(2528,5099,0)
                ),
                new Area(
                        new Tile(2535,5096,0),
                        new Tile(2528,5099,0),
                        new Tile(2533, 5114,0),
                        new Tile(2540, 5112,0)
                ),
                new Area(
                        new Tile(2533, 5114,0),
                        new Tile(2540, 5112,0),
                        new Tile(2542,5126,0),
                        new Tile(2537,5130,0)
                ),
                new Area(

                        new Tile(2542,5126,0),
                        new Tile(2537,5130,0),
                        new Tile(2541, 5135,0),
                        new Tile(2544, 5135,0)
                ),
                new Area(
                        new Tile(2542, 5137,0),
                        new Tile(2544, 5135,0),
                        new Tile(2546,5138,0),
                        new Tile(2542,5144,0),
                        new Tile(2537,5143,0)
                )
        };
        public static final Area[] pathtomining = new Area[]{
                new Area(
                        new Tile(2544,5133,0),
                        new Tile(2539,5134,0),
                        new Tile(2537,5129,0),
                        new Tile(2541,5126,0)

                ),
                new Area(
                        new Tile(2537,5129,0),
                        new Tile(2541,5126,0),
                        new Tile(2543,5115,0),
                        new Tile(2535,5116,0)
                ),
                new Area(
                        new Tile(2543,5115,0),
                        new Tile(2535,5116,0),
                        new Tile(2529,5106,0),
                        new Tile(2537,5100,0)
                ),
                new Area(
                        new Tile(2529,5106,0),
                        new Tile(2537,5100,0),
                        new Tile(2532,5091,0),
                        new Tile(2523,5092,0)
                ),
                new Area(
                        new Tile(2532,5091,0),
                        new Tile(2523,5092,0),
                        new Tile(2511,5085,0),
                        new Tile(2521,5074,0)
                ),
                new Area(
                        new Tile(2511,5085,0),
                        new Tile(2521,5074,0),
                        new Tile(2513,5068,0),
                        new Tile(2510,5071,0)
                ),
                new Area(
                        new Tile(2513,5068,0),
                        new Tile(2510,5071,0),
                        new Tile(2505,5066,0),
                        new Tile(2506,5063,0)
                ),
                new Area(
                        new Tile(2504,5066,0),
                        new Tile(2501,5066,0),
                        new Tile(2498,5065,0),
                        new Tile(2498,5064,0),
                        new Tile(2502,5059,0),
                        new Tile(2504,50590,0),
                        new Tile(2506,5061,0)
                        )
        };
        public static final Area Bank_Area = new Area(
                new Tile(2542, 5137,0),
                new Tile(2544, 5135,0),
                new Tile(2546,5138,0),
                new Tile(2542,5144,0),
                new Tile(2537,5143,0)
        );

    public int onLoop() {

     if (!Inventory.isFull()) {
                if (MINING_AREA.contains(getLocalPlayer())) {
                    mine();

                } else if(Bank_Area.contains(getLocalPlayer())) {
                    walktomining();
                    //if(Walking.walk(MINING_AREA.getRandomTile())) sleep(Calculations.random(3500,5500));
                 
                }

            } else if(Inventory.isFull()) {
                if (!Bank_Area.contains(getLocalPlayer())){
                    walktobank();
                   // if(Walking.walk(BankLocation.TZHAAR.getArea(4).getRandomTile()))sleep(Calculations.random(3500,5500));

                }else bank();

            }

    }

    private void walktobank(){

            for(int i=1;i<pathtobank.length;i++){
                a=pathtobank[i];
                if(!a.contains(getLocalPlayer())){
                    tile =  a.getCenter().getRandomizedTile();
                    Walking.clickTileOnMinimap(tile);
                    log("walk to bank");
                    sleepUntil(()-> getLocalPlayer().getTile()==tile,Calculations.random(6000,7500));

                }
            }

        }

    private void walktomining(){

            for(int i=0;i<pathtobank.length;i++){
                a=pathtobank[i];
                if(!a.contains(getLocalPlayer())){
                    tile =  a.getCenter().getRandomizedTile();
                    Walking.clickTileOnMinimap(tile);
                    log("walk to bank");
                    sleepUntil(()-> getLocalPlayer().getTile()==tile,Calculations.random(6000,7500));

                }
            }

        }

    it's work to go to the bank and failed to back to mining area any one can help me ?

     

    Link to comment
    Share on other sites

    12 hours ago, Pandemic said:

    Hey there, can you get me an exact from and to tile you're trying to walk to so I can replicate it on my end?

    Thanks!

    from  (2500,5065,0) to (2540,5141,0) and reverse 

    Link to comment
    Share on other sites

    On 2/10/2021 at 8:32 PM, Neffarion said:

    In my experience, the DreamBot Web as good as it is on DB3 now, it still could be better in regard to interaction with objects and being teleported around to other places (like dungeons & caves and ship travelling for example).
    So a few months ago I started writing a "world walker", which is basically a simple layer on top of the DreamBot Web. I thought about making it open source, so that other scripters could use it or improve on it if they wish. 

    All this simply does is bridge places which you couldn't possibly walk by using the default Web walker only. 

    The code can be found here: https://github.com/0xNeffarion/DreamBot-WorldWalker

    So how do I use it?

    Pretty simple. Assuming you imported that code into your project, all you need to do is to add the places you want the pathfinder to be able to bridge on the start of your script and then call the walk function.
    You can check a few example nodes I already added in the pathfinder by going here (So there's no need to add the ones in there already)

    Adding nodes for a simple interaction example:

    
    @Override
    public void onStart(){
       SimpleNode<GameObject> sn1 = new SimpleNode<>("Dwarven Mine to Falador", new Tile(3058, 9777, 0), "Staircase", "Climb-up", GameObject.class);
       SimpleNode<GameObject> sn2 = new SimpleNode<>("Falador to Dwarven Mine", new Tile(3061, 3377, 0), "Staircase", "Climb-down", GameObject.class);
    
       sn1.connect(sn2);
       sn2.connect(sn1);
       WorldWalking.getWorldPathFinder().addNodes(sn1, sn2);
    }

     

    Ship travelling example:

    
    @Override
    public void onStart(){
       ShipTravelNode shipTravel1 = new ShipTravelNode("Port Sarim to Karamja", new Tile(3029, 3217, 0),
                    "Seaman Lorris", "Talk-to",
                    new String[]{"Yes please."},
                    new InventoryRequirement(COINS, 30));
    
       ShipTravelNode shipTravel2 = new ShipTravelNode("Karamja to Port Sarim", new Tile(2954, 3146, 0),
                    "Customs officer", "Talk-to",
                    new String[]{"Can I journey on this ship?", "Ok."},
                    new InventoryRequirement(COINS, 30));
    
       shipTravel1.connect(shipTravel2);
       shipTravel2.connect(shipTravel1);
    
       WorldWalking.getWorldPathFinder().addNodes(shipTravel1, shipTravel2);
    }

    If you don't have the requirements needed, the pathfinder will not be able to find a path and the walk method will return false (or will try to find some other way to get to the destination tile if possible)

    You can also use: WorldWalking.getWorldPathFinder().canReach() to check if you can get to the tile you want to go

    Walking usage:

    
    @Override
    public int onLoop(){
       if(WorldWalking.shouldWalk()) {
          WorldWalking.walk(tileToWalkTo);
       }
       return 1000;
    }

     

    Note: that this is not to be used on simple local obstacles like doors, gates or even stairs which make you only move in the Z axis and keep you in the same region. For this purpose you need to add obstacles the normal way by adding them to the DreamBot's DijPathFinder (for different Z values) or AStarPathFinder for other things

     

    i try to include this and call Worldwalking.walk(2540,5141,0);

    and didn't work

    @Pandemic

     

    @Neffarion

    Link to comment
    Share on other sites

    19 minutes ago, abouhanafy87 said:

    i try to include this and call Worldwalking.walk(2540,5141,0);

    and didn't work

    @Pandemic

     

    @Neffarion

    Sorry I thought I replied in here, but yeah our web walker doesn't support that area right now, so you'll need to manually walk a predetermined path :(

    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.