[AUTOIT]
Hello.
I need your help. I wrote a code that searches the map window for a pixel. Unfortunately, I do not have idea how to do so that clicking on one point on the map would go further, and not look for earlier pixels. Here's the code:
Here's an example of how the script works:

As we can see on the gif: The script checks how far away it is the red X. At some point it stops seeing the last pixel (which is okay), but even when there are red crosses in the place of green marks, the script can not go on.
It would look like this:
via Imgflip GIF Maker
I have done: heal script, attack and even looting. But this one, does not let me sleep in the night.
Any ideas?
Hello.
I need your help. I wrote a code that searches the map window for a pixel. Unfortunately, I do not have idea how to do so that clicking on one point on the map would go further, and not look for earlier pixels. Here's the code:
Code:
While 1 If _IsPressed('1B') Then Exit EndIf For $i = 1 To 2 If $i = 1 Then For $w = $WPos[0] + 15 To $WPos[2] Step 10 $dot = PixelSearch($w, $h, $w + 10, $WPos[3] - 30, 0xffffff, 0, 1) If Not error Then If $xPrev <> 0 Or $yPrev <> 0 Then Pixel_Distance($xPrev, $yPrev, $dot[0], $dot[1]) EndIf MouseMove($dot[0], $dot[1], 5) $xPrev = $dot[0] $yPrev = $dot[1] EndIf Next Else For $w = $WPos[2] To $WPos[0] + 15 Step -10 $dot = PixelSearch($w, $h, $w - 10, $WPos[3] - 30, 0xff4646, 0, 1) If Not error Then If $xPrev <> 0 Or $yPrev <> 0 Then Pixel_Distance($xPrev, $yPrev, $dot[0], $dot[1]) EndIf MouseMove($dot[0], $dot[1], 5) $xPrev = $dot[0] $yPrev = $dot[1] EndIf Next EndIf Next WEnd

As we can see on the gif: The script checks how far away it is the red X. At some point it stops seeing the last pixel (which is okay), but even when there are red crosses in the place of green marks, the script can not go on.
It would look like this:

I have done: heal script, attack and even looting. But this one, does not let me sleep in the night.
Any ideas?
Comment