Ejemplo n.º 1
0
 static void waitForRespawn()
 {
     while (Hack.ReadInt(MainWindow.process, MainWindow.MobCountBaseAdr, MainWindow.MobCountOffset) < 10)
     {
         Thread.Sleep(1);
     }
 }
Ejemplo n.º 2
0
        internal static void botting()//黑肥肥
        {
            int counter = 0;

            if (isOnRope() && getCharacterX() != 834)
            {
                RopeExiting(true);
            }
            //training start
            while (true)
            {
                if (counter % 3 == 0)
                {
                    //go to position start
                    if (Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset) > 2055)
                    {
                        RopeClimbing(1380, true, 2055, 2205, -60, 60);
                    }
                    RopeClimbing(834, false, 1845, 2205, 60, 60);
                    //go to position end
                    AutoKey.mre_PickUp.Reset();
                    if (counter % 6 == 0)
                    {
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1);
                        }
                        Thread.Sleep(MainWindow.delayComboKey1);
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2);
                        }
                        Thread.Sleep(MainWindow.delayComboKey2);
                    }
                    else
                    {
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keySkill);
                        }
                        Thread.Sleep(1000);
                    }
                    AutoKey.mre_PickUp.Set();
                    RopeClimbing(834, true, 1695, 2205, 60, 60);
                    GoToX(750);
                    Attack(1);
                }
                GoToX(-164);
                Attack(1);
                GoToX(653);
                Attack(1);
                GoToX(1585);
                Attack(1);
                GoToX(653);
                Attack(1);

                counter++;
            }
        }
Ejemplo n.º 3
0
        static void SpecialRopeClimbing(int coorX, bool isClimbToTop, int topBoundary, int floorY, int leftDistance, int rightDistance, DateTime time_start)
        {
            int CharacterX, CharacterY, CharacterStatus;

            CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset);
            DateTime time_end = DateTime.Now; //計時結束 取得目前時間
                                              //後面的時間減前面的時間後 轉型成TimeSpan即可印出時間差
            double result = ((time_end - time_start)).TotalMilliseconds;

            if (result >= 5000 && isStand())
            {
                if (_threadOfTraining.Name == "Petri1hit")
                {
                    Attack(1);
                }
                else
                {
                    Attack(2);
                }
                time_start = DateTime.Now;
            }
            if (CharacterStatus < 14 || CharacterStatus > 17)
            {
                GoToNearX(coorX, leftDistance, rightDistance);
                Hack.KeyPress(WindowHwnd, MainWindow.keyJump);
                GoToXInAir(coorX, 4, true, true);
            }
            while (true)
            {
                CharacterX      = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset);
                CharacterY      = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset);
                CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset);
                if (CharacterY > floorY)
                {
                    break;
                }
                else if ((isClimbToTop && (CharacterY <= topBoundary) && ((CharacterStatus < 14) || (CharacterStatus > 17))) ||
                         (isClimbToTop == false) && (CharacterY <= topBoundary))
                {
                    Thread.Sleep(1);
                    Hack.KeyUp(WindowHwnd, Keys.Up);
                    Hack.KeyUp(WindowHwnd, Keys.Right);
                    Hack.KeyUp(WindowHwnd, Keys.Left);
                    return;
                }
                else if (CharacterX >= coorX - 20 && CharacterX <= coorX + 20 && CharacterY <= floorY)
                {
                    Hack.KeyDown(WindowHwnd, Keys.Up);
                }
                else
                {
                    RopeClimbing(coorX, isClimbToTop, topBoundary, floorY, leftDistance, rightDistance);
                }
            }
        }
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (MainWindow.isBind)
     {
         label_AttackCount.Content     = "攻擊次數: " + Hack.ReadInt(MainWindow.process, MainWindow.AttackCountBaseAdr, MainWindow.AttackCountOffset);
         label_HpAlert.Content         = "HP警告: " + Hack.ReadInt(MainWindow.process, MainWindow.HpAlarmBaseAdr, MainWindow.HpAlarmOffset);
         label_MpAlert.Content         = "MP警告: " + Hack.ReadInt(MainWindow.process, MainWindow.MpAlarmBaseAdr, MainWindow.MpAlarmOffset);
         label_HpValue.Content         = "HP值: " + (double)Hack.ReadInt(MainWindow.process, MainWindow.HpValueBaseAdr, MainWindow.HpValueOffset) / Hack.ReadInt(MainWindow.process, MainWindow.HpAlarmBaseAdr, MainWindow.HpAlarmOffset) * 20;
         label_MpValue.Content         = "MP值: " + (double)Hack.ReadInt(MainWindow.process, MainWindow.MpValueBaseAdr, MainWindow.MpValueOffset) / Hack.ReadInt(MainWindow.process, MainWindow.MpAlarmBaseAdr, MainWindow.MpAlarmOffset) * 20;
         label_Exp.Content             = "經驗值: " + Math.Round(Hack.ReadDouble(MainWindow.process, MainWindow.ExpPercentBaseAdr, MainWindow.ExpPercentOffset), 2) + "%";
         label_PlayerCount.Content     = "地圖玩家數量: " + Hack.ReadInt(MainWindow.process, MainWindow.PlayerCountBaseAdr, MainWindow.PlayerCountOffset);
         label_MobCount.Content        = "地圖怪物數量: " + Hack.ReadInt(MainWindow.process, MainWindow.MobCountBaseAdr, MainWindow.MobCountOffset);
         label_CharacterStates.Content = "角色狀態: " + Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset);
         label_CharacterX.Content      = "角色X座標: " + Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset);
         label_CharacterY.Content      = "角色Y座標: " + Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset);
         //int a = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset);
         //if (a < 53) Debug.Write(a + " ");
         label_MapID.Content = "地圖編號: " + Hack.ReadInt(MainWindow.process, MainWindow.MapIDBaseAdr, MainWindow.MapIDOffset);
     }
 }
