예제 #1
0
        private void RunMomentum()
        {
            int        y;
            Coordinate c = new Coordinate(0, 0);
            bool       found;
            List <int> l = PixelCoordinatesBuff();

            while (running)
            {
                while (Form1.toggler && running)
                {
                    found = false;
                    //for (x = 660; x < 950; x++) //660   1300
                    foreach (int x in l)
                    {
                        c.SetX(x);
                        c.SetY(909);

                        if (SearchPixelOne("#773400", c))
                        {
                            c.SetX(x + 22);
                            c.SetY(914);
                            if (SearchPixelOne("#53411C", c))                            //#D6B134
                            {
                                c.SetX(x + 18);
                                c.SetY(923);
                                if (SearchPixelOne("#B4BABC", c))                                 //#B4BBBB
                                {
                                    c.SetX(x + 13);
                                    c.SetY(926);
                                    if (SearchPixelOne("#311839", c))
                                    {
                                        //wissen wo buff ist und da

                                        c.SetX(x + 30);
                                        c.SetY(950);
                                        if (SearchPixelOne("#FFFFFF", c))
                                        {
                                            found = true;
                                        }

                                        c.SetX(x + 28);
                                        c.SetY(941);
                                        if (SearchPixelOne("#DBD6D3", c))                                         //#FEFEFE
                                        {
                                            c.SetX(x + 41);
                                            c.SetY(944);
                                            if (SearchPixelOne("#F8F8F8", c))                                             //#FFFFFF
                                            {
                                                found = true;
                                            }

                                            c.SetX(x + 38);
                                            c.SetY(944);
                                            if (SearchPixelOne("#FFFFFF", c))
                                            {
                                                c.SetX(x + 35);
                                                c.SetY(946);
                                                if (SearchPixelOne("#555444", c))                                                 //#FFFFFF
                                                {
                                                    found = true;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    if (!found)
                    {
                        SendKeys.SendWait(boxSend);
                    }
                    Thread.Sleep(delay);
                }
                Thread.Sleep(delay);
            }
        }