Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 06:20

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

Advertisement



[GWA2] Switching between rune listings at rune trader

Discussion on [GWA2] Switching between rune listings at rune trader within the GW Bots forum part of the Guild Wars category.

Reply
 
Old   #1
 
3vangelist's Avatar
 
elite*gold: 0
Join Date: Jan 2018
Posts: 46
Received Thanks: 14
Unhappy [GWA2] Switching between rune listings at rune trader

Hi all,

I'm in a bit of a bind with getting buy quotes for items that aren't for my primary profession.

When you open dialog with the rune trader, the first "tab" you see is for your own profession, i.e. if you're an assassin, you'll see Vaguard's Insignia at the top of the buy list.

GWA2 can only read the merchant items for the current tab. Does anyone know or can help with the action (or packet) headers needed to switch to another tab so I can get a buy quote for Sentinel's Insignia, for example?

Many thanks in advance
3vangelist is offline  
Old 10/11/2018, 15:25   #2
 
elite*gold: 0
Join Date: May 2014
Posts: 269
Received Thanks: 320
GWA2 has a Function to request a quote to buy/sell an Item.
See TraderRequest() and TraderRequestSell().

BUT: :-)
Most Runes may share the same ItemModelID (for the same Profession)
eg:
5559, "Warrior Rune of Superior Tactics"
5559, "Warrior Rune of Superior Strength"

To get the correct Quote (buy) for the Item i changed the Function TraderRequest() ... so i can give ItemModelID AND ItemModString as Parameter.

I changed
Code:
If DllStructGetData($lItemStruct, 'ModelID') = $aModelID And DllStructGetData($lItemStruct, 'bag') = 0 And DllStructGetData($lItemStruct, 'AgentID') = 0 Then
to
Code:
If ((StringLen($aModelID) < 6 And DllStructGetData($lItemStruct, 'ModelID') = $aModelID) Or (StringLen($aModelID) > 5 And StringInStr(GetModStruct($lItemStruct), $aModelID) > 0)) And DllStructGetData($lItemStruct, 'bag') = 0 And DllStructGetData($lItemStruct, 'AgentID') = 0 Then
DerMoench14 is offline  
Thanks
1 User
Old 10/11/2018, 23:10   #3
 
3vangelist's Avatar
 
elite*gold: 0
Join Date: Jan 2018
Posts: 46
Received Thanks: 14
Quote:
Originally Posted by DerMoench14 View Post
GWA2 has a Function to request a quote to buy/sell an Item.
See TraderRequest() and TraderRequestSell().

BUT: :-)
Most Runes may share the same ItemModelID (for the same Profession)
eg:
5559, "Warrior Rune of Superior Tactics"
5559, "Warrior Rune of Superior Strength"

To get the correct Quote (buy) for the Item i changed the Function TraderRequest() ... so i can give ItemModelID AND ItemModString as Parameter.

I changed
Code:
If DllStructGetData($lItemStruct, 'ModelID') = $aModelID And DllStructGetData($lItemStruct, 'bag') = 0 And DllStructGetData($lItemStruct, 'AgentID') = 0 Then
to
Code:
If ((StringLen($aModelID) < 6 And DllStructGetData($lItemStruct, 'ModelID') = $aModelID) Or (StringLen($aModelID) > 5 And StringInStr(GetModStruct($lItemStruct), $aModelID) > 0)) And DllStructGetData($lItemStruct, 'bag') = 0 And DllStructGetData($lItemStruct, 'AgentID') = 0 Then
I knew this already - I'll turn this into a more specific question based on your code (because its pretty much what I'm already doing atm)...

If I took your code and applied the correct model ID and modstring to it for a Survivor Insignia, does it find an item listed for the merchant for a Survivor Insignia?

If the answer is definitely yes, I know that I'm wrong and something else is going on :P

UPDATE: Looks like something strange happens when you have the same item in your inventory already - it seems to recycle that item within the range of the Merchant's item pointers in memory, meaning that the Bag/Slot would show that it is in your own inventory, and isn't a trader item?
3vangelist is offline  
Old 10/12/2018, 12:18   #4
 
elite*gold: 0
Join Date: May 2014
Posts: 269
Received Thanks: 320
Quote:
Originally Posted by 3vangelist View Post
I knew this already - I'll turn this into a more specific question based on your code (because its pretty much what I'm already doing atm)...

