Jump to content

PixelCheckSum Problems


Tr10
 Share

Recommended Posts

Hello,

I have this:

Note: this is not my script, which is why I desire help editing it.

;Dynamic wait for a screen. Feed a screen to wait for from Checksums.au3, or define your own. Also supply a timeout. Returns 0 if failed, 1 if success
Func ScreenWait($ScreenName, $Timeout)
   Local $Checksum[5]
   Local $Sum
   $Checksum = Eval($ScreenName)
   $Time = TimerInit()
   Do
      Sleep(200)
      $Sum = PixelChecksum($Checksum[1], $Checksum[2], $Checksum[3], $Checksum[4])
      If $Sum = $Checksum[0] Then Return 1
   Until TimerDiff($Time) > $Timeout
   LogEvent(1, $Sum & " does not match the expected the checksum of " & $Checksum[0] & " for the menu " & $ScreenName & " at coordinates (" & $Checksum[1] & " ," & $Checksum[2] & " ," & $Checksum[3] & " ," & $Checksum[4] & ") and timed out after " & $TimeOut & " milliseconds.")
   Return 0
EndFunc

Which includes:

Global $TitleScreen[5]               ;Declare the value
$TitleScreen[0] = 3319931069           ;The resulting checksum
$TitleScreen[1] = 80                   ;Upper left X
$TitleScreen[2] = 400                 ;Upper left Y
$TitleScreen[3] = 85                   ;Lower right X
$TitleScreen[4] = 405                 ;Lower right Y

Global $LoginScreen[5]
$LoginScreen[0] = 1831881397
$LoginScreen[1] = 360
$LoginScreen[2] = 250
$LoginScreen[3] = 370
$LoginScreen[4] = 255

Global $CharacterSelect[5]
$CharacterSelect[0] = 2362581377
$CharacterSelect[1] = 107
$CharacterSelect[2] = 177
$CharacterSelect[3] = 117
$CharacterSelect[4] = 178

Global $Lobby[5]
$Lobby[0] = 1292465505
$Lobby[1] = 400
$Lobby[2] = 480
$Lobby[3] = 430
$Lobby[4] = 510

Global $CreateButton[5]               ;the selected (greyed out) "Create" lobby button
$CreateButton[0] = 2470124185
$CreateButton[1] = 545
$CreateButton[2] = 455
$CreateButton[3] = 550
$CreateButton[4] = 460

Global $GameJoin[5]                   ;Checksum for the black area of the game loading screen
$GameJoin[0] = 7077889
$GameJoin[1] = 700
$GameJoin[2] = 100
$GameJoin[3] = 705
$GameJoin[4] = 105

Global $GUIBar[5]                       ;Can be used to determine if in-game
$GUIBar[0] = 1671697521
$GUIBar[1] = 5
$GUIBar[2] = 575
$GUIBar[3] = 10
$GUIBar[4] = 580

Now say, I wanted to change what it was pixelsearching for?

How would I receive a checksum which I could then use to determine where I am.

Currently, my script will look for when this checksum occurs and then do something because of it.

But, I have no idea how it comes up with the checksum value that it does :)

Any help?

Thank you.

Link to comment
Share on other sites

Maybe something like this would help. It's just a suggestion.

HotKeySet("{F6}","Record")
Global $Step,$reloop
while 1
    $Step = 0
    $nextName = InputBox('next name','Enter reference for next area')
    If $nextname = '' then exitloop
    $reloop = true
    while $reloop
        $coords = InputBox("next set of coords","left, top, right, bottom ")
        if $Coords = '' then Exit
        $coords = StringSplit($coords,',')
        if UBound($Coords) < 5 Then
            MsgBox(0,'ERROR','Please enter 4 coordinates separated by commas.' & @LF & 'E.g. 123,34,456,789')
            $reloop = True
        Else
            $reloop = False
        EndIf
    WEnd
    
    MsgBox(0,'ready','press F6 when image is correct for ' & $nextname)
    while $Step = 0
        Sleep(50)
    WEnd


wend

