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
  • Problems with getAStarPathfinder and Al Kharid toll gate


    dumbass

    Recommended Posts

    So im trying to make a script for collecting hides at Lumbridge dairy farm and banking them in Al Kharid using the toll gate. Using getAStarPathfinder i should be able to give the name of the obstacle and the action which it needs to perform. if you right-click the gate and select "Pay-toll(10gp)" you can pass the gate without entering dialog.

    m.getWalking().getAStarPathFinder().addObstacle(new PassableObstacle("Gate", "Pay-toll(10gp)" , null, null, null));

    My problem is, when running the script the bot never right-clicks the gate to try and select "Pay-toll(10gp)". It just left-clicks it, selecting "Open Gate" and gets stuck in a dialog. I tried adding a sleepUntill() -> (Condition) thing but that didnt work as well.

    m.getWalking().getAStarPathFinder().addObstacle(new PassableObstacle("Gate", "Pay-toll(10gp)" , null, null, null));
    m.sleepUntil(() -> m.getDialogues().inDialogue(), 100000);
    	if (m.getDialogues().inDialogue()) {
    		while (m.getDialogues().inDialogue()) {
    			m.getDialogues().continueDialogue();
    			m.sleep(600, 1300);

    I have no clue how to pass this damn gate, pls help me :(

    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.