Jump to content
Prismo

InterruptedException help

Recommended Posts

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? 

Link to comment
Share on other sites

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

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