EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Understanding packet structure (https://www.eqemulator.org/forums/showthread.php?t=35199)

provocating 04-15-2012 04:09 PM

Understanding packet structure
 
Okay I thought I had this, but maybe I do not.

I am guessing this is the packet that got sent from me sellling a single malachite to a vendor using Underfoot

Code:

[OPCode: 0x0b27] OP_ShopPlayerSell [Server->Client] [Size: 16]
000 | 93 01 00 00 17 00 00 00 01 00 00 00 31 00 00 00  | ............1...

This is 16 bytes if I am right, and have the right packet.

So this would be the structure correct ? It is me selling to the vendor a malachite. The sell struct seems to be larger so it does not looking like a likely candidate.

So this would be the struct.

Code:

struct Merchant_Purchase_Struct {
/*000*/        int32        npcid;                        // Merchant NPC's entity id
/*004*/        int32        itemslot;                // Player's entity id
/*008*/        int32        quantity;
/*012*/        int32        price;
};

I can make out the slot and the amount, which was one malachite. But the NPCid does not match me or the vendor, no matter if I read it from right to left or left to right, converted it to decimal. I am thinking I am missing something simple here.

I posted this in a separate thread because this has nothing to really do with the VoA development.

Derision 04-15-2012 04:20 PM

That packet has the following values:
Code:


NPCID        0x00000193        Decimal        403
Slot        0x00000017        Decimal        23
Qty        0x00000001        Decimal  1
Price        0x00000031        Decimal  49

I'd need to see the OP_ZoneEntry packet for the merchant to tell if the NPCID was correct or not.

provocating 04-15-2012 04:23 PM

Code:

[OPCode: 0x4b61] OP_ZoneEntry [Server->Client] [Size: 355]
000 | 4d 65 72 61 62 6f 5f 53 6f 74 61 74 68 30 30 30  | Merabo_Sotath000
016 | 00 93 01 00 00 3c 33 33 53 40 01 00 00 00 1d 00  | .....<33S@......
032 | 00 00 80 bf 00 00 00 00 00 00 80 40 00 00 00 20  | ...........@...
048 | 3f 00 00 a0 3f 08 00 00 00 01 01 00 00 00 64 00  | ?...?.........d.
064 | 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  | ................
080 | 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 29 00  | ..............).
096 | 64 00 03 15 00 00 00 42 72 65 77 69 6e 67 20 53  | d......Brewing S
112 | 75 70 70 6c 69 65 73 00 00 00 00 00 00 00 00 00  | upplies.........
128 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
144 | 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00  | ................
160 | 00 00 38 03 00 00 00 00 96 00 16 fc 07 00 00 00  | ..8.............
176 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
192 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
208 | 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 15 00  | ................
224 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
256 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
272 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
288 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
304 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
336 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
352 | 00 00 00                                        |

I see the 01 93 in the packet when he was picked up during zone in. I am guessing this in no way reflects his ID of 202081 - Merabo_Sotath (Brewing Supplies)

Derision 04-15-2012 04:25 PM

Quote:

Originally Posted by provocating (Post 208883)
Code:

[OPCode: 0x4b61] OP_ZoneEntry [Server->Client] [Size: 355]
000 | 4d 65 72 61 62 6f 5f 53 6f 74 61 74 68 30 30 30  | Merabo_Sotath000
016 | 00 93 01 00 00 3c 33 33 53 40 01 00 00 00 1d 00  | .....<33S@......
032 | 00 00 80 bf 00 00 00 00 00 00 80 40 00 00 00 20  | ...........@...
048 | 3f 00 00 a0 3f 08 00 00 00 01 01 00 00 00 64 00  | ?...?.........d.
064 | 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  | ................
080 | 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 29 00  | ..............).
096 | 64 00 03 15 00 00 00 42 72 65 77 69 6e 67 20 53  | d......Brewing S
112 | 75 70 70 6c 69 65 73 00 00 00 00 00 00 00 00 00  | upplies.........
128 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
144 | 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00  | ................
160 | 00 00 38 03 00 00 00 00 96 00 16 fc 07 00 00 00  | ..8.............
176 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
192 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
208 | 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 15 00  | ................
224 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
256 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
272 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
288 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
304 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
336 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
352 | 00 00 00                                        |


