static public bool isInTown(LockedFastImage image = null) { Point pixel = new Point(258, 545); Point pixel2 = new Point(284, 546); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } Color c2; if (image != null) { c2 = image[pixel2]; } else { c2 = GetColorAt(pixel2); } return(c.Name == PixelColors.getinstance().isInTown || isStashOpen(image) || c2.Name == PixelColors.getinstance().isInTown2); }
static public PixelColors getinstance() { if (instance == null) { instance = new PixelColors(); } return(instance); }
static public bool isInGame(LockedFastImage image = null) { Point pixel = new Point(125, 598); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isInGame); }
static public bool isCharScreen_GrayEnterGameButton(LockedFastImage image = null) { Point pixel = new Point(73, 262); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isCharScreen_GrayEnterGameButton); }
static public bool isLoginLoading(LockedFastImage image = null) { Point pixel = new Point(438, 401); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isLoginLoading); }
static public bool isDisconnectDienst(LockedFastImage image = null) { Point pixel = new Point(430, 381); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isDisconnectDienst); }
static public bool isloginScreen(LockedFastImage image = null) { Point pixel = new Point(278, 178); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isloginScreen); }
static public bool isStashOpen(LockedFastImage image = null) { Point pixel = new Point(167, 60); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isStashOpen); }
static public bool isDead(LockedFastImage image = null) { Point pixel = new Point(522, 502); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isDead); }
static public bool isNeedRep(LockedFastImage image = null) { Point pixel = new Point(585, 49); Color c; if (image != null) { c = image[pixel]; } else { c = GetColorAt(pixel); } return(c.Name == PixelColors.getinstance().isNeedRep1 || c.Name == PixelColors.getinstance().isNeedRep2); }
private void button6_Click(object sender, EventArgs e) { xml.write(PixelColors.isCharScreen_GrayEnterGameButton_key, Tools.GetColorAt(new Point(73, 262)).Name); PixelColors.getinstance().reload(); }
private void button4_Click(object sender, EventArgs e) { xml.write(PixelColors.isLoginLoading_key, Tools.GetColorAt(new Point(438, 401)).Name); PixelColors.getinstance().reload(); }
private void button3_Click(object sender, EventArgs e) { xml.write(PixelColors.isDisconnectDienst_key, Tools.GetColorAt(new Point(430, 381)).Name); PixelColors.getinstance().reload(); }
private void button12_Click(object sender, EventArgs e) { xml.write(PixelColors.isStashOpen_key, Tools.GetColorAt(new Point(167, 60)).Name); PixelColors.getinstance().reload(); }
private void button10_Click(object sender, EventArgs e) { xml.write(PixelColors.isNeedRep2_key, Tools.GetColorAt(new Point(585, 49)).Name); PixelColors.getinstance().reload(); }
private void button7_Click(object sender, EventArgs e) { xml.write(PixelColors.isInTown_key, Tools.GetColorAt(new Point(258, 545)).Name); PixelColors.getinstance().reload(); }
private void button8_Click(object sender, EventArgs e) { xml.write(PixelColors.isWPopen_key, Tools.GetColorAt(new Point(158, 66)).Name); PixelColors.getinstance().reload(); }
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 button11_Click(object sender, EventArgs e) { xml.write(PixelColors.isDead_key, Tools.GetColorAt(new Point(522, 502)).Name); PixelColors.getinstance().reload(); }
private void button1_Click(object sender, EventArgs e) { xml.write(PixelColors.isloginScreen_key, Tools.GetColorAt(new Point(278, 178)).Name); PixelColors.getinstance().reload(); }
private void button13_Click(object sender, EventArgs e) { xml.write(PixelColors.isInventoryOpen_key, Tools.GetColorAt(new Point(672, 61)).Name); PixelColors.getinstance().reload(); }
private void button2_Click(object sender, EventArgs e) { xml.write(PixelColors.isLoadingScreen_key, Tools.GetColorAt(new Point(450, 562)).Name); PixelColors.getinstance().reload(); }
static public PixelColors getinstance() { if (instance == null) instance = new PixelColors(); return instance; }
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 { } }