Exemplo n.º 1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = string.Format(toolStripStatusLabel1.Text, Exe_Version);
            toolStripStatusLabel3.Text = string.Format(toolStripStatusLabel3.Text, LocalVersion);
            frmSelect = new SelectWoWProcessToAttachTo(this);

            txtPlayerHealth.Text = "0";
            txtPlayerPower.Text  = "0";
            txtTargetHealth.Text = "0";

            // Its annoying as hell when people use incorrect culture info, this will force it to use the correct number and date formats.
            var ci = new CultureInfo("en-ZA")
            {
                DateTimeFormat = { ShortDatePattern = "yyyy/MM/dd" }, NumberFormat = { NumberDecimalSeparator = ".", CurrencyDecimalSeparator = "." }
            };

            Thread.CurrentThread.CurrentCulture   = ci;
            Thread.CurrentThread.CurrentUICulture = ci;

            FormClosing += FrmMain_FormClosing;
            Shown       += FrmMain_Shown;
            Log.Initialize(rtbLog, this);

            Log.WritePixelMagic("Welcome to PixelMagic developed by WiNiFiX", Color.Blue);

            Log.Write("Current version: " + LocalVersion);

            Log.WriteNoTime("To view a sample rotation see the file: " + Application.StartupPath + "\\Rotations\\DemonHunter\\Vengeance.cs", Color.Gray);

            Log.WriteNoTime("Should you encounter rotation issues at low health ensure that flashy red screen is turned off in interface options.", Color.Green);

            var processName = Process.GetCurrentProcess().ProcessName.ToUpper();

            if (processName == "PixelMagic")
            {
                Log.WriteNoTime("It has been detected that you have not renamed 'PixelMagic.exe' this is not allowed.", Color.Red);
            }

            Log.HorizontalLine = "-".PadLeft(152, '-');
            Log.DrawHorizontalLine();
        }
Exemplo n.º 2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = string.Format(toolStripStatusLabel1.Text, Exe_Version);
            toolStripStatusLabel3.Text = string.Format(toolStripStatusLabel3.Text, LocalVersion);
            frmSelect = new SelectWoWProcessToAttachTo(this);

            prgPlayerHealth.Value = 0;
            prgPower.Value        = 0;
            prgTargetHealth.Value = 0;

            // Its annoying as hell when people use incorrect culture info, this will force it to use the correct number and date formats.
            var ci = new CultureInfo("en-ZA")
            {
                DateTimeFormat = { ShortDatePattern = "yyyy/MM/dd" }, NumberFormat = { NumberDecimalSeparator = ".", CurrencyDecimalSeparator = "." }
            };

            Thread.CurrentThread.CurrentCulture   = ci;
            Thread.CurrentThread.CurrentUICulture = ci;

            FormClosing += FrmMain_FormClosing;
            Shown       += FrmMain_Shown;
            Log.Initialize(rtbLog, this);

            Log.WritePixelMagic("Welcome to PixelMagic Premium Edition developed by WiNiFiX", Color.Blue);
            Log.WriteNoTime("For support please visit: http://goo.gl/0AqNxv");
            Log.WriteNoTime("To view a sample rotation see the file: " + Application.StartupPath + "\\Rotations\\Warrior\\Warrior.cs", Color.Gray);
            Log.WriteNoTime("To find spell / buff id's in WoW use the addon http://mods.curse.com/addons/wow/spellid", Color.Gray);

            var processName = Process.GetCurrentProcess().ProcessName.ToUpper();

            if (processName == "PIXELMAGIC")
            {
                Log.WriteNoTime("It has been detected that you have not renamed 'PixelMagic.exe' before running it, it is recommended to rename it", Color.Red);
            }

            Log.HorizontalLine = "-".PadLeft(152, '-');
            Log.DrawHorizontalLine();
        }
