SRL Archive - Research & Development Lounge

HTML5 Bot Idea


chemicstry

2013-09-26 16:31:52

Hello all, I haven't been here for a while since I left runescape but now new html5 version of runescape pulled my attention.
As you all know html5 runescape runs on javascript and webgl. Since javascript is not compiled, just minified it is easy to get all game data.

Firstly I tried getting player position.
Here is the script: http://intel.kd.io/inject_playerpos.js
You can inject it into client via chromes debug console with the following code:
s = document.createElement('script'); s.src = 'https://intel.kd.io/inject_playerpos.js'; document.body.appendChild(s);

You will see output:
Player pos: 0,3207,3248 
It's in format "level, x, y"

This is just first tests, I will try something more tomorrow :)

Runescape client source: https://world17.runescape.com/html5/client/Bootstrap.js
I have deminified one but it's 3mb and too large for pastebin. Everyone knows how to deminify anyway.

We could even find out real object names (with some patience) and have a full runescape client source ;)

One thing that I couldn't do is launching client from local files. Chrome just crashes on loading screen.

<3 html5 runescape


GitHub:
https://github.com/Intel/JSBot
IRC:
Rizon #jsbot

J J

2013-09-26 17:54:12

Script:

var Z = ge._cnt._ldp();
if (Z._jw()) {
var Q = qo.create();
Z._exo(Q);
var V = ge._cke();
if (V !== undefined) {
var P = V._iex();
if (P !== undefined) {
var Y = bfj();
P._uxn(Y, false);
console.log("Player pos: " + Y.level + "," + Y.x + "," + Y._bnm);
}
}
} else {
console.log("Game not ready yet");
}

Looks interesting. @Brandon; worked on a Chrome WebGL replacement that logs all the drawing calls. I'm not sure how he has progressed with that.

The only problem is the same as reflection/injection: fields/methods will have different names after updates.
Using WebGL + a few Javascript hooks you could potentially create a bot that runs in Chrome.

Perhaps you could make an extension/add-on. Just not sure how you plan on making it type, move the mouse and rotate the screen. Not sure if you can simulate mouse movement.

chemicstry

2013-09-26 18:14:27

Yeah, the biggest problem is updates. It might be possible to identify objects by their structure (something that I did when playing with wow).

About mouse movement simulation, it might not be needed. If we could find function that is responsible for mouse, I'm almost sure that there wouldn't be any code checking mouse movement so we could even call mouse click functions directly.

Another function:
var Z = ge._cnt._ldp();
if (Z._jw()) {
var something = ge._cke();
if (something !== undefined) {
var Player = something._iex();
if (Player !== undefined) {
var ObjectMgr = Player.parent;
var Objects = ObjectMgr._gqw;
for (var ObjIndex in Objects)
{
var Obj = Objects[ObjIndex];
if (Obj._exw !== undefined)
if (Obj._exw._bei !== undefined)
console.log(Obj._exw._bei);
}
}
}
} else {
console.log("Game not ready yet");
}
Finds all nearby npcs and players.
I don't know yet how to directly get object manager but it's accessible from player object via parent.
"ge" seems like a main client object and "ge._cke()._iex()" points to player object.

Update:
var Z = ge._cnt._ldp();
if (Z._jw()) {
var something = ge._cke();
if (something !== undefined) {
var Player = something._iex();
if (Player !== undefined) {
var ObjectMgr = Player.parent;
var Objects = ObjectMgr._gqw;
for (var ObjIndex in Objects)
{
var Obj = Objects[ObjIndex]._exw;
if (Obj !== undefined && Obj._uxn !== undefined)
{
var Pos = bfj();
Obj._uxn(Pos, false);
console.log("Name: " + Obj._bei + " X: " + Pos.x + " Y: " + Pos._bnm);
}
}
}
}
} else {
console.log("Game not ready yet");
}

Output:
Name: powershudas X: 3208 Y: 3265 inject_findobj.js:17
Name: Hank X: 3199 Y: 3250 inject_findobj.js:17
Name: Training dummy X: 3194 Y: 3257 inject_findobj.js:17
Name: Training dummy X: 3197 Y: 3257 inject_findobj.js:17
Name: Harlan X: 3198 Y: 3262 inject_findobj.js:17
Name: Will Dee X: 3206 Y: 3254 inject_findobj.js:17
Name: Training dummy X: 3200 Y: 3257 inject_findobj.js:17
Name: Minnie Gamer X: 3207 Y: 3258 inject_findobj.js:17
Name: Polly Paw X: 3208 Y: 3260 inject_findobj.js:17
Name: Lady Deathknell X: 3210 Y: 3256 inject_findobj.js:17
Name: Barr Rows X: 3212 Y: 3260 inject_findobj.js:17
Name: Lumbridge guard dog X: 3216 Y: 3258 inject_findobj.js:17
Name: Elite Lumbridge guardsman (upgraded) X: 3213 Y: 3264 inject_findobj.js:17
Name: Elite Lumbridge guardsman (upgraded) X: 3216 Y: 3255 inject_findobj.js:17
Name: Goblin X: 3215 Y: 3269 inject_findobj.js:17
Name: Imp X: 3204 Y: 3279 inject_findobj.js:17
Name: Goblin X: 3216 Y: 3279 inject_findobj.js:17
Name: Man X: 3206 Y: 3252 inject_findobj.js:17
Name: Goblin X: 3223 Y: 3263 inject_findobj.js:17
Name: Falador White Knight X: 3223 Y: 3258 inject_findobj.js:17
Name: Woman X: 3208 Y: 3250

This stuff is addicting

Olly

2013-09-26 21:21:45

Wow, quite impressive… :)

serajin

2013-09-26 21:39:57

This is some fancy lookin' coding…

haiku

2013-09-27 02:49:49

what are the implications of this to all of those uneducated at coding?

Dgby714

2013-09-27 04:21:57

core did this awhile back, never seen any of the code, but nobody was interested so he stopped playing with it.

Kevin

2013-09-27 10:55:04

From: haiku
what are the implications of this to all of those uneducated at coding?

You could possibly have a new setup where 90-100% of the bot exists within your browser and it could determine everything with 100% accuracy.

From: Dgby714
core did this awhile back, never seen any of the code, but nobody was interested so he stopped playing with it.


