How to get the headers?

05/25/2024 13:57 JimRaynerd#1
I'm curious to know how the headers are gathered. I'm currently looking at the ones from Zilvermoon and comparing them to Logicdoor's and I'm wondering how they got about finding them.

I heard that the headers got changed a few years back by Anet and that broke most bots.


Here's an example:
Code:
#Region ;=QUEST=
;GAME_SMSG_QUEST_ADD
Global Const $HEADER_QUEST_ACCEPT = 0x39			;Accepts a quest from the NPC
Global Const $HEADER_QUEST_REWARD = 0x4F			;Retrieves Quest reward from NPC
;GAME_CMSG_QUEST_ABANDON 0x0F or GAME_SMSG_QUEST_REMOVE 0x51
Global Const $HEADER_QUEST_ABANDON = 0x0F			;Abandons the quest

;LogicDoors
Global Const $HEADER_QUEST_ABANDON = 0x000F ;Same as above
Global Const $HEADER_QUEST_REQUEST_INFOS = 0x0010
Global Const $HEADER_QUEST_SET_ACTIVE = 0x0012
#EndRegion ;=QUEST=

Google isn't helping because it gives me stuff about image headers (like cover images) :/

Also is there functionally a difference between the 2 extra 0's?
Global Const $HEADER_QUEST_ABANDON = 0x0F
vs
Global Const $HEADER_QUEST_ABANDON = 0x000F




Are headers also meant to be unique?

Code:
;GAME_CMSG_INTERACT_ITEM 0x3D or GAME_CMSG_INTERACT_GADGET 0x4F
Global Const $HEADER_SIGNPOST_RUN = 0x4F			;Runs to signpost
vs

Code:
Global Const $HEADER_QUEST_REWARD = 0x4F			;Retrieves Quest reward from NPC
Both have the same 0x4F header for different actions.


Edit: pretty sure they're meant to be unique and the Zilvermoon version reuses the same header with different variable names as shown here:

Code:
Global Const $HEADER_QUEST_ACCEPT = 0x39	
Global Const $HEADER_DIALOG = 0x39	

Func AcceptQuest($aQuestID)
	Return SendPacket(0x8, $HEADER_QUEST_ACCEPT, '0x008' & Hex($aQuestID, 3) & '01')
EndFunc   ;==>AcceptQuest
but when compared to Logicdoor's:

Code:
Global Const $HEADER_SEND_DIALOG = 0x0039 

Func AcceptQuest($aQuestID)
	; If IsDllStruct(GetQuestByID($aQuestID)) Then Return
	Out("Accepting quest" & $aQuestID)
	SendPacket(0x8, $HEADER_SEND_DIALOG, '0x008' & Hex($aQuestID, 3) & '01')
	RequestQuestInformation($aQuestID)
	Out($aQuestID)
	Out("Accepted quest " & $Quest_ID[$aQuestID] & " - Status: " & QuestLogState($aQuestID))
	Out("Starting at " & $Map_ID[QuestMapFrom($aQuestID)])
	Out("Ending at " & $Map_ID[QuestMapTo($aQuestID)])
	Pingsleep(100)
EndFunc   ;==>AcceptQuest
09/12/2024 14:02 silencer001#2
i dont understand, both headers are the same in every case. Just the funcs are a bit different (logicdoors has more debugging going on). The way to update them is go to wait until the guys on github update GWCA and grab the headers from them. Finding the headers after an update that breaks them requires some reverse engineering skill to find the new ones no idea how they do this part.
09/12/2024 18:22 apoguita#3
I haven't seen this question before, I cangive more insight on how it's done.

The "headers" in AutoIt are direct memory addresses for data that the library needs to read/write

You get them by either monitoring those memory addresses or reverse engineering them.

The way GWCA get it's memory addresses is by performing byte search in the game memory, finding the patterns ensures a "base pointer" and then they can locate the memory area by shifting bytes.

That is why GWca doesn't break on major game updates, because it has a method of locating relevant memory areas.


As per your question of "quest headers" the packet you need to send when accepting a quest is formed by several factors, the dialog of the button presented, the I'd of the quest you're taking and some other things, you only see a single uint_32 number because it's what can be written in memory but the message is encoded there.

To see what are the values that you need, you can look In toolbox, see in the "info module" and look for the values you are looking for.

If instead what.you want is to learn how the packet is formed, look in the dialogmodule.cpp in the code, all info you need is there
11/13/2024 08:45 Backxtar#4
Does any1 have the new headers already?
11/13/2024 16:21 pendulum1#5
Maybe this will help you, gl man
11/13/2024 20:50 Zilvermoon#6
Quote:
Originally Posted by pendulum1 View Post
Maybe this will help you, gl man
How to use this ? (You can message me if you want)