I apologize if this isn't the right forum to post; however i was trying to build a generic 'buy' script to command line buy items.
When I talk to a shop NPC I get a return 0x03c which seems to have the list of items to purchase. However, the list is inaccurate based on packets.parse.
Example:
Yoskolo in Lower-Jeuno offers to sell a number of items (16); however the packets.parse returns 24 items. A handful of the items are correctly parse and a handful are not - which seems to me to be an offset definition somewhere.
I'm going to try and debug and extract the exact bits I need/want by reading it raw, but if you guys can help on the packets.parse that would be more consistent.
To recreate simply load up PacketViewer then log incoming 0x03c.
What is for sale in the game:
Log:
[2017-05-07 13:32:13] | 0 1 2 3 4 5 6 7 8 9 A B C D E F | 0123456789ABCDEF ----------------------------------------------------- ---------------------- 0 | 3C 64 3D 06 00 00 0F 01 0C 00 00 00 9D 11 00 C2 0 | <d=............. 1 | 00 00 00 00 C8 00 00 00 46 11 01 00 00 00 00 00 1 | ........F....... 2 | 2C 01 00 00 47 11 02 00 00 00 00 00 4C 04 00 00 2 | ,...G.......L... 3 | 48 11 03 00 00 00 00 00 A2 03 00 00 59 11 04 00 3 | H...........Y... 4 | 00 00 00 00 90 01 00 00 5A 11 05 00 00 00 00 00 4 | ........Z....... 5 | A8 15 00 00 CC 11 06 00 00 00 00 00 EC 18 00 00 5 | ................ 6 | B6 13 07 00 00 00 00 00 10 1D 00 00 B7 13 08 00 6 | ................ 7 | 00 00 00 00 34 17 00 00 B8 13 09 00 00 00 00 00 7 | ....4........... 8 | F8 11 00 00 B9 13 0A 00 00 00 00 00 F0 1E 00 00 8 | ................ 9 | BA 13 0B 00 00 00 00 00 88 13 00 00 BB 13 0C 00 9 | ................ A | 00 00 00 00 68 10 00 00 BC 13 0D 00 00 00 00 00 A | ....h........... B | D0 20 00 00 BD 13 0E 00 00 00 00 00 60 EA 00 00 B | . ..........`... C | D6 13 0F 00 00 00 00 00 -- -- -- -- -- -- -- -- C | ........-------- _zero1: 0 _padding1: 271 Price 1: 12 (12 G) Item 1: 4509 (Distilled Water) Shop Slot 1: 49664 Price 2: 0 (0 G) Item 2: 200 (Tsahyan Mask) Shop Slot 2: 0 Price 3: 69958 (69,958 G) Item 3: 0 (-) Shop Slot 3: 0 Price 4: 300 (300 G) Item 4: 4423 (Apple Juice) Shop Slot 4: 2 Price 5: 0 (0 G) Item 5: 1100 (Xalmo Feather) Shop Slot 5: 0 Price 6: 201032 (201,032 G) Item 6: 0 (-) Shop Slot 6: 0 Price 7: 930 (930 G) Item 7: 4441 (Grape Juice) Shop Slot 7: 4 Price 8: 0 (0 G) Item 8: 400 (Gr. Mahogany Bed) Shop Slot 8: 0 Price 9: 332122 (332,122 G) Item 9: 0 (-) Shop Slot 9: 0 Price 10: 5544 (5,544 G) Item 10: 4556 (Icecap Rolanberry) Shop Slot 10: 6 Price 11: 0 (0 G) Item 11: 6380 (Refined Chair) Shop Slot 11: 0
The 2nd item should be Orange Juice - resource item # 4422 which in hex is 1146, which you can see in line "1" of the raw hex above right in the middle "46 11". However it's being parsed as item "200" (Hex: C8).
Any help would be appreciated!
thanks,
Sam