Maybe it was just a timing when noone noticed it, or did it not happen publicly? (I don't recall it at the very least).

Brandon

2013-09-27 12:06:43

From: haiku
what are the implications of this to all of those uneducated at coding?


There's none really. It injects javascript but that's not really detectable at all. You can even use it as an extension.

The downside (not downsides imo):

For the developer, it'd be hard to get Simba to communicate directly with the extension/browser unless the developer makes a bot for the browser itself (non-simba related).

The developer(s) would need an updater every time the client gets updated (if the bootstrap changes).

Things like this is almost never used because SRL is really a "colour" based community and that's usually made very clear by a lot around here.



The upside:

This is exactly like reflection and possibly even more powerful since you have access to the entire client's code before it reaches the gfx (object names, implementations, etc).

This would rarely need updating if the bootstrap stays roughly same.


I say OP should keep going with this until it is developed enough to use right away.


From: Kevin
You could possibly have a new setup where 90-100% of the bot exists within your browser and it could determine everything with 100% accuracy.

Maybe it was just a timing when noone noticed it, or did it not happen publicly? (I don't recall it at the very least).


Was pretty public. On IRC at least.

Flight

2013-09-27 12:36:05

This is pretty neat and I'd like to see something come from this. Might I ask how you plan to handle the updating every 6 hours?

chemicstry

2013-09-27 15:27:19

From: Flight
This is pretty neat and I'd like to see something come from this. Might I ask how you plan to handle the updating every 6 hours?

HTML5 client is not auto generated, at least not yet. Source remained the same for the past 5 days.

I did some more testing today and was hoping to find out inventory objects but it's harder than I though. The worst thing is that they use setter and getter functions, which make it hard to debug.

BobboHobbo

2013-09-27 23:50:47

This is quite impressive! Keep us posted on new finds please :).

chemicstry

2013-09-29 16:10:03

So I hooked all mouse functions and they seem to be working. Code:
http://pastebin.com/c28NM9je

This is just simple code to emulate mouse events so it doesn't have any "humanish" movement yet but you can do JBMouse.Move(x, y) and .Click(button)

Next step is move to tile function, might have that today : >

I didn't think of any namespace for functions so it's just JB (Javascript Bot)

Update:

Movement is working :}
http://www.youtube.com/watch?v=daCxCaSHi0w

Spartan 117

2013-09-29 19:16:53

This is looking pretty bad ass and the included video is pretty exciting. Keep up the good work!:spot:

rj

2013-09-29 20:00:00

From: chemicstry
So I hooked all mouse functions and they seem to be working. Code:
http://pastebin.com/c28NM9je

This is just simple code to emulate mouse events so it doesn't have any "humanish" movement yet but you can do JBMouse.Move(x, y) and .Click(button)

Next step is move to tile function, might have that today : >

I didn't think of any namespace for functions so it's just JB (Javascript Bot)

Update:

Movement is working :}
http://www.youtube.com/watch?v=daCxCaSHi0w


OO looks very cool just need some decent mouse movements

xtrapsp

2013-09-30 05:15:52

From: chemicstry
So I hooked all mouse functions and they seem to be working. Code:
http://pastebin.com/c28NM9je

This is just simple code to emulate mouse events so it doesn't have any "humanish" movement yet but you can do JBMouse.Move(x, y) and .Click(button)

Next step is move to tile function, might have that today : >

I didn't think of any namespace for functions so it's just JB (Javascript Bot)

Update:

Movement is working :}
http://www.youtube.com/watch?v=daCxCaSHi0w


Genuinely interested in this… This would bring me back to RS Bots.

If you setup a github I'm down to help out

Justin

2013-09-30 05:56:34

Amazing, keep up the work, so far it looks awesome :)

chemicstry

2013-09-30 07:00:10

From: xtrapsp
Genuinely interested in this… This would bring me back to RS Bots.

If you setup a github I'm down to help out


We and everyone who is willing to help should have a talk regarding further development. Irc, skype, anywhere.
First thing is to get the base bot structure. I'm certainly not a fan of javascript and I do not know what are the best oop patterns. So I would definitely appreciate help on this.
Other than that, there a lot of work finding required objects. I was trying to find inventory yesterday but left that aside after 3 hours of searching…
Chromes javascript debugger is very limited for this stuff but I don't know any other.

Sirenia

2013-09-30 07:41:47

This looks very interesting and I really want to follow your progress, please keep us updated :)

xtrapsp

2013-09-30 08:17:32

From: chemicstry
We and everyone who is willing to help should have a talk regarding further development. Irc, skype, anywhere.
First thing is to get the base bot structure. I'm certainly not a fan of javascript and I do not know what are the best oop patterns. So I would definitely appreciate help on this.
Other than that, there a lot of work finding required objects. I was trying to find inventory yesterday but left that aside after 3 hours of searching…
Chromes javascript debugger is very limited for this stuff but I don't know any other.


PM me your skype. I'm not super knowledgeable on JS but I am learning (Doing a few things in HTML5 atm).
If anything I have an arsenal of tools that could help

Gu3st...

2013-09-30 11:50:08

@chemicstry; This is looking really good! :) Keep up the good work and keep us updated! This looks really promising!

greent

2013-09-30 13:01:50

I played around with this awhile ago and refactored some of the cache loading (Object/Npc/Item definitions etc). If you wanted to look into any of that id be willing to help.

chemicstry

2013-09-30 14:28:10

We are now on github: https://github.com/Intel/JSBot
And I also created #jsbot channel on rizon for development discussion.

From: greent
I played around with this awhile ago and refactored some of the cache loading (Object/Npc/Item definitions etc). If you wanted to look into any of that id be willing to help.


I would love to see those. Message me on irc, skype "chemicstry" or just send me a message on github.

weequ

2013-09-30 19:24:36

I knew javascript bots would come with html5 update but the progress have just been really slow so far. I'm going to take a course on javascript in the next period so maybe html5 client hacking could teach me something… Good job, looks interesting.

Brandon

2013-09-30 21:55:34

From: weequ
I knew javascript bots would come with html5 update but the progress have just been really slow so far. I'm going to take a course on javascript in the next period so maybe html5 client hacking could teach me something… Good job, looks interesting.



Iunno what I can do to help you and I really hate js.. However I do have the following and you should note that not all of them are 100% correct. I just skimmed through the deminified js pretty quickly..

