private void _scanner1_DoWork(object sender, DoWorkEventArgs e) { scan_bar.Value = 0; List <uint> npc_adds = newscan.AobScanAddress(new byte[] { 0x09, 0x24 }); foreach (var vl in npc_adds) { s_dt.Rows.Add(vl, 9225); } }
private void bg_scan_item_DoWork(object sender, DoWorkEventArgs e) { int melee_min = 0; int melee_max = 0; int magic_min = 0; int magic_max = 0; toolz.GetInt(txt_n_min, ref melee_min); toolz.GetInt(txt_n_max, ref melee_max); toolz.GetInt(txt_s_min, ref magic_min); toolz.GetInt(txt_s_max, ref magic_max); byte[] n_min = new byte[2]; byte[] n_max = new byte[2]; byte[] s_min = new byte[2]; byte[] s_max = new byte[2]; n_min = BitConverter.GetBytes((short)melee_min); n_max = BitConverter.GetBytes((short)melee_max); s_min = BitConverter.GetBytes((short)magic_min); s_max = BitConverter.GetBytes((short)magic_max); int pat_len = n_min.Length + n_max.Length + s_min.Length + s_max.Length; byte[] pat = new byte[pat_len]; // for (int x = 0; x < pat_len; x++) //{ int x = 0; for (int i = 0; i < n_min.Length; i++) { pat[x] = n_min[i]; x++; } for (int i = 0; i < n_max.Length; i++) { pat[x] = n_max[i]; x++; } for (int i = 0; i < s_min.Length; i++) { pat[x] = s_min[i]; x++; } for (int i = 0; i < s_max.Length; i++) { pat[x] = s_max[i]; x++; } // } scan.Pos = 0; lb_fnd.Text = "Found : 0"; if (!bg_status.IsBusy) { bg_status.RunWorkerAsync(); } item_adds = scan.AobScanAddress(pat); }