Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Client bug?

Featured Replies

public void antiBan2() throws InterruptedException {
        int random = random(1,3);

         if (random == 1) {    
            sleep(random(1000, 2000));
            mouse.moveRandomly(random(1000, 2000));
            if (random == 2) {    
                sleep(random(1000, 2000));
                mouse.moveRandomly(random(300, 1000));
                mouse.moveRandomly(random(1000, 2000));}
        }
    }

This should move mouse 2/3 times, but it works only like 1/100.

 

The same thing happens with path 

new Position(3027 +random(-2, 2),3709 +random(-2, 2),0)

each time its used it should be random, but instead path is always repeated the same and actually changes only like 1/100 time.

public void antiBan2() throws InterruptedException {
        int random = random(1,3);

         if (random == 1) {    
            sleep(random(1000, 2000));
            mouse.moveRandomly(random(1000, 2000));
            if (random == 2) {    
                sleep(random(1000, 2000));
                mouse.moveRandomly(random(300, 1000));
                mouse.moveRandomly(random(1000, 2000));}
        }
    }

This should move mouse 2/3 times, but it works only like 1/100.

 

The same thing happens with path 

new Position(3027 +random(-2, 2),3709 +random(-2, 2),0)

each time its used it should be random, but instead path is always repeated the same and actually changes only like 1/100 time.

 

 

 

Your logic is flawed that's why. You have nested if(random == 2) inside if(random == 1).  So the code inside if(random == 2) will never be executed, because it can only be reached if random = 1...

 

It should look more like:

public void antiBan2() throws InterruptedException {
        
    int random = random(1,3);

    switch(random){

        case 1:
            sleep(random(1000, 2000));
            mouse.moveRandomly(random(1000, 2000));
            break;
        case 2:
            sleep(random(1000, 2000));
            mouse.moveRandomly(random(300, 1000));
            mouse.moveRandomly(random(1000, 2000));
            break;
    }
}

The same thing happens with path 

new Position(3027 +random(-2, 2),3709 +random(-2, 2),0)

each time its used it should be random, but instead path is always repeated the same and actually changes only like 1/100 time.

 

 

That is because the walker in OSBot walks to a position within (i think) 2 tile accuracy.

 

If you want it to walk to the exact tile, you will need to create your own WalkingEvents.

Edited by Explv

Your logic is flawed that's why. You have nested if(random == 2) inside if(random == 1).  So the code inside if(random == 2) will never be executed, because it can only be reached if random = 1...

 

It should look more like:

public void antiBan2() throws InterruptedException {
        
    int random = random(1,3);

    switch(random){

        case 1:
            sleep(random(1000, 2000));
            mouse.moveRandomly(random(1000, 2000));
            break;
        case 2:
            sleep(random(1000, 2000));
            mouse.moveRandomly(random(300, 1000));
            mouse.moveRandomly(random(1000, 2000));
            break;
    }
}

 

That is because the walker in OSBot walks to a position within (i think) 2 tile accuracy.

 

If you want it to walk to the exact tile, you will need to create your own WalkingEvents.

 

This ^

 

You nested the if statements instead of putting them behind eachother :)

 

Khaleesi

 

  • Author

I tried

walking.walk(new Position(3027 +random(-2, 2),3709 +random(-2, 2),0));

walking.webWalk(new Position(3027 +random(-2, 2),3709 +random(-2, 2),0));

Position[] PATH = {new Position(3020 +random(-2, 2),3700 +random(-2, 2),0), new Position(3027 +random(-2, 2),3709 +random(-2, 2),0)};

localWalker.walkPath(PATH);


it seems, that all methods which involve 

new Position

, will generate 1 random position and will repeat it.

 

while

localWalker.walk(3027 +random(-2,2), 3709 +random(-2,2));

generates new position each time its used..

Edited by gorgas8

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.