Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Javascript Coding:
Biggest JAVA Bot making guide ever!

 

 


rsc_wana_b
Enthusiast


Aug 30, 2005, 3:24 AM

Post #1 of 7 (2124 views)
Shortcut
Biggest JAVA Bot making guide ever! Can't Post

Well i found this at runecms.. So i wont take the credit lol but here it go's.




How to make it scriptable.....
Let's get it started
You need deobed 201 + all jag and mem file

The Complete Bot Making Tutorial


Setting up Your Folders
OK first go to your documents folder (or where ever you store all your files) and create a new folder called MyBot. (Obviously change this to whatever you wish)
Then inside that create a 2 new folders, 1 called “Files” and one called “Data”.
Now open up notepad and inside put this:

Code: @echo off
cd Files
JAVA mudclient
Pause



Save this as Run.bat and put it inside your “MyBot” folder. This is the code you need to run your compiled bot
Now open up another notepad and inside put this:

Code: @echo off

javac *.java
pause

Save this as Compile.bat and put it inside your “Files” folder. This make you able to compile all .java file to .class file.
Ok now your all set up you should download the deobbed mudclient 201. You can find it on rscn.
Extract this to a random place and copy and paste the files into your “Files” folder.

Now for the data files, get them from another bot folder you have.
Again extract them to a random place and copy and paste all the .jag and .mem to your “Data” folder.

Et voila. Your set up to begin editing your bot is done, Congratulations.

Making your bot as a client!
First go into your files folder and open mudclient.java

Then search for
Code: arg0 = "../release/" + arg0;

and change that to

Code: arg0 = "Data/" + arg0;

then find

Code: String s2 = getParameter("referid");

under that there's a code like

Code: dkd = Integer.parseInt(s2);

and change it to

Code: dkd = 0;

then find

Code: String s3 = getParameter("member");

you have a line below like this: Code:

Code: int i2 = Integer.parseInt(s3);

and change to

Code: int i2 = 0;

then find

Code: String s4 = getParameter("poff");

then a line below like this

Code: int j2 = Integer.parseInt(s4);

change to

Code: int j2 = 0;

then search this

Code: public final URL getCodeBase()

and then check that it is like this

Code: public final URL getCodeBase()
{
if(link.fni != null)
return link.fni.getCodeBase();
else
return super.getCodeBase();
}

then change that to

Code: public final URL getCodeBase()
{
try
{
return new URL("http://" + super.aac + "/client2/");
}
catch(Exception e) {return null;}
}

then find

Code: public final URL getDocumentBase()

then check the whole code is like this

Code: public final URL getDocumentBase()
{
if(link.fni != null)
return link.fni.getDocumentBase();
else
return super.getDocumentBase();
}


then change that to

Code: public final URL getDocumentBase()
{
try
{
return new URL("http://www.rs.com"); //but put proper address
}
catch(Exception e) {return null;}
}
Ok now your done with the mudclient.java, save and close it. Now open a.java and find this

Code: fih = false;

change that to

Code: fih = true;

That ^^^ makes it so you can see the objects such as trees when you run your bot.

Ok now save and close a.java and open b.java and find: Code:

Code: 127.0.0.1

change that to

Code: 217.138.31.250

close and compile you are done creating a basic client for runescape

Removing chat filter

This again is one of the first and easier steps for bot makers. Its incredibly simple. Open u.java and search for

Code: return new String(ac);

and replace that with

Code: return arg0;

And you are done… no more *** will appear in your rs screen

Removing welcome screen

Ok, this is easy.

First remove

Code: if(djj)
fab();
else

and the welcome screen's gone.

For your own message to appear find

Code: abn(ekc, ekd, false);

and add underneath that:

Code: fdj("Your message here", 3);

and you've got you're own welcome message.

Disabling report abuse button
Now we will disable report abuse button because nobody need it and you dont wana se a big [Expletive Deleted]ing screen apear while your pking so
an easy search and destroy.
Find:

Code: if(dmh == 1)
emh();
else
Delete it. and it is now disabled.

You can change the 'Report Abuse' to some other name, yourbot name etc. By finding:

Code: dnb.cdl("Report abuse", 457, dci + 6, 0, 0xffffff);
edit report abuse to anything keep the '' '' example ''[Expletive Deleted]bot''

Right click to add someone on your list

First, declare this

Code: public String BuddyName = "";

OK. Search for "Follow". It should be the first one, in that list on the Right Click Menu(Attack, Follow, Trade etc...)

After all of this:

Code: dem[ejf] = "Follow";
ejm[ejf] = "@whi@" + deh[i3].gme + s1;
dga[ejf] = 2820;
djk[ejf] = deh[i3].gmf;
ejf++;
Add this:

add under ejf++;

Code: dem[ejf] = "Add-Buddy";
ejm[ejf] = "@whi@" + deh[i3].gme + s1;
dga[ejf] = 2821;
BuddyName = deh[i3].gme;
ejf++;

This basically makes a new Right Click item, that says "Add-Buddy", and makes the var BuddyName equal to the perssons name.

Now go to the very top of your document, and were going to add the function for the newly created Right click item. Now search for 2820.
Under this:

Code: if(j2 == 2810)
{
super.aag.hcn(62);
super.aag.hdj(k1);
super.aag.hdl();
}
Add this:

Code: if(j2 == 2821)
{
String s1 = super.fkm.trim();
super.fkl = BuddyName;
super.fkm = "";
eie = 1;
if(s1.length() > 0 && t.fnc(s1) != djc.gmd)
acj(s1);
fdj(BuddyName + " has been added to your Friends List.", 3);
}

done you got a right click option to add someone on your list!

