Jump to content

Recommended Posts

Posted

hi guys i did that script based on color changes (to pick items ...) and yet its not working properly ... i want it to scan those points and when something changes there it picks it ... but if it dont find a color change it has to scan the rest of the places ... now when it scan 1 place that changes it starts to try to pick all the rest 2 :)

heres the script

While 1

$checksum = PixelChecksum(140,245,142,247)

While $checksum = PixelChecksum(140,245,142,247)

Sleep(100)

$checksum = PixelChecksum(171,231,173,233)

While $checksum = PixelChecksum(171,231,173,233)

Sleep(100)

$checksum = PixelChecksum(194,222,196,224)

While $checksum = PixelChecksum(194,222,196,224)

Sleep(100)

$checksum = PixelChecksum(296,166,298,168)

While $checksum = PixelChecksum(296,166,298,168)

Sleep(100)

$checksum = PixelChecksum(330,151,332,153)

While $checksum = PixelChecksum(330,151,332,153)

Sleep(100)

$checksum = PixelChecksum(351,139,353,141)

While $checksum = PixelChecksum(351,139,353,141)

Sleep(100)

$checksum = PixelChecksum(408,144,410,146)

While $checksum = PixelChecksum(408,144,410,146)

Sleep(100)

$checksum = PixelChecksum(424,151,426,153)

While $checksum = PixelChecksum(424,151,426,153)

Sleep(100)

$checksum = PixelChecksum(571,218,573,220)

While $checksum = PixelChecksum(571,218,573,220)

Sleep(100)

$checksum = PixelChecksum(599,235,601,237)

While $checksum = PixelChecksum(599,235,601,237)

Sleep(100)

WEnd

MouseMove(599,235)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(639,302)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(571,218)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(610,246)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(424,151)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(464,179)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(408,144)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(448,172)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(351,139)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(391,167)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(330,151)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(370,179)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(296,166)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(336,194)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(194,222)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(234,250)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(171,231)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(211,259)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

MouseMove(140,245)

MouseDown("left")

MouseUp("left")

Sleep(500)

MouseMove(180,273)

MouseDown("left")

MouseUp("left")

Sleep(11000)

WEnd

Posted

That looks like way too many nested While loops. Start by looking at your code with correct indentation and see if anything seems wrong to you. If you really want it to look like that (which I really doubt), you really should change the variable names.

What I suspect is the case is that you want a big loop to go on the outside, with each check and reaction on the inside.

While 1
    $checksum = PixelChecksum(140,245,142,247)
    While $checksum = PixelChecksum(140,245,142,247)
        Sleep(100)
        $checksum = PixelChecksum(171,231,173,233)
        While $checksum = PixelChecksum(171,231,173,233)
            Sleep(100)
            $checksum = PixelChecksum(194,222,196,224)
            While $checksum = PixelChecksum(194,222,196,224)
                Sleep(100)
                $checksum = PixelChecksum(296,166,298,168)
                While $checksum = PixelChecksum(296,166,298,168)
                    Sleep(100)
                    $checksum = PixelChecksum(330,151,332,153)
                    While $checksum = PixelChecksum(330,151,332,153)
                        Sleep(100)
                        $checksum = PixelChecksum(351,139,353,141)
                        While $checksum = PixelChecksum(351,139,353,141)
                            Sleep(100)
                            $checksum = PixelChecksum(408,144,410,146)
                            While $checksum = PixelChecksum(408,144,410,146)
                                Sleep(100)
                                $checksum = PixelChecksum(424,151,426,153)
                                While $checksum = PixelChecksum(424,151,426,153)
                                    Sleep(100)
                                    $checksum = PixelChecksum(571,218,573,220)
                                    While $checksum = PixelChecksum(571,218,573,220)
                                        Sleep(100)
                                        $checksum = PixelChecksum(599,235,601,237)
                                        While $checksum = PixelChecksum(599,235,601,237)
                                            Sleep(100)
                                        WEnd
                                        MouseMove(599,235)
                                        MouseDown("left")
                                        MouseUp("left")
                                        Sleep(500)
                                        MouseMove(639,302)
                                        MouseDown("left")
                                        MouseUp("left")
                                        Sleep(11000)
                                    WEnd
                                    MouseMove(571,218)
                                    MouseDown("left")
                                    MouseUp("left")
                                    Sleep(500)
                                    MouseMove(610,246)
                                    MouseDown("left")
                                    MouseUp("left")
                                    Sleep(11000)
                                WEnd
                                MouseMove(424,151)
                                MouseDown("left")
                                MouseUp("left")
                                Sleep(500)
                                MouseMove(464,179)
                                MouseDown("left")
                                MouseUp("left")
                                Sleep(11000)
                            WEnd
                            MouseMove(408,144)
                            MouseDown("left")
                            MouseUp("left")
                            Sleep(500)
                            MouseMove(448,172)
                            MouseDown("left")
                            MouseUp("left")
                            Sleep(11000)
                        WEnd
                        MouseMove(351,139)
                        MouseDown("left")
                        MouseUp("left")
                        Sleep(500)
                        MouseMove(391,167)
                        MouseDown("left")
                        MouseUp("left")
                        Sleep(11000)
                    WEnd
                    MouseMove(330,151)
                    MouseDown("left")
                    MouseUp("left")
                    Sleep(500)
                    MouseMove(370,179)
                    MouseDown("left")
                    MouseUp("left")
                    Sleep(11000)
                WEnd
                MouseMove(296,166)
                MouseDown("left")
                MouseUp("left")
                Sleep(500)
                MouseMove(336,194)
                MouseDown("left")
                MouseUp("left")
                Sleep(11000)
            WEnd
            MouseMove(194,222)
            MouseDown("left")
            MouseUp("left")
            Sleep(500)
            MouseMove(234,250)
            MouseDown("left")
            MouseUp("left")
            Sleep(11000)
        WEnd
        MouseMove(171,231)
        MouseDown("left")
        MouseUp("left")
        Sleep(500)
        MouseMove(211,259)
        MouseDown("left")
        MouseUp("left")
        Sleep(11000)
    WEnd
    MouseMove(140,245)
    MouseDown("left")
    MouseUp("left")
    Sleep(500)
    MouseMove(180,273)
    MouseDown("left")
    MouseUp("left")
    Sleep(11000)
WEnd
Posted (edited)

wow thx for the fast reply :) mmm yeah in that structure its way better lol thanks alot :mellow: also another question >< im creating a bot, ... i dont think pixelcheksum is the best way to make my bot work ... i need it to detect when an area is able to be used and just go to it any suggestion (like to go fishing when theres like flies on the water) thanks alot :)

Edited by notakiller

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
  • Recently Browsing   0 members

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