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
  • Is there a method for finding the Interactable Object that is making us not reach?


    Bryno

    Recommended Posts

    Hi there!

    I see there is canReach methods and such but I was wondering if there was a way of determining WHY can't I reach that object?

    For example, if I just try to attack a Chicken, it might say you can't reach because door is closed, and then I can do something like:

    // Can't reach the chicken, because this door is closed in the way
    Gameobject door = objectInWay(Chicken);
    
    // Open that door so I can reach chicken.
    door.interact("Open");

     

    Thanks!

    Link to comment
    Share on other sites

    Here's essentially what I do, just force it to walk (i.e. handle obstacles)
     

    if (!Walking.canReach(Chicken)) {
      if (Walking.shouldWalk(Calculations.random(4,9)) {
        Walking.walk(chicken);
        sleep(5,10);
      }
    }
    
    if (canReach....)

    Also some less common, but still common, obstacles need to be added to the walker but doors and such should already be covered.

    Link to comment
    Share on other sites

    9 minutes ago, holic said:

    Here's essentially what I do, just force it to walk (i.e. handle obstacles)
     

    if (!Walking.canReach(Chicken)) {
      if (Walking.shouldWalk(Calculations.random(4,9)) {
        Walking.walk(chicken);
        sleep(5,10);
      }
    }
    
    if (canReach....)

    Also some less common, but still common, obstacles need to be added to the walker but doors and such should already be covered.

    Wait... NO WAY!

    You're telling me they implemented door handling in the "walk()" method....

    That is CRAZY amazing! :D<3 

    I have to test that out... I just assumed you would always have to implement your own door-object handling based on your script :O    

    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.