Register for your free account! | Forgot your password?

You last visited: Today at 13:40

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

Advertisement



GW Working Bots 2019!

Discussion on GW Working Bots 2019! within the GW Exploits, Hacks, Bots, Tools & Macros forum part of the Guild Wars category.

Reply
 
Old 05/07/2019, 15:48   #526
 
elite*gold: 0
Join Date: Dec 2014
Posts: 21
Received Thanks: 12
Quote:
Originally Posted by smiley232 View Post
Code:
Func ChangeWeaponSetByPacket($aSet)
	Switch $aSet
		Case 1, 2, 3, 4
			Return SendPacket(0x8, 0x38, $aSet - 1)
		Case Else
			Return False
	EndSwitch
EndFunc
Do you know the sendpacket header and size for TargetNearestEnemy() as well? I tried to get it with a packet sniffer but nothing is coming up.

Thanks in advance
schnoesel21 is offline  
Old 05/07/2019, 16:52   #527
 
elite*gold: 0
Join Date: Mar 2018
Posts: 24
Received Thanks: 18
Quote:
Originally Posted by schnoesel21 View Post
Do you know the sendpacket header and size for TargetNearestEnemy() as well? I tried to get it with a packet sniffer but nothing is coming up.
for me it does not seem that there are packets involved in the targeting stuff.

as a workaround (if i need the 2nd and 3rd nearest agent as well) i currently use sorted arrays:
Code:
#include <Array.au3>

