- Joined
- Jun 8, 2017
- Messages
- 187
- Thread Author
- #1
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.
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
[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");}
}
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"); }
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"); }