Quote:
Originally Posted by NovaCygni
thankyou, got that feature working properly now, I still need to make a new module to deal with the packets better, I need to find a way to make the packets more user friendly. you have any help for this? I want to make it so it shows nearby players names and stores the x,y position as a value, so that later I can add to it by making it autostig players.
|
I'm working with the raw packets in my proxy, but it's not too hard to examine the player appear packet...only problem being it's the same ID as the monster spawn packet. Once you find the identifier though it shouldn't be a problem.
The packet for players appearing is ID 'F6 03' or '0x3F6'. x location is at byte 53/54 and the y location is stored in bytes 55 and 56. Legnth of the players (or monsters) name is stored in byte 67 and and the name is stored in bytes 68 to (68 + length of name).
One way to tell if it was a monster or a player would be to check what it's equips are (also in the same packet) as for monsters this would be blank, however a player with no equipment on would then be recognised as a monster. Another option would be to check the players stance (byte 9-13 in the f6 03 packet) as far as I can tell monsters have different stances (not sure if each monsters is unique, I only checked a few) and none of the are the same as any of the players stances (e.g. sit, dance etc).
The stances I know are: 68 00 00 00 - Pheasants, 30 00 00 00 - Turtledoves. So if you were to find all the possible stances of players, which is easy enough to do, you can run a check to see if the spawn packet contains one of those stances, if so you have a player appearing and can simply extract the information you want.
If you want to compare player and monster packets I grabbed two so you can see.
Code:
4D 00 F6 03 DD D7 06 00 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 21 00 01 00 CD 01 D3 01 00 00 05 64 00 00 00 00 00 01 08 50 68 65 61 73 61 6E 74 00 00
[Stance ]
Pheasant
Code:
4F 00 F6 03 A0 B6 14 00 41 29 28 00 00 00 00 80 00 00 00 00 86 09 00 32 00 00 00 00 8B CA 01 00 D3 09 02 00 E4 A1 07 00 92 05 10 00 00 00 00 00 00 00 00 00 B6 01 80 01 51 01 00 FA 00 00 6E 00 00 01 0A 4E 4F 52 4D 41 4C 32 30 30 37 00 00
[Stance ]
A player
Alternativly you could check that the ID does not correspond with any monsters in the game, however that would be a little long winded, it would work however.