August 12, 20187 yr 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 August 12, 20187 yr by CLoud
August 12, 20187 yr 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.
August 12, 20187 yr 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?
August 12, 20187 yr 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 August 12, 20187 yr by CLoud Fucked up the order of the quotes.
Create an account or sign in to comment