Jump to content

Waiting until target dies from ranged


CLoud

Recommended Posts

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...