Since the Companion App is now officially gone, RSAPI has no use but will remain on GitHub (archived) for sentimental reasons.
RSAPI uses functions stowed away in the Companion App. The Companion App actually comes with some great functionality but it is hidden behind a terrible application structure with dynamic loading of vital assets and uglified code such as;
if(false){}
if(false){}
if(false){}
Every week the Companion App gets a new obfuscation done upon it, which in turn makes the functions have different names and be placed upon different locations. Another albeit easier issue is the client parameters are changed on every use. RSAPI not only handles the obfuscation but also strips out non-essential UI code.
Use Python 3.6, install tornado.
$ pip install tornado
Note that what is uploaded to GitHub is the core of RSAPI. This includes the deobfuscator, function mapping and patterns for some features bundled into a concept to provide it as a web-service. This is far from all RSAPI is capable of, see section expanding for more information.
- Start the server
python server.py
. - Open
docs/comapp.html
in a browser. (Use FireFox. Chrome is too secure...) - Open the FireFox console and login with a RuneScape account
login("<email>", "<passwd>")
. (Authenticator? Editdocs/comapp.js:124
, 3rd parameter is the authenticator code).
If you now login with a different account on RuneScape you should see the RSAPI account sitting in lobby. Messaging the RSAPI account should give you the exact same message back. You can also message anyone from the RSAPI account by visiting http://localhost/msg?name=NAME&message=MESSAGE.
I recommend using the official Companion App in Google Chrome and using the breakpoints function. The file you are looking for is Bootstrap.js
. Jagex decided to on every update change (almost) every function- and variable-name aswell as the order of the code. However, the code is separated into major objects in which their internal structure does not change. What RSAPI does is find a pattern in this parent object and simply create a global variabe to point there. The user then only needs to know in what spot the desired function comes. See docs/comapp.js:111
for examples of function name remapping.
To add your own functions, write a pattern that matches a child function inside a parent function regardless of variables names (to withstand updates). Add this pattern in server.py
and add a function name map inside docs/comapp.js
.
Here are webm's of some features that were recorded in early development.
- Bank evaluator
- Buy and sell items
- Checking item values
- Note: Capable of checking every tradeable item in less than 25 seconds.
- Chat
- Dailyscape
RSAPI has endless potential, it can automate anything companion app can do. Examples of possible implementations:
- Todays ____. (Vis wax, araxxor path, travelling merchant...)
- Sit in multiple friends chat and PM upon event. (Ghost peng, portables...)
- Merchanting bot.
- PM multiple people at the same time. (Personalized clan notification, raid group notifier...)
- World tracker. (Build a database of users world preferences?)
- Reliable name tracker. (Adding a friend reveals their last name)
- Regular ComApp without lag. (It is Jagex's way of loading UI that makes ComApp slow)