If I took your code and applied the correct model ID and modstring to it for a Survivor Insignia, does it find an item listed for the merchant for a Survivor Insignia?

If the answer is definitely yes, I know that I'm wrong and something else is going on :P

UPDATE: Looks like something strange happens when you have the same item in your inventory already - it seems to recycle that item within the range of the Merchant's item pointers in memory, meaning that the Bag/Slot would show that it is in your own inventory, and isn't a trader item?
For me
Code:
[...] And DllStructGetData($lItemStruct, 'bag') = 0 And DllStructGetData($lItemStruct, 'AgentID') = 0 [...]
works fine.

Code:
;~ Description: Request a Quote to buy an Item from a Trader. Returns true if successful.
Func TraderRequest($aModelID, $aExtraID = -1)
	Local $lOffset[4] = [0, 0x18, 0x40, 0xC0]
	Local $lItemArraySize = MemoryReadPtr($mBasePointer, $lOffset)
	Local $lFound = False
	Local $lQuoteID = MemoryRead($mTraderQuoteID)
	Local $lModStructPtr, $lModStructSize, $lModStruct, $lItemPtr
	For $lItemID = 1 To $lItemArraySize[1]
		$lItemPtr = GetItemPtr($lItemID)
		If $lItemPtr = 0 Then ContinueLoop
		$lModStructPtr = MemoryRead($lItemPtr + 16, 'ptr')
		$lModStructSize = MemoryRead($lItemPtr  + 20, 'long')
		$lModStruct = MemoryRead($lModStructPtr, 'Byte[' & $lModStructSize * 4 & ']')
		If (StringLen($aModelID) < 6 And MemoryRead($lItemPtr + 44, 'long') = $aModelID) Or (StringLen($aModelID) > 5 And StringInStr($lModStruct, $aModelID) > 0) Then
			If MemoryRead($lItemPtr + 12, 'ptr') = 0 And MemoryRead($lItemPtr + 4, 'long') = 0 Then
				If $aExtraID = -1 Or MemoryRead($lItemPtr + 34, 'short') = $aExtraID Then
					$lFound = True
					ExitLoop
				EndIf
			EndIf
		EndIf
	Next
	If Not $lFound Then Return False
	DllStructSetData($mRequestQuote, 2, MemoryRead($lItemPtr, 'long'))
	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
This is the whole Function I use ... ofc Pointer instead of Structs.
Still works for me, even if i have a Rune/whatever in my Inventory.
DerMoench14 is offline  
Reply

Tags
gwa2


Similar Threads Similar Threads
5 DIGIT - 26 WINS - MG1 - ORIGINAL-EMAIL - NO LEAGUE LISTINGS
08/11/2016 - Counter-Strike Trading - 4 Replies
Sup guys, in this Thread im offering you my 5 Digit Smurf. - STEAM_0:0:17XXX - HL1 and CS;GO - No hacks used - Original E-mail included - 51 Wins - Master Guardian Elite - No League Listings
help with sbot client crash after switching between clients?
09/20/2013 - Silkroad Online - 3 Replies
Hey guys has anyone else experienced this problem? I will have one bot up and then hide client and start another one. But if I want to switch back to the original client it crashes when I say show client. Does anyone know how to fix it? I don't think it's a graphics card issue because I just got a new card that can handle bf3 on ultra so I'm quite confused. Any help is appreciated.
[QUESTION]gameguard revision listings for cabal and their files
06/12/2012 - Cabal Online - 2 Replies
i want to try and re-flourish the fake gg or the infamous gg emulation. reason.im just so f*cked up with the current gg in cabal ph gg rev 1865 that have the gamemon64.des in it ! its so f*cking annoying ! need help :3
Mob and Item Listings
12/17/2010 - PW Hacks, Bots, Cheats, Exploits - 18 Replies
well since there have been many questsions about this before, i'll give some example codes, of how to list mobs and select them, and how to list items and pick them up. these functions are a great start for a bot =) we'll start with the listing functions: Func GetNpcList() Local $array, $pointer, $npc_base, $counter $pointer = memread(memread(memread(memread(memread($base) + 0x1C) + 0x8) + 0x24) + 0x18) For $x=0 To 768



All times are GMT +2. The time now is 06:20.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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