private void savesetting() { Settings.Default.nombre_choix = nombrebot; int i = 0; if (Settings.Default.bots.Count == 0) { foreach (ComboBox c in arg) { Settings.Default.bots.Add(c.SelectedIndex); i++; } } else { foreach (ComboBox c in arg) { Settings.Default.bots[i] = c.SelectedIndex; i++; } } HKMDB.serialize(hotkeymanager1.listOfHotkeys); saveKeys(); this.combatSettings1.save(); Settings.Default.first_use = false; Settings.Default.Save(); ClassSettings.Default.Save(); }
private void button1_Click(object sender, EventArgs e) { if (textBox3.Text != string.Empty) { if (keyassignation != null) { bool accep = true; for (int i = 0; i < nombreditems; i++) { HKMDB Truc = (HKMDB)listOfHotkeys[i]; if (Truc.KeyToString() == HKMDB.KeyToString(keyassignation) && i != listBox1.SelectedIndex) { accep = false; MessageBox.Show("Already Choosen!", "Error"); } } if (accep == true) { listOfHotkeys[listBox1.SelectedIndex] = new HKMDB(keyassignation, listBox1.SelectedIndex); } } else { MessageBox.Show("Erreur", "Erreur Impossible"); } } refresh(); }
private void refresh() { keyassignation = null; HKMDB Truc = (HKMDB)listOfHotkeys[listBox1.SelectedIndex]; textBox1.Text = Truc.KeyToString(); textBox3.Text = string.Empty; }
private void Form2_Load(object sender, EventArgs e) { SomeSettings.UserHotkey = HKMDB.deserialize(); this.DoubleBuffered = true; this.TopMost = true; if (Settings.Default.consolesavelocation == true && SomeSettings.bot_firstuse == false && Settings.Default.consolesize != null) { this.Size = Settings.Default.consolesize; this.Location = Settings.Default.consolelocation; } else { this.Location = new Point(SystemInformation.PrimaryMonitorSize.Width - this.Size.Width, 0); } SomeSettings.consoleHiden = !Settings.Default.showconsole; SomeSettings.showballon = Settings.Default.showballoon; this.BackColor = Settings.Default.consolebackgroundcolor; textBox1.BackColor = Settings.Default.consolebackgroundcolor; richTextBox1.BackColor = Settings.Default.consolebackgroundcolor; textBox1.Font = Settings.Default.consolefont; richTextBox1.Font = Settings.Default.consolefont; label1.Font = Settings.Default.consolefont; label1.ForeColor = Settings.Default.consolefontcolor; textBox1.ForeColor = Settings.Default.consolefontcolor; richTextBox1.ForeColor = Settings.Default.consolefontcolor; textBox1.Size = new Size(textBox1.Size.Width, (int)Math.Truncate(label1.Font.Size) + 3); textBox1.Location = new Point(label1.Location.X + label1.Size.Width, textBox1.Location.Y); //appstart.InterceptKeys.Launch(); //appstart.InterceptKeys.appuyé += new KeyTransfertEventHandler(InterceptKeys_appuyé); SomeSettings.hkm = new HotKeyManager(); if (SomeSettings.working == false) { this.Dispose(); Application.Exit(); Application.ExitThread(); } else { analyzencour = 0; analyzfini = false; botnumber = SomeSettings.botnumber; if (botnumber == 0) { this.Dispose(); } debug = Settings.Default.debug_mode; sendtext(" XBot By Um3w "); // richTextBox1.ap sendtext(" Version: " + SomeSettings.ProductVersion); sendtext(""); sendtext("User settings saved"); sendtext("XBot mode: " + SomeSettings.getBotModstring(SomeSettings.BotMod)); sendtext("->Bots number: " + SomeSettings.botnumber.ToString()); launchingthread(); } }
private void analyzehwnd() { analyzencour = 0; analyzfini = false; hwnd = new IntPtr[botnumber]; pid = new IntPtr[botnumber]; //HotKeyModifier HKM = HKMDB ConsoleHK = SomeSettings.UserHotkey[0] as HKMDB; sendtext("->Entering windows handle configuration", ConsoleLvl.Medium); sendtext("Click on the WoW window of the character asked then press " + ConsoleHK.KeyToString()); // sendtext(ConsoleHK.MainKey().ToString() + "-" + ConsoleHK.Modifiers().ToString()); SomeSettings.hkm.Register(ConsoleHK.MainKey(), (HotKeyModifier)ConsoleHK.Modifiers(), 1, new HotKeyEventHandler(analyzethwnd)); sendtext("Main character: " + botHub.getClasse(analyzencour) + "..."); }
private void ClassicEtSemiStart() { foreach (Bot b in UserBots) { //Memory.InjectDllToWindow(b.Handle, //sendconsole("pid b:" + b.PID.ToString()); Threadbot[b.ID] = new Thread(new ParameterizedThreadStart(this.MainThreadLoop)); Threadbot[b.ID].Start(b.ID); } BotWatcher = new Thread(new ThreadStart(BotHelper.WatcherOoO)); BotWatcher.Start(); BotHealer = new Thread(new ThreadStart(BotHelper.WatchHealth)); BotHealer.Start(); BotCentralizer = new Thread(new ThreadStart(BotHelper.CentralizeOoO)); BotCentralizer.Start(); ActionToAllBot(new SAction(BotAction.FollowMain, followMainPriority), 1, false); HKMDB AttackMainHK = SomeSettings.UserHotkey[2] as HKMDB; HKMDB FollowMainHK = SomeSettings.UserHotkey[3] as HKMDB; HKMDB ChangeMainHK = SomeSettings.UserHotkey[1] as HKMDB; HKMDB GoToLocHK = SomeSettings.UserHotkey[4] as HKMDB; HKMDB CamHackHK = SomeSettings.UserHotkey[5] as HKMDB; HKMDB AddCamHK = SomeSettings.UserHotkey[6] as HKMDB; HKMDB LowCamHK = SomeSettings.UserHotkey[7] as HKMDB; MxBots.Hook.StartMouseHook(); SomeSettings.hkm.Register(AttackMainHK.MainKey(), (HotKeyModifier)AttackMainHK.Modifiers(), 1, new HotKeyEventHandler(AttackMainTarget)); SomeSettings.hkm.Register(FollowMainHK.MainKey(), (HotKeyModifier)FollowMainHK.Modifiers(), 2, new HotKeyEventHandler(SwitchFollow)); SomeSettings.hkm.Register(ChangeMainHK.MainKey(), (HotKeyModifier)ChangeMainHK.Modifiers(), 3, new HotKeyEventHandler(ChangeMainPress)); SomeSettings.hkm.Register(GoToLocHK.MainKey(), (HotKeyModifier)GoToLocHK.Modifiers(), 4, new HotKeyEventHandler(war3)); SomeSettings.hkm.Register(CamHackHK.MainKey(), (HotKeyModifier)CamHackHK.Modifiers(), 5, new HotKeyEventHandler(switchCameraHack)); SomeSettings.hkm.Register(AddCamHK.MainKey(), (HotKeyModifier)AddCamHK.Modifiers(), 6, new HotKeyEventHandler(addCam)); SomeSettings.hkm.Register(LowCamHK.MainKey(), (HotKeyModifier)LowCamHK.Modifiers(), 7, new HotKeyEventHandler(lowCam)); }
public hotkeymanager() { InitializeComponent(); Firstuse = false; HKMDB lol = new HKMDB(new KeyEventArgs(Keys.Control | Keys.Enter), 1); nombreditems = HKMLIST.NOMBREDEHOTKEYS; if (Settings.Default.first_use == true) { Firstuse = true; listOfHotkeys = new System.Collections.ArrayList(); listOfHotkeys.Capacity = nombreditems; for (int arg = 0; arg < nombreditems; arg++) { listOfHotkeys.Add(HKMLIST.HKMLISTDEF[arg]); } } else { listOfHotkeys = HKMDB.deserialize(); if (listOfHotkeys.Count != nombreditems) { int anciennombreditems = listOfHotkeys.Capacity; listOfHotkeys.Capacity = nombreditems; for (int arg = anciennombreditems; arg < listOfHotkeys.Capacity; arg++) { listOfHotkeys.Add(HKMLIST.HKMLISTDEF[arg]); } } } foreach (HKMDB h in HKMLIST.HKMLISTDEF) { listBox1.Items.Add(h.DonnemoiladéfinitionConnard()); } listBox1.SelectedIndex = 0; }
private void textBox3_KeyDown(object sender, KeyEventArgs e) { textBox3.Text = HKMDB.KeyToString(e); keyassignation = e; }