Exemplo n.º 1
0
        private void Button_FullFish_AllSellOk(object sender, RoutedEventArgs e)
        {
            Point point = GameManager.FindGamePicture(AppSetting.RectList[( int )RectEnum.FullFishContinue], GamePicture.FullFish_SellAllOk);

            if (!ImgCheck(point))
            {
                return;
            }
            MouseHooker.MoveTo(point, true);
        }
Exemplo n.º 2
0
        private void Button_Back_Click(object sender, RoutedEventArgs e)
        {
            Point point = GameManager.FindGamePicture(AppSetting.RectList[( int )RectEnum.FullFishContinue], GamePicture.Back);

            if (!ImgCheck(point))
            {
                return;
            }
            WriteLog("<Success> : " + point.X + " / " + point.Y);
            MouseHooker.MoveTo(point, true);
        }
Exemplo n.º 3
0
        private void Button_HookreMove_Click(object sender, RoutedEventArgs e)
        {
            if (TextBox_HookerX.Text.Length == 0 ||
                TextBox_HookerY.Text.Length == 0)
            {
                return;
            }

            MouseHooker.MoveTo(new Point(
                                   int.Parse(TextBox_HookerX.Text),
                                   int.Parse(TextBox_HookerY.Text)
                                   ), true);
        }
Exemplo n.º 4
0
            public static void FullFishCheckingThread(ref int fullFishCount, GamePicture fullFish, Rect rect)
            {
                List <bool> check = new List <bool>()
                {
                    false, false
                };
                List <Thread> FinderThreadList = new List <Thread>();

                try
                {
                    while (true)
                    {
                        AA :;
                        var point = FindGamePicture(rect, fullFish);
                        if (!IsFind(point))
                        {
                            if (check[0] == true && check[1] == false)
                            {
                                if (MacroThread != null)
                                {
                                    MacroThread.Abort();
                                }
                                MainWindow.mainWindow.WriteLog("어망 진입완료");
                                MainWindow.mainWindow.ModifySellFullFish("어망 풀 : " + (++fullFishCount).ToString() + "(" + (++StackFullFishCount) + ")");
                                int a      = 0;
                                int b      = 0;
                                int NoFish = 0;

                                try
                                {
                                    FinderThreadList.Add(new Thread(() => ClickThreadOnce(
                                                                        ref a, GamePicture.FullFish_SellAll, AppSetting.RectList[( int )RectEnum.FullFishContinue]
                                                                        )));
                                    FinderThreadList.Add(new Thread(() => ClickThreadOnce(
                                                                        ref b, GamePicture.FullFish_SellAllOk, AppSetting.RectList[( int )RectEnum.FullFishContinue]
                                                                        )));
                                    StartList(FinderThreadList);
                                }
                                catch (Exception e) { MainWindow.mainWindow.WriteLog("문제1 : " + e); }

                                try
                                {
                                    while (true)
                                    {
                                        var Clear어망 = FindGamePicture(AppSetting.RectList[( int )RectEnum.FullFishContinue], GamePicture.FullFish_SellCheck);
                                        if (IsFind(Clear어망))
                                        {
                                            NoFish++;
                                            MainWindow.mainWindow.WriteLog(GamePicture.FullFish_SellCheck + "확인");
                                            break;
                                        }
                                        Thread.Sleep(500);
                                    }
                                }
                                catch (Exception e) { MainWindow.mainWindow.WriteLog("문제2 : " + e); }


                                try
                                {
                                    if (NoFish > 0)
                                    {
                                        AbortList(FinderThreadList);
                                        FinderThreadList.Clear();
                                        ClickEvent(GamePicture.Back, AppSetting.RectList[( int )RectEnum.FullFishContinue], 1000, new Action(() =>
                                        {
                                            MouseHooker.MoveTo(new Point(0, 0));
                                            MainWindow.mainWindow.WriteLog("낚시터로 이동완료");


                                            MacroThread = new Thread(MacroThreadFunction);
                                            MacroThread.Start();
                                        }));
                                        check[0] = false;
                                        check[1] = false;
                                        goto AA;
                                    }
                                    else
                                    {
                                        MainWindow.mainWindow.WriteLog("어망 비우기 실패");
                                        goto AA;
                                    }
                                }
                                catch (Exception e) { MainWindow.mainWindow.WriteLog("문제3 : " + e); }
                            }
                            Thread.Sleep(1000);
                            check.Add(false);
                            check.RemoveAt(0);
                            continue;
                        }
                        check.Add(true);
                        check.RemoveAt(0);
                        MouseHooker.LeftClick(point);
                        Thread.Sleep(1000);
                    }
                }
                catch { AbortList(FinderThreadList); }
            }