|
How to dump information from the clients. This section includes how to dump items and background informationWell I requested this tutorial in the Request section about a month ago on how to dump item's and info about them. Of course, not a lot of people know how so I had to learn myself. With about a week of going through 621 client, I figured it out.
Now I will be using the [621] client but, you can basically use any revision client and it should still end up working for you, if you know where the item, npc's, and object classes are. Otherwise, you have to know where those classes are or you will never succeed on this.
If you have a revision, and do not know where the classes are, check out my other thread which tells you how to trace information, which is basically self explanatory.
If you do need help on finding the item, npc, or object classes, you may PM me.
Now let's get to the information on how to do this.
In 621 there is a "SpecialOutPacket.java" class that I believe mgi released the client and it was named that. Now, I checked in 634 and I do not believe that 634 has a "SpecialOutPacket" or if it does, it does not contain the item class.
Now let's see what we have in that class:
Now, some of that may be refactored so just ignore my refactoring and compare it to yours.Code:/* ju - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ final class SpecialOutPacket { static int a; static int b; static pl c; static Class_ae d = new Class_ae(); int packetID; static int f; static int g; static il h = new il(8); public static void a(int i) { if (i != 0) c = null; c = null; d = null; h = null; } public final String toString() { f++; throw new IllegalStateException(); } static final void a(byte i) { if (i > -102) c = null; b++; int i_0_ = (int) (34.46 * (double) Class_hc.e); i_0_ <<= 2; if (lg.r.o()) i_0_ += 512; lg.r.GA(200, i_0_); } static final void a(da var_da, int i, sd var_sd, int i_1_, int i_2_, int i_3_) { a++; if (var_da != null && i_3_ == 26219) var_sd.a(i, true, var_da.J(), var_da.K(), var_da.OA(), i_2_, var_da.l(), var_da.KA(), var_da.H(), i_1_, var_da.za()); } static final void b(byte i) { g++; int[] is = new int[((ItemDefLoader) laa.itemDefLoader).g]; int i_4_ = 0; for (int i_5_ = 0; ((ItemDefLoader) laa.itemDefLoader).g > i_5_; i_5_++) { ItemDef itemLoaded = laa.itemDefLoader.d(12388, i_5_); if (((ItemDef) itemLoaded).B >= 0 || ((ItemDef) itemLoaded).J >= 0) is[i_4_++] = i_5_; System.out.println("Hello"); } kq.U = new int[i_4_]; int i_6_ = 0; int i_7_ = -26 / ((i - 63) / 42); for (/**/; i_6_ < i_4_; i_6_++) kq.U[i_6_] = is[i_6_]; } SpecialOutPacket(int packetID, int packetSize) { ((SpecialOutPacket) this).packetID = packetID; } }
Now, the reason I added theis to see when the code is activated. This way, I can see if it even activates while we are running the client.Code:System.out.println("Hello");
Now when I run the client, it prints 'hello' when "Fetching Updates" gets around 92%. This is good, and means we will be able to dump anything from this method without needing any type of login except for update server.
Now let's look at a certain method:
Now, theCode:static final void b(byte i) { g++; int[] is = new int[((ItemDefLoader) laa.itemDefLoader).g]; int i_4_ = 0; for (int i_5_ = 0; ((ItemDefLoader) laa.itemDefLoader).g > i_5_; i_5_++) { ItemDef itemLoaded = laa.itemDefLoader.d(12388, i_5_); if (((ItemDef) itemLoaded).B >= 0 || ((ItemDef) itemLoaded).J >= 0) is[i_4_++] = i_5_; System.out.println("Hello"); }is a big deal of this. This will basically let us get information from the client about that certain item that is being selected by i_5_. This actually will run through every item there is in 621. Now, let's dump some information from the client:Code:itemLoaded
I changed my method to:
Now when I run the client, I getCode:static final void b(byte i) { g++; int[] is = new int[((ItemDefLoader) laa.itemDefLoader).g]; int i_4_ = 0; for (int i_5_ = 0; ((ItemDefLoader) laa.itemDefLoader).g > i_5_; i_5_++) { ItemDef itemLoaded = laa.itemDefLoader.d(12388, i_5_); if (((ItemDef) itemLoaded).B >= 0 || ((ItemDef) itemLoaded).J >= 0) is[i_4_++] = i_5_; System.out.println("item name: " + itemLoaded.itemName); }
yes, I do get to the last item but it's some weird one so I scrolled up to chose these.Code:item name: Armadyl platebody item name: Armadyl platebody item name: Armadyl platebody item name: Armadyl platelegs item name: Armadyl platelegs item name: Armadyl platelegs
Now to dump more information, if you have eclipse(i advise having it) simply just write out some printing things such as:
This way, you see what that variable does or at least what it looks like and you can just print it and compare it to other ones.Code:System.out.println("itemLoaded.(variablehere)" + itemLoaded.(variablehere));
If you need more information on item dumping, feel free to PM me, or post here.
In the next post, I will cover object dumping.
How to dump object information
Now, dumping objects is basically the same as dumping items. There is just more objects than items, obviously. Now lets see how we can do this.
If you read the item dumping above, we will be using the same method as we used for items, this way we do not have to create another method and just screw something up.
We will just create a extra loop in the method.
The current method is:
Now let's set up our object info into a new loop:Code:static final void b(byte i) { g++; int[] is = new int[((ItemDefLoader) laa.itemDefLoader).g]; int i_4_ = 0; for (int i_5_ = 0; ((ItemDefLoader) laa.itemDefLoader).g > i_5_; i_5_++) { ItemDef itemLoaded = laa.itemDefLoader.d(12388, i_5_); if (((ItemDef) itemLoaded).B >= 0 || ((ItemDef) itemLoaded).J >= 0) is[i_4_++] = i_5_; }
Now our new client method:Code:for (int objectNumber = 0; 25000/*this is what we are going to dump too*/ > objectNumber; objectNumber++) { ObjectDef object = ul.k.getObjectDef((byte)114, objectNumber); System.out.println("object-name: "+object.objectName); System.out.println("object-id: " + object.objectID); }
(edit: this does not contain the whole method by the way)Code:static final void b(byte i) { g++; int[] is = new int[((ItemDefLoader) laa.itemDefLoader).g]; int i_4_ = 0; for (int i_5_ = 0; ((ItemDefLoader) laa.itemDefLoader).g > i_5_; i_5_++) { ItemDef itemLoaded = laa.itemDefLoader.d(12388, i_5_); if (((ItemDef) itemLoaded).B >= 0 || ((ItemDef) itemLoaded).J >= 0) is[i_4_++] = i_5_; System.out.println("item name: " + itemLoaded.itemName); } for (int objectNumber = 0; 25000/*this is what we are going to dump too*/ > objectNumber; objectNumber++) { ObjectDef object = ul.k.getObjectDef((byte)114, objectNumber); System.out.println("object-name: "+object.objectName); System.out.println("object-id: " + object.objectID); }
Now when I run this client, it outputs:
There you go, now just look at the method above and start dumping every variable from the object's and see what you can do.Code:object-name: Clothes equipment object-id: 24976 object-name: null object-id: 24977 object-name: null object-id: 24978 object-name: null object-id: 24979 object-name: null object-id: 24980 object-name: null object-id: 24981 object-name: null object-id: 24982 object-name: null object-id: 24983 object-name: Crop circle object-id: 24984 object-name: Crop circle object-id: 24985 object-name: Crop circle object-id: 24986 object-name: Crop circle object-id: 24987 object-name: Centre of crop circle object-id: 24988 object-name: Magic wheat object-id: 24989 object-name: Magic wheat object-id: 24990 object-name: Centre of crop circle object-id: 24991 object-name: null object-id: 24992 object-name: null object-id: 24993 object-name: null object-id: 24994 object-name: Deposit box object-id: 24995 object-name: null object-id: 24996 object-name: null object-id: 24997 object-name: null object-id: 24998 object-name: null object-id: 24999
How to dump NPC's information
Now, dumping NPC's is about the same as dumping objects and items. You just have to know where the definition for that class is. Now let's create a loop to about 10000 of NPC's like we did with objects.
Our loop:
Now all we have to do, is that under the item loop or object loop if you never removed it to:Code:for (int npcNumber = 0; 10000 > npcNumber; npcNumber++) { NPCDef npc = jm.p.getNPCDef(npcNumber, (byte)-121); System.out.println("npc name: "+npc.npcName); System.out.println("npc id: " + npc.npcID); System.out.println("npc combat level: " + npc.combatLevel); }
Now when we run this, we receive:Code:static final void b(byte i) { g++; int[] is = new int[((ItemDefLoader) laa.itemDefLoader).g]; int i_4_ = 0; for (int i_5_ = 0; ((ItemDefLoader) laa.itemDefLoader).g > i_5_; i_5_++) { ItemDef itemLoaded = laa.itemDefLoader.d(12388, i_5_); if (((ItemDef) itemLoaded).B >= 0 || ((ItemDef) itemLoaded).J >= 0) is[i_4_++] = i_5_; System.out.println("item name: " + itemLoaded.itemName); } for (int objectNumber = 0; 25000/*this is what we are going to dump too*/ > objectNumber; objectNumber++) { ObjectDef object = ul.k.getObjectDef((byte)114, objectNumber); System.out.println("object-name: "+object.objectName); System.out.println("object-id: " + object.objectID); } for (int npcNumber = 0; 10000 > npcNumber; npcNumber++) { NPCDef npc = jm.p.getNPCDef(npcNumber, (byte)-121); System.out.println("npc name: "+npc.npcName); System.out.println("npc id: " + npc.npcID); System.out.println("npc combat level: " + npc.combatLevel); }
Tada. You now know how to dump NPC's.Code:npc id: 9081 npc combat level: 0 npc name: Monk of Zamorak npc id: 9082 npc combat level: 0 npc name: Fly npc id: 9083 npc combat level: 0 npc name: Kuradal npc id: 9084 npc combat level: 0 npc name: Kuradal npc id: 9085 npc combat level: 0 npc name: Abyssal demon npc id: 9086 npc combat level: 0 npc name: Gargoyle npc id: 9087 npc combat level: 0 npc name: Queen Sigrid npc id: 9088 npc combat level: 0 npc name: Dagannoth sentinel npc id: 9089 npc combat level: 193 npc name: Goblin squad (heavy) (blue) npc id: 9090 npc combat level: 0 npc name: Goblin squad (heavy) (blue) npc id: 9091 npc combat level: 0 npc name: Dagannoth guardian npc id: 9092 npc combat level: 148 npc name: Baba Yaga npc id: 9093 npc combat level: 0 npc name: Baba Yaga npc id: 9094 npc combat level: 0 npc name: Silas npc id: 9095 npc combat level: 0 npc name: Wallasalki npc id: 9096 npc combat level: 98 npc name: Dagannoth npc id: 9097 npc combat level: 90 npc name: Dagannoth npc id: 9098 npc combat level: 88 npc name: King Vargas npc id: 9099 npc combat level: 0 npc name: Goblin squad (heavy) (yellow) npc id: 9100 npc combat level: 0 npc name: Goblin squad (heavy) (yellow) npc id: 9101 npc combat level: 0 npc name: King Vargas npc id: 9102 npc combat level: 0 npc name: Dagannoth npc id: 9103 npc combat level: 90 npc name: null npc id: 9104 npc combat level: 0 npc name: Bardur npc id: 9105 npc combat level: 0 npc name: Dagannoth Mother npc id: 9106 npc combat level: 0 npc name: Dagannoth Mother npc id: 9107 npc combat level: 353 npc name: Dagannoth Mother npc id: 9108 npc combat level: 353 npc name: Dagannoth Mother npc id: 9109 npc combat level: 353 npc name: Goblin squad (light) (red) npc id: 9110 npc combat level: 0 npc name: Goblin squad (light) (red) npc id: 9111 npc combat level: 0 npc name: Dagannoth Mother npc id: 9112 npc combat level: 353 npc name: Dagannoth Mother npc id: 9113 npc combat level: 353 npc name: Dagannoth Mother npc id: 9114 npc combat level: 353 npc name: Dagannoth Mother npc id: 9115 npc combat level: 353 npc name: Dagannoth Mother
Any other information, post or PM.
nice.. goodjob
Good job Anthony, you're doing great with the client. I should never have told you to focus more on server development. However, if you integrate these skills into making a cache reader, you will find yourself learning even more.
Great work, I look forward to seeing more from you.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |