Пример #1
0
        internal static void selling()
        {
            int firstItemIconScreenX, firstItemIconScreenY;
            int firstItemScreenX, firstItemScreenY;
            int sureSellScreenX, sureSellScreenY;

            Hack.ClientToScreen(WindowHwnd, 421, 274, out firstItemIconScreenX, out firstItemIconScreenY);
            Hack.ClientToScreen(WindowHwnd, 540, 274, out firstItemScreenX, out firstItemScreenY);
            Hack.ClientToScreen(WindowHwnd, 297, 271, out sureSellScreenX, out sureSellScreenY);
            while (!(Hack.CompareColor(IntPtr.Zero, firstItemIconScreenX, firstItemIconScreenY, "DDDDDD", "222222") &&
                     (Hack.CompareColor(IntPtr.Zero, firstItemIconScreenX + 10, firstItemIconScreenY - 10, "DDDDDD", "222222"))))
            {
                Hack.MoveTo(firstItemScreenX, firstItemScreenY);
                Hack.LeftDoubleClick();
                //sureSellColor1 = dmBotting.DM.GetColor(297 + windowX, 271 + windowY);
                //sureSellColor2 = dmBotting.DM.GetColor(481 + windowX, 271 + windowY);
                if (Hack.CompareColor(IntPtr.Zero, sureSellScreenX, sureSellScreenY, "4488BB", "000000"))
                {
                    Hack.KeyPress(WindowHwnd, Keys.Enter);
                }
            }
            while (Hack.CompareColor(WindowHwnd, 580, 174, "EE8844", "111111"))
            {
                Hack.KeyPress(WindowHwnd, Keys.Enter);
            }
        }
Пример #2
0
        internal static void selling()
        {
            int clientX = 544, clientY = 434;
            int screenX, screenY, nowX, nowY, sureSellScreenX, sureSellScreenY;

            Hack.ClientToScreen(MainWindow.WindowHwnd, clientX, clientY, out screenX, out screenY);
            nowX = screenX;
            nowY = screenY;
            Hack.MoveTo(screenX, screenY);
            Hack.ClientToScreen(MainWindow.WindowHwnd, 297, 271, out sureSellScreenX, out sureSellScreenY);
            while (nowX == screenX && nowY == screenY)
            {
                Hack.GetMousePosition(out nowX, out nowY);
                Hack.LeftDoubleClick();
                if (Hack.CompareColor(IntPtr.Zero, sureSellScreenX, sureSellScreenY, "4488BB", "000000"))
                {
                    Hack.KeyPress(MainWindow.WindowHwnd, Keys.Enter);
                }
            }
        }
Пример #3
0
 internal static void bottingGobyShopping()
 {
     // Goby -> Aquarium
     while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) != 230000000)
     {
         int doorX, doorY, tempDoorX, tempDoorY;
         doorX     = Hack.ReadInt(MainWindow.process, MainWindow.DoorXBaseAdr);
         doorY     = Hack.ReadInt(MainWindow.process, MainWindow.DoorYBaseAdr);
         tempDoorX = doorX;
         tempDoorY = doorY;
         while (doorX == tempDoorX && doorY == tempDoorY)
         {
             doorX = Hack.ReadInt(MainWindow.process, MainWindow.DoorXBaseAdr);
             doorY = Hack.ReadInt(MainWindow.process, MainWindow.DoorYBaseAdr);
             Hack.KeyPress(WindowHwnd, MainWindow.keyDoor);
             Thread.Sleep(1000);
         }
         DateTime time_start = DateTime.Now;
         double   result     = 0;
         while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) == 230040100 && result < 8000)
         {
             GoToLocationInWater(doorX, doorY, 5, true, true, 230000000);
             DateTime time_end = DateTime.Now; //計時結束 取得目前時間
                                               //後面的時間減前面的時間後 轉型成TimeSpan即可印出時間差
             result = ((time_end - time_start)).TotalMilliseconds;
         }
     }
     AutoKey.mre_PickUp.Reset();
     // Aquarium -> Aquarium Store
     while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) != 230000002)
     {
         while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) == 230000000)
         {
             GoToLocationInWater(190, 11, 5, true, true, 230000002);
         }
     }
     // Selling
     while (!Hack.CompareColor(WindowHwnd, 580, 174, "EE8844", "111111"))
     {
         int screenX, screenY;
         Hack.ClientToScreen(WindowHwnd, 267, 65, out screenX, out screenY);
         Hack.MoveTo(screenX, screenY);//seller of Aqua store
         Hack.LeftDoubleClick();
     }
     selling();
     // Aquarium Store -> Aquarium
     while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) != 230000000)
     {
         Hack.KeyDown(WindowHwnd, Keys.Up);
         while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) == 230000002)
         {
             GoToX(-349, 0, false, true, 230000000);
             Hack.KeyDown(WindowHwnd, Keys.Up);
             GoToX(-351, 0, false, true, 230000000);
             Hack.KeyDown(WindowHwnd, Keys.Up);
             GoToX(-347, 0, false, true, 230000000);
             Hack.KeyDown(WindowHwnd, Keys.Up);
         }
     }
     // Aquarium -> Goby
     while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) != 230040100)
     {
         GoToLocationInWater(195, 340, 5, true, true, 230040100);
         while (Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset) == 230000000)
         {
             GoToLocationInWater(674, 340, 5, true, true, 230040100);
         }
     }
     AutoKey.mre_PickUp.Set();
 }