Func Record()
    $Chk = PixelChecksum($coords[1],$coords[2],$coords[3],$coords[4])
    IniWrite("Checks.ini",$nextname,"Coords",StringFormat("%d, %d, %d, %d",$coords[1],$coords[2],$coords[3],$coords[4] ))
    IniWrite("Checks.ini",$nextname,"Checksum",$Chk)
    $Step = 1
EndFunc
Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I just tried this and It is giving me a strange checksum for the value that I already have on the same coordinates.

Do checksum's vary?

What is the checksum it gave and why is it strange?

What is the checksum you already had and how did you get it?

A checksum of the same area with the same picture should always be the same.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

What is the checksum it gave and why is it strange?

What is the checksum you already had and how did you get it?

A checksum of the same area with the same picture should always be the same.

The checksum it gives me with the same image is

[inchat]

Coords=377, 465, 435, 518

Checksum=267602967

And Now my program is telling me that the checksums don't match, it tells me it is looking for 2847757272

Link to comment
Share on other sites

The checksum it gives me with the same image is

[inchat]

Coords=377, 465, 435, 518

Checksum=267602967

And Now my program is telling me that the checksums don't match, it tells me it is looking for 2847757272

You are asking for help.

Put yourself in my position if you can. How could I use anything in your last post to decide the next step in helping you?

I cannot. What have you told me that could let me understand the problem?

What do you mean by 'my program'? How am I supposed to know what the program is? It isn't anything you've posted so far. If it tells you what it is looking for why did you need to find the value?

I understood that you needed to know when a region of the screen had a certain image so you could do something. The method I gave allowed you to make a record of what to check against. So the reference checksum and the test are both calculated by AutoIt.

I'm off to bed anyway, it's 1.30 am here.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

You are asking for help.

Put yourself in my position if you can. How could I use anything in your last post to decide the next step in helping you?

I cannot. What have you told me that could let me understand the problem?

What do you mean by 'my program'? How am I supposed to know what the program is? It isn't anything you've posted so far. If it tells you what it is looking for why did you need to find the value?

I understood that you needed to know when a region of the screen had a certain image so you could do something. The method I gave allowed you to make a record of what to check against. So the reference checksum and the test are both calculated by AutoIt.

I'm off to bed anyway, it's 1.30 am here.

That was a very professional and nice way to say that I am a idiot, I appreciate it.

You're completely right, that post didn't do anything to help you help me.

I apologize.

Here is my Main.au3:

;=======================================================
;Smorg's Diablo II LOD Mini OOG Controller for Battlenet
;Version 1.0
;=======================================================
opt("PixelCoordMode", 2)
opt("MouseCoordMode", 2)
opt("RunErrorsFatal", 0)
opt("SendKeyDelay", 200)

Global $RestoreRealm = 0;

$RunLoop = 0
$CurrentCDkey = IniRead(@ScriptDir & "\Config.ini", "Settings", "LastCDkeyused", "")

#Include "IniRead.au3"
#Include "Checksums.au3"

If $CDkeyCount > 0 Then
    SetNextCDkey()
EndIf

If WinExists($D2WinName) Then
   MsgBox(0, "", "Looks like a d2 window is already open! Close it before launching the bot.")
   Exit
EndIf

;AdLibEnable("ShowSum", 200);for debugging... replace the checksum in ShowSum() to adjust what to look for

If LaunchD2() = 0 Then
   MsgBox(0, "", "Oh noes! we failed to log in! Better check the error log to find out why...")
   Exit
Else
   LogEvent(0, "Launched Diablo II and successfully logged in to the Lobby.")
EndIf

