Killing gold sellers - fight bots with bots?

12/03/2018 15:16 3vangelist#1
Hi all,

Just wanted to raise a discussion on this one. I think that it would be good to give something back to the game by helping to ban the gold sellers from Kamadan that are using bots themselves - see [Only registered and activated users can see links. Click Here To Register...]

Basically, gold selling bots hack accounts and then use bots on them to cycle between districts and back to Kamadan ae1 - they do this so you don't have enough time to type "/report <player name>" and then click on the "Report" button before they're gone. GM's even do this in game every so often but it becomes so annoying that they usually give up!

I was wondering that if we could figure out which packets to send to ANet using the report dialog, then using GWA2 or something we could make a simple bot to catch these guys out.

Would anyone be willing to help me find the packets/actions to create this bot? I think it would really help
12/03/2018 19:07 savsuds#2
Written by 4D 1
Code:
#include 'GWA2_new.au3'

Initialize(WinGetProcess('[CLASS:ArenaNet_Dx_Window_Class]'))


SetEvent('', '', '', '', 'OnLoad')


Enum $REPORT_VERBAL_ABUSE, _
		$REPORT_BOTTING = 2, _
		$REPORT_SPAMMING = 4, _
		$REPORT_LEECHING = , _
		$REPORT_SCAMMING = , _
		$REPORT_CHARNAME =

Func OnLoad()
	Local $name

	Do
		Sleep(100)
	Until GetAgentExists(-2)
	For $i = 1 To GetPlayerArraySize()
		$name = GetPlayerName($i)
		If StringInStr($name,'Mmo Gamers Market') Then
			ConsoleWrite("Reporting " & $name &  [MENTION=3576271]CRLF[/MENTION])
			ReportPlayer($name,$REPORT_BOTTING)
			Sleep(250)
		EndIf


	Next
EndFunc   ;==>OnLoad
OnLoad()

ProcessWaitClose(WinGetProcess($mGWHwnd))

Func ReportPlayer($aPlayerName, $aType)
	Static Local $lStruct = DllStructCreate('ptr;dword;dword;wchar[32];dword')
	Static Local $lPacketSend = GetValue('CommandPacketSend')

	DllStructSetData($lStruct, 1, $lPacketSend)
	DllStructSetData($lStruct, 2, 0x48)
	DllStructSetData($lStruct, 3, 0x5B)
	DllStructSetData($lStruct, 4, $aPlayerName)
	DllStructSetData($lStruct, 5, $aType)

	Enqueue(DllStructGetPtr($lStruct),DllStructGetSize($lStruct))
EndFunc   ;==>ReportPlayer

Func GetPlayerName($aPlayerID)
	Static $lOffsets[5] = [0, 0x18, 0x2C, 0x80C]
	$lOffsets[4] = 0x28 + 0x4C * $aPlayerID
	Local $lPtr = MemoryReadPtr($mBasePointer, $lOffsets, 'ptr')[1]
	Return MemoryRead($lPtr, 'wchar[20]')
EndFunc   ;==>GetPlayerName

Func GetPlayerArraySize()
	Static $lOffsets = [0, 0x18, 0x2C, 0x814]
	Return MemoryReadPtr($mBasePointer, $lOffsets, 'dword')[1]
EndFunc   ;==>GetPlayerArraySize
12/03/2018 19:10 3vangelist#3
Quote:
Originally Posted by savsuds View Post
Written by 4D 1
Code:
#include 'GWA2_new.au3'

Initialize(WinGetProcess('[CLASS:ArenaNet_Dx_Window_Class]'))


SetEvent('', '', '', '', 'OnLoad')


Enum $REPORT_VERBAL_ABUSE, _
		$REPORT_BOTTING = 2, _
		$REPORT_SPAMMING = 4, _
		$REPORT_LEECHING = , _
		$REPORT_SCAMMING = , _
		$REPORT_CHARNAME =

Func OnLoad()
	Local $name

	Do
		Sleep(100)
	Until GetAgentExists(-2)
	For $i = 1 To GetPlayerArraySize()
		$name = GetPlayerName($i)
		If StringInStr($name,'Mmo Gamers Market') Then
			ConsoleWrite("Reporting " & $name &  [MENTION=3576271]CRLF[/MENTION])
			ReportPlayer($name,$REPORT_BOTTING)
			Sleep(250)
		EndIf


	Next
EndFunc   ;==>OnLoad
OnLoad()

ProcessWaitClose(WinGetProcess($mGWHwnd))

Func ReportPlayer($aPlayerName, $aType)
	Static Local $lStruct = DllStructCreate('ptr;dword;dword;wchar[32];dword')
	Static Local $lPacketSend = GetValue('CommandPacketSend')

	DllStructSetData($lStruct, 1, $lPacketSend)
	DllStructSetData($lStruct, 2, 0x48)
	DllStructSetData($lStruct, 3, 0x5B)
	DllStructSetData($lStruct, 4, $aPlayerName)
	DllStructSetData($lStruct, 5, $aType)

	Enqueue(DllStructGetPtr($lStruct),DllStructGetSize($lStruct))
EndFunc   ;==>ReportPlayer

Func GetPlayerName($aPlayerID)
	Static $lOffsets[5] = [0, 0x18, 0x2C, 0x80C]
	$lOffsets[4] = 0x28 + 0x4C * $aPlayerID
	Local $lPtr = MemoryReadPtr($mBasePointer, $lOffsets, 'ptr')[1]
	Return MemoryRead($lPtr, 'wchar[20]')
EndFunc   ;==>GetPlayerName

Func GetPlayerArraySize()
	Static $lOffsets = [0, 0x18, 0x2C, 0x814]
	Return MemoryReadPtr($mBasePointer, $lOffsets, 'dword')[1]
EndFunc   ;==>GetPlayerArraySize
Perfect, thanks :)