Jump to content

Blackjacking


Recommended Posts

Posted (edited)

you could try 

 

if(!myPlayer().isUnderAttack)

//kock out

else

//sleep

 

I'll try that. Another thing I was thinking of was checking my player's HP before and after the knockout. How do I get my player's HP with this API? I'm new at OSBot.

Edited by elemt
Posted (edited)

Thank you

 

I would also suggest getting straight into Conditional Sleeps, which is basically sleeping until a condition is true (prevents over sleeping, etc)

new ConditionSleep(2000){ // 2000 is the time out, so it will sleep for a max of 2 seconds
 @Override
 public boolean condition(){
     return !myPlayer().isUnderAttack() && !myPlayer.isAnimating();
 }
}.sleep();




Its a bit longer than a regular sleep, but considered better in terms of antiban in the long run and script efficiency/effectiveness.

Edited by Tom

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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