;===============================
;Main Loop: Your code goes here!
;===============================
While 1
   For $RunCount = 1 To 9999
      $RunLoop = $RunLoop + 1
      If CreateGame() = 1 Then
         $begin__ = TimerInit()
         while ScreenCheck("Lobby") = 0
            Sleep(1000)
            If (TimerDiff($begin__) > IniRead(@ScriptDir & "\Config.ini", "Settings", "GameTimeout", "120000")) Then
               ExitLoop
            EndIf
         wend
         If ($RunLoop > 9) AND ($CDkeyCount > 0) Then
            Sleep(1000+($GameCreateDelay*1000))
         Else
            Sleep(5000+($GameCreateDelay*1000))
         EndIf
      Else
         $RunLoop = 0
         LogEvent(0, "Restarting D2 - New keys!! (If available)")
         opt("SendKeyDelay", 5)
         D2Kill()
         if $CDkeyCount > 0 Then
            SetNextCDkey()
         endif
         for $loopage = 1 to 50
            If LaunchD2() = 0 Then
               LogEvent(0, "Failed to login #" & $loopage)
               D2Kill()
               Sleep(300000)
            Else
               ExitLoop
            EndIf
         Next
         opt("SendKeyDelay", 200)
      EndIf
      If ($RunLoop > 9) AND ($CDkeyCount > 0) Then
         $RunLoop = 0
         LogEvent(0, "Restarting D2 - New keys!! (If available)")
         opt("SendKeyDelay", 5)
         D2Kill()
         SetNextCDkey()
         for $loopage = 1 to 50
            If LaunchD2() = 0 Then
               LogEvent(0, "Failed to login #" & $loopage)
               D2Kill()
               Sleep(300000)
            Else
               ExitLoop
            EndIf
         Next
         opt("SendKeyDelay", 200)
      EndIf
;Chicken()
;Exit
   Next
WEnd
;===============================

Func SetNextCDkey()

