Buy/Sell Menu Packet At An NPC Vendor ?

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » General » Buy/Sell menu packet at an NPC vendor ?
Buy/Sell menu packet at an NPC vendor ?
 Asura.Nalfey
Offline
Server: Asura
Game: FFXI
user: Nalf
Posts: 102
By Asura.Nalfey 2024-12-03 12:34:46
Link | Quote | Reply
 
Hey,
Does anyone know which packet (if any) is triggered by slecting the "Buy" or "Sell" in the pop up menus when speaking to an NPC vendor ?

I'm trying to force a lua to buy meds from the curio moogle, but the default behaviour of the game is to start on the last menu item that was previously selected at any vendor.

Example, if you go sell Sortie earrings at a vendor in West Adoulin and then go to the Curio Moogle in Port Windy to buy meds, your menu selector will start on "Sell" and not "Buy".

Any smart mind have a way to always target "Buy" ?
Online
Posts: 14580
By Pantafernando 2024-12-03 13:25:26
Link | Quote | Reply
 
Your best bet is to grab a packetviewer tool, try to filter all the noise packet then try to isolate the actual packet sent when buying and compare with other addon that already do similar things.

Menus are normally just an graphical interface. If you want to manually hit a "buy" button, then you need some sort of keypress.

If you want to use packets for that, generally everything will go together mixed.
 Shiva.Thorny
Offline
Server: Shiva
Game: FFXI
user: Rairin
Posts: 2827
By Shiva.Thorny 2024-12-03 13:36:55
Link | Quote | Reply
 
Buy/sell popup menus don't trigger a packet, they're solely client side and the server will allow you to send individual item purchase and sale packets as soon as the menu has appeared without actually entering the submenu.
 Fenrir.Niflheim
VIP
Online
Server: Fenrir
Game: FFXI
user: Tesahade
Posts: 734
By Fenrir.Niflheim 2024-12-03 13:38:55
Link | Quote | Reply
 
Might be better to ask this question in the windower discord in the development channel see the welcome channel to get access to it
 Asura.Nalfey
Offline
Server: Asura
Game: FFXI
user: Nalf
Posts: 102
By Asura.Nalfey 2024-12-03 14:05:56
Link | Quote | Reply
 
Thanks all !

Yeah that's what my conclusions were getting to, I tried PacketViewer but I wasn't really seeing major changes when switching from Buy<>Sell in the vendor menu.

Will ask on the discord, maybe someone knows an elegant way of always selecting Buy regardless of where the cursor starts when opening the buy/sell menu.
 Shiva.Thorny
Offline
Server: Shiva
Game: FFXI
user: Rairin
Posts: 2827
By Shiva.Thorny 2024-12-03 18:18:42
Link | Quote | Reply
 
Asura.Nalfey said: »
maybe someone knows an elegant way of always selecting Buy

You really don't need to 'select buy' at all. If you're using packets to purchase, the process should be:

(for all shops)
-Poke npc with C>S 0x1A to get response.

(for curio moogle only)
-Catch incoming 0x34 and block it to prevent client getting locked in menu.
-Send C>S 0x5B with the menu index for the shop you want to open.

(for all shops)
-Watch for S>C 0x3C, which will contain item ids/indexes/prices for the items available. multiple will be sent for big shops. If you don't want buy/sell menu to pop up at all, block this too.
-Send C>S 0x83 packets to buy the items. There's no exit shop packet, so once you have the items you want you're all set.

If you're doing this with keystrokes, you probably need to use memory to see what is currently selected. That'll be difficult on windower.

If this sounds too intimidating, you should probably leave it for someone who knows how to do it before you accidentally spend a bunch of gil on the wrong things.
Log in to post.