Jump to content
Sign in to follow this  
ink

Empty Detect

Recommended Posts

ink

Hi.

I would like to check if a coloum in my inv(Diablo II) is empty or not also my problem is it dosent go further in the if my script look below

Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)




;variables...
$PCheckSum = 1935595220
$box_size = 30
$num_of_rows = 4
$num_of_columns = 10
$InvStartY = 319
$InvKey = "i"

Func inventory($key)
       send($key)
       
EndFunc

WinActivate("b")
inventory($InvKey);open inventory
For $rows = 1 To $num_of_rows step +1
   $InvStartX = 435
   For $cols = 1 to $num_of_columns step +1
                MouseMove($InvStartX, $InvStartY, 10)
                 $sum = PixelChecksum($InvStartX, $InvStartY, $InvStartX+$box_size, $InvStartY+$box_size)
                 MsgBox(0, "","I koordinat (" & $InvStartX & "," & $InvStartY & ") er pixelchecksummen " & $sum & " (Hex=" & Hex($sum, 6) & ")")
                  WinActivate("b")
                   If $sum = $PCheckSum Then
                   MsgBox(0, ""," (Venstre musseknap aktiveret)" & @LF)
                  MouseClick("left", $InvStartX, $InvStartY, 1, 10)
                 MouseClick("left", 100, 100, 1, 10)
               EndIf
               $InvStartX = $InvStartX + $box_size
       Next
       $InvStartY = $InvStartY +$box_size
Next

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  

×