Displaying player id after follow and trade
now you wana se player id after follow? who would so
Find:

Code: dem[ejf] = "Trade with";
Underneath it you should see something like this:

Code: ejm[ejf] = "@whi@" + deh[i3].gme + s1;
Delete the ';' and add this:


Code: + "@red@ " + deh[i3].gmf+"";
This will display their PlayerID in red.
done

Making your bot capable of shemale

now you wana make your bot capable of shemale????
use this
find

Code: final void faa()

now you should se something like this

Code: private final void faa()
{
dgk.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dgk.geb(dlb))
do
ddb = ((ddb - 1) + e.aji) % e.aji;
while((e.ali[ddb] & 3) != 1 || (e.ali[ddb] & 4 * ddi) == 0);
if(dgk.geb(dlc))
do
ddb = (ddb + 1) % e.aji;
while((e.ali[ddb] & 3) != 1 || (e.ali[ddb] & 4 * ddi) == 0);
if(dgk.geb(dld))
dde = ((dde - 1) + eii.length) % eii.length;
if(dgk.geb(dle))
dde = (dde + 1) % eii.length;
if(dgk.geb(dlf) || dgk.geb(dlg))
{
for(ddi = 3 - ddi; (e.ali[ddb] & 3) != 1 || (e.ali[ddb] & 4 * ddi) == 0; ddb = (ddb + 1) % e.aji);
for(; (e.ali[ddc] & 3) != 2 || (e.ali[ddc] & 4 * ddi) == 0; ddc = (ddc + 1) % e.aji);
}
if(dgk.geb(dlh))
ddf = ((ddf - 1) + eid.length) % eid.length;
if(dgk.geb(dli))
ddf = (ddf + 1) % eid.length;
if(dgk.geb(dlj))
ddh = ((ddh - 1) + dki.length) % dki.length;
if(dgk.geb(dlk))
ddh = (ddh + 1) % dki.length;
if(dgk.geb(dll))
ddg = ((ddg - 1) + eid.length) % eid.length;
if(dgk.geb(dlm))
ddg = (ddg + 1) % eid.length;
if(dgk.geb(dln))
{
super.aag.hcn(238);
super.aag.hdb(ddi);
super.aag.hdb(ddb);
super.aag.hdb(ddc);
super.aag.hdb(ddd);
super.aag.hdb(dde);
super.aag.hdb(ddf);
super.aag.hdb(ddg);
super.aag.hdb(ddh);
super.aag.hdl();
dnb.cak();
eln = false;
}
}

replace all this [Expletive Deleted] with

Code: public final void faa()
{
dgk.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dgk.geb(dlb))
do
ddb = ((ddb - 1) + e.aji) % e.aji;
while((e.ali[ddb] & 3) != 1);
if(dgk.geb(dlc))
do
ddb = (ddb + 1) % e.aji;
while((e.ali[ddb] & 3) != 1);
if(dgk.geb(dld))
dde = ((dde - 1) + eii.length) % eii.length;
if(dgk.geb(dle))
dde = (dde + 1) % eii.length;
if(dgk.geb(dlf) || dgk.geb(dlg))
{
ddi = 3 - ddi;
for(; (e.ali[ddc] & 3) != 2 || (e.ali[ddc] & 4 * ddi) == 0; ddc = (ddc + 1) % e.aji);
}
if(dgk.geb(dlh))
ddf = ((ddf - 1) + eid.length) % eid.length;
if(dgk.geb(dli))
ddf = (ddf + 1) % eid.length;
if(dgk.geb(dlj))
ddh = ((ddh - 1) + dki.length) % dki.length;
if(dgk.geb(dlk))
ddh = (ddh + 1) % dki.length;
if(dgk.geb(dll))
ddg = ((ddg - 1) + eid.length) % eid.length;
if(dgk.geb(dlm))
ddg = (ddg + 1) % eid.length;
if(dgk.geb(dln))
{
super.aag.hcn(238);
super.aag.hdb(ddi);
super.aag.hdb(ddb);
super.aag.hdb(ddc);
super.aag.hdb(ddd);
super.aag.hdb(dde);
super.aag.hdb(ddf);
super.aag.hdb(ddg);
super.aag.hdb(ddh);
super.aag.hdl();
dnb.cak();
eln = false;
}
}

owned lol!

Y axis rotate

