Is this all still accurate? I have searched for a solution on here and make some changes to Transactionfunction etc but it always crashes the game.
uncertain if it is a problem with the function since update, pattern or, ASM
TIA
Func TraderRequest($aModelID, $aExtraID = -1)
Local $lItemStruct = DllStructCreate('long Id;long AgentId;byte Unknown1[4];ptr Bag;ptr ModStruct;long ModStructSize;ptr Customized;byte unknown2[4];byte Type;byte unknown4;short ExtraId;short Value;byte unknown4[2];short Interaction;long ModelId;ptr ModString;byte unknown5[4];ptr NameString;ptr SingleItemName;byte Unknown4[10];byte IsSalvageable;byte Unknown6;byte Quantity;byte Equiped;byte Profession;byte Type2;byte Slot')
Local $lOffset[4] = [0, 0x18, 0x40, 0xC0]
Local $lItemArraySize = MemoryReadPtr($mBasePointer, $lOffset)
Local $lOffset[5] = [0, 0x18, 0x40, 0xB8, 0]
Local $lItemPtr, $lItemID
Local $lFound = False
Local $lQuoteID = MemoryRead($mTraderQuoteID)
For $lItemID = 1 To $lItemArraySize[1]
$lOffset[4] = 0x4 * $lItemID
$lItemPtr = MemoryReadPtr($mBasePointer, $lOffset)
If $lItemPtr[1] = 0 Then ContinueLoop
DllCall($mKernelHandle, 'int', 'ReadProcessMemory', 'int', $mGWProcHandle, 'int', $lItemPtr[1], 'ptr', DllStructGetPtr($lItemStruct), 'int', DllStructGetSize($lItemStruct), 'int', '')
If DllStructGetData($lItemStruct, 'ModelID') = $aModelID And DllStructGetData($lItemStruct, 'bag') = 0 And DllStructGetData($lItemStruct, 'AgentID') == 0 Then
If $aExtraID = -1 Or DllStructGetData($lItemStruct, 'ExtraID') = $aExtraID Then
$lFound = True
ExitLoop
EndIf
EndIf
Next
If Not $lFound Then Return False
DllStructSetData($mRequestQuote, 2, DllStructGetData($lItemStruct, 'ID'))
Enqueue($mRequestQuotePtr, 8)
Local $lDeadlock = TimerInit()
$lFound = False
Do
Sleep(20)
$lFound = MemoryRead($mTraderQuoteID) <> $lQuoteID
Until $lFound Or TimerDiff($lDeadlock) > GetPing() + 5000
Return $lFound
EndFunc ;==>TraderRequest