I managed to run the Runescape applet in a JFrame so far.
Now I would like to get the player's coordinates from the applet as I don't want to analyse the pixels of the game yet.
Is that possible? I've seen a bot from rsbots.net that actually could display the character's absoulte coordinates.
Here is my code:
Code:
Class loader = Class.forName("loader");
Client client = new Client(); // Client extends JFrame
RSStub stub = new RSStub(44, true, 15); /* world numer, is members world, country
RSStub implements AppletStub */
Applet app = (Applet)loader.newInstance();
app.setStub(stub);
app.init();
app.start();
client.AddApplet(app);
client.setSize(600, 400);
client.setVisible(true);
Thanks
Great site btw
===========================================
I have been searching for tutorials and analysed some java bot codes now and I want to share my results:
You can do that by either reflection or BCEL (which basically also is reflection, but you can also inject code).
I tried to analyse the loader.class file (the file that is executed first). When I view it in a bytecode-viewer (or using java reflection) I get the following fields and methods:
Code:
h : String
i : String
j : int
<clinit>()
a : Applet
b : int
c : boolean
d : int
e : boolean
f : boolean
g : boolean
k : int
loader()
a(boolean, ml, c, byte)
a(byte, c, boolean)
a(byte[], File, byte)
a(c, byte[], int, boolean)
a(int, File)
a(int, String)
destroy()
init()
paint(Graphics)
run()
start()
stop()
update(Graphics)
And I found out that loader extends Applet.
Has anyone an idea how to proceed?