You might find it useful, you might find it useless :( but here goes:


var q = function(M, L) <--- ModelView Matrix. Copies Matrix M to Matrix L.

//------------------------------------------------------------

var x = function(L) <--- Creates Identity Matrix:

[1, 0, 0, 0]
[0, 1, 0, 0]
[0, 0, 1, 0]
[0, 0, 0, 1]

//------------------------------------------------------------


var p = function(Z) <--- Seems to be finding inverse of a specified matrix? :S


//------------------------------------------------------------

var K = function(M, L) <--- Copies Matrix M to L and sets the eye position to 0, 0, 0, 1.

//------------------------------------------------------------

var d = function(L) <--- Simply returns the Matrix L as a string comma delimited.

//------------------------------------------------------------

a.prototype._bi = function(r) <--- Loads the vertex shader and fragment shader, compiles/links to it, and deletes/frees the allocated memory.
<--- It then goes on to get the uniform variable location specified by i.name and its attribute.

//------------------------------------------------------------

var lg = function() <--- The source-code of a shader (usual language is GLSL). Returns the source as a string for loading later.

//------------------------------------------------------------

var vv = function() <--- The source-code of a shader (usual language is GLSL). Returns the source as a string for loading later.


---ALL shaders have \n and \t's written into them within quotes--- This is how you identify them. Some are fragment shaders, others are vertex and geometric shaders.'
---ALL shaders are written in GLSL a C-Style language for shaders---



//-----------------------------------------------------------

var rz = function() <--- Not sure if this is unicode UTF8 to UTF16 conversion but it really seems like it or some sort of string encryption/decryption.
<--- I believe this function has something to do with rendering Bitmap fonts along with: var u = function(P, K, S).


//-----------------------------------------------------------

var ph = function() <--- Definitely a fragment shader and it is definitely written in GLSL - Standard most used shading language (very much like C/C++).
<--- Because of this, I believe all the shaders are written in GLSL because you cannot write shaders in two different languages for OGL (HLSL + GLSL).


//-----------------------------------------------------------

var byl = function() <--- Seems to be rendering fonts. Similar to OpenGLs display list fonts. Note: a bitmap-font/display-list font can only have 256 characters.

//-----------------------------------------------------------

var jg = function(a) <--- Switching languages/encoding.

//-----------------------------------------------------------

var gm = function() <--- Creates and removes mouselisteners (i think).

//-----------------------------------------------------------


var brs = function() <--- Initialization function. Checks if WebGL is supported, instantiates a canvas, some textures and buffers (vertex, frame, etc..)


//-----------------------------------------------------------

y.webGL = function(P) <--- Part of the initialisation function. This is the function that initializes the game. Think of this as "Main" as it initialises all texture
required for loading the game successfully, all shaders, buffers, and variables necessary for running. Also sets up the matrices, storage,
audio, etc..

//------------------------------------------------------------

var blg = function() <--- Sets up caching.

//------------------------------------------------------------

r = ax.getElementById("gamefps"); <--- I believe this retrieves FPS. I''m not 100% sure yet though.


//------------------------------------------------------------

var cr = function() <--- I believe this is the "LinkedList" constructor function.

//------------------------------------------------------------

var bdm = function() <--- Renders a model.

Info:
p.gl.bindBuffer(p.gl.ARRAY_BUFFER, c); <--- binds a vertex buffer with the ID#: c.
p.gl.bufferData(p.gl.ARRAY_BUFFER, r, p.gl.STATIC_DRAW); <--- r is the sizeof the vertex buffer in bytes.
p.gl.bindBuffer(p.gl.ELEMENT_ARRAY_BUFFER, b); <--- binds an index buffer with the ID#: b.
p.gl.bufferData(p.gl.ELEMENT_ARRAY_BUFFER, h, p.gl.STATIC_DRAW); <--- h is the sizeof the index buffer in bytes.

//If rendering a buffer, do NOT forget to use the stride to get each vertex as specified index + stride offset.

n.gl.vertexAttribPointer(A._ten(bqn._dnh.id), 2, n.gl.FLOAT, false, 16, 8); <--- set the vertex pointer as well as the stride and type of vertices (float).
n.gl.drawElements(n.gl.TRIANGLES, 6, n.gl.UNSIGNED_SHORT, 0) <--- Draw a model. A call to drawElements always means a model is being rendered.


gl.readPixels <--- A call to this function means you can simply pass the colour buffer to Simba. The current plugin does this and supplies the Smart buffer.
var D = p.bindTexture(vy._gnk, A._esu(), p.gl.TEXTURE_2D); <--- Binds a texture. Usually binding a texture means that the next couple calls are either going to shade it or immediately draw it to the screen.
d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X + c, 0, d.RGBA, this.width, this.height, 0, d.RGBA, d.UNSIGNED_BYTE, b) <--- A texture''s info. The buffer containing the textre as well as the width and height and encoding.


//------------------------------------------------------------

var x = function(O, I, H, R, A, E, G, D, Q) <--- seems extremely similar to projection of a point to the screen via gluProject/gluUnProject. Then again,
it really seems to just be setting the viewing area/frustrum/clipping area.

//------------------------------------------------------------

var p = function(C, B) <--- Normalizes a vector C and stores the result in B as well as returns the result.



//------------------------------------------------------------

var bxi = function() <--- Class for decoding and encoding audio.
var bzo = function() <--- Class for audio playback (I think).


//------------------------------------------------------------

var bch = { //Seems like an Enum of some sort. Might be useful.
_kdp: kh._pqj("SFX_SUB"),
_nch: kh._pqj("MUSIC_SUB"),
_nci: kh._pqj("DIALOG_SUB"),
_ncj: kh._pqj("PLAYER_ANIMATION_SUB"),
_nck: kh._pqj("NPC_ANIMATION_SUB"),
_ncm: kh._pqj("LOCATION_ANIMATION_SUB"),
_ncn: kh._pqj("GENERAL_ANIMATION_SUB"),
_nco: kh._pqj("LOCATIONS_SUB"),
_ncq: kh._pqj("LOCATION_RANDOM_SUB"),
_ncr: kh._pqj("LOCATION_GENERIC_SUB")
};

var vh = {
_vmj: kh._pqj("MASTER"),
_vml: kh._pqj("SFX"),
_vmm: kh._pqj("MUSIC"),
_vmo: kh._pqj("MUSIC_LOGIN"),
_vmp: kh._pqj("AMBIENT"),
_vmq: kh._pqj("VOICEOVER")
};


//----------------------------------------------------------

b.prototype.toString = function() { <--- Not sure yet..
return "(x: " + this.x + ", z: " + this._bnf + ", level: " + this.level + ")"
};

//----------------------------------------------------------


var m = d.clientParameters._umb.value._tqu + ".com"; <--- Loads the client. Altogether, I believe it translates to: [url]https://runescape.com/l=LanguageID[/url]
var o = k ? "https://" : "http://";
return o + n + "." + m + "/l=" + d.clientParameters._uml.value.id + "/a=" + d.clientParameters._umm.value + p + "/"

//----------------------------------------------------------

var bdf = function(a) <--- Allows the user to specify which game they want to load. Runecape, Transformers, StellarDawn, etc..


//----------------------------------------------------------

var bsm = function() <--- Sets ALL the strings used for EVERY interface in the game (including right-clicks, etc..). Can be used to identify text on screen/interfaces or simply eliminate some variables from the obfuscated code.


Very SMALL!! example (source-code):

