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
  • Check if interacted with a interactable object


    Recommended Posts

    Hello, I am writing some quest bots. And Sometimes the cursor misses a GameObject. I want to make a method that does something like this.

    void interactGO(GameObject gameobject){
    Boolean interacted = true;
    			interacted = false;


    But I don't know how to check if my player has interacted with a object. I know I can check it the model of the object has changed or something like that. But I reckon that sooner or later I am going to stumble into some GameObject that will not change its state in any way.


    Any ideas?

    Edited by NoSpine
    Link to comment
    Share on other sites

    actually the problem wasn't with the cursor missing but for some reason it opened a door with just interact() and the other time it wanted interact("open"), but I wouldn't mind the answer to the previous question :) 

    Link to comment
    Share on other sites

    Ok, now this is embarrassing, I am talking to myself, I didn't look in the docs well enough. I see that interact() returns true if the action was performed successfully so I can just build on that.  

    Link to comment
    Share on other sites

    As you stated above, right, I've seen people recommend often to do something like if(x.interact(...) { which will work for what you're trying to achieve.

    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

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