public static void rebitmap() { if (ifcolor.a != null) { //释放旧Bitmap ifcolor.a.Dispose(); } //新Bitmap ifcolor.a = Piccolor.GetWindow(hwnd); }
public static bool FindAndClickMonster() { Point xy = Piccolor.GetImageContains(a, global::MoleAssist.Properties.Resources.lv, 0); if (xy.X == -1) { return(false); } Common.Click(xy.X, xy.Y); return(true); }
private void button9_Click(object sender, EventArgs e)//========================是否可以使用技能 { if (ifcolor.IfFight()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(327, 576)).ToString()); a.Dispose(); } }
private void button8_Click(object sender, EventArgs e)//--------------------------战斗加载 { if (ifcolor.IfcheckGhost()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(121, 3)).ToString()); a.Dispose(); } }
private void button7_Click(object sender, EventArgs e)//------------------寻找野怪 { if (ifcolor.FindAndClickMonster()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = "找不到"; a.Dispose(); } }
private void button6_Click(object sender, EventArgs e)//-----------------首发死亡 { if (ifcolor.PetDie()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(153, 103)).ToString()); a.Dispose(); } }
private void button5_Click(object sender, EventArgs e)//------------------在线时间 { if (ifcolor.OnlineTime()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(409, 320)).ToString()) + "," + (ColorTranslator.ToWin32(a.GetPixel(474, 283)).ToString()); a.Dispose(); } }
private void button4_Click(object sender, EventArgs e)//------------------技能或等级提升 { if (ifcolor.SkillLvUp()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(189, 222)).ToString()) + "," + (ColorTranslator.ToWin32(a.GetPixel(587, 461)).ToString()); a.Dispose(); } }
private void button3_Click(object sender, EventArgs e)//------------------战斗结束 { if (ifcolor.FightEnd()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(542, 196)).ToString()) + "," + (ColorTranslator.ToWin32(a.GetPixel(603, 197)).ToString()); a.Dispose(); } }
private void button2_Click(object sender, EventArgs e)//-----------------关闭资料 { if (ifcolor.Profile()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(959, 95)).ToString()) + "," + (ColorTranslator.ToWin32(a.GetPixel(552, 114)).ToString()); a.Dispose(); } }
private void button1_Click(object sender, EventArgs e)//-------------------------获得物品 { if (ifcolor.GetGoods()) { } else { Bitmap a = Piccolor.GetWindow(Handle); label1.Text = (ColorTranslator.ToWin32(a.GetPixel(700, 288)).ToString()) + "," + (ColorTranslator.ToWin32(a.GetPixel(594, 411)).ToString()); a.Dispose(); } }
public static int IfVerify() { if (ColorTranslator.ToWin32(ifcolor.a.GetPixel(513, 412)) == 3407871 && ColorTranslator.ToWin32(ifcolor.a.GetPixel(516, 411)) == 3407871) { int key = ColorTranslator.ToWin32(ifcolor.a.GetPixel(418, 305)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(418, 326)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(529, 305)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(529, 326)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(654, 305)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(654, 326)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(793, 305)) + ColorTranslator.ToWin32(ifcolor.a.GetPixel(793, 326)); if (ConfigManager.hashTable.ContainsKey(key)) { switch ((int)ConfigManager.hashTable[key]) { case 1: Common.Click(418, 305); break; case 2: Common.Click(529, 305); break; case 3: Common.Click(654, 305); break; case 4: Common.Click(793, 305); break; } return(1); } else { string path = System.IO.Path.GetTempPath() + key + ".jpg"; Bitmap b = Piccolor.cut(ifcolor.a); b.Save(path); Common.SendFile(path); b.Dispose(); return(2); } } return(-1); }