Func GetAgentArraySorted($aAgentType = 0)	;returns a 2-dimensional array([agentID, [distance]) sorted by distance
	Local $lDistance
	Local $lAgentArray = GetAgentArray($aAgentType)
	Local $lReturnArray[1][2]
	Local $lMe = GetAgentByID(-2)
	Local $AgentID

	For $i = 1 To $lAgentArray[0]
		$lDistance = (DllStructGetData($lMe, 'X') - DllStructGetData($lAgentArray[$i], 'X')) ^ 2 + (DllStructGetData($lMe, 'Y') - DllStructGetData($lAgentArray[$i], 'Y')) ^ 2
		$AgentID = DllStructGetData($lAgentArray[$i], 'ID')
		ReDim $lReturnArray[$i][2]
		$lReturnArray[$i - 1][0] = $AgentID
		$lReturnArray[$i - 1][1] = Sqrt($lDistance)
	Next
	_ArraySort($lReturnArray, 0, 0, 0, 1)
	Return $lReturnArray
EndFunc   ;==>GetAgentArraySorted

$AgentArray = GetAgentArraySorted()
For $i = 0 To UBound($AgentArray) - 1
	$Agent = GetAgentByID($AgentArray[$i][0])
Next
make sure to set the correct $aAgentType, so you dont pull items when you want to look for enemies (0xDB) or you dont pull npcs etc when you want to pick up items (0x400).
smiley232 is offline  
Thanks
1 User
Old 05/07/2019, 17:02   #528
 
elite*gold: 0
Join Date: Dec 2014
Posts: 21
Received Thanks: 12
Quote:
Originally Posted by smiley232 View Post
for me it does not seem that there are packets involved in the targeting stuff.

as a workaround (if i need the 2nd and 3rd nearest agent as well) i currently use sorted arrays:
Code:
#include <Array.au3>

Func GetAgentArraySorted($aAgentType = 0)	;returns a 2-dimensional array([agentID, [distance]) sorted by distance
	Local $lDistance
	Local $lAgentArray = GetAgentArray($aAgentType)
	Local $lReturnArray[1][2]
	Local $lMe = GetAgentByID(-2)
	Local $AgentID

	For $i = 1 To $lAgentArray[0]
		$lDistance = (DllStructGetData($lMe, 'X') - DllStructGetData($lAgentArray[$i], 'X')) ^ 2 + (DllStructGetData($lMe, 'Y') - DllStructGetData($lAgentArray[$i], 'Y')) ^ 2
		$AgentID = DllStructGetData($lAgentArray[$i], 'ID')
		ReDim $lReturnArray[$i][2]
		$lReturnArray[$i - 1][0] = $AgentID
		$lReturnArray[$i - 1][1] = Sqrt($lDistance)
	Next
	_ArraySort($lReturnArray, 0, 0, 0, 1)
	Return $lReturnArray
EndFunc   ;==>GetAgentArraySorted

$AgentArray = GetAgentArraySorted()
For $i = 0 To UBound($AgentArray) - 1
	$Agent = GetAgentByID($AgentArray[$i][0])
Next
make sure to set the correct $aAgentType, so you dont pull items when you want to look for enemies (0xDB) or you dont pull npcs etc when you want to pick up items (0x400).
Thanks for that but i had a little bit of hope left we can use sendpacket for all the broken functions.
schnoesel21 is offline  
Old 05/07/2019, 19:44   #529
 
elite*gold: 0
Join Date: Mar 2019
Posts: 2
Received Thanks: 3
Anyone have a fix for SellItem? Doesn't seem to work anymore, does not crash but does not sell either.

From GWA2:
Code:
;~ Description: Sells an item.
Func SellItem($aItem, $aQuantity = 0)
	If IsDllStruct($aItem) = 0 Then $aItem = GetItemByItemID($aItem)
	If $aQuantity = 0 Or $aQuantity > DllStructGetData($aItem, 'Quantity') Then $aQuantity = DllStructGetData($aItem, 'Quantity')

	DllStructSetData($mSellItem, 2, $aQuantity * DllStructGetData($aItem, 'Value'))
	DllStructSetData($mSellItem, 3, DllStructGetData($aItem, 'ID'))
	Enqueue($mSellItemPtr, 12)
EndFunc   ;==>SellItem
Doesn't seem to use SendPacket. I'm unfamiliar with how GWA2 works so no clue how to fix it.
elitestpvperofall is offline  
Old 05/07/2019, 20:07   #530
 
elite*gold: 0
Join Date: Mar 2018
Posts: 12
Received Thanks: 8
Check the following in your gwa2. Mine is selling.


Code:
SetValue('SellItemFunction', '0x' & Hex(GetScannedAddress('ScanSellItemFunction', -85), 8))
Code:
_('ScanSellItemFunction:')
AddPattern('8B4D2085C90F858E')

List of all CtoGS headers, it's from GWCA:
Code:
const unsigned short CtoGS_MSGDisconnect = 0x9;
const unsigned short CtoGS_MSGRequestItems = 0x97;
const unsigned short CtoGS_MSGRequestSpawn = 0x8D;
const unsigned short CtoGS_MSGRequestAgents = 0x96;
const unsigned short CtoGS_MSGCallTarget = 0x28;
const unsigned short CtoGS_MSGGoNPC = 0x3F;
const unsigned short CtoGS_MSGGoGadget = 0x57;
const unsigned short CtoGS_MSGGoPlayer = 0x39;
const unsigned short CtoGS_MSGPickUpItem = 0x45;
const unsigned short CtoGS_MSGAttack = 0x2C;
const unsigned short CtoGS_MSGCancelAction = 0x2E;
const unsigned short CtoGS_MSGOpenChest = 0x59;
const unsigned short CtoGS_MSGDropBuff = 0x2F;
const unsigned short CtoGS_MSGDropItem = 0x32;
const unsigned short CtoGS_MSGDropGold = 0x35;
const unsigned short CtoGS_MSGEquipItem = 0x36;
const unsigned short CtoGS_MSGDonateFaction = 0x3B;
const unsigned short CtoGS_MSGDialog = 0x41;
const unsigned short CtoGS_MSGMouseMove = 0x44;
const unsigned short CtoGS_MSGUseSkill = 0x4C;
const unsigned short CtoGS_MSGCallSkill = 0x2A;
const unsigned short CtoGS_MSGSetSkillbarSkill = 0x61;
const unsigned short CtoGS_MSGChangeSecondary = 0x47;
const unsigned short CtoGS_MSGSetAttributes = 0x10;
const unsigned short CtoGS_MSGLoadSkillbar = 0x62;
const unsigned short CtoGS_MSGRequestQuote = 0x52;
const unsigned short CtoGS_MSGTransactItem = 0x53;
const unsigned short CtoGS_MSGTransactTrade = 0x50;
const unsigned short CtoGS_MSGStartSalvage = 0x7C;
const unsigned short CtoGS_MSGSalvageMaterials = 0x7F;
const unsigned short CtoGS_MSGSalvageMod = 0x80;
const unsigned short CtoGS_MSGIdentifyItem = 0x71;
const unsigned short CtoGS_MSGMoveItem = 0x77;
const unsigned short CtoGS_MSGAcceptAllItems = 0x78;
const unsigned short CtoGS_MSGUseItem = 0x83;
const unsigned short CtoGS_MSGStartTrade = 0x4F;
const unsigned short CtoGS_MSGAcknowledgeTrade = 0x0;
const unsigned short CtoGS_MSGAcceptTrade = 0x7;
const unsigned short CtoGS_MSGCancelTrade = 0x1;
const unsigned short CtoGS_MSGAddItemTrade = 0x2;
const unsigned short CtoGS_MSGRemoveItemTrade = 0x5;
const unsigned short CtoGS_MSGChangeOffer = 0x6;
const unsigned short CtoGS_MSGSubmitOffer = 0x3;
const unsigned short CtoGS_MSGAddNpc = 0xA5;
const unsigned short CtoGS_MSGKickNpc = 0xAE;
const unsigned short CtoGS_MSGInvitePlayer = 0xA6;
const unsigned short CtoGS_MSGInvitePlayerByName = 0xA7;
const unsigned short CtoGS_MSGKickPlayer = 0xAF;
const unsigned short CtoGS_MSGAcceptPartyRequest = 0xA4;
const unsigned short CtoGS_MSGDenyPartyRequest = 0xA2;
const unsigned short CtoGS_MSGEnterChallenge = 0xAB;
const unsigned short CtoGS_MSGReturnToOutpost = 0xAD;
const unsigned short CtoGS_MSGAbandonQuest = 0x12;
const unsigned short CtoGS_MSGActivateQuest = 0x13;
const unsigned short CtoGS_MSGRequestQuest = 0x16;
const unsigned short CtoGS_MSGSetHeroAggression = 0x17;
const unsigned short CtoGS_MSGLockHeroTarget = 0x18;
const unsigned short CtoGS_MSGChangeHeroSkillSlotState = 0x1C;
const unsigned short CtoGS_MSGCommandHero = 0x1E;
const unsigned short CtoGS_MSGCommandAll = 0x1F;
const unsigned short CtoGS_MSGAddHero = 0x23;
const unsigned short CtoGS_MSGKickHero = 0x24;
const unsigned short CtoGS_MSGTravelGH = 0xB6;
const unsigned short CtoGS_MSGLeaveGH = 0xB8;
const unsigned short CtoGS_MSGTravelTo = 0xB7;
const unsigned short CtoGS_MSGSendChat = 0x69;
const unsigned short CtoGS_MSGSetDisplayedTitle = 0x5D;
const unsigned short CtoGS_MSGRemoveDisplayedTitle = 0x5E;
const unsigned short CtoGS_MSGSkipCinematic = 0x68;
const unsigned short CtoGS_MSGUnlockSkillByTome = 0x72;
const unsigned short CtoGS_MSGDeleteItem = 0x6E;
const unsigned short CtoGS_MSGSplitStack = 0x7A;
const unsigned short CtoGS_MSGChangeGold = 0x81;
const unsigned short CtoGS_MSGSwitchMode = 0xA1;
const unsigned short CtoGS_MSGLeaveParty = 0xA8;
const unsigned short CtoGS_MSGTick = 0xB5;
const unsigned short CtoGS_MSGDrawMap = 0x31;

Since i've updated the TargetNearestEnemy() function
from this

Code:
Func TargetNearestEnemy()
	Return PerformAction(0x93, 0x18)
EndFunc
to this (thanks to afmart )

Code:
Func TargetNearestEnemy()
	Local $target = GetNearestEnemyToAgent(-2)
        ChangeTarget($target)
EndFunc
I've had a lot of game crashes. I think this is caused by the ChangeTarget() function. In the GWCA code I see another offset for the memory pattern. I think that causes the error. Until now, all game clients are running again without major problems.

Code:
;SetValue('ChangeTargetFunction', '0x' & Hex(GetScannedAddress('ScanChangeTargetFunction', -119), 8))
SetValue('ChangeTargetFunction', '0x' & Hex(GetScannedAddress('ScanChangeTargetFunction', -0x78), 8))
Note: -0x78 is -120 in decimal

I would just like to know how to read this data from the memory ...
Surimata is offline  
Thanks
3 Users
Old 05/07/2019, 20:30   #531
 
elite*gold: 0
Join Date: May 2013
Posts: 11
Received Thanks: 5
That's ******* great ! Well done my friend thank for the update it's working for me, i'm pretty sure there is plenty of other people sharing their functions too then we gonna make a huge database for the new gwa2
kymsy is offline  
Old 05/07/2019, 20:31   #532
 
Coaxx123's Avatar
 
elite*gold: 0
Join Date: Mar 2019
Posts: 162
Received Thanks: 43
All this code is mad too deep for my liking but that target nearest enemy function works fine on my vaettir bot and its on 400 runs now, no crashing

Although since the new updates I haven't been able to run both of my accounts on vaettirs, one seems to crash at 75-+ runs
Coaxx123 is offline  
Old 05/07/2019, 21:00   #533
 
elite*gold: 0
Join Date: Mar 2019
Posts: 69
Received Thanks: 2
are there any destroyer core farming?
cruzmoreno27 is offline  
Old 05/07/2019, 21:15   #534
 
Coaxx123's Avatar
 
elite*gold: 0
Join Date: Mar 2019
Posts: 162
Received Thanks: 43
Destroyer gloves are ****.
Coaxx123 is offline  
Thanks
2 Users
Old 05/07/2019, 21:27   #535
 
elite*gold: 0
Join Date: May 2013
Posts: 11
Received Thanks: 5
Quote:
Originally Posted by Coaxx123 View Post
All this code is mad too deep for my liking but that target nearest enemy function works fine on my vaettir bot and its on 400 runs now, no crashing

Although since the new updates I haven't been able to run both of my accounts on vaettirs, one seems to crash at 75-+ runs
I'm curious with which GW2A you're running it, because mine don't kill them and spam "tuck".. at least he ball well
kymsy is offline  
Old 05/07/2019, 21:47   #536
 
elite*gold: 0
Join Date: Mar 2019
Posts: 19
Received Thanks: 0
my JQ bot isn't buying zkeys , do you know what i have to do to fix it plz?
Attached Files
File Type: zip JQ Zkeys.zip (228.6 KB, 7 views)
zyf is offline  
Old 05/07/2019, 21:49   #537
 
elite*gold: 0
Join Date: Mar 2018
Posts: 12
Received Thanks: 8
This is because your TargetNearestEnemy () and SendChat () functions are not up to date.
Take a look at my last post. This will allow you to repair the TargetNearestEnemy ().
The SendChat () must look like this:

Code:
;MemoryWrite($lAddress + 8, $aChannel & $lMessage, 'wchar[122]')
MemoryWrite($lAddress + 12, $aChannel & $lMessage, 'wchar[122]')
Your bot wants to put "stuck/" in the chat, but it cuts off the first position. That's why he writes the "tuck".
Surimata is offline  
Old 05/07/2019, 22:00   #538
 
Coaxx123's Avatar
 
elite*gold: 0
Join Date: Mar 2019
Posts: 162
Received Thanks: 43
Quote:
Originally Posted by kymsy View Post
I'm curious with which GW2A you're running it, because mine don't kill them and spam "tuck".. at least he ball well

Code:
 Func TargetNearestEnemy()
	Local $target = GetNearestEnemyToAgent(-2)
        ChangeTarget($target)
EndFunc
Also add the code above, which will fix your bots dyslexia.
Coaxx123 is offline  
Old 05/07/2019, 22:14   #539
 
elite*gold: 0
Join Date: May 2013
Posts: 11
Received Thanks: 5
Thank for the answer guys, you are amazing !

Code:
			If $lBlocked > 0 Then
				If TimerDiff($ChatStuckTimer) > 3000 Then	; use a timer to avoid spamming /stuck
					SendChat("stuck", "/")
					$ChatStuckTimer = TimerInit()
				EndIf
				$lBlocked = 0
				$lHosCount = 0
			EndIf

			If GetDistance() > 1100 Then ; target is far, we probably got stuck.
				If TimerDiff($ChatStuckTimer) > 3000 Then ; dont spam
					SendChat("stuck", "/")
					$ChatStuckTimer = TimerInit()
					RndSleep(GetPing())
					If GetDistance() > 1100 Then ; we werent stuck, but target broke aggro. select a new one.
						TargetNearestEnemy()
					EndIf
				EndIf
			EndIf
		EndIf

So I'm wondering for the sendchat function if it's code i need to change ?

for the others i did it thank you
kymsy is offline  
Old 05/07/2019, 23:10   #540
 
elite*gold: 0
Join Date: Mar 2019
Posts: 15
Received Thanks: 2
Guys you are doing a great work !
hug56 is offline  
Reply


Similar Threads Similar Threads
Last Chaos GuardianS - New 2019 Server (Opening 12 January 2019)
01/27/2019 - Last Chaos Private Server - 180 Replies
https://www.youtube.com/watch?v=kCfwdUoPHu0 Website Coming Soon Server Information Start level :1 Max level:165 Experience:x2 Skill Points:x3
[Selling] Microsoft Office Professional Plus 2019 / Microsoft Office Home and Business 2019
12/05/2018 - Trading - 0 Replies
Topic Zahlung nur per PayPal. Angebote einfach unter dem Thread.



All times are GMT +1. The time now is 13:42.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.