var aO = [];
aO[jg._vaf.id] = "This is the developer console. To close, press the ALT-`, ALT-\xb2 or ALT-\xa7 keys on your keyboard.";
aO[jg._vai.id] = "Das ist die Entwicklerkonsole. Zum Schlie\xdfen, die Tasten ALT+`, ALT+\xb2 oder ALT+\xa7 dr\xfccken.";
aO[jg._vaj.id] = "Ceci est la console de d\xe9veloppement. Pour la fermer, appuyez sur les touches ALT+`, ALT+\xb2 ou ALT+\xa7.";
aO[jg._vam.id] = "Este \xe9 o painel de controle do desenvolvedor. Para fechar, pressione ALT-`, ALT-\xb2 ou ALT-\xa7.";
aO[jg._vat.id] = "Esta es la consola de desarrolador. Para cerrarla, pulsa las teclas ALT-`, ALT-\xb2 or ALT-\xa7 en tu teclado.";
var cu = [];
cu[jg._vaf.id] = "The developer console can be accessed with ALT-`, ALT-\xa7 or ALT-\xb2.";
cu[jg._vai.id] = "Die Entwicklerkonsole kann mit ALT+`, ALT+\xa7 oder ALT+\xb2 aktiviert werden.";
cu[jg._vaj.id] = "La console de d\xe9veloppement est accessible gr\xe2ce aux touches ALT+`, ALT+\xa7 ou ALT+\xb2.";
cu[jg._vam.id] = "O painel de controle do desenvolvedor pode ser acessado com ALT-`, ALT-\xa7 ou ALT-\xb2.";
cu[jg._vat.id] = "Puedes acceder a la consola de desarrollador con ALT-`, ALT-\xa7 o ALT-\xb2.";
var bF = [];
bF[jg._vaf.id] = "There was an error executing the command.";
bF[jg._vai.id] = "Es gab einen Fehler beim Ausf\xfchren des Befehls.";
bF[jg._vaj.id] = "Une erreur s'est produite lors de l'ex\xe9cution de la commande.";
bF[jg._vam.id] = "Houve um erro quando o comando foi executado.";
bF[jg._vat.id] = "Se produjo un error al ejecutar el comando.";
var aG = [];
aG[jg._vaf.id] = "Unknown developer command: ";
aG[jg._vai.id] = "Unbekannter Befehl: ";
aG[jg._vaj.id] = "Commande inconnue : ";
aG[jg._vam.id] = "Comando desconhecido: ";
aG[jg._vat.id] = "Comando desconocido: ";
var p = [];
p[jg._vaf.id] = "Cancel";
p[jg._vai.id] = "Abbrechen";
p[jg._vaj.id] = "Annuler";
p[jg._vam.id] = "Cancelar";
p[jg._vat.id] = "Cancelar";
var t = [];
t[jg._vaf.id] = "#Player";
t[jg._vai.id] = "#Spieler";
t[jg._vaj.id] = "#Joueur";
t[jg._vam.id] = "#Jogador";
t[jg._vat.id] = "#Jugador";
var s = [];
s[jg._vaf.id] = "Login to a members' server to use this object.";
s[jg._vai.id] = "Du musst auf einer Mitglieder-Welt sein, um diesen Gegenstand zu benutzen.";
s[jg._vaj.id] = "Connectez-vous \xe0 un serveur d'abonn\xe9s pour utiliser cet objet.";
s[jg._vam.id] = "Acesse um servidor para membros para usar este objeto.";
s[jg._vat.id] = "Accede a un servidor para miembros para usar este objeto.";
var aE = [];
aE[jg._vaf.id] = "Swap this note at any bank for the equivalent item.";
aE[jg._vai.id] = "Dieses Zertifikat kann in einer Bank entsprechend eingetauscht werden.";
aE[jg._vaj.id] = "\xc9changez ce re\xe7u contre l'objet correspondant dans la banque de votre choix.";
aE[jg._vam.id] = "V\xe1 a qualquer banco para trocar esta nota pelo objeto equivalente.";
aE[jg._vat.id] = "Cambia este vale en cualquier banco por el objeto equivalente.";
var a6 = [];
a6[jg._vaf.id] = "Discard";
a6[jg._vai.id] = "Ablegen";
a6[jg._vaj.id] = "Jeter";
a6[jg._vam.id] = "Descartar";
a6[jg._vat.id] = "Descartar";
var m = [];
m[jg._vaf.id] = "Discard";
m[jg._vai.id] = "Ablegen";
m[jg._vaj.id] = "Jeter";
m[jg._vam.id] = "Descartar";
m[jg._vat.id] = "Descartar";
var b1 = [];
b1[jg._vaf.id] = "Take";
b1[jg._vai.id] = "Nehmen";
b1[jg._vaj.id] = "Prendre";
b1[jg._vam.id] = "Pegar";
b1[jg._vat.id] = "Agarrar";
var cs = [];
cs[jg._vaf.id] = "Drop";
cs[jg._vai.id] = "Fallen lassen";
cs[jg._vaj.id] = "Poser";
cs[jg._vam.id] = "Largar";
cs[jg._vat.id] = "Dejar";
var bk = [];
bk[jg._vaf.id] = "Ok";
bk[jg._vai.id] = "Okay";
bk[jg._vaj.id] = "OK";
bk[jg._vam.id] = "Ok";
bk[jg._vat.id] = "OK";
var bY = [];
bY[jg._vaf.id] = "Select";
bY[jg._vai.id] = "Ausw\xe4hlen";
bY[jg._vaj.id] = "S\xe9lectionner";
bY[jg._vam.id] = "Selecionar";
bY[jg._vat.id] = "Seleccionar";
var cg = [];
cg[jg._vaf.id] = "Continue";
cg[jg._vai.id] = "Weiter";
cg[jg._vaj.id] = "Continuer";
cg[jg._vam.id] = "Continuar";
cg[jg._vat.id] = "Continuar";

//Code actually continues. Simply finding the function above will allow you to view ALL the variables containing text.


//----------------------------------------------------------------------------------

g.getWorldPosition = function(t, v) <--- Returns position of t within the world and stores it in v.


//----------------------------------------------------------------------------------

var dn = function() <--- Overhead icons: Prayer Icon, Skulled-Player Icon, etc..


//-----------------------------------------------------------------------------------

Example of a model being rendered using the a shader (most likely vertex shader).

S.gl.bindBuffer(S.gl.ARRAY_BUFFER, R._gcs);
S.gl.bindBuffer(S.gl.ELEMENT_ARRAY_BUFFER, R._gct);
S.gl.uniformMatrix4fv(M._tek(bqn._dfj.id), false, O);
S.gl.vertexAttribPointer(M._ten(bqn._dmw.id), 2, S.gl.FLOAT, false, 16, 0);
S.gl.vertexAttribPointer(M._ten(bqn._dnh.id), 2, S.gl.FLOAT, false, 16, 8);
S.gl.drawElements(S.gl.TRIANGLES, 6, S.gl.UNSIGNED_SHORT, 0)


//-----------------------------------------------------------------------------------

var Y = function(bI) <--- Sets custom cursor.


//-----------------------------------------------------------------------------------

var aN = function(aX) <--- Example of drawing a texture using a shader and buffer. (Basically draws a texture like a model)


//-----------------------------------------------------------------------------------

var qc = function(b) <--- Socket class

Example code:

p._vfr = function() {
return {
available: r(),
writesFromServer: q,
readsFromClient: s,
writesFromClient: g,
sendTime: o,
_vft: (o / g),
_vfu: k === undefined ? 0 : k.bufferedAmount,
totalBytesRead: d,
totalBytesWritten: x
}
};
j = undefined;
return p


G = qc({
inBufferSize: 1000000,
outBufferSize: 100000,
bufferWrites: true,
url: (K ? "wss://" : "ws://") + J + ":" + L,
protocol: "jagex"
})


//------------------------------------------------------------------------------------


c.prototype._npo = function() {
if (this._nmu !== _jyt && this._nmu._tcd() === true) {
var d = this._nmu._tce(this._hd.gameState, this._hd.gameState); <--- GameState variable.
if (d === undefined || d === _jyt) {
return false
}
}
return true
};


//-----------------------------------------------------------------------------------

var zt = function() <--- Handles unicode and current locale.


//-----------------------------------------------------------------------------------

qg._kcv(m, false, n, true, d, h << WorldScale._btb, i << WorldScale._btb, e << WorldScale._btb, g << WorldScale._btb) <--- WorldScale needed for projection.


//----------------------------------------------------------------------------------


var blo = function() <--- Class for the developers console. Contains important info such as player position and camera eye.

Example code:

if (S === "commands" || S === "help") {
o("commands - This command");
o("cls - Clear console");
o("displayfps - Toggle FPS and other information");
o("getcamerapos - Print location and direction of camera for use in bug reports");
return
}
if (S === "cls") {
e = 0;
d = 0;
return
}
if (S === "displayfps") {
a._cnn._njq();
if (a._cnn._njs()) {
o("FPS on")
} else {
o("FPS off")
}
return
}
if (S === "getcamerapos") {
var aa = a._cnh._lec();
if (aa._ji()) {
var Q = yo.create();
aa._exw(Q);
var U = rv._cwi(Q);
o("Camera look: xa: " + U._cwj + ", ya:" + U._cwk); //Camera's Look at location!!
var W = a._cjq();
if (W !== undefined) {
var P = W._ifl();
if (P !== undefined) {
var Z = uj();
P._uyc(Z, false);
o("Player pos: " + Z.level + "," + Math.floor(Z.x / 64) + "," + Math.floor(Z._bnf / 64) + "," + (Z.x % 64) + "," + (Z._bnf % 64)) <--- Player position within the entire world!!
}
}
return
} else {
o("Camera not available yet")
}
}


//----------------------------------------------------------------------------------------------

var bzi = function() <--- Class for handling game time. Day, Month, Year, etc..


//----------------------------------------------------------------------------------------------

var bdc = function() <--- Function containing the switch statement for all libraries loaded and configurations. Ex: Jaggl, Jaclib, WorldMap data, etc..


//----------------------------------------------------------------------------------------------

var qa = { <--- Enum for IO flags..
MOUSE: 0,
KEYPRESS: 1,
KEYHELD: 2
};


//----------------------------------------------------------------------------------------------

var kt = function() <--- Scene cache class.


//----------------------------------------------------------------------------------------------

var kw = function() <--- Debugger for textures, models, buffers and particle rendering..


//----------------------------------------------------------------------------------------------

Yeah I know I mentioned "class"; not really classes but they really should be.. Some of the functions are literally a page and a half in size :|

Anyway, best of luck! =) you're doing great so far. I really hope the above helps out somewhat though. Good luck.

chemicstry

2013-10-01 05:50:07

From: Brandon
Iunno what I can do to help you and I really hate js.. However I do have the following and you should note that not all of them are 100% correct. I just skimmed through the deminified js pretty quickly..

You might find it useful, you might find it useless :( but here goes:


Yeah I know I mentioned "class"; not really classes but they really should be.. Some of the functions are literally a page and a half in size :|

Anyway, best of luck! =) you're doing great so far. I really hope the above helps out somewhat though. Good luck.


Thx for such a big list of functions. That will definitely come to use.
I don't really know anything about webgl/opengl and all 3d stuff so object targeting will probably be the hardest part.

chemicstry

2013-10-02 14:14:00

Some updates on bot developement:

Created an alpha version of GUI:

Written script loader which runs script in web worker thread (so it doesn't lag main client)
It is also fully isolated from bot core and runescape itself.
All API is loaded and called via RPC.

Here's an example of how script would look like:
http://pastebin.com/W9DZGMxs

Bootstrap code could even be injected into script automatically but that's not the highest priority atm.

There is one serious problem though. Javascript doesn't have such thing like sleep so writing scripts might be pain with all those callbacks and fucntions.
One option is to wait until chrome implements function generators (they are wip as I know). With them it would be possible to simulate sleep function with yield.
Other option is no option.

Kevin

2013-10-02 14:55:06

From: chemicstry
There is one serious problem though. Javascript doesn't have such thing like sleep so writing scripts might be pain with all those callbacks and fucntions.
One option is to wait until chrome implements function generators (they are wip as I know). With them it would be possible to simulate sleep function with yield.
Other option is no option.


Other option is a WebAPI that is called and specifically delays a response in order to create the sleep. REST GET endpoint would solve the problem - should be around 2 lines of C#/ASPX code to create and likely already exists somewhere in the public domain ( I can't seem to find a case where it does though… maybe someone with a server would be willing to host it). Or there are solutions if you combine in Jquery as well.

Try this code out once someone may agree to said endpoint (I can't say I'm super familiar with js buuuuuut):

<script type="text/javascript">

function sleep(milliSeconds){
var resource;
var response;
if(typeof ActiveXObject == 'undefined'){
resource = new XMLHttpRequest();
}
else{
// IE
resource = new ActiveXObject("Microsoft.XMLHTTP");
}

try{
resource.open('GET', 'sleep.php?milliSeconds=' + milliSeconds, false);//This would be directed at the aforementioned endpoint.
resource.send(null);
response = resource.responseText; // JavaScript waits for response
}
catch(e){
alert(e);
}

return true;
}

chemicstry

2013-10-02 15:20:28

From: Kevin
Other option is a WebAPI that is called and specifically delays a response in order to create the sleep. REST GET endpoint would solve the problem - should be around 2 lines of C#/ASPX code to create and likely already exists somewhere in the public domain ( I can't seem to find a case where it does though… maybe someone with a server would be willing to host it). Or there are solutions if you combine in Jquery as well.

Try this code out once someone may agree to said endpoint (I can't say I'm super familiar with js buuuuuut):

<script type="text/javascript">

function sleep(milliSeconds){
var resource;
var response;
if(typeof ActiveXObject == 'undefined'){
resource = new XMLHttpRequest();
}
else{
// IE
resource = new ActiveXObject("Microsoft.XMLHTTP");
}

try{
resource.open('GET', 'sleep.php?milliSeconds=' + milliSeconds, false);//This would be directed at the aforementioned endpoint.
resource.send(null);
response = resource.responseText; // JavaScript waits for response
}
catch(e){
alert(e);
}

return true;
}


Interesting. Haven't seen anything like that. The only problem I can see is ping to the server. But this would affect only short duration sleeps. Will test it, thanks.

Now there is an even bigger problem :D
Runescape generates random source for every IP address :D
I was thinking of analysing bootstrap code with javascript but I can't get it into string because of cross domain security ;/
Proxy wouldn't work either because of IP detection.
Good brain teaser :)

Kevin

2013-10-02 15:33:46

From: chemicstry
Interesting. Haven't seen anything like that. The only problem I can see is ping to the server. But this would affect only short duration sleeps. Will test it, thanks.

Now there is an even bigger problem :D
Runescape generates random source for every IP address :D
I was thinking of analysing bootstrap code with javascript but I can't get it into string because of cross domain security ;/
Proxy wouldn't work either because of IP detection.
Good brain teaser :)


(Hopefully) Not the best answer, but a local iis web-server program could be created to get through the cross domain security. Another way around the random source - or even updated bootstrapper - would be to work on some sort of smart, on the fly, deminification and translation for variable/function names… Prolly require a separate program run once per computer but might be possible…

chemicstry

2013-10-02 17:01:14

From: Kevin
(Hopefully) Not the best answer, but a local iis web-server program could be created to get through the cross domain security. Another way around the random source - or even updated bootstrapper - would be to work on some sort of smart, on the fly, deminification and translation for variable/function names… Prolly require a separate program run once per computer but might be possible…


Written a small script to find main game object http://pastebin.com/wMHyD1ka
Used javascript parsing library named ACORN and it's amazing. It parses whole runescape source in ~3 seconds.

I couldn't get around same origin policy though. You have to download runescape bootstrap manually and give it to bot to analyse.
Probably the only way is a local web server as you mentioned.

nickrules

2013-10-02 19:42:28

From: chemicstry
There is one serious problem though. Javascript doesn't have such thing like sleep so writing scripts might be pain with all those callbacks and fucntions.
One option is to wait until chrome implements function generators (they are wip as I know). With them it would be possible to simulate sleep function with yield.
Other option is no option.


First of all, I've been following this thread for a few days now, and I'd like to say that I love what you're doing, and I'd love to help if possible (though my JS skills are far from complete). That said, I can start helping you right now with this handy dandy little link ;)

J J

2013-10-03 07:12:23

Nice progress once again and congratulations on achieving a new cup :)
Oh.. and awesome analysis, Brandon.
var blo = function() <— Class for the developers console. Contains important info such as player position and camera eye.

I assume this can be used to grab the Player's position + Camera position pretty easily?

Considering it's needed to find patterns this is certainly useful.

chemicstry

2013-10-03 15:49:00

From: J J
Nice progress once again and congratulations on achieving a new cup :)
Oh.. and awesome analysis, Brandon.

I assume this can be used to grab the Player's position + Camera position pretty easily?

Considering it's needed to find patterns this is certainly useful.


That's where I first started. That console object contains examples of how to get player, position, gamestate, etc. But the camera angles do not work, even in console (probably a WIP?)

Unfortunately Brandon's function list is useless as every IP gets different bootstrap. But I could still use them if he uploaded his bootstrap. I worked all day on a bootstrap parser which generates function and object signatures. It can find same functions in random bootstraps so it will be used to bypass random bootstrap generation. However, it will probably be the only thing that I will have to keep closed source to prevent jagex from breaking it.

Kevin

2013-10-03 15:52:58

From: chemicstry
That's where I first started. That console object contains examples of how to get player, position, gamestate, etc. But the camera angles do not work, even in console (probably a WIP?)

Unfortunately Brandon's function list is useless as every IP gets different bootstrap. But I could still use them if he uploaded his bootstrap. I worked all day on a bootstrap parser which generates function and object signatures. It can find same functions in random bootstraps so it will be used to bypass random bootstrap generation. However, it will probably be the only thing that I will have to keep closed source to prevent jagex from breaking it.


I understand your worries due to jagex possibly breaking it, but we are an open-source community with reasonable past fears from non-open source creations. Perhaps as opposed to a full closed-source, you would be willing to make it a private-sourced project such that a certain ranking of people may be capable of accessing it (Dev+ or the like)?

Also, PM me later (here or skype) and I'll try and grab and send you my bootstrap.

chemicstry

2013-10-03 16:07:37

From: Kevin
I understand your worries due to jagex possibly breaking it, but we are an open-source community with reasonable past fears from non-open source creations. Perhaps as opposed to a full closed-source, you would be willing to make it a private-sourced project such that a certain ranking of people may be capable of accessing it (Dev+ or the like)?

Also, PM me later (here or skype) and I'll try and grab and send you my bootstrap.


Sure, I will share it with private group of devs. I just don't want it to be completely public.

Brandon

2013-10-03 18:15:36

From: chemicstry
That's where I first started. That console object contains examples of how to get player, position, gamestate, etc. But the camera angles do not work, even in console (probably a WIP?)

Unfortunately Brandon's function list is useless as every IP gets different bootstrap. But I could still use them if he uploaded his bootstrap. I worked all day on a bootstrap parser which generates function and object signatures. It can find same functions in random bootstraps so it will be used to bypass random bootstrap generation. However, it will probably be the only thing that I will have to keep closed source to prevent jagex from breaking it.



Here (it twill take long to load lol): http://paste.villavu.com/show/QAmdiHrlZ3QcGKa6H9FC/

The link seems to load faster in firefox than in chrome so yeah; for me at least.

Goodluck with it. It is HUGE! Luckily, paste.villavu.com has no limit that I can see..

Kevin

2013-10-10 20:01:58

http://paste.villavu.com/show/5431/

Rtap

2013-10-21 09:05:28

Is this still being worked on? It looks promising!

Zorgatone

2013-10-21 13:09:14

I'm interested in the project, please keep it updated

greent

2013-10-21 14:42:55

I've been playing around with this since i spoke to you and you could create a analyser to find hooks for each by creating patterns similar to a java updater. Here's a simple example that finds the object definitions class its worked for each revision i've tested on.

var fs = require('fs');
var esprima = require('D:\\Program Files\\Utils\\Programing\\workspace\\Utils\\JavaScriptAnalysis\\src\\util\\esprima.js');
var createAnalyser = function (filePath) {
var Analyser = function (filePath) {
this.filePath = filePath;
this.code = null;
this.ast = null;
}
Analyser.prototype.analyse = function (classVisitors) {
fs.readFile(this.filePath, function (err, data) {
if (err) {
throw err;
}
this.code = data;
this.ast = esprima.parse(this.code);
console.log("Code Parsed")
var program = ast["body"];
for (var temp in program) {
if (program.hasOwnProperty(temp) && program[temp].type === 'VariableDeclaration') {
var child = program[temp].declarations[0];
for (var v in classVisitors) {
if (v === undefined) {
continue;
}
var visitor = classVisitors[v];
if (visitor.visit(child)) {
console.log(v, " > \n", child);
break;
}
}
}
}
});
}
return new Analyser(filePath);
}
function checkClassName(classNode, name) {
return classNode['id'] != null && classNode['id'].name === name;
}
var visitors = {
Bootstrap: {
visit: function (classNode) {
return checkClassName(classNode, 'Bootstrap');
},
},
ObjectDef: {
intField : false,
nullField : false,
constructorParams: false,
visit : function (classNode) {
this.intField = false;
this.nullField = false;
this.constructorParams = false;
var body = classNode['init']['callee'];
if (body === undefined || (body = body['body']) === null || (body = body['body']) === null) {
return false;
}
for (var v in body) {
var child = body[v];
switch (child['type']) {
case 'VariableDeclaration':
this.visitField(child);
break;
case 'ExpressionStatement':
this.visitMethod(child);
break;

}
}
return this.intField && this.nullField && this.constructorParams;
},
visitField : function (fieldNode) {
var body = fieldNode['declarations'][0]['init'];
if (body === null) {
return;
}
switch (body['type']) {
case 'Literal':
switch (body['raw']) {
case '6':
this.intField = true;
break;
case '"null"':
this.nullField = true;
break;
}
break;
case 'FunctionExpression':
if (body['params'].length === 3) {
this.constructorParams = true;
}
}
},
visitMethod : function (methodNode) { }
}
}
var parser = createAnalyser("D:\\Program Files\\Utils\\Programing\\workspace\\Utils\\JavaScriptAnalysis\\data\\revisions\\Bootstrap21-10-2013.txt");
parser.analyse(visitors);
Note this is running locally using node.js and you'll need to get the esprima source and change directories

chemicstry

2013-10-29 08:23:02

Thanks for the code greent. I will look into it when I have time as I have been very busy for the past few weeks.

Development of bot kinda slowed down as I ran into synchronous javascript problems which I don't know how to solve.
To make sleep function in javascript webworker you have to be in a generator function (which are still alpha in chrome) and yield a rpc call to function in main script via postmessage. That function in main then creates a timeout which sends a rpc response back to web worker to resume function. It sounds as terrible as it actually is. I am trying to implement this but I just started working on a robust web worker rpc library.

