Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //just store your accs in the string array below
- //and remember to separate the ign, user and pass with a colon
- //the format is "ingamename:loginusername:loginpassword"
- private String[] accounts = new String[]{"ign1:username1:pass", "ign2:username2:pass", "ign3:username3:pass"};
- private int cycleMinutes = 30;
- private int accIndex;
- private long timer = System.currentTimeMillis();
- public void run() {
- String[] accInfo = accounts[accIndex].split();
- String ign = accInfo[0];
- String username = accInfo[1];
- String password = accInfo[2];
- //cycling accounts
- if (System.currentTimeMillis() - timer > cycleMinutes * 60000) {
- timer = System.currentTimeMillis();
- accIndex++;
- if (accIndex >= accounts.length) {
- accIndex = 0;
- }
- }
- //logging into and out of accounts
- if (Game.isLoggedin()) {
- RSPlayer myPlayer = Player.getRSPlayer();
- if (myPlayer != null && myPlayer.getName() != null) {
- if (myPlayer.getName().equalsIgnoreCase(ign)) {
- //run your script here
- } else {
- Login.logout();
- }
- }
- } else {
- Login.login(username, password);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement