Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Yup another World Hopper. Why not?


Recommended Posts

    public enum State{        WORLD_MENU, WELCOME_SCREEN, LOGIN_SCREEN, HOW_TO_PLAY, LOBBY, ERROR;    }    public int TargetWorld = General.random(1, 78);    final int[] BadWorlds = {1, 2, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47,            48, 55, 56, 63, 64, 71, 72, 25, 37};    public Boolean Hopped = false;    public int x;    public int y;    public void worldHop(boolean Random) {        Hopped = false;        while (true) {            if (Login.getLoginState() == Login.STATE.INGAME && !LoginState().equals(State.LOBBY)) {                if (!Hopped) {                    if (Screen.getColorAt(486, 40).equals(new Color(0, 0, 1))) {                        Mouse.moveBox(479, 32, 496, 49);                        General.sleep(100, 300);                        Mouse.click(1);                        long t = System.currentTimeMillis();                        while (Timing.timeFromMark(t) < General.random(2500, 3000) && Screen.getColorAt(486, 40).equals(new Color(0, 0, 1))) {                            General.sleep(300);                        }                        General.sleep(100);                    } else {                        Login.logout();                    }                } else {                    break;                }            } else {                switch (LoginState()) {                    case WORLD_MENU:                        if (Random) {                            selectWorld(General.random(1, 78));                        } else {                            selectWorld(TargetWorld);                        }                        break;                    case WELCOME_SCREEN:                        if (Hopped) {                            Login.login();                        } else {                            Mouse.moveBox(13, 470, 97, 491);                            General.sleep(100, 300);                            Mouse.click(1);                            long t = System.currentTimeMillis();                            while (Timing.timeFromMark(t) < General.random(7000, 10000) && LoginState().equals(State.WELCOME_SCREEN)) {                                General.sleep(300);                            }                            General.sleep(100);                        }                        break;                    case LOGIN_SCREEN:                        if (Hopped) {                            Login.login();                        } else {                            Mouse.moveBox(13, 470, 97, 491);                            General.sleep(100, 300);                            Mouse.click(1);                            long t = System.currentTimeMillis();                            while (Timing.timeFromMark(t) < General.random(7000, 10000) && LoginState().equals(State.LOGIN_SCREEN)) {                                General.sleep(300);                            }                            General.sleep(100);                        }                        break;                    case HOW_TO_PLAY:                        if (Hopped) {                            Mouse.moveBox(317, 305, 449, 336);                            General.sleep(100, 300);                            Mouse.click(1);                            long t = System.currentTimeMillis();                            while (Timing.timeFromMark(t) < General.random(4000, 7000) && LoginState().equals(State.HOW_TO_PLAY)) {                                General.sleep(300);                            }                            General.sleep(100);                        } else {                            Mouse.moveBox(13, 470, 97, 491);                            General.sleep(100, 300);                            Mouse.click(1);                            long t = System.currentTimeMillis();                            while (Timing.timeFromMark(t) < General.random(7000, 10000) && LoginState().equals(State.HOW_TO_PLAY)) {                                General.sleep(300);                            }                            General.sleep(100);                        }                        break;                    case LOBBY:                        Mouse.moveBox(280, 296, 495, 374);                        General.sleep(100, 300);                        Mouse.click(1);                        long t = System.currentTimeMillis();                        while (Timing.timeFromMark(t) < General.random(7000, 10000) && LoginState().equals(State.LOBBY)) {                            General.sleep(300);                        }                        General.sleep(100);                        break;                    default:                        General.sleep(500);                        break;                }            }        }    }    public void selectWorld(int num) {        int World = num;        while (LoginState().equals(State.WORLD_MENU)) {            if (containsInt(BadWorlds, World)) {                World++;            } else {                getArea(World);                Mouse.moveBox(x, y, x + 87, y + 18);                General.sleep(100, 300);                Mouse.click(1);                long t = System.currentTimeMillis();                while (Timing.timeFromMark(t) < General.random(2500, 3000) && LoginState().equals(State.WORLD_MENU)) {                    General.sleep(300);                }                General.sleep(100);            }        }        Hopped = true;        if (TargetWorld == 78) {            TargetWorld = 1;        } else {            TargetWorld++;        }    }    public void getArea(int World) {        x = 199;        y = 73;        for (int i = 1; i < 79; i++) {            if (containsInt(BadWorlds, i)) {                if (containsInt(new int[]{1, 2, 8, 16, 25, 37}, i)) {                    y = y + 24;                }            } else {                if (i == World) {                    break;                }                if (containsInt(new int[]{18, 38, 60}, i)) {                    y = 73;                    x = x + 93;                } else {                    y = y + 24;                }            }        }    }    public State LoginState() {        if (Screen.getColorAt(98, 129).equals(new Color(0, 0, 0))) {            return State.WORLD_MENU;        } else if (Screen.getColorAt(423, 248).equals(new Color(255, 255, 0))) {            return State.WELCOME_SCREEN;        } else if (Screen.getColorAt(534, 341).equals(new Color(11, 11, 11))) {            return State.LOGIN_SCREEN;        } else if (Screen.getColorAt(382, 323).equals(new Color(255, 255, 255))) {            return State.HOW_TO_PLAY;        } else if (Screen.getColorAt(365, 340).equals(new Color(255, 255, 255))) {            return State.LOBBY;        } else {            return State.ERROR;        }    }    public boolean containsInt(final int[] array, final int key) {        for (final int i : array) {            if (i == key) {                return true;            }        }        return false;    }

