Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • RSBotStats - Script Stat Tracking API | Easily Track Your Script Stats!


    YoHoJo

    Recommended Posts

    Runescape Bot Stats

    RSBotStats is an API that allows scripters to easily track tasks their scripts have accomplished. 

    Add stats tracking to your script with a simple JSON POST request!

    Use to showoff and market your script!

     

    Check it out here.

    FRuGfip.png

    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.

    More To Come

    Eager to continue development of this, open to all suggestions and constructive criticism!

     

    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:

     

     

    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) {
     
     }
    }

     

     
     
    : - ] Please integrate and enjoy!
    Link to comment
    Share on other sites

    What backend language are you using in order to process this data?

    I have a somewhat similar data collection platform I'm working on too :P

     

    Definitely interesting though,if this is legitimate!

     

     

    Edit: perhaps its  easier for scripters if you create a few default java utility classes for them to use, instead of letting them hardcode the post requests.

    EDIT: Oh whoops didn't  read that part. I might still have a few utility classes that might help you, let me know if you need them then i'll grab them for you when I'm off work

    Link to comment
    Share on other sites

    What backend language are you using in order to process this data?

    I have a somewhat similar data collection platform I'm working on too :P

     

    Definitely interesting though,if this is legitimate!

     

     

    Edit: perhaps its  easier for scripters if you create a few default java utility classes for them to use, instead of letting them hardcode the post requests.

    EDIT: Oh whoops didn't  read that part. I might still have a few utility classes that might help you, let me know if you need them then i'll grab them for you when I'm off work

    Thanks for your interest, It's definitely legitimate!

    Data on the page is real*, source is on Github. Built using Ruby on Rails.

     

    Yeah, would be great if someone could share a more robust method that accepts 0 or as many tasks as needed as parameters.

     

    I see you have some scripts released, feel free to integrate this along with your own solution, may help get more eyes on your scripts :).

     

    *Some of the runtimes on this script need to be converted from ms to minutes, scripter miscalculated.

     

    Link to comment
    Share on other sites

    i like this, i have some spare time right now i see what i can do


    What backend language are you using in order to process this data?

    I have a somewhat similar data collection platform I'm working on too :P

     

    Definitely interesting though,if this is legitimate!

     

     

    Edit: perhaps its  easier for scripters if you create a few default java utility classes for them to use, instead of letting them hardcode the post requests.

    EDIT: Oh whoops didn't  read that part. I might still have a few utility classes that might help you, let me know if you need them then i'll grab them for you when I'm off work

    u finish like 10% of ur work fam

     

    Edit: one suggestion I have is making the graphs and stats embeddable so scripters can put them in their threads

    Link to comment
    Share on other sites

    pull request waiting for approval, you can deny it if you dont like I tried to keep it as simple as possible

     

    edit: https://github.com/AakLak/rs_script_stats/pull/14

    Thanks for this! I'll accept the request.

    Would love to help make the scripter-end integration as easy as possible, and this is a big help!

     

    Get detailed, custom script stats for your scripts with a simple JSON POST request! 
    Use to showoff and market your script. pls use
    Link to comment
    Share on other sites

    • 2 weeks later...

    well well look who we have here #overpricedpins

    Hi friend.

     

    Someone's got to be the first DreamBot user!

     

    Get detailed, custom script stats for your scripts with a simple JSON POST request! 
    Use to showoff and market your script. pls use
    Link to comment
    Share on other sites

     

    Hi friend.

     

    Someone's got to be the first DreamBot user!

     

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

     

     

    Whilst I don't intend to make use of your api, I actually found it very interesting reading your source code (Ruby on Rails is a language I want to pick up a bit more on the side). Maybe you won't find a big userbase for your project here, but do realise that your contribution is very appreciated  :D

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.