예제 #1
0
파일: Quest.cs 프로젝트: xxspokiixx/L2RBot
        /// <summary>
        /// Clicks the pixel's point and resets timer object.
        /// </summary>
        /// <param name="GamePoint"></param>
        public void Click(Point GamePoint)
        {
            log.Info("Clicking Point " + GamePoint.ToString());

            if (Timer.IsRunning)
            {
                ResetTimer();
            }

            StartTimer();

            //ADB bot click
            if (IsAdbBot)
            {
                AdbApp.Click(GamePoint);

                return;
            }

            if (Screen.GetType() == typeof(Rectangle))
            {
                Point screenPoint = ScreenObj.PointToScreenPoint(Screen, GamePoint.X, GamePoint.Y); //Convert game point to screen point

                Mouse.LeftMouseClick(screenPoint.X, screenPoint.Y);                                 //click screen point
            }
        }
예제 #2
0
파일: Quest.cs 프로젝트: xxspokiixx/L2RBot
        /// <summary>
        /// Updates Screen object's Rectangle and Point.
        /// </summary>
        /// <param name="App"></param>
        public void UpdateScreen(Process App)
        {
            if (IsAdbBot)
            {
                Screen = new Bitmap(AdbApp.ScreenCap());

                return;
            }
            log.Info("Updated Screen object for " + BotName);

            Screen = ScreenObj.GetRect(App);
        }