Jump to content

InterruptedException help


Recommended Posts

Posted
2 hours ago, HeyImJamie said:

Lul Antiban

does it not work? i thought any human like interaction would be in our favour?

2 hours ago, Satire said:

If you have an antiban(){ } function then it just goes

 


antiban() throws InterruptedException{
//do whatever

}

 

where do i put it? in onloop? and how do i trigger it? 

Posted (edited)
antiban() throws InterruptedException{ //throwing this exception here is not required if you will not be using any sleeps or conditional sleeps.
int rand = random(1,8); // generate a random number from 1-8 each time the function is called
switch(rand){
case 0:
// do something
break; // we break here so we exit out of the switch statement, else it will just do whatever and go down to the  next case

case 1: 
// do something
break; 

case 2: //time for a real example
if(myPLayer().isAnimating && !inventory.isFull()){
/*say we're woodcutting or something then we can randomly hover over a skill or rotate/move the  camera
 In this case, we'll move the pitch(vertical angle basically(up and down))*/
getCamera().movePitch(random(55,67)); //in between angle 55 and 67 (67 is the max pitch)
break;
}

}

You can call it anywhere you like, wheter you use enums or not. For the sake of simplicity, we'll use onLoop

So in your onloop

int onLoop() throws Interupted Exception{
//each loop we'll generate a random number and if that random number is equal to 30 and the player isn't animating, the condition will be true and it will then call the antiban method.
if(random(1,50) == 30 && !myplayer().isAnimating){ //this is just an example... so not hate
  antiban(); // call antiban function
}
return 200;
}

lol my post got deleted oh well. 


So I basically said that you must be new to programming in general as well as scripting (as you've stated). So I suggest you take a look at the coding conventions for Java and learn about functions and conditional statements. 

http://www.oracle.com/technetwork/java/codeconvtoc-136057.html -- you can see some here

Now, above is an example of an antiban in use, however, it is a very shit antiban and it will most likely get u banned hahahha

Antibans don't really do much from my experience and many people will say this exact thing. I know it's hard to believe. But for the sake of learning, you can make one just for fun for a learning experience. 

Edited by Satire

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...