n3ss3s
2009-12-12 15:37:53
Seeing people are interested in updating reflection, which RSBot gives an opportunity for, I'll just post some simple things that allow you to update the hooks from RSBot. You could learn these things and more by Googling, but I think this will score more interested people.
A Java class. If you do not have experience of Java, observe a class as 'something', for example, a RuneScape Character. Very relevant to cheating aswell.
Our Character class can, and does contain information such as the Character's current animation, and it's tile position. Both of these are applicable to both NPCs and Players, for example if our NPC class's name is 'np', and the animation field in the Character class is 'an', is the NPC's animation found at np.an.
We will never get to use it in that direct way though, as we will find the Player array, and pick one from there which are all instances of the np NPC class. In SCAR we would do something like SmartGetFieldInt(theNPC, "an");
A part of an old updater output.
If we have our Character instace charac, charac.w is it's animation.
You will need a decompiler, and I recommend DJ Java Decompiler, as it's Archiver.exe can nicely decompile whole jars.
I also recommend Notepad++ as it offers code highlighting and a very good, informative easy to use Search From Files, which you will need.
Now, let's get us some fields shall we? Locate your RSBot folder, go to the lib folder and inside it make a new folder called rs. In the lib folder as you propably have seen, is the rs.jar aswell. Now, open up Archiver.exe and select open, find the rs.jar. Then go Select -> Select All. Then hit Decompile and locate the rs folder we just created. It's gonna prompt you about creating class files or something, just hit ok…
After it has decompiled the class files, open up Notepad++. (Note that my Notepad++ is Finnish, so I don't know if the English version says Search or Find.)
Hit Search -> Search From Files, or hit CTRL + SHIFT+ F. Then, as filter, write *.jad, and to the search field write "implements RSCharacter". Make sure it searches from the rs folder. When it gives you the result (should only give one result), double click the quote of the code, something along
"Line 8: implements RSCharacter" and it will open up the file.
Scroll down to almost bottom, just above the variable declarations on the bottom. You will find what you were looking for.
TUTORIAL WILL BE CONTINUED
A Java class. If you do not have experience of Java, observe a class as 'something', for example, a RuneScape Character. Very relevant to cheating aswell.
Our Character class can, and does contain information such as the Character's current animation, and it's tile position. Both of these are applicable to both NPCs and Players, for example if our NPC class's name is 'np', and the animation field in the Character class is 'an', is the NPC's animation found at np.an.
We will never get to use it in that direct way though, as we will find the Player array, and pick one from there which are all instances of the np NPC class. In SCAR we would do something like SmartGetFieldInt(theNPC, "an");
A part of an old updater output.
[Character]
*jd implements interface com.tageteg.accessors.Character
->getMessage() into class jd gets FIELD java.lang.String jd.H
->getAnimation() into class jd gets FIELD int jd.Kb
->getMotion() into class jd gets FIELD int jd.pc
->getLocationX() into class jd gets FIELD int[] jd.mc
->getLocationY() into class jd gets FIELD int[] jd.wc
->getY() into class jd gets FIELD int jr.y
->getX() into class jd gets FIELD int jr.w
->getAnimation() into class jd gets FIELD int jd.w
If we have our Character instace charac, charac.w is it's animation.
You will need a decompiler, and I recommend DJ Java Decompiler, as it's Archiver.exe can nicely decompile whole jars.
I also recommend Notepad++ as it offers code highlighting and a very good, informative easy to use Search From Files, which you will need.
Now, let's get us some fields shall we? Locate your RSBot folder, go to the lib folder and inside it make a new folder called rs. In the lib folder as you propably have seen, is the rs.jar aswell. Now, open up Archiver.exe and select open, find the rs.jar. Then go Select -> Select All. Then hit Decompile and locate the rs folder we just created. It's gonna prompt you about creating class files or something, just hit ok…
After it has decompiled the class files, open up Notepad++. (Note that my Notepad++ is Finnish, so I don't know if the English version says Search or Find.)
Hit Search -> Search From Files, or hit CTRL + SHIFT+ F. Then, as filter, write *.jad, and to the search field write "implements RSCharacter". Make sure it searches from the rs folder. When it gives you the result (should only give one result), double click the quote of the code, something along
"Line 8: implements RSCharacter" and it will open up the file.
Scroll down to almost bottom, just above the variable declarations on the bottom. You will find what you were looking for.
public final String getMessage()
{
return eb;
}
public final int isMoving()
{
return rc;
}
public final int getAnimation()
{
return G;
}
public final int[] getLocationY()
{
return sc;
}
public final int[] getLocationX()
{
return pc;
}
public final int getLoopCycleStatus()
{
return ab;
}
public final int getHPRatio()
{
return Z;
}
public final int getHeight()
{
return hb;
}
public final int getInteracting()
{
return Qb;
}
TUTORIAL WILL BE CONTINUED