Way to close any open NPC Dialogs

06/07/2021 23:39 Latyos#1
Hello,

I've been curious if there's a packet or a trick that I can send/do to client to close any NPC dialogs they have currently open or is that has to be closed by the client?
10/16/2021 10:31 tehpwnerer69#2
Redacted Post
10/23/2021 16:08 Yupmoh#3
Quote:
Originally Posted by Latyos View Post
Hello,

I've been curious if there's a packet or a trick that I can send/do to client to close any NPC dialogs they have currently open or is that has to be closed by the client?
For older clients you can just hook it (as in a full close dialogue) however for newer clients the ESC button closes out open dialogues afaik so maybe you can look for a button trigger perhaps?

Just thought I'd let you know what my initial thoughts were thinking about this.
10/24/2021 17:56 Relic#4
The easiest way to hide the NPC dialog via server packet is to patch an existing (unused) hide window action via the MsgAction packet which does not require any hooking.

I'll be using client version 5579 as a reference:

MsgAction[Offset 4 = 116][Offset 8 = 3608] packet.

[Offset 8 = 3608] would normally hide the DowngradeEquipment window but instead we'll change the offset to hide the Npc dialog. You can use any other type as long as it hides a window.

[Only registered and activated users can see links. Click Here To Register...]

We need to find the address offset for the CDlgTask which is a property in the CMyShellDlg class. In 5579 the CDlgTask offset is 0x1a6c90.

After we patch the client, sending MsgAction[Offset 4 = 116][Offset 8 = 3608] hides the task dialog window.