I have been thinking of alternatives to this as well.
I don't know much about chrome extensions but maybe it would be possible to write a V8 javascript engine plugin for sleep function?
Kevin's idea with http request is an option too but it heavily depends on ping to the server and is very inaccurate.
The only alternative is to use timeouts instead of sleep but scripts would look like …

Kevin

2013-10-29 10:16:09

From: chemicstry
Thanks for the code greent. I will look into it when I have time as I have been very busy for the past few weeks.

Development of bot kinda slowed down as I ran into synchronous javascript problems which I don't know how to solve.
To make sleep function in javascript webworker you have to be in a generator function (which are still alpha in chrome) and yield a rpc call to function in main script via postmessage. That function in main then creates a timeout which sends a rpc response back to web worker to resume function. It sounds as terrible as it actually is. I am trying to implement this but I just started working on a robust web worker rpc library.

I have been thinking of alternatives to this as well.
I don't know much about chrome extensions but maybe it would be possible to write a V8 javascript engine plugin for sleep function?
Kevin's idea with http request is an option too but it heavily depends on ping to the server and is very inaccurate.
The only alternative is to use timeouts instead of sleep but scripts would look like …

Another alternative to an actual server would be to write a local server program that would be run in the IIS (Windows only, sorry MAC/Linux users), thus allowing a local 'server' that would have a 0 ping response time for the endpoint.

chemicstry

2013-10-29 11:06:04

From: Kevin
Another alternative to an actual server would be to write a local server program that would be run in the IIS (Windows only, sorry MAC/Linux users), thus allowing a local 'server' that would have a 0 ping response time for the endpoint.


But then it loses whole "bot in browser" idea.
I actually tried that XHR sleep and it turned out quite well.
Here's code: http://pastebin.com/498JBXxE
It corrects sleep duration with ping from previous sleeps.
On remote server (same country) I get about 2ms error.
Ping jitter is the key factor here

Kevin

2013-10-29 11:33:14

From: chemicstry
But then it loses whole "bot in browser" idea.
I actually tried that XHR sleep and it turned out quite well.
Here's code: http://pastebin.com/498JBXxE
It corrects sleep duration with ping from previous sleeps.
On remote server (same country) I get about 2ms error.
Ping jitter is the key factor here

You could still be botting in the browser, you'd just need a separate program running the local IIS server.

As for fearing ping jitter, is that necessarily a bad thing? It's free randomization in our waits to lower detectability :p

chemicstry

2013-11-06 08:14:03

I've been trying to find some more hooks lately but chromes javascript debugger is literally useless.
The only thing that can be useful there is profiler memory snapshot. It is saved in JSON format but there is no specification on the data ??? I've been lurking through chromes source code so it might be possible to write a custom snapshot reader. But then again it's a lot of work…

Does anyone know if there are any decent javascript debuggers? Google doesn't seem to help at all…

Kyle Undefined

2013-11-06 10:16:42

From: chemicstry
I've been trying to find some more hooks lately but chromes javascript debugger is literally useless.
The only thing that can be useful there is profiler memory snapshot. It is saved in JSON format but there is no specification on the data ??? I've been lurking through chromes source code so it might be possible to write a custom snapshot reader. But then again it's a lot of work…

Does anyone know if there are any decent javascript debuggers? Google doesn't seem to help at all…


Unfortunately, the best I've found is either Google Chrome's version, or Firebug, and they are pretty much exactly the same.

The best thing about this idea is that you can just add a manifest.xml file to it and boom, a Chrome Extension (Well, not entirely, but close).

Good work on this, it seems to be coming along well.

greent

2013-11-09 17:53:21

I've been slowly refactoring a copy myself recently if there's anything in particular you like me to look for just say. I've also partially restructured the updater i was working on to make it easier to use and added some hooks for various fields. Take a look

https://gist.github.com/Overflow-Powerbot/b1e683de9fbb9298962e

Example Output

{ Bootstrap: 'Bootstrap',
Stream: 'yu',
NPCComposite:
{ className: 'jp',
fields:
{ modelIds: '_tai',
name: 'name',
interactAction: '_szy',
combatLevel: '_nmo',
questIds: '_qo' },
methods: { readOpcode: '_xs' } },
ItemComposite:
{ className: 'bcj',
fields:
{ modelId: '_cgw',
name: 'name',
stackableItem: '_kna',
storeValue: '_knf',
membersOnly: '_bev',
groundAction: '_kmu',
inventoryAction: '_kmv',
unnotedItem: '_knm',
notedItemId: '_kop',
notedItemTemplateId: '_koq',
teamId: '_knk',
questIds: '_qo' },
methods: { readOpcode: '_xs' } },
GameObjectComposite:
{ className: 'bbp',
fields:
{ modelId: '_vwc',
name: 'name',
sizeX: '_vnb',
sizeZ: '_vnc',
interactive: '_gte',
interactAction: '_szy',
membersOnly: '_bev',
questIds: '_qo' },
methods: { readOpcode: '_xs' } } }

alar82

2013-11-11 12:41:16

Hmm I don't know much about about programming, but how would one load JSbot as whole into chrome console?Well managed load parts of it, javascript seems so severly limited:S
Greent how did you load that 'esprima'?

greent

2013-11-12 16:06:25

From: alar82
Greent how did you load that 'esprima'?


Look into node.js and npm modules

https://npmjs.org/

i386

2013-12-12 20:58:54

Anything new on this?

tristen8878

2013-12-13 11:54:40

From: chemicstry
So I hooked all mouse functions and they seem to be working. Code:
http://pastebin.com/c28NM9je

This is just simple code to emulate mouse events so it doesn't have any "humanish" movement yet but you can do JBMouse.Move(x, y) and .Click(button)

Next step is move to tile function, might have that today : >

I didn't think of any namespace for functions so it's just JB (Javascript Bot)

Update:

Movement is working :}
http://www.youtube.com/watch?v=daCxCaSHi0w


Just watched the video and that's impressive can't wait to see how html5 botting comes along.

jurka

2014-01-01 05:58:34

This is nice code you have, but I am having problem with injecting any code into the client.

All the functions and variables are protected by self executing functions, so you can not easily call these out. How did you inject the hooks to the client so they would be callable from Developer console ?

SoulShare

2014-07-06 23:49:19

Any update on this? I find this very interesting.

J J

2014-07-07 10:49:45

From: SoulShare
Any update on this? I find this very interesting.

It seems that the development has been stopped. :redface:
I have been spending a lot of time with HTML, Javascript and CSS lately, so I might give it a try myself. Unfortunately some links have also been broken in this thread. And I bet Jagex has changed the variable names.

toxjq

2014-08-10 02:45:31

this seems very interesting :)

steelmuffin

2014-08-16 19:18:49

This would be a lot better if the html5 client actually ran decently on my pc.

kriogenic

2014-12-28 11:36:47

So I messed around some with this and as people have mentioned in the previous posts the variables are different for each IP and roll every so often to change.

I have written up an experimental bootstrapper of my own which pulls these variable names from each individuals IP based bootstrap.

