示例#1
0
文件: Main.cs 项目: RonOliver/Test
        /// <summary>
        /// Tries to use skills (and also toggle off progress mode, if it is on).
        /// Lots of room for optimization here.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void useskills_Tick(object sender, EventArgs e)
        {
            // Dark Ritual
            PlayerEngine.PressKey(Imports.VK_6);

            // Golden Clicks
            PlayerEngine.PressKey(Imports.VK_8);
            PlayerEngine.PressKey(Imports.VK_5);
            PlayerEngine.PressKey(Imports.VK_4);

            // DPS
            // PlayerEngine.PressKey(Imports.VK_1);
            PlayerEngine.PressKey(Imports.VK_2);
            PlayerEngine.PressKey(Imports.VK_3);
            PlayerEngine.PressKey(Imports.VK_7);

            if (!GameEngine.IsProgressModeOn())
            {
                PlayerEngine.AddAction(new Action(GameEngine.GetProgressButton(), 0));
            }
        }
示例#2
0
        /// <summary>
        /// Tries to use skills (and also toggle off progress mode, if it is on).
        /// Lots of room for optimization here.
        /// Skill usage is not optimal, taken out until can figure them out.
        /// This function is called every 2 seconds by a Timer in Main.Designer.cs 'useSkills'
        /// Will have to check to see how this works if you stop the program in the middle of this,
        /// not sure how the stopwatch will work in that case
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void useskills_Tick(object sender, EventArgs e)
        {
            //Check PlayerEngine.useSkils - Only if true execute skills
            if (PlayerEngine.getUseSkils())
            {
                // First set of skill usage
                // Clickstorm -> Powersurge -> Lucky Strikes -> Metal Detector -> Golden Clicks ->
                // Super Clicks -> Energize -> Dark Ritual -> Reload
                // Check flag and if skillTimer2 is currently not running or it has been running for 15 min
                if (!skillFlag && (!skillTimer2.IsRunning || skillTimer2.ElapsedMilliseconds > 900000))
                {
                    //Stop skillTimer2
                    if (skillTimer2.IsRunning)
                    {
                        skillTimer2.Stop();
                    }

                    //First run of Skill Usage - skillFlag = false
                    PlayerEngine.PressKey(Imports.VK_1);
                    PlayerEngine.PressKey(Imports.VK_2);
                    PlayerEngine.PressKey(Imports.VK_3);
                    PlayerEngine.PressKey(Imports.VK_4);
                    PlayerEngine.PressKey(Imports.VK_5);
                    PlayerEngine.PressKey(Imports.VK_7);
                    PlayerEngine.PressKey(Imports.VK_8);
                    PlayerEngine.PressKey(Imports.VK_6);
                    PlayerEngine.PressKey(Imports.VK_9);

                    //Start skillTimer1
                    skillTimer1.Start();

                    //Toggle flag
                    skillFlag = true;
                }

                // Second set of skill usage
                // Energize -> Reload -> Clickstorm -> Powersurge -> Lucky Strikes -> Metal Detector ->
                // Golden Clicks -> Super Clicks
                // Check flag and if skillTimer1 has been running for 15 min (900,000 milliseconds)
                else if (skillFlag && (skillTimer1.ElapsedMilliseconds > 900000))
                {
                    //Stop skillTimer1
                    if (skillTimer1.IsRunning)
                    {
                        skillTimer1.Stop();
                    }

                    //Second run of Skill Usage - skillFlag = true
                    PlayerEngine.PressKey(Imports.VK_8);
                    PlayerEngine.PressKey(Imports.VK_9);
                    PlayerEngine.PressKey(Imports.VK_1);
                    PlayerEngine.PressKey(Imports.VK_2);
                    PlayerEngine.PressKey(Imports.VK_3);
                    PlayerEngine.PressKey(Imports.VK_4);
                    PlayerEngine.PressKey(Imports.VK_5);
                    PlayerEngine.PressKey(Imports.VK_7);

                    //Start skillTimer2
                    skillTimer2.Start();

                    //Toggle flag
                    skillFlag = false;
                }
            }

            /*
             * // Dark Ritual
             * PlayerEngine.PressKey(Imports.VK_6);
             *
             * // Golden Clicks
             * PlayerEngine.PressKey(Imports.VK_8);
             * PlayerEngine.PressKey(Imports.VK_5);
             * PlayerEngine.PressKey(Imports.VK_4);
             *
             * // DPS
             * // PlayerEngine.PressKey(Imports.VK_1);
             * PlayerEngine.PressKey(Imports.VK_2);
             * PlayerEngine.PressKey(Imports.VK_3);
             * PlayerEngine.PressKey(Imports.VK_7);
             */
            /* Moved to First task in tasklist
             * if (!GameEngine.IsProgressModeOn())
             * {
             *  PlayerEngine.AddAction(new Action(GameEngine.GetProgressButton(), 0));
             * }
             */
        }