1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug Failing Interactions

Discussion in 'Developer Support' started by SilenceP44, Aug 10, 2017.

  1. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    Whenever I try to interact with a spriteitem, Interface (ex. Pressing 'Take' in blast furnace dispenser, Withdrawing anything from the bank, Equiping Items, ...) It fails +- 50 % of the time. The mouse just hovers over or right clicks the item and then just stops half way. First I thought that my code was wrong (wrong interaction), but everyone seems to be using somewhat similar code and it works 50 % of the time???

    Extra note for Example 2: It doesn't always return 'Failed to interact with (all)' if it fails as I would expect.

    Pretty sure I got an account banned by this because it kept freaking out at withdrawing and depositing of my airorbs / supplies.

    [Debug] Java Version: 8u144 x86 (Oracle Corporation)
    [Debug] Maximum Heap Size: 248MB
    [Debug] RuneMate Version: 2.54.0
    [Debug] Operating System: Windows 10 x64

    if (Inventory.getQuantity("Cosmic rune") != 78) {
    isDone = false;
    if (Inventory.getQuantity("Cosmic rune") != 0) {
    if (Bank.deposit("Cosmic rune", 0)) {
    Execution.delayUntil(() -> !Inventory.containsAnyOf("Cosmic rune"), 1000, 5000);
    } else { bot.logText("Failed to depost Cosmic rune"); }
    }
    if (Bank.withdraw("Cosmic rune", 78)) {
    Execution.delayUntil(() -> Inventory.contains("Cosmic rune"), 500, 4000);
    } else { bot.logText("Failed to withdraw Cosmic runes");}
    }

    InterfaceComponent BarDispenserInterface = Interfaces.newQuery().containers(28, 109).actions("Take").results().first(); // --> The take all for iron bars at blast furnace
    if (BarDispenserInterface != null && BarDispenserInterface.isVisible()) {
    bot.logText("Trying to click (all)");
    if (BarDispenserInterface.click()) { // --> interact("Take") has same results
    // Mouse.click(Mouse.Button.LEFT); --> Even after adding this when the mouse is on the 'Take' interaction, it doesn't work.
    bot.logText("Clicked (all)");
    Execution.delayUntil(() -> Inventory.containsAnyOf(bot.getBars()), 150, 4000);
    } else { bot.logText("Failed to Interact with (all)"); }
    } else { bot.logText("BardispenserInterface is null or not visible"); }
     
  2. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    The fact that you have two different containers in your interface query could be the cause for this. Are you sure they are both needed?
     
  3. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    Pretty sure I need to because InterfaceComponent[28, 108 - 115] are all the '(all)' containers. But even if this was the case that doesnt explain why it fails to complete basic tasks like withdrawing.
     
    #3 SilenceP44, Aug 10, 2017
    Last edited: Aug 10, 2017
  4. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    It's probably just a case of Clouse being Clouse :p
     
  5. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    Yeah but how do I fix it :(
    --- Double Post Merged, Aug 10, 2017, Original Post Date: Aug 10, 2017 ---
    Found this post Resolved - Clouse inaccuracy for menu options , I think this is the same problem but here it looks to be resolved
    --- Double Post Merged, Aug 10, 2017 ---
    @Cloud
    --- Double Post Merged, Aug 10, 2017 ---
    bump
    --- Double Post Merged, Aug 11, 2017 ---
    Anyone ?
     

Share This Page

Loading...