clanket Posted October 25, 2018 Share Posted October 25, 2018 (edited) I'm currently working on some scripts that require faster reaction times from the bot. The animation timer for thieving is ~4 ticks per action. The method f.iteract("Pickpocket") will match the default animation timer. My goal is to get it somewhere around 2-2.5 tick reaction time rather than 4. Is there anyway to modify the speed of method or will I have to write my own work around? Edited October 25, 2018 by clanket Quote Link to comment Share on other sites More sharing options...
Solution Posted October 25, 2018 Share Posted October 25, 2018 Probably your best bet to create your own interaction for things like this. Quote Link to comment Share on other sites More sharing options...
Juggles Posted October 25, 2018 Share Posted October 25, 2018 Can't change the speed. Quote Link to comment Share on other sites More sharing options...
clanket Posted October 25, 2018 Author Share Posted October 25, 2018 Here's a quick class that you can use to override the default interaction timers. import org.osbot.rs07.utility.*; import java.util.function.*; public final class Sleep extends ConditionalSleep { private final BooleanSupplier condition; public Sleep(final BooleanSupplier condition, final int timeout) { super(timeout); this.condition = condition; } public Sleep(final BooleanSupplier condition, final int timeout, final int interval) { super(timeout, interval); this.condition = condition; } public boolean condition() throws InterruptedException { return this.condition.getAsBoolean(); } public static boolean sleepUntil(final BooleanSupplier condition, final int timeout) { return new Sleep(condition, timeout).sleep(); } public static boolean sleepUntil(final BooleanSupplier condition, final int timeout, final int interval) { return new Sleep(condition, timeout, interval).sleep(); } } Now to override the interaction speed for something like pickpocketing all you have to do is. if(targetWithAHugeDong.interact("Pickpocket")){ Sleep.sleepUntil(() -> myPlayer().exists(), random(950, 1500)); break; }; You can now modify the speed at which you click/interact with the target. It no longer requires the animation to finish. I'll post all my 2-3 tick scripts publicly when I'm done skilling to 99. 1 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted October 25, 2018 Share Posted October 25, 2018 27 minutes ago, clanket said: Here's a quick class that you can use to override the default interaction timers. Now to override the interaction speed for something like pickpocketing all you have to do is. You can now modify the speed at which you click/interact with the target. It no longer requires the animation to finish. I'll post all my 2-3 tick scripts publicly when I'm done skilling to 99. That doesn't change the actual time .interact() takes to complete. OP wants to know if there is a way to make the interact() method faster, which there is not. OP would have to write his own interact() method. Quote Link to comment Share on other sites More sharing options...