Пример #1
0
        public void SellItems(int n = 0)
        {
            for (var i = 0; i < 5; i++)
            {
                touch.GotoTopLeft();
            }

            touch.GotoTradeDepot();
            BotApplication.Wait(500);

            if (CheckIfInTradeDepot())
            {
                // 409 305 x 150 px
                for (var i = 0; i < 8; i++)
                {
                    bool result = CreateSellItem(0, i);
                    if (!result)
                    {
                        break;
                    }
                }

                Bot.BotApplication.Wait(150);
                touch.Execute("input touchscreen swipe 923 300 384 300");
                //touch.Swipe(new Point(900, 300), new Point(900, 300), new Point(384, 300), 1, true);
                Bot.BotApplication.Wait(150);
                for (var i = 0; i < 8; i++)
                {
                    CreateSellItem(1, i);
                }

                //Bot.BotApplication.Wait(150);
                //touch.Swipe(new Point(923, 300), new Point(923, 300), new Point(384, 300), 1, true);
                //Bot.BotApplication.Wait(150);
                //for (var i = 0; i < 8; i++)
                //{
                //    CreateSellItem(1, i);

                //}


                //// Color c = touch.GetPixel(409,305);
                if (CheckIfInTradeDepot())
                {
                    touch.ClickAt(new Point(958, 135));
                }
                this.touch.GotoCenter();
            }
            //else {
            //    if(n<3)
            //    SellItems(n++);
            //}
        }