If Random is true it will select worlds randoms, if false it will hop in order eg. 3,4,5,6 (Default worlds to be ignored are Busy worlds, F2P worlds and PVP worlds. Change if you wish.)

 

How to use:

setLoginBotState(false);worldHop(false);setLoginBotState(true);
Link to post
Share on other sites
  • 4 weeks later...
  • 2 months later...
  • 1 month later...
  • 3 weeks later...

It oftenly hops to the same worlds.. :/ for the rest it workds great!

 

I'm not familiar with the Tribot API yet, but I'm assuming there's a .getCurrentWorld command, or something along those lines, somewhere.

 

If so, all it would take is adding something like:

 

int targetWorld;

 

if (targetWorld == whatever.getCurrentWorld) {

targetWorld++;

}

Link to post
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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Our picks

    • TRiBot 12 Release Candidate

      The TRiBot team has been hard at work creating the last major version of TRiBot before the TRiBot X release. We've noticed many problems with TRiBot 11 with a lot of users preferring TRiBot 10 over 11. We've heard you, so we took TRiBot 10, added the new features introduced with 11, introduced some other new things, and created TRiBot 12. So without further adieu, here's TRiBot 12.
        • Sad
        • Like
      • 37 replies
    • Gradle is a build tool used to accelerate developer productivity.

      We recently setup a Maven repository (TRiBot Central) to make it easier for scripters to create scripts. Check it out here: https://gitlab.com/trilez-software/tribot/tribot-central/-/packages

      Furthermore, we've released a simple Gradle project to make it easy to run TRiBot and develop scripts for it. Check it out here: https://gitlab.com/trilez-software/tribot/tribot-gradle-launcher

      The goals of TRiBot Central are to:

      Deliver updates to TRiBot faster


      Better organize TRiBot's dependencies (AKA dependancies)


      Make it easier to develop scripts for TRiBot


      Make it easier to use and run TRiBot


      Note: TRiBot won't be able to run scripts from within this project until TRiBot's next release.
        • Like
      • 10 replies
    • Hi everyone,

      I'd like to thank everyone for their patience in this transition period. Since last week, we've worked out the remaining bugs with this integration.

      Some users have still been having issues with connecting their forums account to their Auth0 account. To resolve this, we've imported all forums accounts into Auth0.

      Unfortunately, the accounts which were imported today were using an unsupported password hashing algorithm. Hence, random passwords were set during the import.

      What does this mean for me?

      If you've previously linked your forums account to your Auth0 account, you don't have to do anything. Nothing changes for you.


      If you haven't logged in via our new login yet,

      Try logging in with your forums email address and the last password you used


      If you are unable to login, please use the "Forgot password" tool on the login page:
      Follow the instructions to reset your password
       
        • thonking
        • Like
      • 17 replies
    • Hello everyone,

      Last week we tried to roll out Auth0 Login, but we lost that battle. Now it's time to win the war!

      Important changes

      When logging into the client, you'll now have to enter your Auth0 account credentials instead of your forums credentials

      Note: 2FA is still handled through your forums account (for the time being)



      Changes for existing users

      You'll have to link your Auth0 account to your forums account here: https://tribot.org/forums/settings/login/?service=11


      Auth0 accounts have been created for most existing users. Please use your forums email address and password to login.



      Important notes

      Make sure to verify your email address upon creating a new Auth0 account


      When we mention your Auth0 account, we mean your account used for auth.tribot.org as displayed below
      • 81 replies
    • To better support the upcoming changes (TRiBot X, new repository), we're switching our login handler to Auth0. Instead of logging in with the standard form, you'll now be required to login through our Auth0 application.

      All existing accounts which have been used within approximately the past year have been imported into Auth0 using the same email and password combination which has been stored on the forums.

      What does this mean for users?

      Your account credentials are now even more securely stored


      You'll be able to login via Facebook, Google, and others in the future


      Is there anything users have to do differently now?

      Existing users: You'll have to login with the standard login, open your Account Settings, then link your Auth0 account


      New users: You'll be redirected to our Auth0 app (auth.tribot.org) where you'll be able to create an account


      Why was this change made?

      The new apps we are creating (such as the new repository) aren't able to use the forums to handle user logins


      To centralize all user accounts in one area


      To ensure that the client login doesn't go down when the forums are having problems


      To speed up our development


      Other considerations

      There's no documentation or official support for using Invision Community combined with Auth0, so there are still a few kinks we're working out


      We're in the works of creating an account management panel specifically for Auth0 accounts (ETA August)


      It's not possible to change email addresses for the time being (this will be resolved this August)


      Changing passwords is a weird process for the time being. To change your password, you'll have to use the "Don't remember your password" tool on the Auth0 login page
        • Like
      • 11 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...