On top of that I have used and rewritten many of the functions here to successfully do the following

  • Display logged in Username
  • Display player coordinates
  • Move the mouse to specified location
  • Click the mouse (Left and Right)
  • Move character to location following a path
  • Find nearest object by name and by ID

The biggest complication with continuing in the development and what has me sitting at a standstill is the way the canvas is drawn…

It is using a simple HTML5 canvas element which is essentially a bitmap image updated very fast. now, I have gotten my script to locate the positions of NPCs and such but actually clicking them without being able to find model data on the object means it is hit and miss when clicking on the specified tile rather then using the bankers model for example to click on.

If I or anyone else can find away to maybe hook the 2D draw method and capture all data about what is being drawn onto the canvas, it may be possible to pass this barrier in which then I can work on cleaning up my IP independent bootstrapper.

I hope the original poster and the rest of the people interested in this topic can help come up with some answers or ideas.

I will clean up my code later this week and post it here for those who want to try my bootstrapper.

Thanks,
Kriogenic.

Quentini

2014-12-28 19:16:57

From: kriogenic
So I messed around some with this and as people have mentioned in the previous posts the variables are different for each IP and roll every so often to change.

I have written up an experimental bootstrapper of my own which pulls these variable names from each individuals IP based bootstrap.

On top of that I have used and rewritten many of the functions here to successfully do the following

  • Display logged in Username
  • Display player coordinates
  • Move the mouse to specified location
  • Click the mouse (Left and Right)
  • Move character to location following a path
  • Find nearest object by name and by ID

The biggest complication with continuing in the development and what has me sitting at a standstill is the way the canvas is drawn…

It is using a simple HTML5 canvas element which is essentially a bitmap image updated very fast. now, I have gotten my script to locate the positions of NPCs and such but actually clicking them without being able to find model data on the object means it is hit and miss when clicking on the specified tile rather then using the bankers model for example to click on.

If I or anyone else can find away to maybe hook the 2D draw method and capture all data about what is being drawn onto the canvas, it may be possible to pass this barrier in which then I can work on cleaning up my IP independent bootstrapper.

I hope the original poster and the rest of the people interested in this topic can help come up with some answers or ideas.

I will clean up my code later this week and post it here for those who want to try my bootstrapper.

Thanks,
Kriogenic.


I am still trying to figure out your join date, which is nearly 8 years old; and this has been decided to be your first post. :p

Unfortunately, HTML5 development has been replaced with the work going into the new client. (Here's to hoping its something C-related)

Sin

2014-12-28 21:46:01

From: Quentini
I am still trying to figure out your join date, which is nearly 8 years old; and this has been decided to be your first post. :p

Unfortunately, HTML5 development has been replaced with the work going into the new client. (Here's to hoping its something C-related)


Mod MMG confirmed somewhere on Reddit that the client will be called Runescape NXT and will run on C++.

J J

2014-12-28 22:27:39

From: Sin
Mod MMG confirmed somewhere on Reddit that the client will be called Runescape NXT and will run on C++.

Here it is: https://twitter.com/mark__gerhard/status/485768629104148482
Also a big thread on the official RS Forums: http://services.runescape.com/m=forum/forums.ws?16,17,191,65416220

Didn't know this either "Until the release of War of Legends in 2010, the company used the slogan "Java Gaming Experts" as it had only produced games written in Java up to that point. Following the launch of the Flash-based War of Legends, the company name was said to stand for "Just About the Game Experience"." reference.

So the C++ client will still use DirectX and/or OpenGL. Looks like that will be the future of botting as expected. But given that the client runs directly on your PC I think Jagex will also be able to detect botting software a lot easier. It is still possible with Java but C++ makes it easier I presume.

Also this is supposed to be released quite soon, "absolutely, the plan is to launch it late Q4, early Q1 2015". reference
@Brandon;

Frement

2014-12-28 22:30:34

With easier detection comes easier ways to evade. Also I personally like the way they are going with the client.

Quentini

2014-12-28 22:45:50

From: Frement
With easier detection comes easier ways to evade. Also I personally like the way they are going with the client.


The way they are going with the client? How so?

kriogenic

2014-12-29 02:49:55

From: Quentini
I am still trying to figure out your join date, which is nearly 8 years old; and this has been decided to be your first post. :p

Unfortunately, HTML5 development has been replaced with the work going into the new client. (Here's to hoping its something C-related)


Yeah you know when you sign up for things to check out a post and think about replying but never do? well when i came to this thread and tried to sign up my username was taken, recovered and made a post.

And oh fair enough. I have been away from runescape for a very very long time. Guess I'll hold off on this and wait for the new client. C++ is more my thing anyway.

Thanks for the heads up.

slushpuppy

2014-12-29 08:01:07

From: Sin
Mod MMG confirmed somewhere on Reddit that the client will be called Runescape NXT and will run on C++.


So they are abandoning the future ability to run RS on mobile devices? Seems a bit odd considering the tablet market alone is nearly 700m++ internet enabled devices..

Ian

2014-12-29 15:35:49

From: slushpuppy
So they are abandoning the future ability to run RS on mobile devices? Seems a bit odd considering the tablet market alone is nearly 700m++ internet enabled devices..


Would it be feasible for them to keep the current game and allow the NXT client as an alternative? This seems like something that they might do if it's possible.

Quentini

2014-12-29 20:00:59

From: BMWxi
Would it be feasible for them to keep the current game and allow the NXT client as an alternative? This seems like something that they might do if it's possible.


It seems to me, if they were smart they would convert it entirely to C++ and never look back; however, it is Jagex, so its hard to say.

slushpuppy

2014-12-29 20:45:52

From: BMWxi
Would it be feasible for them to keep the current game and allow the NXT client as an alternative? This seems like something that they might do if it's possible.


I believe that one of the major factors for attempting the HTML5 client was to enable jagex to tap into the vast mobile market… now there's one game called albion that managed to create an MMORPG that runs on android

https://albiononline.com/

I honestly don't think the technical challenges are that great any more if a smaller game company manages to do it..


Simply launchimg RS3 on google app store would probably solve jagex's player/financial issues. But owell… jagex these days seems to have the habit of stabbing themselves with a dagger..

Brandon

2014-12-30 10:59:20

Having the entire game being in C++ does not mean they lose anything at all.. Not sure why you guys believe that Java is automatically cross platform and that C++ isn't.

The JVM is written entirely in C++..

Now that it's said, a mod stated that it will be written in C++ with EXPORTS for Java.. Meaning that if required, a Java interface can load the game.

You can have a very tiny java application layer run in the browser, download a shared library and invoke the native interface via JNI. It already does this for JagGL, JagDX and Jaclib.

Jagex loses nothing..

masterBB

2014-12-30 11:03:36

The game I am working on now is written in haxe with openFL. It works in html5, flash, exe(windows), mac, linux, android etc

You could also look at monogame, which supports everything but html5.

kylestev

2015-01-02 22:35:04

Howdy y'all. I couldn't remember my password or email for my old SRL account so I just made this one. Anyways, I forked the latest proof of concept by @greent and updated it slightly so more people can easily use it.

I actually can't post the link just yet, but if you go to @greent's post and visit the Github Gist, you can click on the "Forks" section and view my fork.

If I find time to work on it more, I'll shoot for smaller files so it is a bit more readable.

Feel free to fork and contribute as you see fit.