Okay Thanks for quick reply. There are somethings I am willing to ask you. No, to you all.
I open SendOPS and I get things like 0xE3 etc. Of course there are more of them so what are these.And how I identify them. :O
Same ar recvoOPS i get like 0xAD and what is these 0x things. How I identify them.
Some other things. "In moople it is inside source." I dont understand this line. And how I update structures.
*Feels Dumb*
Currently I am in beginner portion of java so like 9th or 10th tutorial and have learnt simple things like basic calculator.
Thanks.
With Regards
Amey
Crost
Any number in Java that is prefixed with 0x is a hexadecimal number. Hex numbers are using base 16 (unlike everyday numbers that use base 10, a.k.a. the decimal base). Think of it as having 6 new "digits" to create numbers from.
These are:
A - 10 in decimal
B - 11 in decimal
C - 12 in decimal
D - 13 in decimal
E - 14 in decimal
F - 15 in decimal
Now, since we have new digits, we need to "count" differently.
In base 10, you count like this: 1,2,3,4,5,6,7,8,9,10,11,12...
However, in hex, you count like this: 1,2,3,4,5,6,7,8,9,
A,B,C,D,E,F,10,11,12...
So 10 in hex is actually 16 in decimal!
That's how base 16 works.
Now, the opcodes themselves:
When you play MapleStory, the client communicates with the server using packets.
Packets are pieces of data that transfer over the internet between the server and your client.
Each packet has an Opcode (Short for operation code). This opcode basically represents what "kind" of packet is this packet.
For instance (I'm just making up numbers now for the sake of example): 0xC5 can be the Opcode of Player movement packets. This means that whenever the server receives this packet, it knows it should treat it as a movement packet, and this way it can handle it correctly.
Another one: Let's say 0x2D is a close-range attack opcode. This means that when the server receives this packet, it will know it should handle this packet as an attack packet, and not something else.
These packets also contain important data: for instance, the movement packet I mentioned will probably contain data such as the new player position (X and Y coords), the kind of movement (walk, jump, teleport etc.), etc., While the damage packet will probably contain data such as the amount of damage dealt, the monster that was hit, the skill that was used (if any) etc. This allows the server to correctly handle the data.
Now, here's the thing: Since we are using the official MapleStory client, we must follow it's "rules". This means that we have to follow the exact packet structures and opcodes that Nexon use, because otherwise the client will not be able to "understand" what we mean. For instance, if I'll try to send the 0x2D packet as an item-pickup packet, the client will not understand it, since it knows that 0x2D means an attack packet, not an item-pickup packet. Thus, it will crash.
And so, this is one of the most important tasks for server programmers: following the correct packet structures from Nexon.
To do this, we use "sniffers" - sniffers are tools that allow you to capture the packets from Nexon's servers (when playing the official versions). This way, you can see the correct packets (and the correct opcodes) and try to analyze how they work so you can copy that to your server. However, those will most likely change whenever MapleStory is updated (new versions), and thus need to be updated again every time.
As for "in moople it is inside the source" - this just means the file containing the packet opcode list is "hard-coded" into the source. Some other sources have the list in a .properties file. This is nothing serious, just other ways of reading that data.