View difference between Paste ID: W8gFFz3G and biBnxaw1
SHOW: | | - or go back to the newest paste.
1
//just store your accs in the string array below
2
//and remember to separate the ign, user and pass with a colon
3
//the format is "ingamename:loginusername:loginpassword"
4
private String[] accounts = new String[]{"ign1:username1:pass", "ign2:username2:pass", "ign3:username3:pass"};
5
private int cycleMinutes = 30;
6
private int accIndex;
7
private long timer = System.currentTimeMillis();
8
9
public void run() {
10
11
	String[] accInfo = accounts[accIndex].split();
12
	String ign = accInfo[0];
13
	String username = accInfo[1];
14
	String password = accInfo[2];
15
   
16
    //cycling accounts
17
	if (System.currentTimeMillis() - timer > cycleMinutes * 60000) {
18
		timer = System.currentTimeMillis();
19
		accIndex++;
20
		if (accIndex >= accounts.length) {
21
			accIndex = 0;
22
		}
23
	}
24
25
    //logging into and out of accounts
26
	if (Game.isLoggedin()) {
27
		RSPlayer myPlayer = Player.getRSPlayer();
28
		if (myPlayer != null && myPlayer.getName() != null) {
29
			if (myPlayer.getName().equalsIgnoreCase(ign)) {
30
				//run your script here
31
            } else {
32
				Login.logout();
33
			}
34
		}
35
	} else {
36
		Login.login(username, password);
37
	}
38
}