Doflamingo Posted June 28, 2017 Share Posted June 28, 2017 Is there any way to use IO when scripting to store information to files? Or any way to save data? Please help, I would like to be able to save data-points for initializing my bots. Thank you. Link to comment Share on other sites More sharing options...
HeyImJamie Posted June 28, 2017 Share Posted June 28, 2017 Believe you can save files to OSBot/data and load whatever you need from there Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 Just to be clear here, are you talking about using java and writing files to save data while the scripts aren't running? Because I'm trying to have my code be able to save points, it's an easy way to determine progress points/load past data. But if it's not possible, I'll simply accept it and do what's best until then... I'm sure there must be sort of way, any java programmers out here? Link to comment Share on other sites More sharing options...
d0zza Posted June 29, 2017 Share Posted June 29, 2017 I'm not really sure what you're asking in the op but you can use Writer and Reader to write and read to files respectively. Then you can use this information to select where to start the script from. For example write the number 5 to a file, then when you run the script again read that file and you know to start from point 5. Link to comment Share on other sites More sharing options...
Pseudo Posted June 29, 2017 Share Posted June 29, 2017 Yes you can. Link to comment Share on other sites More sharing options...
Alek Posted June 29, 2017 Share Posted June 29, 2017 6 hours ago, Doflamingo said: Just to be clear here, are you talking about using java and writing files to save data while the scripts aren't running? Because I'm trying to have my code be able to save points, it's an easy way to determine progress points/load past data. But if it's not possible, I'll simply accept it and do what's best until then... I'm sure there must be sort of way, any java programmers out here? Java is a high level language, it doesn't take much to be proficient at it. Your script gets executed, therefore how else would you use the client to read and write files without code caving or function hooking? Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 5 hours ago, Alek said: Java is a high level language, it doesn't take much to be proficient at it. Your script gets executed, therefore how else would you use the client to read and write files without code caving or function hooking? I'm asking if you can save data, your response isn't helping it's just another question. Link to comment Share on other sites More sharing options...
Alek Posted June 29, 2017 Share Posted June 29, 2017 5 minutes ago, Doflamingo said: I'm asking if you can save data, your response isn't helping it's just another question. HeyImJamie answered your question, you can read/write inside of the local OSBot folder. Look up "Script" in the API for the directory method. Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 3 minutes ago, Alek said: HeyImJamie answered your question, you can read/write inside of the local OSBot folder. Look up "Script" in the API for the directory method. Thank you, I will certainly look and figure that out. Appreciate the assistance on this one guys, won't lie. 1 Link to comment Share on other sites More sharing options...