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.

Starting OSBot client with java

Featured Replies

Hi Guys,

I am building a BotManager so i can build some integration with my web-panel later on.

At the moment i got the basics running but having an issue with starting the OSBot client.

The client starts and even runs the script but the bufferedReader ends as soon OSBot Starts.

See code down-below:

package Services;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Test {

    public Test()
    {
        System.out.println("Starting bot");
        try {
            List<String> command = new ArrayList<>();
            Collections.addAll(command, "C:\\Program Files\\Java\\jdk1.8.0_261\\bin\\javaw.exe", "-jar");
            Collections.addAll(command, "osbot 2.5.85.jar");
            Collections.addAll(command, "-login", String.format("%s:%s", "account", "password"));
            Collections.addAll(command, "-bot", String.format("%s:%s:%s", "test@gmail.com", "password", "0000"));
            Collections.addAll(command, "-world", "335");
            Collections.addAll(command, "-script", "TutorialIsland:test@gmail.com");



            final ProcessBuilder processBuilder = new ProcessBuilder(command);
            processBuilder.redirectErrorStream(true);
            final Process process = processBuilder.start();

            try (final InputStream inputStream = process.getInputStream();
                 final InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
                 final BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) {

                String outputLine;

                while ((outputLine = bufferedReader.readLine()) != null) {
                    outputLine = outputLine.trim();

                    System.out.println(outputLine);

                }

                System.out.println("Buffer ending? start failed?");
            }
            
            

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}

 

bufferReader output:

Starting bot
Starting local script with name: TutorialIsland
[DEBUG][07/26 07:50:47 PM]: Injected 2 field list filters
[DEBUG][07/26 07:50:47 PM]: Injected 2 field filters
[DEBUG][07/26 07:50:47 PM]: Injected 2 method list filters
[DEBUG][07/26 07:50:47 PM]: Injected 3 method filters
Buffer ending? start failed?

 

Hope someone knows what's going wrong :D

Thanks!

Sincerely Dennis

 

 

Create an account or sign in to comment

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.