Exemple #1
0
        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();
        }
Exemple #2
0
 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);
         }
     }
 }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
 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);
 }
Exemple #5
0
 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 { }
 }
Exemple #6
0
 private void ToFront(object sender, EventArgs e)
 {
     L2Manager.ActivateProcessWindow(L2Manager.selected.p);
 }
Exemple #7
0
 private void button6_Click(object sender, EventArgs e)
 {
     L2Manager.AILoopStopAll();
 }
Exemple #8
0
 private void button4_Click_1(object sender, EventArgs e)
 {
     L2Manager.AILoopStop();
 }