June 2, 20169 yr So I have a personal script where I use one item on another and then interact with the widget to "Make All". So far, the script works, but my only problem is that the player will "Use" multiple times before actually interacting with the widget, and then after using the widget "Make All" he'll also select the item in the inventory again randomly until it's time to bank. This doesn't affect the script itself but I feel like its very clearly bot behavior and would like to fix it. Here's my code for that part (I've changed variable names to anonymize it). Thanks in advance for any help! case MAKE: sleep(500); if ((getInventory().contains("ITEM1")) && (getInventory().contains("ITEM2")) && !myPlayer().isAnimating()) { inventory.interact("Use", "ITEM1"); inventory.interact("Use", "ITEM2"); sleep(500); if (getWidgets().isVisible(309, 4)) { getWidgets().interact(309, 4, "Make All"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } break; Edited June 2, 20169 yr by imancity
June 2, 20169 yr if (getInventory().contains("ITEM1") && getInventory().contains("ITEM")) { if (!getWidgets().isVisible(309, 4)) { if (getInventory().interact("Use", "ITEM1")) { if (getInventory().interact("Use", "ITEM2")) { new org.osbot.rs07.utility.ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(309, 4); } }.sleep(); } } } else { if (getWidgets().interact(309, 4, "Make All")) { new ConditionalSleep(100_000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("ITEM1") || getDialogues().isPendingContinuation(); } }.sleep(); } } }
June 2, 20169 yr Author if (getInventory().contains("ITEM1") && getInventory().contains("ITEM")) { if (!getWidgets().isVisible(309, 4)) { if (getInventory().interact("Use", "ITEM1")) { if (getInventory().interact("Use", "ITEM2")) { new org.osbot.rs07.utility.ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(309, 4); } }.sleep(); } } } else { if (getWidgets().interact(309, 4, "Make All")) { new ConditionalSleep(100_000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("ITEM1") || getDialogues().isPendingContinuation(); } }.sleep(); } } } Perfect!!! Thanks a ton man. (I'm sure you know what those 'items' are supposed to be too :P)
Create an account or sign in to comment