Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 07:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Selling to a Material Trading by Scripting in 2024

Discussion on Selling to a Material Trading by Scripting in 2024 within the GW Bots forum part of the Guild Wars category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2020
Posts: 5
Received Thanks: 0
Selling to a Material Trading by Scripting in 2024

Ok I will be brief, I want to "request a quote" to a Material Trader Merchant (for example to know the price of bones, the non rare one) to sell an item to them.

I found a way to do that, but doing so crashes the game at the moment.

The latest GWA2.au3 offers the function
Func TraderRequestSell($aItem)

but using it as below crashes the game

PHP Code:
Local $Item_ExtraID_Bones 921

Do
           
Local $quote TraderRequestSell($Item_ExtraID_Bones)
           If 
TraderSell() Then $lHowMany += 1
Until $lHowMany 

Do you guys have any suggestions or experience with this
and how did you make it work?
fury90723 is offline  
Old 05/06/2024, 18:55   #2
 
Restia Ashdoll's Avatar
 
elite*gold: 0
Join Date: Apr 2016
Posts: 313
Received Thanks: 166
Quote:
Originally Posted by fury90723 View Post
Ok I will be brief, I want to "request a quote" to a Material Trader Merchant (for example to know the price of bones, the non rare one) to sell an item to them.

I found a way to do that, but doing so crashes the game at the moment.

The latest GWA2.au3 offers the function
Func TraderRequestSell($aItem)

but using it as below crashes the game

PHP Code:
Local $Item_ExtraID_Bones 921

Do
           
Local $quote TraderRequestSell($Item_ExtraID_Bones)
           If 
TraderSell() Then $lHowMany += 1
Until $lHowMany 

Do you guys have any suggestions or experience with this
and how did you make it work?
You should need 2 Func for that

Here is an Example how it could look in script:
Code:
	While GetGoldCharacter() > 20*1000
		TraderRequest(930)
		Sleep(500 + 3 * GetPing())
		TraderBuy()
	WEnd
Code:
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

Func TraderBuy()
	If Not GetTraderCostID() Or Not GetTraderCostValue() Then Return False
	Enqueue($mTraderBuyPtr, 4)
	Return True
EndFunc   ;==>TraderBuy

idk if these gwa2 func still work i didnt use that for years but at least you see how it should work
Restia Ashdoll is offline  
Old 05/06/2024, 22:10   #3
ベトナム警察




 
Lumi's Avatar
 
elite*gold: 0
The Black Market: 517/0/0
Join Date: Jan 2012
Posts: 16,499
Received Thanks: 3,528
Arrow GW Exploits, Hacks, Bots, Tools & Macros -> GW Bots

#moved
Lumi is offline  
Old 05/07/2024, 02:14   #4
 
elite*gold: 0
Join Date: Sep 2020
Posts: 5
Received Thanks: 0
Thank you for answering Restia Ashdoll!

Yeah you suggested me the 2 functions to buy,
there are 2 to buy and 2 to sell
allegedly:
-> buy
TraderRequest()
TraderBuy()
-> sell
TraderRequestSell()
TraderSell()

The trader request functions crash the game.
Do we know any workarounds for this?

I'd be willing to add a new implementation to GWA2, but I am not sure how would I go and do that, are there any docs that help with the GW API?

Maybe my gwa2 is not the latest one? Does anybody have one that works? (headers are the latest ones)

GWA2.au3

;~ Description: Request a quote to sell an item to the trader.
Func TraderRequestSell($aItem)
Local $lItemID
Local $lFound = False
Local $lQuoteID = MemoryRead($mTraderQuoteID)

If IsDllStruct($aItem) = 0 Then
$lItemID = $aItem
Else
$lItemID = DllStructGetData($aItem, 'ID')
EndIf

DllStructSetData($mRequestQuoteSell, 2, $lItemID)
Enqueue($mRequestQuoteSellPtr, 8)

Local $lDeadlock = TimerInit()
Do
Sleep(20)
$lFound = MemoryRead($mTraderQuoteID) <> $lQuoteID
Until $lFound Or TimerDiff($lDeadlock) > GetPing() + 155000
Return $lFound
EndFunc ;==>TraderRequestSell

;~ Description: ID of the item item being sold.
Func TraderSell()
#If Not GetTraderCostID() Or Not GetTraderCostValue() Then Return False
Enqueue($mTraderSellPtr, 4)
Return True
EndFunc ;==>TraderSell
fury90723 is offline  
Reply

Tags
bot, material trader, script


Similar Threads Similar Threads
🔥CHEAP AF🔥 VALORANT AIMBOT 2024✅(💎UNDETECTED SINCE 2024💎)
01/28/2024 - Valorant Trading - 0 Replies
*EXTERNAL* AIMBOT ONLY "UNDETECTED SINCE 2021 🔥🔥✅✅" ⚠️REQUIREMENTS: ✅𝗢𝗡𝗟𝗬 𝗙𝗢𝗥 𝗪𝗜𝗡𝗗𝗢x 298;𝗦 𝟭𝟬! DOES NOT SUPPORT WINDOWS 11 ✅𝗠𝘂𝘀𝘁 Disable Windows security using Defender Control ✅𝗠𝘂𝘀𝘁 Uninstall Antivirus
Cabal Asia Prime 2024 | Latest Cheat | RDR Full Bypassed | Latest Trainer 2024.
01/25/2024 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 0 Replies
#LusotTV #subscribe if you are interested contact me on. Discord : LusotTV#7136 Facebook : https://www.facebook.com/antii93 VIDEO SAMPLE :



All times are GMT +2. The time now is 07:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.