Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Reading Script Settings/Presets

Featured Replies

Accredit me if you use it please i release these out of my own time!

 

this will return the data type of an ArrayList<String> from the text file we could do this for an int or pretty much any other type of object

    public ArrayList<String> readConfigSettings(String Path, int LineLimt)
            throws Throwable {
        BufferedReader br = new BufferedReader(new FileReader(new File(Path)));
        ArrayList<String> lines = new ArrayList<String>();
        for (int i = 0; i < LineLimt; i++) {
            lines.add(i, br.readLine().toString());
        }
        br.close();
        return lines;
    }

in use...

 

using the file we produced using my other snippet on writing script settings..

            ArrayList<String> settings = readConfigSettings((System.getProperty("user.home")+ File.separator + "OSBot" + File.separator + "data"+ File.separator + "settings.txt"),3);
            String option_one = settings.get(0); // the array starts at 0
            String option_two = settings.get(1);
            int option_three = Integer.parseInt(settings.get(2));

You should replace

for (int i = 0; i < LineLimt; i++) {
            lines.add(i, br.readLine().toString());
        }
with

String line = null;
int i = 0;
while ((line = br.readLine()) != null) {
   lines.add(i++,line);
}
This eliminates having to know how long the file is!
  • Author

You should replace

for (int i = 0; i < LineLimt; i++) {
            lines.add(i, br.readLine().toString());
        }
with

String line = null;
int i = 0;
while ((line = br.readLine()) != null) {
   lines.add(i++,line);
}
This eliminates having to know how long the file is!

 

yer i have that on mine didn't update not many people post on my snippets :/

will update in 2 mins

 

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.