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
  • Try asking for help in the chatbox
  • Interact Issue


    spoonMate
     Share

    Recommended Posts

    I am trying to make a blast furnace script for myself and having problems with interact misclicking on the belt, it will find the object but the click point it finds is often not actually within the clickbox. Is there a way to make it click closer to the center of the object? My current object detection and interaction code is as follows:

     

            GameObject Belt = getGameObjects().closest(gameObject -> gameObject != null && gameObject.getName().equals("Conveyor belt"));
            sleepUntil(() -> Belt.interact(), 9000);

     

    I have tried forcing right click with put-in-ore as the option, but it still mis-clicks.

    Link to comment
    Share on other sites

    Yeah I think that may be it, the extension of the belt is not interactable. Trying to look into the bounding box now. Just started trying to learn the API. 

    Link to comment
    Share on other sites

    1 hour ago, spoonMate said:

    Yeah I think that may be it, the extension of the belt is not interactable. Trying to look into the bounding box now. Just started trying to learn the API. 

    Just get the exact object that you need. Use the object's id or use getTopObjectOnTile(Tile tile) method if needed. If it still missclicks then get the bounding box and get the center.

    Link to comment
    Share on other sites

    7 hours ago, ozeki6 said:

    Just get the exact object that you need. Use the object's id or use getTopObjectOnTile(Tile tile) method if needed. If it still missclicks then get the bounding box and get the center.

    Thanks to both of you, ended up using the hasAction method but needed the getTopObjectOnTile method for the dispenser. In the end got it working :)

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

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