public ConfigMenu(double sX0, double sY0, double sX1, double sY1, AirPlaneList aplIn)
        {
            bgColor          = Color.FromArgb(255, 255, 255);
            stdColor         = Color.FromArgb(0, 0, 0);
            ca_bgCol         = Color.FromArgb(240, 240, 240);
            ca_bdCol         = Color.FromArgb(0, 0, 0);
            stdFont          = new Font("SansSelif", 12);
            bigFont          = new Font("SansSelif", 16);
            smallFont        = new Font("SansSelif", 9);
            airplaneCange    = 0;
            selectedAirPlane = 0;
            displayAirPlane  = 0;
            SETTING_NOMAL    = 0;
            SETTING_LOWLEVEL = 1;
            selectedSetting  = 0;
            displaySetting   = 0;
            settingName      = new String[] { "NORMAL", "LOW_LEVEL" };
            dt       = new double[] { 0.005D, 0.01D };
            t_disp   = new int[] { 6, 7 };
            t_record = new int[] { 40, 20 };
            clip     = new Clipper(sX0, sY0, sX1, sY1);
            apl      = aplIn;

            ok               = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            cancel           = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            airplaneNext     = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            airplanePrev     = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            setting_normal   = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
            setting_lowlevel = new ClickArea(0, 0, 0, 0, ca_bdCol, ca_bgCol);
        }
示例#2
0
        /// <summary>
        /// main overriden method used to perform this script event
        /// </summary>
        public override void DoEvent()
        {
            // update the status label on the main form
            //
            Status = $"Mouse move to random point in area: {ClickArea.PrintArea()}.";

            MoveMouseToArea(ClickArea);
        }
示例#3
0
        protected override void RunInputScript(ClickArea clickArea, KeyCode code, int mode)
        {
            var verbScript = Variables[VariableVerbScript.Value];

            if (verbScript != 0)
            {
                RunScript(verbScript, false, false, new [] { (int)clickArea, (int)code, mode });
            }
        }
示例#4
0
 /// <summary>
 /// returns a string which is added to the listbox to give information about the event which was added to the event list
 /// </summary>
 /// <returns></returns>
 public override string GetEventListBoxString()
 {
     if (GroupID == -1)
     {
         return("Move mouse to random point in area " + ClickArea.PrintArea() + ".");
     }
     else
     {
         return("[Group " + GroupID + " Repeat x" + NumberOfCycles + "] Move mouse to random point in area " + ClickArea.PrintArea() + ".");
     }
 }
        public BotConfiguration(string configFolder)
        {
            XDocument xmlConfiguration = GetXml(configFolder);

            startButton = new ClickArea(xmlConfiguration.Descendants("StartGHBButton").FirstOrDefault());
            fightButton = new ClickArea(xmlConfiguration.Descendants("FightButton").FirstOrDefault());
            skipDialogButton = new ClickArea(xmlConfiguration.Descendants("SkipDialogButton").FirstOrDefault());
            autoBattleButton = new ClickArea(xmlConfiguration.Descendants("AutoBattleButton").FirstOrDefault());
            acceptAutoBattle = new ClickArea(xmlConfiguration.Descendants("AcceptAutoBattleButton").FirstOrDefault());

            communicateServerTimer = (int)xmlConfiguration.Descendants("CommunicateServerTimer").FirstOrDefault() * 1000;
            stageTimer = (int)xmlConfiguration.Descendants("StageTimer").FirstOrDefault() * 1000;
        }
示例#6
0
        /// <summary>
        /// main overriden method used to perform this script event
        /// </summary>
        public override void DoEvent()
        {
            // update the status label on the main form
            //
            Status = $"Mouse move to area: {ClickArea.PrintArea()} on window: {WindowToClickTitle}.";

            // bring the window associated with this event to the front
            //
            BringEventWindowToFront(this);

            if (ClickArea.Height > 0)
            {
                // don't override original click area or it will cause the mouse position to incrememnt every time this method is called
                RECT NewClickArea = GetClickAreaPositionOnWindow(WindowToClickHandle, ClickArea);

                // call the final mouse move method
                //
                MoveMouseToAreaOnWindow(NewClickArea);
            }
        }
示例#7
0
        protected override void RunInputScript(ClickArea clickArea, KeyCode code, int mode)
        {
            int verbScript;

            verbScript = 4;
            Variables[VariableClickArea.Value] = (int)clickArea;
            switch (clickArea)
            {
                case ClickArea.Verb:        // Verb clicked
                    Variables[VariableClickVerb.Value] = (int)code;
                    break;
                case ClickArea.Inventory:       // Inventory clicked
                    Variables[VariableClickObject.Value] = (int)code;
                    break;
            }

            var args = new[] { (int)clickArea, (int)code, mode };

            if (verbScript != 0)
                RunScript(verbScript, false, false, args);
        }
 /// <summary>
 /// returns a string which is added to the listbox to give information about the event which was added to the event list
 /// </summary>
 /// <returns></returns>
 public override string GetEventListBoxString()
 {
     if (GroupID == -1)
     {
         return("Move mouse to random pixel matching colour " + SearchColour + " in area " + ClickArea.PrintArea() + " on " + GetWindowTitle(WindowToClickHandle) + " window.");
     }
     else
     {
         return("[Group " + GroupID + " Repeat x" + NumberOfCycles + "] Move mouse to random pixel matching colour " + SearchColour + " in area " + ClickArea.PrintArea() + " on " + GetWindowTitle(WindowToClickHandle) + " window.");
     }
 }
示例#9
0
 protected abstract void RunInputScript(ClickArea clickArea, KeyCode code, int mode);
示例#10
0
 /// <summary>
 /// returns a string which is added to the listbox to give information about the event which was added to the event list
 /// </summary>
 /// <returns></returns>
 public override string GetEventListBoxString()
 {
     if (GroupID == -1)
     {
         return("Move mouse to Point X: " + CoordsToMoveTo.X + " Y: " + CoordsToMoveTo.Y + " on " + WindowToClickTitle + " window.");
     }
     else
     {
         return("[Group " + GroupID + " Repeat x" + NumberOfCycles + "] Move mouse to random point in area " + ClickArea.PrintArea() + " on " + WindowToClickTitle + " window.");
     }
 }
示例#11
0
 protected abstract void RunInputScript(ClickArea clickArea, KeyCode code, int mode);
示例#12
0
        protected override void RunInputScript(ClickArea clickArea, KeyCode code, int mode)
        {
            var verbScript = Variables[VariableVerbScript.Value];

            if (verbScript != 0)
            {
                RunScript(verbScript, false, false, new [] { (int)clickArea, (int)code, mode });
            }
        }