Ejemplo n.º 5
0
        internal static void SpecialRopeClimbing(int coorX, bool isClimbToTop, int topBoundary, int floorY, int leftDistance, int rightDistance)
        {
            int CharacterX, CharacterY, CharacterStatus;

            CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset);
            if (isStand())
            {
                GoToNearX(coorX, leftDistance, rightDistance);
                if (nowFloor == 3)
                {
                    Hack.KeyPress(WindowHwnd, MainWindow.keyJump);
                    GoToXInAir(coorX, 4, true, true);
                }
            }

            CharacterX      = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset);
            CharacterY      = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset);
            CharacterStatus = Hack.ReadInt(MainWindow.process, MainWindow.CharacterStatusBaseAdr, MainWindow.CharacterStatusOffset);
            if (CharacterY > floorY)
            {
                return;
            }
            else if ((isClimbToTop && (CharacterY <= topBoundary) && ((CharacterStatus < 14) || (CharacterStatus > 17))) ||
                     (isClimbToTop == false) && (CharacterY <= topBoundary))
            {
                Thread.Sleep(1);
                Hack.KeyUp(WindowHwnd, Keys.Up);
                Hack.KeyUp(WindowHwnd, Keys.Right);
                Hack.KeyUp(WindowHwnd, Keys.Left);
                return;
            }
            else if (CharacterX >= coorX - 20 && CharacterX <= coorX + 20 && CharacterY <= floorY)
            {
                Hack.KeyDown(WindowHwnd, Keys.Up);
            }
        }
Ejemplo n.º 6
0
        internal static void botting()//發條熊
        {
            int CharacterX, CharacterY, counter = 0;

            if (isOnRope() && getCharacterX() != -320)
            {
                RopeExiting(true);
            }
            //training start
            while (true)
            {
                if (counter % 5 == 0)
                {
                    //go to position start
                    do
                    {
                        GoToX(-179);
                        upstairTeleport(6);
                        RopeClimbing(-320, false, -213, 6, -70, 70);
                        CharacterX = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset);
                        CharacterY = Hack.ReadInt(MainWindow.process, MainWindow.CharacterYBaseAdr, MainWindow.CharacterYOffset);
                    } while (CharacterX != -320 && CharacterY > -213);


                    //go to position end
                    AutoKey.mre_PickUp.Reset();
                    if (counter % 10 == 0)
                    {
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1);
                        }
                        Thread.Sleep(MainWindow.delayComboKey1);
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2);
                        }
                        Thread.Sleep(MainWindow.delayComboKey2);
                    }
                    else
                    {
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keySkill);
                        }
                        Thread.Sleep(1000);
                    }
                    AutoKey.mre_PickUp.Set();
                    RopeExiting(true);
                }
                GoToX(-607);
                Attack(1);
                GoToX(-80);
                Attack(1);
                GoToX(598);
                Attack(1);
                GoToX(-80);
                Attack(1);

                counter++;
            }
        }
