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.

Tricks to add external libraries GSON, JSON, Simple-JSON

Featured Replies

Some people mentioned earlier that it is possible add GSON or similar libraries using tricks to get around client permissions. If you could give me a step-by-step guide for intelliJ or Eclipse and post a time and place, I will be there to suck your dick. I would love to get around using SimpleJSON because I can't for the life of me get it to read a local .json file I generate.

Also, I have SimpleJSON working to generate a local .json file of data that I want to store. However, when I want to read the file I can't seem to debug a null pointer exception even though I've verified the bot sees the file and is in the right directory. If anyone has a snippet of code they got to work to read a .json file, time-place-dicksucking etc...

1 hour ago, moeotterson said:

Some people mentioned earlier that it is possible add GSON or similar libraries using tricks to get around client permissions. If you could give me a step-by-step guide for intelliJ or Eclipse and post a time and place, I will be there to suck your dick. I would love to get around using SimpleJSON because I can't for the life of me get it to read a local .json file I generate.

Also, I have SimpleJSON working to generate a local .json file of data that I want to store. However, when I want to read the file I can't seem to debug a null pointer exception even though I've verified the bot sees the file and is in the right directory. If anyone has a snippet of code they got to work to read a .json file, time-place-dicksucking etc...

time-place-dicksucking?????? o.o

There are plenty of resources online of how to use the Json simple library.

For example:

https://www.mkyong.com/java/json-simple-example-read-and-write-json/

Just make sure your Json file is in the OSBot data directory, and you make use of the OSBot getDirectoryData() method. For example:

String jsonFile = Paths.get(getDirectoryData(), "yourJsonFile.json").toString();

(Syntax may be wrong, I'm on my phone)

Edited by Explv

  • Author
21 hours ago, El_Maestro said:

As far as I am aware there is no way around the permissions. The only thing that is possible is to invoke the clients main method using reflection (basically load the osbot client the same way osbot loads the runescape client). 

 

In short, I'd recommend using json simple. I ran into the same issue a few days ago. All json and xml libraries that automatically serialize/deserialize objects use reflection to set the field values of the new instance class on deserialization. I went with json simple which will require you to make your own make-shift object serialization/deserialization functionality. PM me on discord if you want help fixing the NPE, I spent a lot of time messing with json simple.

Messaged you on forums for details.

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.