Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Help] Sleeping With No Animation

Featured Replies

Title pretty much says it all. 
Character needs to sleep, when combining items. Character doesn't do an animation. Some sort of inventory listener? 

Take a look at this. You can use that to sleep while a certain condition is met - which in your case would be while the player in animating.

Take a look at this. You can use that to sleep while a certain condition is met - which in your case would be while the player in animating.

Smh solution pls.

What he is doing is combining items which doesnt give an animation, what he needs to do is wait till the inventory only contains say potatoes instead of onions and potatoes.

Smh solution pls.

What he is doing is combining items which doesnt give an animation, what he needs to do is wait till the inventory only contains say potatoes instead of onions and potatoes.

Making potions has an animation does it not? I'm sure there's other examples :P

Making potions has an animation does it not? I'm sure there's other examples :P

But he certainly asked for sleeping with no animation, he could be grinding chocolste bars for what I know which has no animation :feels:

What I would do is remember which two inventory slots I'm interacting with, do the desired action and sleep until one of the inventory slots is empty or contains a different item using ConditionalSleep :)

What I would do is remember which two inventory slots I'm interacting with, do the desired action and sleep until one of the inventory slots is empty or contains a different item using ConditionalSleep :)

You'll have an issue with that if you use the 'Make all' option.

 

 

Here's what to do:

Every time the inventory decreases by 1 in amount of whatever resource you're using, record the time using System.currentTimeMillis(). Then, when you go back in the loop, check if your inventory resource count has decreased by 1 again. If it has, change the time to System.currentTimeMillis() again. Then create a check to see if it has not changed in the past ~ 5 seconds. If it hasn't, then you know you've stopped making it for whatever reason. You could do this in a conditionalsleep or in the regular loop cycle if you want - it's your choice. That's your first option.

 

Your second option (less stable but easier to make) would be to check if the interaction with both item returned 'true' and if it did, then conditional sleep until your inventory doesn't contain one of them anymore OR dialogues/random events, and if either condition is met, stop sleeping.

Title pretty much says it all. 

Character needs to sleep, when combining items. Character doesn't do an animation. Some sort of inventory listener? 

 

Easiest solution is just to sleep until either your player can no longer combine items, or (if applicable, your character has leveled up):

new ConditionalSleep(60_000) {
    @ Override
    public boolean condition() {
        return !canCombine() || getDialogues().isPendingContinuation();
    }
}.sleep();

Where canCombine() would be something like:

public boolean canCombine() {
    return getInventory().contains("Item 1") && getInventory().contains("Item 2");
}

You'll have an issue with that if you use the 'Make all' option.

 

 

Here's what to do:

Every time the inventory decreases by 1 in amount of whatever resource you're using, record the time using System.currentTimeMillis(). Then, when you go back in the loop, check if your inventory resource count has decreased by 1 again. If it has, change the time to System.currentTimeMillis() again. Then create a check to see if it has not changed in the past ~ 5 seconds. If it hasn't, then you know you've stopped making it for whatever reason. You could do this in a conditionalsleep or in the regular loop cycle if you want - it's your choice. That's your first option.

 

Your second option (less stable but easier to make) would be to check if the interaction with both item returned 'true' and if it did, then conditional sleep until your inventory doesn't contain one of them anymore OR dialogues/random events, and if either condition is met, stop sleeping.

 

I don't recall anything ingame that has a make x option that doesn't have an animation. But yes, your solution + explv's combined together is the proper solution

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.