Resolved Bot not detecting GameObjects?

Discussion in 'Client & Site Support' started by paulsniper19, Sep 14, 2015.

  1. paulsniper19

    Joined:
    Jun 20, 2015
    Messages:
    245
    Likes Received:
    30
    @Cloud I noticed that with my Portable Planker bot, it is no longer detecting the portable sawmill; instead, it is just hovering over it. Once I click on the GameObject (Sawmill) manually, then everything else works as expected. I have tested this a few times, and came to the conclusion that this may be a bug in the GameObject detection. Below, I have listed two different variables tested for the GameObject declaration:

    GameObject sawmill = GameObjects.getLoaded("Portable sawmill").nearest();
    OR
    GameObject sawmill = GameObjects.newQuery().names("Portable sawmill").results().first();

    I have even used the IDs in place of the names, to no avail.

    Below, is the method for clicking the sawmill:


    if (sawmill != null ) {
    if (sawmill.isVisible() && Inventory.contains("Oak logs")) {
    sawmill.interact("Make planks");
    }
    }

    In order for it to click the sawmill, instead of sawmill.interact("Make planks");,I had to use this workaround:

    sawmill.hover();
    Mouse.click(Mouse.Button.LEFT);
     
  2. Best Answer:
    Post #2 by Cloud, Sep 14, 2015
  3. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,585
    Likes Received:
    931
    The fact that you can hover it and get a non-null instance proves that it's detecting it fine. In regards to it not clicking, my assumption is that you didn't type the action exactly the way that it's displayed in the menu. Use the miscellaneous tab in the dev toolkit to find out what it is exactly.
     
  4. paulsniper19

    Joined:
    Jun 20, 2015
    Messages:
    245
    Likes Received:
    30
    Is it possible that the action would have changed ? Reason I'm asking is because this all of a sudden happened.
     
  5. Defeat3d

    Defeat3d Prime Celestial

    Joined:
    Oct 30, 2014
    Messages:
    1,410
    Likes Received:
    612
    90% chance you're not passing the exact action.
     
  6. paulsniper19

    Joined:
    Jun 20, 2015
    Messages:
    245
    Likes Received:
    30
    That's the miscellaneous tab. I'm seeing it's the same :/ Unless my sight has failed me lol
     

    Attached Files:

    • 12.png
      12.png
      File size:
      522.8 KB
      Views:
      5

Share This Page

Loading...