scriptersteve Posted February 27, 2018 Share Posted February 27, 2018 (edited) How am I able to login to an account from my script pulling data from another file. Will store logins/passwords and want to login without having to setup acc in OSbot, just from inside my script. Didn't know if this could be done/how it was done. Had a look at api and am properly blind but couldn't see anything to do with logging in without having acc details stored on OSbot. Looked at client login/autologgin but was unsure. Just wanted to have a look at account replacement for some fun. Edited February 27, 2018 by scriptersteve Quote Link to comment Share on other sites More sharing options...
Butters Posted February 27, 2018 Share Posted February 27, 2018 Custom login handler is your friend here. Ain't gonna be too easy to do properly. Check out Explv's login handler. Quote Link to comment Share on other sites More sharing options...
scriptersteve Posted February 27, 2018 Author Share Posted February 27, 2018 Where can i find this? just blank searched it and only other people's threads talking about it came up? Quote Link to comment Share on other sites More sharing options...
Butters Posted February 27, 2018 Share Posted February 27, 2018 1 Quote Link to comment Share on other sites More sharing options...
Snuts Posted February 27, 2018 Share Posted February 27, 2018 Here's a small snippet I use for reading accounts from a file, you should be able to take from it what you need. private void readAccounts() { // The name of the file to open. String fileName = "accounts.txt"; // This will reference one line at a time String line = null; try { // FileReader reads text files in the default encoding. FileReader fileReader = new FileReader(getDirectoryData() + fileName); // Always wrap FileReader in BufferedReader. BufferedReader bufferedReader = new BufferedReader(fileReader); while((line = bufferedReader.readLine()) != null) { String[] lineInfo = line.split(":"); vars.addToAccounts(lineInfo); } // Always close files. bufferedReader.close(); vars.setCheckedFile(true); } catch(FileNotFoundException ex) { log("Accounts file not found, stopping script"); stop(false); } catch(IOException ex) { log("Error reading file, stopping script"); stop(false); } } Probably not the best way to do this but works none the less. 1 Quote Link to comment Share on other sites More sharing options...
scriptersteve Posted February 27, 2018 Author Share Posted February 27, 2018 Thansk Quote Link to comment Share on other sites More sharing options...
inababila Posted March 2, 2018 Share Posted March 2, 2018 Also use command line parameter to disable randoms. Quote Link to comment Share on other sites More sharing options...