Open up mudclient.java
Create a new integer named YRotate under:
Code: public final class mudclient extends b
{

Next find:

Code: ejg.bin(k6, -dnh.gjf(k6, l8), l8, 912, dkg * 4, 0, eac * 2)

Change 912 to YRotate.
Now, for your keyspress. Add this in method fcf.

Code: if(l == 1004) //Up
YRotate -= 5;
if(l == 1005) //Down
YRotate += 5;


wow you can rotate like crazy...

Adding a zoom

just add this at your fcf methods...

Code: if(l == 1002) //page Up
eac -= 5;
if(l == 1003) //page Down
eac += 5;

Removing fog of war

find this

Code: if(!super.fkk)
{
ejg.bbg = 2400;
ejg.bbh = 2400;
ejg.bbi = 1;
ejg.bbj = 2300;
} else
{
ejg.bbg = 2200;
ejg.bbh = 2200;
ejg.bbi = 1;
ejg.bbj = 2100;
}

and change it to

Code: if(!super.fkk)
{
ejg.bbg = 50000;
ejg.bbh = 50000;
ejg.bbi = 1;
ejg.bbj = 50000;
} else
{
ejg.bbg = 50000;
ejg.bbh = 50000;
ejg.bbi = 1;
ejg.bbj = 50000;
}

Using your own logo
Now you wana use your own logo? this is how you do

Open a.java
Find

Code: private final void flh()
{
fjh.setColor(Color.black);
fjh.fillRect(0, 0, fia, fib);
byte abyte0[] = fcb("jagex.jag", "Jagex library", 0);
if(abyte0 == null)
{
return;
} else
Replace that entire method with this:

Code: private final void flh()
{
Toolkit toolkit = Toolkit.getDefaultToolkit();
fjh.setColor(Color.black);
int i = (fia - 281) / 2;
int k = (fib - 148) / 2;
fjg = toolkit.getImage(this.UserDir + "/" + "logo.gif");
fjh.drawImage(fjg, i, k, this);
j.cdi("h11p", 0, this);
j.cdi("h12b", 1, this);
j.cdi("h12p", 2, this);
j.cdi("h13b", 3, this);
j.cdi("h14b", 4, this);
j.cdi("h16b", 5, this);
j.cdi("h20b", 6, this);
j.cdi("h24b", 7, this);
}

Now find this:

Code: private int fia;
Above that line, add this:

Code: public static final String UserDir = System.getProperty("user.dir");
This goes in the SAME folder with all your .class files.

If you want it in a folder, inside that folder, change this line:

Code: fjg = toolkit.getImage(this.UserDir + "/" + "logo.gif");
To This:



Code: fjg = toolkit.getImage(this.UserDir + "/FOLDERNAME/" + "logo.gif");

change folder name to the name of your folder do'h

Displaying id when you examine
open mudclient.java

search for examine (There are four. The first one is for items in your inventory, second is for items on the ground, third is for the npc, and last is for trees and such)
once you find the one you want to look for the 4 digit number
looks like this:(could be a diferent number depending on what examine you are trying to do this for, this one is for items in your inventory)

Code: dga[ejf] = 3600;

copy the number put it in the search menu or whatever and search for the number again it will take you to the method part

once you find that you should see:

Code: fdj(e.aic[k1], 3);

replace that with:

Code: fdj("("+ k1 +") " + e.aic[k1], 3);

do this for the 4 posible id

Autologin toogle
Open mudclient.java

First you need to create autologin var so put this

Code: public boolean autologin;

under the

Code: public final class mudclient extends b
{

Then find this line

Code: eki.gea(super.fke, super.fkf, super.fkh, super.fkg);


above that add

Code: if(autologin) abn(ekc, ekd, false);

then find keypress method which is fcf
and before the


Code: if(ehe == 0)
{
if(ecf == 0)
eki.gec(l);
if(ecf == 1)

add

Code: if(l == 1009)
{
autologin = autologin;
if(autologin = !autologin)
fdj("UrBotName: Autologin turned: on", 3);
else
fdj("UrBotName: Autologin turned: off", 3);
}

Now you have a working autologin toogle...

Turn your cancel box into a world input box

Find:

Code: private final void emg(int l)


Above this, add:

Code: public void SwitchTo(int l)
{
super.aad = (43595 - l % 2);
super.aac = serverips[l - 81];
}


Find:

Code: dla.gfe(410, l, 120, 25);
dla.gfd(410, l, "Cancel", 4, false);
een = dla.gfl(410, l, 120, 25);


replace with:

Code: dla.gfe(410, l+20, 120, 40);
dla.gfd(410, l+15, "World", 4, false);
serv = dla.gfj(410, l+30, 120, 40, 4, 20, false, false);
find
Code: private boolean elk;


Underneath, add:

Code: public int serv;
public String server;
public static String serverips[] = {"uk1.rs.com","uk1.rs.com","ul3.rs.com","ul3.rs.com","cet3b.rs.com","cet3b.rs.com"};fix the rs.com to the prooper adress

find
Code: abn(ekc, ekd, false);


Replace with:

Code: if(ecf == 2)
{
dla.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dla.geb(een))
ecf = 0;
if(dla.geb(eek))
dla.ggg(eel);
if(dla.geb(eel))
dla.ggg(serv);
if(dla.geb(serv) || dla.geb(eem))
{
ekc = dla.ggd(eek);
ekd = dla.ggd(eel);
server = dla.ggd(serv);
if((Integer.parseInt(server) >= 81) && (Integer.parseInt(server) <= 86))
{
SwitchTo(Integer.parseInt(server));
abn(ekc, ekd, false);
}
else
ada("Invalid server!","F2p servers only");
}
}

find

Code: if(ecf == 2)
{
dla.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dla.geb(een))
ecf = 0;
if(dla.geb(eek))
dla.ggg(eel);
if(dla.geb(eel) || dla.geb(eem))

replace with

Code: if(ecf == 2)
{
dla.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dla.geb(een))
ecf = 0;
if(dla.geb(eek))
dla.ggg(eel);
if(dla.geb(eel))
dla.ggg(serv);
if(dla.geb(serv) || dla.geb(eem))

Let rs remember your pass and username

Ok when you log out rs will remember your thing but if you close the bot it wont so you dont get piss off

find

Code: dla.ggc(eej, "Please enter your username and password");
dla.ggc(eek, "");
dla.ggc(eel, "");
dla.ggg(eek);

and delete

Code: dla.ggc(eek, "");
dla.ggc(eel, "");

now rs will remember your thing until you close the bot

Adding a autoeat function
Ok this will basicly autoeat.... so you can turn it on while autofighting...

declare this

Code: boolean autoEating = false;
public int foodID = 373;
public int eathp = 50;
private AutoEat AE;

the fod id is lobster change it to what ever you want and the hp is 50 you can change it to 30 if you want

go to fcf mrthods and add this

Code: if(l == 1015)
{
autoEating = !autoEating;
if(autoEating) {

fdj("@whi@Autoeat turned on", 3);
AE = new AutoEat();
AE.start();
} else {
fdj("@red@AutoEat turned off.", 3);
}
}

declare this thread

Code: private class AutoEat extends Thread
{
public void run()
{
while(autoEating)
{
if(dfk[3] <= eathp && !InCombat())
{
if(fac(foodID) > 0)
{

UseItem(foodID);
Wait(1500);


}
else
{
adg("OMG No more Food!");
autoEating = false;
autofighter = false;

Wait(50);
}
}

Wait(50);
}
}

AutoEat()
{
start();
}
}

now we need to declare an wait methods plus an incombat method... if you dont have this add it if you do dont add it...

Code: public boolean InCombat()
{
return djc.gml == 8 || djc.gml == 9;
}


and


public void Wait(int ms)
{
try{Thread.sleep(ms);}
catch(Exception exception){}
}

wotzor you know have a working autoeat

Ingame world switcher
Seems like everyone is getting confused over world switchers so... here's a really, really simple implementation.

Open mudclient.java

Find:

Code: public final class mudclient extends b
{


Underneath, add:

Code: public void SwitchTo(int l)
{
if((l%2) == 0) {
super.aad = 43595;
} else {
super.aad = 43594;
}
serv = l;
l -= 81;
super.aac = serverips[l];
}


Find:

Code: if(s1.startsWith("::"))
{


Underneath, add:


Code: if(s1.startsWith("::server"))
{
serv = s1.length();
server = s1.substring(serv - 2,serv);
serv = Integer.parseInt(server);
aca();//LogOut();
SwitchTo(serv);
abn(ekc, ekd, false); //LogIn();
fdj("@red@Switched to world "+serv, 3);
} else {


Find:

Code: else
acn(s1.substring(2));

Underneath that, add:


Code: }

Find:

Code: private boolean eln;

Underneath, add:


Code: public int serv;
public String server;
public static String serverips[] = {"uk1.rs.com","uk1.rs.com","ul3.rs.com","ul3.rs.com","cet3b.rs.com","cet3b.rs.com"};
if you already have this code dont add it also the same thing for the public switch to int

Changinf Fightmode with a f key

Ok, this tutorial is nice and simple. There's no errors when I compile, and it works in game perfectly, so feel FREE to use it. Tell me of anything wrong you get, etc. This really is owed much to Menno (Alibvandestraat) <3

Step one:

Open your mudclient, and right under:




Code: public final class mudclient extends b
Put these lines:
Code: int Fightmode = 1;
&
Code: String style;
&
Code: public void SetMode(int i)
{
dkh = i;
dnl = 0;
super.aag.hcn(148);
super.aag.hdb(dkh);
super.aag.hdl();
}
Step two:

Search for:

Code: fcf
This will bring you to the keypress method, and this is the part where we place an f key to press.

F1 - 1008
F2 - 1009
F3 - 1010
F4 - 1011
F5 - 1012
F6 - 1013
F7 - 1014
F8 - 1015
F9 - 1016
F10 - 1017
F11 - 1018
F12 - 1019

Simply insert this, and change anything you wish to that can be changed if you wish. The key 1009 is f2. If you wish to change to different f keys, then use the ones I stated above that suit you:

Code: if(l == 1009)
{
Fightmode++;
if(Fightmode == 1)
{
SetMode(1);
style = "aggressive";
}
if(Fightmode == 2)
{
SetMode(2);
style = "accurate";
}
if(Fightmode == 3)
{
SetMode(3);
style = "defensive";
}
if(Fightmode == 4)
{
Fightmode = 0;
SetMode (0);
style = "controlled";
}
fdj("Yourbot: Style changed to " + style + "!", 3);
}
Step Three:
Search for:
Code: faj
Make sure it all looks like this:
Code: private final void faj()
{
byte byte0 = 7;
byte byte1 = 15;
char c1 = '\257';
if(dnl != 0)
{
for(int l = 0; l < 5; l++)
{
if(l <= 0 || super.fke <= byte0 || super.fke >= byte0 + c1 || super.fkf <= byte1 + l * 20 || super.fkf >= byte1 + l * 20 + 20)
continue;
dkh = l - 1;
dnl = 0;
super.aag.hcn(74);
super.aag.hdb(dkh);
super.aag.hdl();
break;
}

}
for(int i1 = 0; i1 < 5; i1++)
{
if(i1 == dkh + 1)
dnb.cam(byte0, byte1 + i1 * 20, c1, 20, j.cbh(255, 0, 0), 128);
else
dnb.cam(byte0, byte1 + i1 * 20, c1, 20, j.cbh(190, 190, 190), 128);
dnb.cbc(byte0, byte1 + i1 * 20, c1, 0);
dnb.cbc(byte0, byte1 + i1 * 20 + 20, c1, 0);
}

dnb.cdl("Select combat style", byte0 + c1 / 2, byte1 + 16, 3, 0xffffff);
dnb.cdl("Controlled (+1 of each)", byte0 + c1 / 2, byte1 + 36, 3, 0);
dnb.cdl("Aggressive (+3 strength)", byte0 + c1 / 2, byte1 + 56, 3, 0);
dnb.cdl("Accurate (+3 attack)", byte0 + c1 / 2, byte1 + 76, 3, 0);
dnb.cdl("Defensive (+3 defense)", byte0 + c1 / 2, byte1 + 96, 3, 0);
}

Step four:

Compile, and check for errors. If you get any, which hopefully you won't, post them here nontheless. Once again, all props to my mate Alibvandestraat.



darkdemon
Enthusiast


Sep 2, 2005, 11:18 AM

Post #2 of 7 (2108 views)
Shortcut
Re: [rsc_wana_b] Biggest JAVA Bot making guide ever! [In reply to] Can't Post

can u give me the link plz.


U r reading a signature.
Free game hacks!


Jaymzanator
Enthusiast


Sep 2, 2005, 6:46 PM

Post #3 of 7 (2104 views)
Shortcut
Re: [darkdemon] Biggest JAVA Bot making guide ever! [In reply to] Can't Post

cant u just put it in 1 big string?


(17:20) Taz:
and tazg is lol'in at you all the way from canada
(17:21) James:
lol canadians


Real Deal
Enthusiast


Sep 3, 2005, 1:08 AM

Post #4 of 7 (2102 views)
Shortcut
Re: [rsc_wana_b] Biggest JAVA Bot making guide ever! [In reply to] Can't Post

Please for god's sake use the "code" box Crazy



«·´`·.*·.¸(`·.¸ ¸.·´)¸.·*.·´`·»
«·´¨*·.¸¸.* Real Deal *.¸¸.·*¨`·»
«·´`·.¸.·´(¸.·* *·.¸)`·.¸.·´`·»


rsc_wana_b
Enthusiast


Sep 3, 2005, 4:48 PM

Post #5 of 7 (2094 views)
Shortcut
Re: [Real Deal] Biggest JAVA Bot making guide ever! [In reply to] Can't Post


In Reply To
Please for god's sake use the "code" box Crazy



Nah. Strain your eye balls. Smile


Real Deal
Enthusiast


Sep 3, 2005, 9:35 PM

Post #6 of 7 (2093 views)
Shortcut
Post deleted by Real Deal [In reply to]

 


Real Deal
Enthusiast


Sep 3, 2005, 10:28 PM

Post #7 of 7 (2091 views)
Shortcut
Re: [Real Deal] Biggest JAVA Bot making guide ever! [In reply to] Can't Post

How to make it scriptable.....


Let's get it started
You need deobed 201 + all jag and mem file

The Complete Bot Making Tutorial


Setting up Your Folders
OK first go to your documents folder (or where ever you store all your files) and create a new folder called MyBot. (Obviously change this to whatever you wish)
Then inside that create a 2 new folders, 1 called “Files” and one called “Data”.
Now open up notepad and inside put this:


Code
 @echo off   
cd Files
JAVA mudclient
Pause



Save this as Run.bat and put it inside your “MyBot” folder. This is the code you need to run your compiled bot
Now open up another notepad and inside put this:


Code
 @echo off  
javac *.java
pause


Save this as Compile.bat and put it inside your “Files” folder. This make you able to compile all .java file to .class file. Ok now your all set up you should download the deobbed mudclient 201. You can find it on rscn. Extract this to a random place and copy and paste the files into your “Files” folder. Now for the data files, get them from another bot folder you have. Again extract them to a random place and copy and paste all the .jag and .mem to your “Data” folder. Et voila. Your set up to begin editing your bot is done, Congratulations.

Making your bot as a client!

First go into your files folder and open mudclient.java
Then search for


Code
  arg0 = "../release/" + arg0;




and change that to


Code
  arg0 = "Data/" + arg0;




then find


Code
  String s2 = getParameter("referid"); 



under that there's a code like


Code
  dkd = Integer.parseInt(s2); 



and change it to


Code
  dkd = 0;




then find


Code
  String s3 = getParameter("member"); 



you have a line below like this:


Code
   int i2 = Integer.parseInt(s3); 



and change to


Code
  int i2 = 0; 



then find


Code
  String s4 = getParameter("poff");




then a line below like this


Code
  int j2 = Integer.parseInt(s4); 



change to


Code
  int j2 = 0; 



then search this


Code
  public final URL getCodeBase() 



and then check that it is like this


Code
 public final URL getCodeBase()   
{
if(link.fni != null)
return link.fni.getCodeBase();
else
return super.getCodeBase();
}




then change that to


Code
 public final URL getCodeBase()   
{
try
{
return new URL("http://" + super.aac + "/client2/");
}
catch(Exception e) {return null;}
}




then find


Code
  public final URL getDocumentBase() 



then check the whole code is like this


Code
 public final URL getDocumentBase()   
{
if(link.fni != null)
return link.fni.getDocumentBase();
else
return super.getDocumentBase();
}



then change that to


Code
 public final URL getDocumentBase()   
{
try
{
return new URL("http://www.rs.com"); //but put proper address
}
catch(Exception e) {return null;}
}




Ok now your done with the mudclient.java, save and close it. Now open a.java and find this


Code
  fih = false; 



change that to


Code
  fih = true;




That makes it so you can see the objects such as trees when you run your bot.
Ok now save and close a.java and open b.java and find:


Code
  127.0.0.1




change that to


Code
  217.138.31.250




close and compile you are done creating a basic client for runescape

Removing chat filter

This again is one of the first and easier steps for bot makers. Its incredibly simple. Open u.java and search for


Code
  return new String(ac);




and replace that with


Code
  return arg0;




And you are done… no more *** will appear in your rs screen

Removing welcome screen

Ok, this is easy. First remove


Code
 if(djj)   
fab();
else




and the welcome screen's gone. For your own message to appear find


Code
  abn(ekc, ekd, false);




and add underneath that:


Code
  fdj("Your message here", 3);




and you've got you're own welcome message.

Disabling report abuse button


Now we will disable report abuse button because nobody need it and you dont wana se a big [Expletive Deleted]ing screen apear while your pking so an easy search and destroy. Find:


Code
 if(dmh == 1)   
emh();
else




Delete it. and it is now disabled. You can change the 'Report Abuse' to some other name, yourbot name etc. By finding:


Code
  dnb.cdl("Report abuse", 457, dci + 6, 0, 0xffffff); 



edit report abuse to anything keep the '' '' example ''[Expletive Deleted]bot''

Right click to add someone to your list

First, declare this


Code
  public String BuddyName = ""; 



OK. Search for "Follow". It should be the first one, in that list on the Right Click Menu(Attack, Follow, Trade etc...)
After all of this:


Code
 dem[ejf] = "Follow";   
ejm[ejf] = "@whi@" + deh[i3].gme + s1;
dga[ejf] = 2820;
djk[ejf] = deh[i3].gmf;
ejf++;




Add this: add under ejf++;


Code
 dem[ejf] = "Add-Buddy";   
ejm[ejf] = "@whi@" + deh[i3].gme + s1;
dga[ejf] = 2821;
BuddyName = deh[i3].gme;
ejf++;




This basically makes a new Right Click item, that says "Add-Buddy", and makes the var BuddyName equal to the perssons name.
Now go to the very top of your document, and were going to add the function for the newly created Right click item. Now search for 2820.
Under this:


Code
 if(j2 == 2810)   
{
super.aag.hcn(62);
super.aag.hdj(k1);
super.aag.hdl();
}




Add this:


Code
 if(j2 == 2821)   
{
String s1 = super.fkm.trim();
super.fkl = BuddyName;
super.fkm = "";
eie = 1;
if(s1.length() > 0 && t.fnc(s1) != djc.gmd)
acj(s1);
fdj(BuddyName + " has been added to your Friends List.", 3);
}




done you got a right click option to add someone on your list!

Displaying player id after follow and trade


now you wana se player id after follow? who would so
Find:


Code
  dem[ejf] = "Trade with"; 




Underneath it you should see something like this:


Code
  ejm[ejf] = "@whi@" + deh[i3].gme + s1;




Delete the ';' and add this:


Code
  + "@red@ " + deh[i3].gmf+"";




This will display their PlayerID in red.
done

Making your bot capable of shemale

now you wana make your bot capable of shemale????
use this
find


Code
  final void faa()


now you should se something like this


Code
 private final void faa()   
{
dgk.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dgk.geb(dlb))
do
ddb = ((ddb - 1) + e.aji) % e.aji;
while((e.ali[ddb] & 3) != 1 || (e.ali[ddb] & 4 * ddi) == 0);
if(dgk.geb(dlc))
do
ddb = (ddb + 1) % e.aji;
while((e.ali[ddb] & 3) != 1 || (e.ali[ddb] & 4 * ddi) == 0);
if(dgk.geb(dld))
dde = ((dde - 1) + eii.length) % eii.length;
if(dgk.geb(dle))
dde = (dde + 1) % eii.length;
if(dgk.geb(dlf) || dgk.geb(dlg))
{
for(ddi = 3 - ddi; (e.ali[ddb] & 3) != 1 || (e.ali[ddb] & 4 * ddi) == 0; ddb = (ddb + 1) % e.aji);
for(; (e.ali[ddc] & 3) != 2 || (e.ali[ddc] & 4 * ddi) == 0; ddc = (ddc + 1) % e.aji);
}
if(dgk.geb(dlh))
ddf = ((ddf - 1) + eid.length) % eid.length;
if(dgk.geb(dli))
ddf = (ddf + 1) % eid.length;
if(dgk.geb(dlj))
ddh = ((ddh - 1) + dki.length) % dki.length;
if(dgk.geb(dlk))
ddh = (ddh + 1) % dki.length;
if(dgk.geb(dll))
ddg = ((ddg - 1) + eid.length) % eid.length;
if(dgk.geb(dlm))
ddg = (ddg + 1) % eid.length;
if(dgk.geb(dln))
{
super.aag.hcn(238);
super.aag.hdb(ddi);
super.aag.hdb(ddb);
super.aag.hdb(ddc);
super.aag.hdb(ddd);
super.aag.hdb(dde);
super.aag.hdb(ddf);
super.aag.hdb(ddg);
super.aag.hdb(ddh);
super.aag.hdl();
dnb.cak();
eln = false;
}
}




replace all this [Expletive Deleted] with


Code
 public final void faa()   
{
dgk.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dgk.geb(dlb))
do
ddb = ((ddb - 1) + e.aji) % e.aji;
while((e.ali[ddb] & 3) != 1);
if(dgk.geb(dlc))
do
ddb = (ddb + 1) % e.aji;
while((e.ali[ddb] & 3) != 1);
if(dgk.geb(dld))
dde = ((dde - 1) + eii.length) % eii.length;
if(dgk.geb(dle))
dde = (dde + 1) % eii.length;
if(dgk.geb(dlf) || dgk.geb(dlg))
{
ddi = 3 - ddi;
for(; (e.ali[ddc] & 3) != 2 || (e.ali[ddc] & 4 * ddi) == 0; ddc = (ddc + 1) % e.aji);
}
if(dgk.geb(dlh))
ddf = ((ddf - 1) + eid.length) % eid.length;
if(dgk.geb(dli))
ddf = (ddf + 1) % eid.length;
if(dgk.geb(dlj))
ddh = ((ddh - 1) + dki.length) % dki.length;
if(dgk.geb(dlk))
ddh = (ddh + 1) % dki.length;
if(dgk.geb(dll))
ddg = ((ddg - 1) + eid.length) % eid.length;
if(dgk.geb(dlm))
ddg = (ddg + 1) % eid.length;
if(dgk.geb(dln))
{
super.aag.hcn(238);
super.aag.hdb(ddi);
super.aag.hdb(ddb);
super.aag.hdb(ddc);
super.aag.hdb(ddd);
super.aag.hdb(dde);
super.aag.hdb(ddf);
super.aag.hdb(ddg);
super.aag.hdb(ddh);
super.aag.hdl();
dnb.cak();
eln = false;
}
}




owned lol!

Y axis rotate

Open up mudclient.java Create a new integer named YRotate under:


Code
  public final class mudclient extends b   
{




Next find:


Code
  ejg.bin(k6, -dnh.gjf(k6, l8), l8, 912, dkg * 4, 0, eac * 2)




Change 912 to YRotate. Now, for your keyspress. Add this in method fcf.


Code
 if(l == 1004) //Up   
YRotate -= 5;
if(l == 1005) //Down
YRotate += 5;




wow you can rotate like crazy...

Adding a zoom

just add this at your fcf methods...


Code
 if(l == 1002) //page Up   
eac -= 5;
if(l == 1003) //page Down
eac += 5;




Removing fog of war

find this


Code
 if(!super.fkk)   
{
ejg.bbg = 2400;
ejg.bbh = 2400;
ejg.bbi = 1;
ejg.bbj = 2300;
}
else
{
ejg.bbg = 2200;
ejg.bbh = 2200;
ejg.bbi = 1;
ejg.bbj = 2100;
}




and change it to


Code
 if(!super.fkk)   
{
ejg.bbg = 50000;
ejg.bbh = 50000;
ejg.bbi = 1;
ejg.bbj = 50000;
}
else
{
ejg.bbg = 50000;
ejg.bbh = 50000;
ejg.bbi = 1;
ejg.bbj = 50000;
}




Using your own logo


Now you wana use your own logo? this is how you do. Open a.java Find


Code
 private final void flh()   
{
fjh.setColor(Color.black);
fjh.fillRect(0, 0, fia, fib);
byte abyte0[] = fcb("jagex.jag", "Jagex library", 0);
if(abyte0 == null)
{
return;
}
else


Replace that entire method with this:


Code
 private final void flh()   
{
Toolkit toolkit = Toolkit.getDefaultToolkit();
fjh.setColor(Color.black);
int i = (fia - 281) / 2;
int k = (fib - 148) / 2;
fjg = toolkit.getImage(this.UserDir + "/" + "logo.gif");
fjh.drawImage(fjg, i, k, this);
j.cdi("h11p", 0, this);
j.cdi("h12b", 1, this);
j.cdi("h12p", 2, this);
j.cdi("h13b", 3, this);
j.cdi("h14b", 4, this);
j.cdi("h16b", 5, this);
j.cdi("h20b", 6, this);
j.cdi("h24b", 7, this);
}




Now find this:


Code
  private int fia;




Above that line, add this:


Code
  public static final String UserDir = System.getProperty("user.dir"); 




This goes in the SAME folder with all your .class files. If you want it in a folder, inside that folder, change this line:


Code
  fjg = toolkit.getImage(this.UserDir + "/" + "logo.gif"); 



To This:


Code
  fjg = toolkit.getImage(this.UserDir + "/FOLDERNAME/" + "logo.gif"); 



change folder name to the name of your folder do'h

Displaying id when you examine
open mudclient.java search for examine (There are four. The first one is for items in your inventory, second is for items on the ground, third is for the npc, and last is for trees and such) once you find the one you want to look for the 4 digit number looks like this:(could be a diferent number depending on what examine you are trying to do this for, this one is for items in your inventory)


Code
  dga[ejf] = 3600;




copy the number put it in the search menu or whatever and search for the number again it will take you to the method part once you find that you should see:


Code
  fdj(e.aic[k1], 3);




replace that with:


Code
  fdj("("+ k1 +") " + e.aic[k1], 3); 



do this for the 4 posible id

Autologin toogle


Open mudclient.java First you need to create autologin var so put this


Code
  public boolean autologin;




under the


Code
  public final class mudclient extends b   
{



Then find this line


Code
  eki.gea(super.fke, super.fkf, super.fkh, super.fkg); 



above that add


Code
  if(autologin) abn(ekc, ekd, false); 



then find keypress method which is fcf and before the


Code
 if(ehe == 0)   
{
if(ecf == 0)
eki.gec(l);
if(ecf == 1)




add


Code
 if(l == 1009)   
{
autologin = autologin;
if(autologin = !autologin)
fdj("UrBotName: Autologin turned: on", 3);
else
fdj("UrBotName: Autologin turned: off", 3);
}




Now you have a working autologin toogle...

Turn your cancel box into a world input box

Find:


Code
  private final void emg(int l)




Above this, add:


Code
 public void SwitchTo(int l)   
{
super.aad = (43595 - l % 2);
super.aac = serverips[l - 81];
}



Find:


Code
 dla.gfe(410, l, 120, 25);   
dla.gfd(410, l, "Cancel", 4, false);
een = dla.gfl(410, l, 120, 25);



replace with:


Code
 dla.gfe(410, l+20, 120, 40);   
dla.gfd(410, l+15, "World", 4, false);
serv = dla.gfj(410, l+30, 120, 40, 4, 20, false, false);



find


Code
  private boolean elk;




Underneath, add:


Code
 public int serv;   
public String server;
public static String serverips[] = {"uk1.rs.com","uk1.rs.com","ul3.rs.com","ul3.rs.com","cet3b.rs.com","cet3b.rs.com"};



fix the rs.com to the prooper adress, find


Code
  abn(ekc, ekd, false); 



Replace with:


Code
 if(ecf == 2)   
{
dla.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dla.geb(een))
ecf = 0;
if(dla.geb(eek))
dla.ggg(eel);
if(dla.geb(eel))
dla.ggg(serv);
if(dla.geb(serv) || dla.geb(eem))
{
ekc = dla.ggd(eek);
ekd = dla.ggd(eel);
server = dla.ggd(serv);
if((Integer.parseInt(server) >= 81) && (Integer.parseInt(server) <= 86))
{
SwitchTo(Integer.parseInt(server));
abn(ekc, ekd, false);
}
else
ada("Invalid server!","F2p servers only");
}
}




find


Code
 if(ecf == 2)   
{
dla.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dla.geb(een))
ecf = 0;
if(dla.geb(eek))
dla.ggg(eel);
if(dla.geb(eel) || dla.geb(eem))



replace with


Code
 if(ecf == 2)   
{
dla.gea(super.fke, super.fkf, super.fkh, super.fkg);
if(dla.geb(een))
ecf = 0;
if(dla.geb(eek))
dla.ggg(eel);
if(dla.geb(eel))
dla.ggg(serv);
if(dla.geb(serv) || dla.geb(eem))



Let rs remember your pass and username

Ok when you log out rs will remember your thing but if you close the bot it wont so you dont get piss off, find


Code
 dla.ggc(eej, "Please enter your username and password");   
dla.ggc(eek, "");
dla.ggc(eel, "");
dla.ggg(eek);



and delete


Code
 dla.ggc(eek, "");   
dla.ggc(eel, "");



now rs will remember your thing until you close the bot

Adding a autoeat function


Ok this will basicly autoeat.... so you can turn it on while autofighting... declare this


Code
 boolean autoEating = false;   
public int foodID = 373;
public int eathp = 50;
private AutoEat AE;




the food id is lobster change it to what ever you want and the hp is 50 you can change it to 30 if you want. Go to fcf mrthods and add this


Code
 if(l == 1015)   
{
autoEating = !autoEating;
if(autoEating)
{

fdj("@whi@Autoeat turned on", 3);
AE = new AutoEat();
AE.start();
}
else {
fdj("@red@AutoEat turned off.", 3);
}
}




declare this thread


Code
 private class AutoEat extends Thread   
{
public void run()
{
while(autoEating)
{
if(dfk[3] <= eathp && !InCombat())
{
if(fac(foodID) > 0)
{
UseItem(foodID);
Wait(1500);
}
else
{
adg("OMG No more Food!");
autoEating = false;
autofighter = false;
Wait(50);
}
}
Wait(50);
}
}
AutoEat()
{
start();
}
}




now we need to declare an wait methods plus an incombat method... if you dont have this add it if you do dont add it...


Code
 public boolean InCombat()   
{
return djc.gml == 8 || djc.gml == 9;
}




and


Code
 public void Wait(int ms)   
{
try{Thread.sleep(ms);}
catch(Exception exception){}
}




wotzor you know have a working autoeat

Ingame world switcher


Seems like everyone is getting confused over world switchers so... here's a really, really simple implementation. Open mudclient.java Find:


Code
 public final class mudclient extends b   
{




Underneath, add:


Code
 public void SwitchTo(int l)   
{
if((l%2) == 0)
{
super.aad = 43595;
}
else {
super.aad = 43594;
}
serv = l;
l -= 81;
super.aac = serverips[l];
}




Find:


Code
 if(s1.startsWith("::"))   
{



Underneath, add:


Code
 if(s1.startsWith("::server"))   
{
serv = s1.length();
server = s1.substring(serv - 2,serv);
serv = Integer.parseInt(server);
aca();//LogOut();
SwitchTo(serv);
abn(ekc, ekd, false); //LogIn();
fdj("@red@Switched to world "+serv, 3);
}
else {




Find:


Code
 else   
acn(s1.substring(2));



Underneath that, add:


Code
  } 



Find:


Code
  private boolean eln;




Underneath, add:


Code
 public int serv;   
public String server;
public static String serverips[] = {"uk1.rs.com","uk1.rs.com","ul3.rs.com","ul3.rs.com","cet3b.rs.com","cet3b.rs.com"};



if you already have this code dont add it also the same thing for the public switch to int

Changinf Fightmode with a f key

Ok, this tutorial is nice and simple. There's no errors when I compile, and it works in game perfectly, so feel FREE to use it. Tell me of anything wrong you get, etc. This really is owed much to Menno (Alibvandestraat) <3

Step one:
Open your mudclient, and right under:


Code
  public final class mudclient extends b



Put these lines:


Code
  int Fightmode = 1;




&


Code
  String style;




&


Code
 public void SetMode(int i)   
{
dkh = i;
dnl = 0;
super.aag.hcn(148);
super.aag.hdb(dkh);
super.aag.hdl();
}




Step two:
Search for:


Code
  fcf




This will bring you to the keypress method, and this is the part where we place an f key to press.

F1 - 1008
F2 - 1009
F3 - 1010
F4 - 1011
F5 - 1012
F6 - 1013
F7 - 1014
F8 - 1015
F9 - 1016
F10 - 1017
F11 - 1018
F12 - 1019

Simply insert this, and change anything you wish to that can be changed if you wish. The key 1009 is f2. If you wish to change to different f keys, then use the ones I stated above that suit you:


Code
 if(l == 1009)   
{
Fightmode++;
if(Fightmode == 1)
{
SetMode(1);
style = "aggressive";
}
if(Fightmode == 2)
{
SetMode(2);
style = "accurate";
}
if(Fightmode == 3)
{
SetMode(3);
style = "defensive";
}
if(Fightmode == 4)
{
Fightmode = 0;
SetMode (0);
style = "controlled";
}
fdj("Yourbot: Style changed to " + style + "!", 3);
}


<