Exemple #1
0
        public void activateLoadedSettings()
        {
            ModulesManager.SioDisable();
            ModulesManager.sio = sio;
            if (sio.working)
            {
                ModulesManager.HardEnableThread((Module)sio);
            }


            ModulesManager.HealerDisable();
            ModulesManager.healer = healer;
            if (healer.working)
            {
                ModulesManager.HardEnableThread((Module)healer);
            }

            ModulesManager.AutoHasteDisable();
            ModulesManager.autoHaste = autoHaste;
            if (autoHaste.working)
            {
                ModulesManager.HardEnableThread((Module)autoHaste);
            }

            ModulesManager.AntyParalyseDisable();
            ModulesManager.antyParalyse = antyParalyse;
            if (antyParalyse.working)
            {
                ModulesManager.HardEnableThread((Module)antyParalyse);
            }

            ModulesManager.TargetingDisable();
            ModulesManager.targeting = targeting;
            if (targeting.working)
            {
                ModulesManager.HardEnableThread((Module)targeting);
            }

            ModulesManager.WalkerDisable();
            ModulesManager.walker = walker;
            if (walker.working)
            {
                ModulesManager.HardEnableThread((Module)walker);
            }

            ModulesManager.AlarmsDisable();
            ModulesManager.alarms = alarms;
            if (alarms.working)
            {
                ModulesManager.HardEnableThread((Module)alarms);
            }
        }
Exemple #2
0
        private void Save(object sender, RoutedEventArgs e)
        {
            try
            {
                bool isWorking = ModulesManager.healer.working;
                if (isWorking)
                {
                    ModulesManager.HealerDisable();
                }

                ModulesManager.healer.lowHPAction  = lowHPB.Text;
                ModulesManager.healer.medHPAction  = medHPB.Text;
                ModulesManager.healer.highHPAction = highHPB.Text;

                if (lowHPMana.Text == "")
                {
                    lowHPMana.Text = "0";
                }
                if (medHPMana.Text == "")
                {
                    medHPMana.Text = "0";
                }
                if (highHPMana.Text == "")
                {
                    highHPMana.Text = "0";
                }
                ModulesManager.healer.lowHPMana  = int.Parse(lowHPMana.Text);
                ModulesManager.healer.medHPMana  = int.Parse(medHPMana.Text);
                ModulesManager.healer.highHPMana = int.Parse(highHPMana.Text);

                if (lowHP.Text == "")
                {
                    lowHP.Text = "0";
                }
                if (medHP.Text == "")
                {
                    medHP.Text = "0";
                }
                if (highHP.Text == "")
                {
                    highHP.Text = "0";
                }
                ModulesManager.healer.lowHP  = int.Parse(lowHP.Text);
                ModulesManager.healer.medHP  = int.Parse(medHP.Text);
                ModulesManager.healer.highHP = int.Parse(highHP.Text);

                if (lowMana.Text == "")
                {
                    lowMana.Text = "0";
                }
                if (highMana.Text == "")
                {
                    highMana.Text = "0";
                }
                ModulesManager.healer.lowMana        = int.Parse(lowMana.Text);
                ModulesManager.healer.highMana       = int.Parse(highMana.Text);
                ModulesManager.healer.lowManaAction  = lMB.Text;
                ModulesManager.healer.highManaAction = hMB.Text;


                if (isWorking)
                {
                    ModulesManager.HealerEnable();
                }

                showPopUpWindow("Saved succesfully");
            }
            catch (Exception)
            {
                showPopUpWindow();
            }
        }
        private static int getItem(int itemNumber, Condition cond)
        {
            object arg      = null;
            int    itemType = -1;

            if (itemNumber == 1)
            {
                itemType = cond.item1;
                if (cond.args.Count > 0)
                {
                    arg = cond.args[0];
                }
            }
            else
            {
                itemType = cond.item2;
                int item1 = cond.item1;
                if (cond.args.Count > 1)
                {
                    arg = cond.args[1];
                }
                else if (cond.args.Count > 0)
                {
                    arg = cond.args[0];
                }
            }

            if (itemType == StatementType.conditionElement["Cap"])
            {
                return(GetData.Cap);
            }
            else if (itemType == StatementType.conditionElement["Item count"])
            {
                int    result = 0;
                string action = cond.args.FirstOrDefault() as string;
                int    x, y;
                GetData.getItemFromEQWindowPosition(out x, out y, Constants.ShieldXOffset, Constants.ShieldYOffset);
                bool wasHealerEnabled = ModulesManager.healer.working;

                int timeToSleep = 350;
                for (int i = 0; i < 5; i++) //nr of tries
                {
                    ModulesManager.HealerDisable();

                    KeyboardSimulator.Press(action);
                    Thread.Sleep(timeToSleep);
                    MouseSimulator.click(x, y);
                    Thread.Sleep(timeToSleep);
                    result = GetData.GetCountFromServerInfo();

                    if (wasHealerEnabled)
                    {
                        ModulesManager.HealerEnable();
                    }

                    GetData.clearLastServerInfo();

                    if (result != -1)
                    {
                        break;
                    }
                    timeToSleep += 40;
                }
                if (result == -1)
                {
                    result = 0;
                }

                return(result);
            }
            else if (itemType == StatementType.conditionElement["Value"])
            {
                return((int)arg);
            }
            else if (itemType == StatementType.conditionElement["HP"])
            {
                return(GetData.MyHP);
            }
            else if (itemType == StatementType.conditionElement["Mana"])
            {
                return(GetData.MyMana);
            }
            return(-1);
        }
Exemple #4
0
 private void HealerDisable(object sender, RoutedEventArgs e)
 {
     ModulesManager.HealerDisable();
 }