Sign in to follow this  
Followers 0
AndrewRenn

How would you make autoit read pixels on Diablo 2?

13 posts in this topic

I awnt it to read pixels in a certain area for text, and if the certain text = "ThisText" do this:

send("Blah!")

how would I be able to do this? :P

thanks :(

Share this post


Link to post
Share on other sites



I awnt it to read pixels in a certain area for text, and if the certain text = "ThisText" do this:

send("Blah!")

how would I be able to do this? :P

thanks :(

No, haha I tried. You will have to use Memory Editing, which can get you banned from Diablo II.

Share this post


Link to post
Share on other sites

No, haha I tried. You will have to use Memory Editing, which can get you banned from Diablo II.

Really? For just reading someones text? :P

other people can do it though, like my friend, but he doesn't use autoit :(

Share this post


Link to post
Share on other sites

Really? For just reading someones text? :(

other people can do it though, like my friend, but he doesn't use autoit :idea:

Using a pixel would be very tough, as you would have to check for every pixel in every letter, for the amount of text. He is most likely using memory reading and editing, to get the chat message. I can get you the memory functions you need, if you want to take the risk of using memory stuff.

Here was my topic. :P

http://www.autoitscript.com/forum/index.ph...c=61512&hl=

Share this post


Link to post
Share on other sites

How detectable is this?

Is it just bannable if found, or is it really detectable?

Share this post


Link to post
Share on other sites

Blizzard scans Diablo II's memory almost everyday, and If there is a change in the memory or reading it, they could ban you. Heres the code if you want it.

MsgBox(0, "", "Log Into BNET and enter a game...")

$OriginalMsg = DiabloGetChatMessage()
Do
    $NewMsg = DiabloGetChatMessage()
    If Not $OriginalMsg = $NewMsg Then MsgBox(0, "", "New Chat Message...   " & $NewMsg)
    $OriginalMsg = $NewMsg
Until 1+2=1

Func DiabloGetChatMessage()
    Local $Handle = _MemoryOpen(WinGetProcess("Diablo II"))
    Local $pointer1 = _MemoryRead(0x6FBCB830, $Handle, 'dword')
    Local $pointer2 = _MemoryRead($pointer1, $Handle, 'dword')
    Local $Temp = _MemoryReadWideString($pointer2, $Handle, 'ushort[256]')
    _MemoryClose($Handle)
    Return $Temp
EndFunc   ;==>GetLastChatMessage

Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $iv_InheritHandle = 1)
    If Not ProcessExists($iv_Pid) Then
        SetError(1)
        Return 0
    EndIf
    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
    If @error Then
        SetError(2)
        Return 0
    EndIf
    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $iv_InheritHandle, 'int', $iv_Pid)
    If @error Then
        DllClose($ah_Handle[0])
        SetError(3)
        Return 0
    EndIf
    $ah_Handle[1] = $av_OpenProcess[0]
    Return $ah_Handle
EndFunc   ;==>_MemoryOpen

Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf
    Local $v_Buffer = DllStructCreate($sv_Type)
    If @error Then
        SetError(@error + 1)
        Return 0
    EndIf
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If Not @error Then
        Local $v_Value = DllStructGetData($v_Buffer, 1)
        Return $v_Value
    Else
        SetError(6)
        Return 0
    EndIf
EndFunc   ;==>_MemoryRead

Func _MemoryReadWideString($iv_Address, $ah_Handle, $sv_Type = 'ushort[255]')
    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf
    Local $v_Buffer = DllStructCreate($sv_Type)
    If @error Then
        SetError(@error + 1)
        Return 0
    EndIf
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If Not @error Then
        $tmpString = ""
        For $char = 1 To 255
            $v_Value = DllStructGetData($v_Buffer, 1, $char)
            If $v_Value = 0 Then ExitLoop
            $tmpString = $tmpString & Chr($v_Value)
        Next
        Return $tmpString
    Else
        SetError(6)
        Return 0
    EndIf
EndFunc   ;==>_MemoryReadWideString

Share this post


Link to post
Share on other sites

Ra reads texts and logs it, I haven't been banned from that, how does it differ from what i'm trying to do? just outa curiosity

Share this post


Link to post
Share on other sites

Ra reads texts and logs it, I haven't been banned from that, how does it differ from what i'm trying to do? just outa curiosity

RA 3.3 memory edits, and reads it. A lot. I've been banned from it 8 times.

Share this post


Link to post
Share on other sites

RA 3.3 memory edits, and reads it. A lot. I've been banned from it 8 times.

Really? I've used for a long time and haven't been banned once :/

I think I'm going to try this out though :/ lol

Share this post


Link to post
Share on other sites

Also, I get an error when using that:

C:\Users\Andrew\Desktop\AutoIt\Examples\safv.au3 (81) : ==> Unknown function name.:

_MemoryClose($Handle)

^ ERROR

>Exit code: 1 Time: 2.318

Share this post


Link to post
Share on other sites

Add this to it...

Func _MemoryClose($ah_Handle)
    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf
    DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
    If Not @error Then
        DllClose($ah_Handle[0])
        Return 1
    Else
        DllClose($ah_Handle[0])
        SetError(2)
        Return 0
    EndIf
EndFunc  ;==>_MemoryClose

Share this post


Link to post
Share on other sites

Just curious about Windows API, why READING memory (not EDITTING) would be detected? How can a third process know my process is reading the memory of another process?

Share this post


Link to post
Share on other sites

Just curious about Windows API, why READING memory (not EDITTING) would be detected? How can a third process know my process is reading the memory of another process?

warden probably looks for suspicous program names that read the memory. just try to get a safe name and you will be fine.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0