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.

Waiting until target dies from ranged

Featured Replies

I'm having trouble using conditional sleeps.

This is what I have so far which works for Melee but keeps clicking when using ranged.

new ConditionalSleep(30000) {
            public boolean condition() throws InterruptedException {
                return rat.isUnderAttack();
            }
        }.sleep();

Anyone got any ideas? Would be greatly appreciated! ❤️

Edited by CLoud

The way you're going about this is bad, you're making the client sleep until the rat is dead. What happens if you need to eat during this time period?

Instead you should be checking for if you're in combat and if not then attack a rat.

Are you trying to sleep after you attempt to attack the rat?

10 minutes ago, d0zza said:

The way you're going about this is bad, you're making the client sleep until the rat is dead.

How is he sleeping until the rat is dead? It's until the rat is under attack?

  • Author

Works perfect! Thank you! Didnt realize it would be that easy

  • Author

Sorry didnt see your other responses.

17 minutes ago, d0zza said:

The way you're going about this is bad, you're making the client sleep until the rat is dead. What happens if you need to eat during this time period?

Instead you should be checking for if you're in combat and if not then attack a rat.

Im interacting with the rat and if it's succesful then run the conditional sleep. If not. Try again.

5 minutes ago, Lexhanatin said:

Are you trying to sleep after you attempt to attack the rat?

How is he sleeping until the rat is dead? It's until the rat is under attack?

I'm sleeping until the rat isnt under attack in the original post. Then when it was dead it was no longer under attack. Thus I'd stop sleeping. But it didnt work well with ranged.

Edited by CLoud
Fucked up the order of the quotes.

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.