Yes, that is correct.

provocating 04-15-2012 04:25 PM

I see the 01 93 in the packet when he was picked up during zone in. I am guessing this in no way reflects his ID of 202081 - Merabo_Sotath (Brewing Supplies). Sorry I am trying to wrap my head around all of this.

Noport 04-15-2012 04:34 PM

I forgot to tell provocating take your current voa.conf rename it to patch_Mar15-2012.conf then put with eqextractor2 directory replace the older file with current opcodes

Derision 04-15-2012 04:34 PM

202081 is just his id in the PEQ npc_types table, which is never sent to the client and has no meaning to it.

0x0193 is the entity_id.

Entity_ids are assigned sequentially, starting from 1, to each NPC that is spawned in a zone, so the first NPC to be spawned gets EntityID 1, the next one gets 2, etc, etc. These are what are sent in the OP_ZoneEntry and various other packets and are what tie things together in the packets.

The EntityID an NPC get assigned could change depending on the order things get spawned, so you need to look at the OP_ZoneEntry packet in the particular collect your are looking at to see what it has been assgined.

The EntityID of an NPC is the 32 bit value following the null terminated name string at the start of the OP_ZoneEntry packet.

provocating 04-15-2012 04:38 PM

Quote:

Originally Posted by Noport (Post 208886)
I forgot to tell provocating take your current voa.conf rename it to patch_mar15.conf then put with eqextractor2 directory replace the older file with current opcodes

I have the Extractor files from just recently, and they do seem to be able to parse the VoA client, are you saying I still need to do this ?

Noport 04-15-2012 04:47 PM

that is what i have been doing just replacing patch_Mar15-2012.conf file with newer opcode so it will show up correctly.

provocating 04-15-2012 04:49 PM

I actually just copied the voa.conf into the directory without replacing anything, it appears to work fine like that ?

Derision 04-15-2012 04:56 PM

EQExtractor2 is looking for a file called patch_Mar15-2012.conf in it's working directory to decode packets collected from the current Live client.

What Noport is saying is that as Trevius updates the patch_VoA.conf in the utils directory with newly found OpCodes, if you want EQExtractor2 to show these OpCodes with their correct name, rather than OP_Unknown, you should copy patch_VoA.conf to the location of your EQExtractor2.exe and rename it to patch_Mar15-2012.conf

provocating 04-15-2012 05:00 PM

I figured it just parsed the directory for *.conf files and used them. This is good to know !

In fact a packet that was not getting parsed right, now appears to be. Thanks !

Noport 04-15-2012 05:03 PM

copy voa.conf to desktop rename patch_Mar15-2012.conf replace older patch_Mar15-2012.conf.. in the program extractor2 you should see patch_mar15 in green correct? if you see voa.conf in green then you ok. i'll let Derision exlpain it to you. i want you to be using current opcode not the older opcode.

provocating 04-15-2012 05:05 PM

Well it is definitely a learning curve. I noticed that selling is not working, which Trevius is probably already working on. Selling the exact same item to the exact same vendor yeilds different results.

UNDERFOOT

Code:

[OPCode: 0x0b27] OP_ShopPlayerSell [Server->Client] [Size: 16]
000 | 93 01 00 00 17 00 00 00 01 00 00 00 31 00 00 00  | ............1...

VOA

Code:

[OPCode: 0x0b27] OP_ShopPlayerSell [Client->Server] [Size: 20]
000 | 93 01 00 00 17 00 ff ff ff ff cf 42 01 00 00 00  | ...........B....
016 | 36 09 ff c2                                      | 6...

One more byte to the packet and obviously some info padded in there.

501st 04-15-2012 05:16 PM

That's likely due to the merchant window revamp. In fact since you're referring to SELLING an item my guess would be that extra information is to handle the new "buy back" tab. Where apparently items you sell default to if the merchant's inventory is full. So you can buy back items sold by mistake.


All times are GMT -4. The time now is 11:38 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.