Exemplo n.º 3
0
        private void FrmMain_Shown(object sender, EventArgs e)
        {
            try
            {
                ConfigFile.Initialize();

                Log.Write(OperatingSystem);

                var i = 0;
                foreach (var screen in Screen.AllScreens)
                {
                    i++;
                    Log.Write($"Screen [{i}] - depth: {screen.BitsPerPixel}bit - resolution: {screen.Bounds.Width}x{screen.Bounds.Height}");
                }

                foreach (var item in classes)
                {
                    if (!Directory.Exists(Application.StartupPath + "\\Rotations\\" + item.Value))
                    {
                        Directory.CreateDirectory(Application.StartupPath + "\\Rotations\\" + item.Value);
                    }
                }

                nudPulse.Value = ConfigFile.Pulse;

                SelectWoWProcessToAttachTo f = new SelectWoWProcessToAttachTo(this);
                f.ShowDialog();

                if (process == null)
                {
                    Close();
                }

                ReloadHotkeys();

                WoW.Initialize(process);

                Log.Write("WoW Path: " + WoW.InstallPath, Color.Gray);
                Log.Write("AddOn Path: " + WoW.AddonPath, Color.Gray);

                var mousePos = new Thread(delegate()
                {
                    while (true)
                    {
                        Threads.UpdateTextBox(txtMouseXY, Cursor.Position.X + "," + Cursor.Position.Y);
                        Thread.Sleep(10);
                    }
                    // ReSharper disable once FunctionNeverReturns
                })
                {
                    IsBackground = true
                };
                mousePos.Start();

                Log.DrawHorizontalLine();
                Log.Write("Please select a rotation to load from 'File' -> 'Load Rotation...'", Color.Green);
                Log.Write("Please note that you can only start a bot, or setup the spellbook, once you have loaded a rotation", Color.Black);
                Log.DrawHorizontalLine();

                //// For testing only
                //if (!Debugger.IsAttached || Environment.MachineName != "BRETT-PC")
                //    return;

                //var rot = new Warrior();
                //rot.Load(this);
                //combatRoutine = rot.combatRoutine;
                //combatRoutine.FileName = Application.StartupPath + @"\Rotations\Warrior\Warrior.cs";
                //Log.Write("Successfully loaded combat routine: " + combatRoutine.Name, Color.Green);
                //Overlay.showOverlay(new Point(20, 680));
                //if (SpellBook.Initialize(Application.StartupPath + @"\Rotations\Warrior\Warrior.cs"))
                //{
                //    spellbookToolStripMenuItem.Enabled = true;
                //    submitTicketToolStripMenuItem.Enabled = true;
                //    cmdStartBot.Enabled = true;
                //    cmdStartBot.BackColor = Color.LightGreen;
                //    cmdRotationSettings.Enabled = true;
                //}
                //else
                //{
                //    spellbookToolStripMenuItem.Enabled = false;
                //    submitTicketToolStripMenuItem.Enabled = false;
                //    cmdStartBot.Enabled = false;
                //    cmdStartBot.BackColor = Color.WhiteSmoke;
                //}
            }
            catch (Exception ex)
            {
                Log.Write(ex.Message, Color.Red);
            }
        }
Exemplo n.º 4
0
        private void FrmMain_Shown(object sender, EventArgs e)
        {
            try
            {
                ConfigFile.Initialize();

                Log.Write(OperatingSystem);

                var i = 0;
                foreach (var screen in Screen.AllScreens)
                {
                    i++;
                    Log.Write($"Screen [{i}] - depth: {screen.BitsPerPixel}bit - resolution: {screen.Bounds.Width}x{screen.Bounds.Height}");
                }

                foreach (var item in classes)
                {
                    if (!Directory.Exists(Application.StartupPath + "\\Rotations\\" + item.Value))
                        Directory.CreateDirectory(Application.StartupPath + "\\Rotations\\" + item.Value);
                }

                nudPulse.Value = ConfigFile.Pulse;

                SelectWoWProcessToAttachTo f = new SelectWoWProcessToAttachTo(this);
                f.ShowDialog();

                if (process == null)
                {
                    Close();
                }

                ReloadHotkeys();

                WoW.Initialize(process);

                Log.Write("WoW Path: " + WoW.InstallPath, Color.Gray);
                Log.Write("AddOn Path: " + WoW.AddonPath, Color.Gray);

                var mousePos = new Thread(delegate ()
                {
                    while (true)
                    {
                        Threads.UpdateTextBox(txtMouseXY, Cursor.Position.X + "," + Cursor.Position.Y);
                        Thread.Sleep(10);
                    }
                    // ReSharper disable once FunctionNeverReturns
                })
                { IsBackground = true };
                mousePos.Start();

                Log.DrawHorizontalLine();
                Log.Write("Please select a rotation to load from 'File' -> 'Load Rotation...'", Color.Green);
                Log.Write("Please note that you can only start a bot, or setup the spellbook, once you have loaded a rotation", Color.Black);
                Log.DrawHorizontalLine();

                //// For testing only
                //if (!Debugger.IsAttached || Environment.MachineName != "BRETT-PC")
                //    return;

                //var rot = new Warrior();
                //rot.Load(this);
                //combatRoutine = rot.combatRoutine;
                //combatRoutine.FileName = Application.StartupPath + @"\Rotations\Warrior\Warrior.cs";
                //Log.Write("Successfully loaded combat routine: " + combatRoutine.Name, Color.Green);
                //Overlay.showOverlay(new Point(20, 680));
                //if (SpellBook.Initialize(Application.StartupPath + @"\Rotations\Warrior\Warrior.cs"))
                //{
                //    spellbookToolStripMenuItem.Enabled = true;
                //    submitTicketToolStripMenuItem.Enabled = true;
                //    cmdStartBot.Enabled = true;
                //    cmdStartBot.BackColor = Color.LightGreen;
                //    cmdRotationSettings.Enabled = true;
                //}
                //else
                //{
                //    spellbookToolStripMenuItem.Enabled = false;
                //    submitTicketToolStripMenuItem.Enabled = false;
                //    cmdStartBot.Enabled = false;
                //    cmdStartBot.BackColor = Color.WhiteSmoke;
                //}
            }
            catch (Exception ex)
            {
                Log.Write(ex.Message, Color.Red);
            }
        }