If ($CDkeyCount > 1) Then
    $ClaKey_M = "\data\global\sfx\cursor\wavindx.wav"
    $ExpKey_M = "\data\global\chars\am\cof\amblxbow.cof"
    If (FileCopy(@ScriptDir & "\CDkeys\" & $CurrentCDkey & "\wavindx.wav", $D2PathName & $ClaKey_M,9) = 1) AND (FileCopy(@ScriptDir & "\CDkeys\" & $CurrentCDkey & "\amblxbow.cof", $D2PathName & $ExpKey_M,9) = 1) Then
       LogEvent(0, "CDkey was injected successfully ~#" & $CurrentCDkey)
    Else
       LogEvent(0, "CDkey was NOT injected successfully ~#" & $CurrentCDkey)
    EndIf
    
    $CurrentCDkey = $CurrentCDkey + 1
    if ($CDkeyCount < $CurrentCDkey) THEN
       $CurrentCDkey = 1
    endif
    
    IniWrite(@ScriptDir & "\Config.ini", "Settings", "LastCDkeyused", $CurrentCDkey)
EndIF
    
EndFunc

;Launches D2, logs in, and gets you to the lobby. Returns 0 if failed, 1 if success.
Func LaunchD2()
   LogEvent(0, "Smorg's Mini OOG controller is launching Diablo II LOD for Battlenet...")
   If Run($D2PathName & "\" & $D2Executable & " " & $Paramaters,$D2PathName) = 0 Then
      LogEvent(1, "Failed to launch Diablo at " & $D2PathName & "\" & $D2Executable & " Check your D2PathName key in Config.ini")
      Return 0
   Else
      LogEvent(0, "D2 Loaded successfully!")
   EndIf
   WinWaitActive($D2WinName)
   Sleep(1000)
   WinMove($D2WinName, "", 0, 0)
   MouseClick("Left", 100, 100, 1, $MenuMouseSpeed)
   If ScreenWait("TitleScreen", 15000) = 0 Then Return 0
   MouseClick("Left", 394, 353, 1, $MenuMouseSpeed)
   If ScreenWait("LoginScreen", 20000) = 0 Then Return 0
   MouseClickDrag("Left", 477, 336, 300, 336, $MenuMouseSpeed)
   Sleep($MenuStaticDelay)
   Send($A)
   Sleep($MenuStaticDelay)
   Send("{TAB}")
   Sleep($MenuStaticDelay)
   Send($P)
   Sleep($MenuStaticDelay)
   MouseClick("Left", 395, 470, 1, $MenuMouseSpeed)
   If ScreenWait("CharacterSelect", 20000) = 0 Then Return 0
       
       $Xclix = 0
       $Yclix = 0
        If $CharSlot = 1 Then
           $Xclix = 180
        $Yclix = 130
       ElseIf $CharSlot = 2 Then
           $Xclix = 450
       $Yclix = 130
       ElseIf $CharSlot = 3 Then
           $Xclix = 180
       $Yclix = 225
       ElseIf $CharSlot = 4 Then
           $Xclix = 450
       $Yclix = 225
       ElseIf $CharSlot = 5 Then
           $Xclix = 171
       $Yclix = 318
       ElseIf $CharSlot = 6 Then
           $Xclix = 447
       $Yclix = 315
       ElseIf $CharSlot = 7 Then
           $Xclix = 180
       $Yclix = 410
       ElseIf $CharSlot = 8 Then
           $Xclix = 458
       $Yclix = 406
       Else
           MsgBox(0, "", "You must pick a character slot! 1-8")
           EXIT(0)
        EndIf
   MouseClick("Left", $Xclix, $Yclix, 1, $MenuMouseSpeed)
   Sleep($MenuStaticDelay)
   MouseClick("Left", 692, 557, 1, $MenuMouseSpeed)
    Sleep(2000)
    Mouseclick("Left", 90, 460, 1, $menumousespeed)
    Sleep(2000)
    Send("/j op emelee")
    Send("{enter}")
    Sleep(200)
    send("-forcemylogin")
    Send("{enter}")
    Sleep(2000)
If ScreenWait("Lobby", 20000) = 0 Then Return 0
   Return 1
EndFunc

;Create a game with dynamic waits & retries. Returns 0 if failed, 1 if success.
Func CreateGame()
   For $Retry = 0 to 4
;If ScreenCheck("Lobby") = 0 Then
   If (IniRead(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "WasDeadStatus", "1")) = 1 Then
      LogEvent(0, "Bot Died. Stopping due to that...")
      EXIT(0)
   EndIf

   LogEvent(0, "Attempting to create the game " & $GameName & $RunCount & " This is attempt number " & $Retry)
   MouseClick("Left", 590, 462, 1, $MenuMouseSpeed)
   If ScreenWait("CreateButton", 15000) = 0 Then
      MouseClick("Left", 712, 461, 1, $MenuMouseSpeed)
      Sleep(2000)
      ContinueLoop
   EndIf
   If (IniRead(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "WasHostiled", "1")) = 1 Then
       IniWrite(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "WasHostiled", "0")
      $RunCount = Random(1, 5000, 1)
   EndIf
   $RunCount = $RunCount+$Retry
   Send($GameName & $RunCount)
   Sleep(200)

    If $GamePassLength = 1 Then
        Send("{TAB}")
        Send($RunCount)
    ElseIf $GamePassLength = 9 Then
        Sleep(10)
    ElseIf $GamePassLength > 1 Then
        Send("{TAB}")
        For $lll = 1 to $GamePassLength
            Send(Random(1, 9, 1))
        Next
    else
        Send("{TAB}")
        Send($GamePassLength)
    EndIf
   MouseClick("Left", 676, 418, 1, $MenuMouseSpeed)
    If ScreenWait("GameJoin", 15000) = 0 Then
        If IniRead(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "IsInGame", "0") = 0 Then
            LogEvent(1, "Game create screen not detected after 5 seconds... will retry the game join.")
            MouseClick("Left", 711, 461, 1, $MenuMouseSpeed)
            ContinueLoop
        EndIf
   EndIf
   Local $Timeout = TimerInit()
   While ScreenCheck("GameJoin") = 1
      If IniRead(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "IsInGame", "0") = 0 Then
          If TimerDiff($Timeout) > 30000 Then
             LogEvent(1, "Looks like we got stuck on the game create screen for over 30 seconds...")
             Return 0
          EndIf
      EndIF
      Sleep(500)
  WEnd
  
  If IniRead(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "IsInGame", "0") = 1 Then
   IniWrite(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "IsInGame", "0")
   Return 1
  Endif
  
   If ScreenCheck("Lobby") = 1 Then
      LogEvent(1, "Failed to Join! Bnet needs to fix their damn servers!!! Lets just retry...")
      ContinueLoop
   ElseIf ScreenCheck("GUIBar") = 1 Then
      LogEvent(0, "Successfully joined the game after " & Round((TimerDiff($Timeout)/1000), 2) & " seconds.")
      Return 1
   Elseif IniRead(@ScriptDir & "\Kuk_Bot.ini", "Intercom", "IsInGame", "0") = 1 Then
    Return 1
   Else
      LogEvent(1, "Hmm, looks like we got lost somewhere while attempting to create a game...")
      Return 0
   EndIf
Next
LogEvent(1, "Failed to create a game after 5 retries.")
Return 0
EndFunc

;Dynamic wait for a screen. Feed a screen to wait for from Checksums.au3, or define your own. Also supply a timeout. Returns 0 if failed, 1 if success
Func ScreenWait($ScreenName, $Timeout)
   Local $Checksum[5]
   Local $Sum
   $Checksum = Eval($ScreenName)
   $Time = TimerInit()
   Do
      Sleep(200)
      $Sum = PixelChecksum($Checksum[1], $Checksum[2], $Checksum[3], $Checksum[4])
      If $Sum = $Checksum[0] Then Return 1
   Until TimerDiff($Time) > $Timeout
   LogEvent(1, $Sum & " does not match the expected the checksum of " & $Checksum[0] & " for the menu " & $ScreenName & " at coordinates (" & $Checksum[1] & " ," & $Checksum[2] & " ," & $Checksum[3] & " ," & $Checksum[4] & ") and timed out after " & $TimeOut & " milliseconds.")
   Return 0
EndFunc

;Simple screen detection, so you don't have to type out the pixelchecksum every time. Returns 1 if the screen matches, 0 if failed.
Func ScreenCheck($ScreenName)
   Local $Checksum[5]
   $Checksum = Eval($ScreenName)

;LogEvent(1, PixelChecksum($Checksum[1], $Checksum[2], $Checksum[3], $Checksum[4]) & " is checksum for: " & $ScreenName)

   If PixelChecksum($Checksum[1], $Checksum[2], $Checksum[3], $Checksum[4]) = $Checksum[0] Then
      Return 1
   Else
      Return 0
   EndIf
EndFunc

;Quit D2. will try to chicken first if you are in-game.
Func D2Kill()
   For $Retry = 0 To 9
      Send("{ESC}")
      If Not WinExists($D2WinName) Then ExitLoop
      Sleep(500)
   Next
   WinClose($D2WinName)
   WinKill($D2WinName)
EndFunc

;Do a quick & effective game exit. Suitable for both emergency chickens, and standard save & exits.
Func Chicken()
   For $Retries = 1 To $ChickenRetries
      Send($KEY_ClearScreen)
      MouseUp("Right")
      MouseUp("Left")
      Send("{ESC}")
      $Timeout = TimerInit()
      While 1
         If (PixelGetColor(481, 535) <> 5406092) AND (PixelGetColor(320, 537) <> 6521492) Then
            ExitLoop
         ElseIf TimerDiff($Timeout) > 500 Then
            LogEvent("Failed to open the main menu, will retry... Retry # " & $Retries)
            ContinueLoop 2
         EndIf
         Sleep(100)
      WEnd
      MouseClick("Left", 400, 280, 1, 0)
      $Timeout = TimerInit()
      While TimerDiff($Timeout) < $ChickenTimeout
         If (PixelGetColor(600, 575) <> 6512995) AND (PixelGetColor(5, 575) <> 2697257) Then ExitLoop 2
         Sleep(100)
      WEnd
      If $Retries >= $ChickenRetries Then
         LogEvent("Max Retries exceeded, Will terminate the Game.exe process")
         ProcessClose("Game.exe")
      Else
         LogEvent("Failed to chicken, Will retry the chicken...")
      EndIf
   Next
   LogEvent("Chicken was a success! ^^")
EndFunc

;Returns 0 if either a menu is open or we aren't in game, and returns 1 if the minipanel is in its expected position. (this requires it to be open)
Func IsMenuOpen()
   If PixelGetColor(325, 559) <> 5274764 Then
      If PixelGetColor(462, 559) <> 8429760 Then
         Return 0
      EndIf
   EndIf
   Return 1
EndFunc

;Simple logging function
Func LogEvent($Code, $String)
   $LogFile = FileOpen(@ScriptDir & "\Logs\Events.txt", 1)
   Select
      Case $Code = 0
         FileWriteLine($LogFile, @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & " [I]> " & $String)
      Case $Code = 1
         FileWriteLine($LogFile, @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & " [E]> " & $String)
   EndSelect
   FileClose($LogFile)
EndFunc

;Debug function... replace the search pattern with whatever you need.
Func ShowSum()
   ToolTip(PixelCheckSum($GameJoin[1], $GameJoin[2], $GameJoin[3], $GameJoin[4]), 0, 0)
EndFunc

Here is my checksums.au3:

;========================================================================
;This file gives reference checksums to menus and screens
;All values are: 32 bit, Decimal, RGB, pixelcoordmode 2, and resolution 1
;========================================================================
Global $TitleScreen[5]      ;Declare the value
$TitleScreen[0] = 3319931069        ;The resulting checksum
$TitleScreen[1] = 80                ;Upper left X
$TitleScreen[2] = 400           ;Upper left Y
$TitleScreen[3] = 85                ;Lower right X
$TitleScreen[4] = 405           ;Lower right Y

Global $LoginScreen[5]
$LoginScreen[0] = 1831881397
$LoginScreen[1] = 360
$LoginScreen[2] = 250
$LoginScreen[3] = 370
$LoginScreen[4] = 255

Global $CharacterSelect[5]
$CharacterSelect[0] = 2362581377
$CharacterSelect[1] = 107
$CharacterSelect[2] = 177
$CharacterSelect[3] = 117
$CharacterSelect[4] = 178

Global $Lobby[5]
$Lobby[0] = 1847525401
$Lobby[1] = 470
$Lobby[2] = 170
$Lobby[3] = 721
$Lobby[4] = 185

Global $CreateButton[5]         ;the selected (greyed out) "Create" lobby button
$CreateButton[0] = 2470124185
$CreateButton[1] = 545
$CreateButton[2] = 455
$CreateButton[3] = 550
$CreateButton[4] = 460

Global $GameJoin[5]             ;Checksum for the black area of the game loading screen
$GameJoin[0] = 7077889
$GameJoin[1] = 700
$GameJoin[2] = 100
$GameJoin[3] = 705
$GameJoin[4] = 105

Global $GUIBar[5]           ;Can be used to determine if in-game
$GUIBar[0] = 1671697521
$GUIBar[1] = 5
$GUIBar[2] = 575
$GUIBar[3] = 10
$GUIBar[4] = 580
;========================================================================

Here is my log.txt:

12/21 20:45:45 [I]> CDkey was injected successfully ~#2
12/21 20:45:45 [I]> Smorg's Mini OOG controller is launching Diablo II LOD for Battlenet...
12/21 20:45:45 [I]> D2 Loaded successfully!
12/21 20:46:30 [E]> 3655925358 does not match the expected the checksum of 1847525401 for the menu Lobby at coordinates (470 ,170 ,721 ,185) and timed out after 20000 milliseconds.

Posted Image

The white box is what I am trying to pixelsearch for.

This is an image of after my create game function has began making a game.

Posted Image

Posted Image

This is an image of me inside a game, I need the pixel search to detect when I leave game and enter the first screen shot again.

This is a game called Diablo II.

It is a MMORPG, it works with a lobby which is used to select an individual game, the lobby (screenshot #1) is where you revert to after you are done in whatever game you are in.

The white box in the lobby was added by me to show you what text I am pixelsearching for.

The original screenshot looks like this:

Posted Image

The Second screen shot in this post is the screen in between the lobby and in game. (More of a loading screen)

Now, as for what this script does, this script logs into to my game, selects my character, and joins my channel.

(This is where I am stuck) I now would like it to be able to detect weather or not it is in game or in channel, if it is in channel I would like it to make another game. And so on and so forth.

But, I am having problems detecting the pixels in the white box in the first uploaded screenshot.

Does this help you help me?

Please let me know if there is anything else I can do to help you help me.

Sorry about before, thank you very much.

~Matt

EDIT:

I changed the coordinates in which I was getting the checksums from to another point and all was well, maybe their was just some weird error with the other point.

Thank you for all of your help, Without that nifty little program you made I would have had no idea's :P

I thank you as much as a man could thank another man :)

Good luck and Happy holidays.

Edited by Tr10
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...