Ejemplo n.º 7
0
        internal static new void GoToX(int coorX, int deviation, bool isTeleport, bool isWithUp, int targetFloor)
        {
            int CharacterX;
            int leftBoundary     = coorX - deviation;
            int rightBoundary    = coorX + deviation;
            int leftFarBoundary  = coorX - 150;
            int rightFarBoundary = coorX + 150;

            while (true)
            {
                CharacterX = Hack.ReadInt(MainWindow.process, MainWindow.CharacterXBaseAdr, MainWindow.CharacterXOffset);
                if (nowFloor == targetFloor)
                {
                    return;
                }
                else if (CharacterX >= leftBoundary && CharacterX <= rightBoundary)
                {
                    Hack.KeyUp(WindowHwnd, Keys.Up);
                    Hack.KeyUp(WindowHwnd, Keys.Down);
                    Hack.KeyUp(WindowHwnd, Keys.Left);
                    Hack.KeyUp(WindowHwnd, Keys.Right);
                    return;
                }
                else if (CharacterX < leftFarBoundary)
                {
                    Hack.KeyUp(WindowHwnd, Keys.Left);
                    Hack.KeyDown(WindowHwnd, Keys.Right);
                    if (isTeleport)
                    {
                        Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport);
                    }
                }
                else if (CharacterX > rightFarBoundary)
                {
                    Hack.KeyUp(WindowHwnd, Keys.Right);
                    Hack.KeyDown(WindowHwnd, Keys.Left);
                    if (isTeleport)
                    {
                        Hack.KeyPress(WindowHwnd, MainWindow.keyTeleport);
                    }
                }
                else if (CharacterX > leftFarBoundary && CharacterX < leftBoundary)
                {
                    Hack.KeyUp(WindowHwnd, Keys.Left);
                    Hack.KeyDown(WindowHwnd, Keys.Right);
                    if (isWithUp)
                    {
                        Hack.KeyDown(WindowHwnd, Keys.Up);
                    }
                }
                else if (CharacterX > rightBoundary && CharacterX < rightFarBoundary)
                {
                    Hack.KeyUp(WindowHwnd, Keys.Right);
                    Hack.KeyDown(WindowHwnd, Keys.Left);
                    if (isWithUp)
                    {
                        Hack.KeyDown(WindowHwnd, Keys.Up);
                    }
                }
                Thread.Sleep(10);
            }
        }
Ejemplo n.º 8
0
        internal static void bottingGobyTraining()
        {
            //Random random = new Random(Guid.NewGuid().GetHashCode());
            int counter = 0;

            while (true)
            {
                GoToLocationInWater(-446, 520, 20, true, false, 0);
                Attack(2);
                if (counter % 3 == 0)
                {
                    AutoKey.mre_PickUp.Reset();
                    if (counter % 6 == 0)
                    {
                        GoToLocationInWater(-585, 882, 20, true, false, 0);
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keyCombo1);
                        }
                        Thread.Sleep(MainWindow.delayComboKey1);
                        for (int i = 0; i < 25; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keyCombo2);
                        }
                        Thread.Sleep(MainWindow.delayComboKey2);
                    }
                    else
                    {
                        GoToLocationInWater(-585, 882, 20, true, false, 0);
                        for (int i = 0; i < 10; i++)
                        {
                            Hack.KeyPress(WindowHwnd, MainWindow.keySkill);
                        }
                        Thread.Sleep(1500);
                    }
                    AutoKey.mre_PickUp.Set();
                }
                else if (counter % 3 == 1)
                {
                    GoToX(-265, 20, false, false, 0);
                }
                GoToLocationInWater(-585, 1032, 20, true, false, 0);
                Attack(1);
                GoToLocationInWater(-428, 1220, 20, true, false, 0);
                Attack(1);
                if (counter % 3 == 1)
                {
                    GoToLocationInWater(-83, 1582, 20, false, false, 0);
                }
                else
                {
                    GoToLocationInWater(-316, 1596, 20, true, false, 0);
                }
                Attack(1);
                do
                {
                    Attack(1);
                } while (Hack.ReadInt(MainWindow.process, MainWindow.MobCountBaseAdr, MainWindow.MobCountOffset) > 21);
                if (counter % 3 == 0)
                {
                    GoToLocationInWater(-829, 875, 20, true, false, 0);
                }
                else if (counter % 3 == 1)
                {
                    GoToLocationInWater(-83, 450, 20, false, false, 0);
                }
                counter++;
            }
        }
Ejemplo n.º 9
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();
 }