private void b_adjust_bot_Click(object sender, EventArgs e) { Point found_point = divideAndConquerSearch(0, 500); if (found_point == FAIL_POINT) { writeToLog(module_name, "Could not adjust Bot!"); return; } Point to_match = new Point(607, 585); Point adjust_point_p = new Point(found_point.X - to_match.X, found_point.Y - to_match.Y); if (Tools.adjust_bot_point == adjust_point_p) { writeToLog(module_name, "Bot was correctly adjusted."); } else { MyXML xml = new MyXML(config_path); xml.write(adjust_point_x, adjust_point_p.X.ToString()); xml.write(adjust_point_y, adjust_point_p.Y.ToString()); Tools.adjust_bot_point = adjust_point_p; writeToLog(module_name, "Bot correctly adjusted from " + Tools.adjust_bot_point.ToString() + " to " + adjust_point_p.ToString() + "."); } BackgroundWorker bgw = new BackgroundWorker(); bgw.DoWork += new DoWorkEventHandler(AsyncAdjustPixelColors); bgw.RunWorkerAsync(); }
private void main_Load(object sender, EventArgs e) { PixelColors.getinstance(); GameStateChecker.getInstance().start(); writeToLog(module_name, D3Stuff.getInstance().getModuleName() + " loaded!"); //load bot options MyXML xml = new MyXML(config_path); try { n_restart_delay.Value = Convert.ToDecimal(xml.read(restart_delay)); } catch { } try { n_max_waittime.Value = Convert.ToDecimal(xml.read(max_waittime)); } catch { } try { n_max_d3_restarts.Value = Convert.ToDecimal(xml.read(max_restarts)); } catch { } try { n_start_delay.Value = Convert.ToDecimal(xml.read(start_delay)); } catch { } try { n_login_trys.Value = Convert.ToDecimal(xml.read(login_trys)); } catch { } try { c_demonHunter.Checked = Convert.ToBoolean(xml.read(demon_hunter)); } catch { } try { c_remember_pass.Checked = Convert.ToBoolean(xml.read(remember_pass)); if (c_remember_pass.Checked) { String dec_pass = xml.read(encrypted_pass); for (int i = 0; i < enc_times; i++) dec_pass = Cypher.Decrypt(dec_pass); t_pw.Text = dec_pass; } } catch { } try { Tools.adjust_bot_point.X = Convert.ToInt32(xml.read(adjust_point_x)); Tools.adjust_bot_point.Y = Convert.ToInt32(xml.read(adjust_point_y)); } catch { } //inithealthBot(); try { D3InventoryStuff.getInstance(); } catch (Exception ex) { MessageBox.Show(ex.Message); } initHailiesBot(); initNxtBot(); initLoginBot(); lvlBot = new B_levelBot(); r_log.Text += "------------------------------" + Environment.NewLine; r_log.SelectionStart = r_log.Text.Length; r_log.ScrollToCaret(); finished_init = true; try { if (xml.read("first_start") == "") { MessageBox.Show("You are using this tool for the first time. Please adjust the bots with the \"" + b_adjust_bot.Text + "\" button."); xml.write("first_start", "!"); } } catch { } }
private void b_adjust_bot_Click(object sender, EventArgs e) { Point found_point = divideAndConquerSearch(0, 500); if(found_point == FAIL_POINT) { writeToLog(module_name, "Could not adjust Bot!"); return; } Point to_match = new Point(607, 585); Point adjust_point_p = new Point(found_point.X - to_match.X, found_point.Y - to_match.Y); if (Tools.adjust_bot_point == adjust_point_p) { writeToLog(module_name, "Bot was correctly adjusted."); } else { MyXML xml = new MyXML(config_path); xml.write(adjust_point_x, adjust_point_p.X.ToString()); xml.write(adjust_point_y, adjust_point_p.Y.ToString()); Tools.adjust_bot_point = adjust_point_p; writeToLog(module_name, "Bot correctly adjusted from " + Tools.adjust_bot_point.ToString() + " to " + adjust_point_p.ToString() + "."); } BackgroundWorker bgw = new BackgroundWorker(); bgw.DoWork += new DoWorkEventHandler(AsyncAdjustPixelColors); bgw.RunWorkerAsync(); }
private void b_isIngame_Click(object sender, EventArgs e) { xml.write(PixelColors.isInGame_key, Tools.GetColorAt(new Point(125, 598)).Name); PixelColors.getinstance().reload(); }
private void main_Load(object sender, EventArgs e) { PixelColors.getinstance(); GameStateChecker.getInstance().start(); writeToLog(module_name, D3Stuff.getInstance().getModuleName() + " loaded!"); //load bot options MyXML xml = new MyXML(config_path); try { n_restart_delay.Value = Convert.ToDecimal(xml.read(restart_delay)); } catch { } try { n_max_waittime.Value = Convert.ToDecimal(xml.read(max_waittime)); } catch { } try { n_max_d3_restarts.Value = Convert.ToDecimal(xml.read(max_restarts)); } catch { } try { n_start_delay.Value = Convert.ToDecimal(xml.read(start_delay)); } catch { } try { n_login_trys.Value = Convert.ToDecimal(xml.read(login_trys)); } catch { } try { c_demonHunter.Checked = Convert.ToBoolean(xml.read(demon_hunter)); } catch { } try { c_remember_pass.Checked = Convert.ToBoolean(xml.read(remember_pass)); if (c_remember_pass.Checked) { String dec_pass = xml.read(encrypted_pass); for (int i = 0; i < enc_times; i++) { dec_pass = Cypher.Decrypt(dec_pass); } t_pw.Text = dec_pass; } } catch { } try { Tools.adjust_bot_point.X = Convert.ToInt32(xml.read(adjust_point_x)); Tools.adjust_bot_point.Y = Convert.ToInt32(xml.read(adjust_point_y)); } catch { } //inithealthBot(); try { D3InventoryStuff.getInstance(); } catch (Exception ex) { MessageBox.Show(ex.Message); } initHailiesBot(); initNxtBot(); initLoginBot(); lvlBot = new B_levelBot(); r_log.Text += "------------------------------" + Environment.NewLine; r_log.SelectionStart = r_log.Text.Length; r_log.ScrollToCaret(); finished_init = true; try { if (xml.read("first_start") == "") { MessageBox.Show("You are using this tool for the first time. Please adjust the bots with the \"" + b_adjust_bot.Text + "\" button."); xml.write("first_start", "!"); } } catch { } }