Jump to content
Sign in to follow this  

Empty Detect

Recommended Posts



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)

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

Func inventory($key)

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) & ")")
                   If $sum = $PCheckSum Then
                   MsgBox(0, ""," (Venstre musseknap aktiveret)" & @LF)
                  MouseClick("left", $InvStartX, $InvStartY, 1, 10)
                 MouseClick("left", 100, 100, 1, 10)
               $InvStartX = $InvStartX + $box_size
       $InvStartY = $InvStartY +$box_size

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.