Example #1
0
        // speed mouse attack mob
        public static void FastClick(AccountModel Account)
        {
            try
            {
                Function F = Account.Func;
                while (Account.IsClickSpeed && Account.IsAuto)
                {
                    try
                    {
                        if (Account.IsClickSpeed && MAPN.WinActive(Account.Pid))
                        {
                            while (MAPN.KeyIsDown(Keys.LButton) && F.ReadMob() == 1 && Account.IsAuto)
                            {
                                Thread.Sleep(250);
                                while (MAPN.KeyIsDown(Keys.LButton) && Account.IsAuto && F.ReadMob() == 1)
                                {
                                    F.AttackMob(0, F.ReadMobId(), true);
                                }
                            }

                            while (MAPN.KeyIsDown(Keys.RButton) && F.ReadMob() == 1 && Account.IsAuto)
                            {
                                Thread.Sleep(250);
                                while (MAPN.KeyIsDown(Keys.RButton) && Account.IsAuto && F.ReadMob() == 1)
                                {
                                    F.AttackMob(1, F.ReadMobId(), true);
                                }
                            }
                        }
                    }
                    catch
                    {
                        Account.IsClickSpeed = false;
                    }
                    Thread.Sleep(200);
                }
            }
            catch
            {
                Account.IsClickSpeed = false;
            }
        }
Example #2
0
        // set Start train
        public static void StartAll(AccountModel Account)
        {
            try
            {
                Function F = Account.Func;
                while (MAPN.ProcessExists(Account.Pid) && Account.IsAuto)
                {
                    try
                    {
                        if (Account.IsAutoTrain)
                        {
                            if (!Account.IsBlockCord && Account.ListCord.Count > 0 && CortNow != null)
                            {
                                try
                                {
                                    Account.Tene   = Convert.ToInt32(F.ReadBlockRadius(CortNow));
                                    Account.IDCort = (IndexT + 1);
                                }
                                catch { }
                            }
                            else if (Account.IsBlockCord && Account.ListCord.Count <= 0)
                            {
                                Account.Tene = Convert.ToInt32(F.ReadBlockRadius());
                            }

                            F.AttackTH(Account.LagInput);

                            if (Account.RadiusInput == F.Radius && F.ID_SELECT == -1)
                            {
                                if (Account.ListCord.Count > 0 && (!Account.IsBlockCord))
                                {
                                    if (F.ReadState() == 0 && (F.ReadCharState() == 25 || F.ReadCharState() == 51) && F.ID_SELECT == -1)
                                    {
                                        F.SetState();
                                    }

                                    CortNow[0] = Account.ListCord[IndexT].X;
                                    CortNow[1] = Account.ListCord[IndexT].Y;
                                    F.Move(CortNow[0], CortNow[1]);
                                    if (F.FIsNear(CortNow[0], CortNow[1], Account.RadiusInput))
                                    {
                                        SetIndex(Account, ref IndexT);
                                    }
                                    CortNow[0] = Account.ListCord[IndexT].X;
                                    CortNow[1] = Account.ListCord[IndexT].Y;
                                    int LX = 0, LY = 0;
                                    while ((!F.FIsNear(CortNow[0], CortNow[1], Account.RadiusInput)) && Account.IsAutoTrain)
                                    {
                                        F.Move(CortNow[0], CortNow[1]);
                                        if (LX == F.ReadX() && LY == F.ReadY())
                                        {
                                            break;
                                        }
                                        LX = F.ReadX();
                                        LY = F.ReadY();
                                        Thread.Sleep(100);
                                    }
                                }
                                else if (Account.ListCord.Count <= 0 || Account.IsBlockCord)
                                {
                                    F.ReturnCord();
                                    CortNow = null;
                                }
                            }
                            if (F.IsMoveT && CortNow != null)
                            {
                                F.MoveTrain(CortNow);
                            }
                            if (!F.ONTrain)
                            {
                                Account.IsAutoTrain = F.ONTrain;
                            }
                            else if (Account.IsAutoBuff)
                            {
                                BuffSkill(Account);
                            }
                        }
                        else
                        {
                        }
                    }
                    catch (Exception E) { MessageBox.Show(E.ToString()); }
                    try
                    {
                        if (Account.IsCut)
                        {
                            if (F.ReadState() == 3)
                            {
                                F.SetCutSkill(Account.CutInput);
                            }
                        }
                    }
                    catch
                    {
                        Account.IsCut = false;
                    }
                    if (MAPN.WinActive(Account.Pid) && Account.IsAutoClick)
                    {
                        try
                        {
                            if (F.ReadMob() == 1 && Account.IsAutoClick && !Account.IsAutoTrain)
                            {
                                if (!Account.IsMouseClick)
                                {
                                    F.AttackMob(0, F.ReadMobId(), true);
                                }
                                else if (Account.IsMouseClick)
                                {
                                    F.AttackMob(1, F.ReadMobId(), true);
                                }
                            }
                        }
                        catch
                        {
                            Account.IsAutoClick = false;
                        }
                    }

                    Thread.Sleep(30 + SleepClick);
                }
            }
            catch { Account.IsAuto = false; }
        }