private void RefreshProcess() { listBox1.Items.Clear(); L2Manager.GetProcess(); List <Character> CharsToRemove = new List <Character>(); foreach (Character c in L2Manager.Chars) { if (!L2Manager.processList.Any(p => p.Id == c.p.Id)) { CharsToRemove.Add(c); } } foreach (Character c in CharsToRemove) { L2Manager.Chars.Remove(c); } foreach (Process p in L2Manager.processList) { listBox1.Items.Add(p.Id); if (!L2Manager.Chars.Any(c => c.p.Id == p.Id)) { L2Manager.Chars.Add(new Character(p)); } } if (L2Manager.charInUse == null && L2Manager.Chars.Count > 0) { L2Manager.charInUse = L2Manager.Chars[0]; } UpdateLoopStart(); }
public void Use(Character c) { if (cdrTime < DateTime.Now) { L2Manager.SendKeystroke(c.p.MainWindowHandle, this.ks); cdrTime = DateTime.Now.AddMilliseconds(this.cd); if (cTime > 0) { c.busyUntil = DateTime.Now.AddMilliseconds(this.cd); } } }
public Form1() { InitializeComponent(); L2Manager.form = this; RefreshProcess(); button5.Text = "RunOnActive:" + L2Manager.runOnActive; statCheckBox.Checked = L2Manager.DoStatCheck; L2Manager.FillClassData(); foreach (Class c in L2Manager.classList) { classDropdown.Items.Add(c); } }
public bool Use(Character c) { if (cdrTime < DateTime.Now) { L2Manager.SendKeystroke(c.p.MainWindowHandle, this.ks); cdrTime = DateTime.Now.AddMilliseconds(this.cd); if (cTime > 0) { c.busyUntil = DateTime.Now.AddMilliseconds(this.cd); } durationEnds = DateTime.Now.AddMilliseconds(duration); return(true); } return(false); }
void AppUpdate() { try { foreach (Character c in L2Manager.Chars) { L2Manager.charInUse = c; L2Manager.GetHP(); L2Manager.GetMHP(); L2Manager.GetMP(); L2Manager.GetMMP(); if (c == L2Manager.selected) { L2Manager.GetTHP(); } } } catch { } }
private void ToFront(object sender, EventArgs e) { L2Manager.ActivateProcessWindow(L2Manager.selected.p); }
private void button6_Click(object sender, EventArgs e) { L2Manager.AILoopStopAll(); }
private void button4_Click_1(object sender, EventArgs e) { L2Manager.AILoopStop(); }