[Help] SRO Ground Click Packet

03/18/2012 15:37 rowni18#1
I created a program (using C++) that can get silkroad packets particularly the ground click packet .

Here is an example:
09002170010001945c0906ea00ec06

I know that this is the actual data:
01945c0906ea00ec06

How can I convert this to x- and y- coordinates?

I know that the byte 0194 are the x-and y-sectors based from other threads posted here.

how about the remaining byte? how can i classify them? Help please.
03/18/2012 15:59 Schickl#2
Code:
01    //1 = has destination, 0 = doesn't have a destination(in this case the packet should contain the angle only
94    //X sector
5c    //Y sector
0906 //WORD X Offset
ea00 //WORD Z Offset
ec06 //WORD Y Offset
realXCords = (*xSector - 135) * 192 + *xOffset / 10;
realYCords = (*ySector - 92) * 192 + *yOffset / 10;
03/19/2012 16:52 rowni18#3
Thanks! I've got the in-game x- and y-coordinates correctly using the formula you've given.

I am only confused with this byte:
01 //1 = has destination, 0 = doesn't have a destination(in this case the packet should contain the angle only

other threads says it is for "sky click" or "ground click". Assuming that you are correct with the "destination" byte, can you give me an example packet that contains angle only and the computation for it?

And... Another thing, how can I compute for the Z offset and what is it? Again, other threads say that it is for elevation. We know that packet [7021] is from client to joymax, which means that the packet comes from the game... How can I find it? (supposedly, if I am going to use an injector. The Z offset shouldn't be any random word)

Thanks you!
03/19/2012 18:13 Schickl#4
Code:
00  //no destination
A822 //example angle
That's the whole packet i think(not 100% sure, because I didn't really work with it yet, but it should be right)

the angle is the direction the char walks to

'bout the Z offset:
It's the height
When you send a packet with the Z Offset of zero to the client, the char will be positioned on the ground.
so you don't need to check that
03/19/2012 19:27 rowni18#5
Thanks! I appreciate you're answers!

BTW I'm creating a C++ based BOT and all I can do now is to analyze [b021] and [7021] packets and I'm successful at making my bot move.

Just want to know If you have links there about SRO packets. I did a lot of searching from the internet and read open-source VB6 source codes (SROPT, etc) and AutoIT sources, etc. But I am not successful at it as many Packet Wikis are dead now and other Bots, if not open source or free(free but not open source), are PAID.
LOL
03/19/2012 19:31 vorosmihaly#6
why don't you just analyze packets for yourself?
03/19/2012 19:52 rowni18#7
Quote:
Originally Posted by vorosmihaly View Post
why don't you just analyze packets for yourself?
Well, just to make things easier. LOL
There are too many opcodes that SRO uses.

From my program, it will be easier to analyze if the packet comes from my client.
e.g. If I cast a skill, I can easily know the packet itself.
But if it is from the server, that would be a very long way...
As i observed, the packets I received are 10X more (if not) than the packets I send.