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.

RSBotStats - Script Stat Tracking API | Easily Track Your Script Stats!

Featured Replies

Runescape Bot Stats

RSBotStats is an API that allows scripters to easily track tasks their scripts have accomplished.
Add to your script with a simple JSON POST request. Use to showoff and market your script!

2kXcag3.png

Real stats from a cooking script!

Getting Started with the API

  • Sign up and add your script here
  • Find your API Key and Script ID here
  • Send a POST request to upload your stats. We recommending sending 1 request on script end.

Example Request

URL: http://pure-woodland-47666.herokuapp.com/api/v1/commits?user_email=YOUR_EMAIL&user_token=YOUR_API_KEY

Body:

{"commit":{
    "script_id": "X5VTnp",
    "user_id": "qN4tOb",
    "runtime": 75.666,
    "stats_attributes": [
        {
            "task": "Trout Caught",
            "amount": 28
        },
        {
            "task": "Lobster Caught",
            "amount": 70
        }]
}}

Parameter Notes

  • At the very least, a commit requires `script_id`, `user_id`, and `runtime`
  • `runtime` is in minutes
  • `stats_attributes` are for tracking any sorts of tasks your script does. ex: Fish Caught, Yews Chopped, XP Gained, GP gained, etc.
  • `user_id: qN4tOb` is the catch-all user. Use this as default.

Example Java JSON POST method
I'm not too familiar with Java.
If someone could share a method to create a JSON post request, "that would be great".
Here's an example from a scripter named Encoded which you can use with some minor tweaks:

public static void commit(long runtime, int experience) {
    try {
        runtime = (int) (runtime / 1000 / 60000);
        String payload =
            "{\"commit\":{\"script_id\": \"" + SCRIPT_ID + "\",\"user_id\": \"qN4tOb\",\"runtime\": " + runtime
                + ",\"stats_attributes\": [{\"task\": \"XP Gained\", \"amount\": " + experience + "}]}}";
        URL url = new URL(URL + "?user_email=" + EMAIL + "&user_token=" + API_KEY);
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();

        conn.setDoOutput(true);
        conn.setDoInput(true);
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "application/json");

        conn.connect();

        byte[] data = payload.getBytes(StandardCharsets.UTF_8);
        DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
        wr.write(data);
        wr.flush();

        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        StringBuilder stb = new StringBuilder();
        String line;
        while ((line = rd.readLine()) != null) {
            stb.append(line).append("\n");
        }

        wr.close();
        rd.close();

        if (conn.getResponseCode() == 201) {
            Logging.debug("Successfully sent script statistics to RS Script Stats.");
        } else {
            Logging.debug(stb.toString());
        }
        conn.disconnect();
    } catch (IOException ignored) {

    }
}

More To Come!
Eager to continue development of this, open to all suggestions and constructive criticism!
Scripters, please use this, thank you :)

Are you a script user who wants to showoff their stats for a script?
Bug the script author to implement this API, it's easy!

Edited by YoHoJo

  • YoHoJo changed the title to RSBotStats - Script Stat Tracking API | Easily Track Your Script Stats!
  • Author

Bunp

Add to your script with a simple JSON POST request!  Use to showoff and market your script!

You could probably modify the example to accept a map (exp:task, quantity:task...). Instead of having to modify the function each time.

Including max, min, avg, and total would probably be good (on the properties) for your site.

I might add this.

 

  • Author

Bunp

Add to your script with a simple JSON POST request!  Use to showoff and market your script!

  • Author
18 hours ago, dreameo said:

You could probably modify the example to accept a map (exp:task, quantity:task...). Instead of having to modify the function each time.

Including max, min, avg, and total would probably be good (on the properties) for your site.

I might add this.

I agree! Ideally it'd accept 0 or as many parameters as needed for different task/amounts. 

Please do ?! 

  • Author

Get detailed, custom script stats for your scripts with a simple JSON POST request! 
Use to showoff and market your script.

 
  •  

Edited by YoHoJo

  • Author

Get detailed, custom script stats for your scripts with a simple JSON POST request! 
Use to showoff and market your script.

 

Edited by YoHoJo

  • Author

Get detailed, custom script stats for your scripts with a simple JSON POST request! 
Use to showoff and market your script.

 

 

  • Author

Get detailed, custom script stats for your scripts with a simple JSON POST request! 
Use to showoff and market your script.

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.