Пример #1
0
        public Loot(Core c, Preferences p)
        {
            prefs = p;
            core = c;

            thread = new Thread(LootThread);
            thread.Start();
        }
Пример #2
0
        public void LoadSettings()
        {
            core.Log("Loading settings", System.Drawing.Color.Green);

            if (File.Exists(Application.StartupPath + ("\\ArcheGrinder"+core.me.name+".xml")))
            {
                XmlSerializer mySerializer = new XmlSerializer(typeof(Preferences));
                FileStream myFileStream = new FileStream(Application.StartupPath + "\\ArcheGrinder"+core.me.name+".xml", FileMode.Open);

                prefs = (Preferences)mySerializer.Deserialize(myFileStream);
            }

            lootCompassion.Checked = prefs.lootCompassion;
            lootConviction.Checked = prefs.lootConviction;
            lootCourage.Checked = prefs.lootCourage;
            lootFortitude.Checked = prefs.lootFortitude;
            lootHonor.Checked = prefs.lootHonor;
            lootLoyalty.Checked = prefs.lootLoyalty;
            lootSacrifice.Checked = prefs.lootSacrifice;

            lootDivineClothGear.Checked = prefs.lootDivineClothGear;
            lootDivineLeatherGear.Checked = prefs.lootDivineLeatherGear;
            lootDivinePlateGear.Checked = prefs.lootDivinePlateGear;
            lootHauntedChest.Checked = prefs.lootHauntedChest;

            lootEternalLibraryWeapon.Checked = prefs.lootEternalLibraryWeapon;
            lootEternalLibraryArmor.Checked = prefs.lootEternalLibraryArmor;
            lootEternalLibraryTome.Checked = prefs.lootEternalLibraryTome;
            lootAyanad.Checked = prefs.lootAyanad;
            lootDisciplesTear.Checked = prefs.lootDisciplesTear;
            lootEnchantedSkein.Checked = prefs.lootEnchantedSkein;

            lootStolenBag.Checked = prefs.lootStolenBag;
            lootScratchedSafe.Checked = prefs.lootScratchedSafe;

            lootUnknown.Checked = prefs.lootUnknown;

            lootDragonChip.Checked = prefs.lootDragonChip;
            lootUnid.Checked = prefs.lootUnid;
            lootPurses.Checked = prefs.lootPurses;
            lootUnknown.Checked = prefs.lootUnknown;

            chkFastTag.Checked = prefs.fastTagging;
            chkHealerMode.Checked = prefs.healerMode;
            chkUseCC.Checked = prefs.useCC;
            chkLoot.Checked = prefs.lootCorpses;
            chkAssist.Checked = prefs.assistMode;

            //open Purses
            chkOpenPurses.Checked = prefs.openPurses;
            chkOpenScratchedSafe.Checked = prefs.OpenScratchedSafe;
            chkOpenStolenBag.Checked = prefs.OpenStolenBag;

            chkPlayDeadMana.Checked = prefs.PlayDeadRegMana;

            chkAutoCombat.Checked = prefs.autoFight;
            chkAutoLoot.Checked = prefs.autoLoot;

            //Buff Monitor Settings
            chkTyrenosIndex.Checked = prefs.UseTyrenosIndex;
            chkGoldenLibraryIndex.Checked = prefs.UseGoldenLibraryIndex;

            chkGreedyDwarvenElixir.Checked = prefs.UseGreedyDwarvenElixir;
            chkStudiousDwarvenElixir.Checked = prefs.UseStudiousDwarvenElixir;
            chkBriskDwarvenElixir.Checked = prefs.UseBriskDwarvenElixir;

            chkHonorBoostTonic.Checked = prefs.UseHonorBoostTonic;
            chkVocationExpertiseTonic.Checked = prefs.UseVocationExpertiseTonic;
            chkXPBoostPotion.Checked = prefs.UseXPBoostPotion;
            chkImmortalXPTonic.Checked = prefs.UseImmortalXPTonic;
            chkLuckyQuicksilverTonic.Checked = prefs.UseQuicksilverTonic;

            chkSpellbookBrickWall.Checked = prefs.UseSpellbookBrickWall;
            chkSpellbookUnstoppableForce.Checked = prefs.UseSpellbookUnstoppableForce;

            chkKingdomHeart.Checked = prefs.UseKingdomHeart;
            chkAncientLibraryRelic.Checked = prefs.UseAncientLibraryRelic;

            textCombatRange.Text = prefs.combatRange.ToString();
            textZoneRadius.Text = prefs.zoneRadius.ToString();

            textMinMP.Text = prefs.minMP.ToString();
            textMinHP.Text = prefs.minHP.ToString();
            textMinMPplayDead.Text = prefs.MinMPplayDead.ToString();

            textPotionCooldown.Text = prefs.potionCooldown.ToString();
            textFoodCooldown.Text = prefs.foodCooldown.ToString();
            textFoodHP.Text = prefs.foodHP;
            textFoodMP.Text = prefs.foodMP;
            textPotionHP.Text = prefs.potionHP;
            textPotionMP.Text = prefs.potionMP;

            boxIgnoreList.Text = "";
            foreach (string mob in prefs.ignoredMobs)
                if(mob.Length > 0)
                    boxIgnoreList.Text += mob + "\n";

            dropdownFlute.SelectedIndex = 0;
            dropdownLute.SelectedIndex = 0;
            dropdownPet.SelectedIndex = 0;

            for (int i = 0; i < dropdownFlute.Items.Count; i++)
            {
                if ((dropdownFlute.Items[i] as ComboBoxItem).Value == prefs.fluteId)
                {
                    dropdownFlute.SelectedIndex = i;
                    break;
                }
            }

            for (int i = 0; i < dropdownLute.Items.Count; i++)
            {
                if ((dropdownLute.Items[i] as ComboBoxItem).Value == prefs.luteId)
                {
                    dropdownLute.SelectedIndex = i;
                    break;
                }
            }

            for (int i = 0; i < dropdownPet.Items.Count; i++)
            {
                if ((dropdownPet.Items[i] as ComboBoxItem).Value == prefs.petId)
                {
                    dropdownPet.SelectedIndex = i;
                    break;
                }
            }

            chkDebugBuffs.Checked = prefs.debugBuffs;
        }
Пример #3
0
        public void SetCore(Core core)
        {
            this.core = core;

            prefs = new Preferences();
            purseList = new List<uint>() { 29203, 35462, 35469, 29204, 35463, 35470, 29205, 35464, 35471, 29206, 35465, 35472, 29207, 35466, 35473, 35461, 34853, 35474, 34915, 35467, 35476, 32059, 34281, 35475, 34916, 35468, 35477 };
            tokenList = new List<uint>() { 26056, 26055, 35525, 26057, 26053, 26054, 26058, 29612 };

            // scan inventory for flute/lute/pets and add them to the dropdown
            dropdownFlute.Items.Add(new ComboBoxItem("Don't use flute", 0));
            dropdownLute.Items.Add(new ComboBoxItem("Don't use lute", 0));
            dropdownPet.Items.Add(new ComboBoxItem("Don't use a pet", 0));

            List<Item> inventory = core.getAllInvItems();
            inventory.AddRange(core.me.getAllEquipedItems());

            foreach (Item item in inventory)
            {
                if (item.weaponType == WeaponType.TubeInstrument)
                    dropdownFlute.Items.Add(new ComboBoxItem(item.name, item.id));

                else if (item.weaponType == WeaponType.StringInstument)
                    dropdownLute.Items.Add(new ComboBoxItem(item.name, item.id));

                else if (item.mountLevel > 0)
                    dropdownPet.Items.Add(new ComboBoxItem(item.name, item.id));
            }

            LoadSettings();

            btnCheckPots_Click();

            if (prefs.autoLoot)
                btnLoot_Click();

            if (prefs.autoFight)
                btnCombat_Click();

            core.onKeyDown += core_onKeyDown;
            core.onExpChanged += core_onExpChanged;
            core.onNewInvItem += core_onNewInvItem;
            core.onCreatureDied += core_onCreatureDied;
        }
Пример #4
0
        public Combat(Core c, Preferences p)
        {
            prefs = p;
            core = c;

            controlDebuffs = new List<uint>() { _BF_BUBBLE_TRAP, _BF_BUBBLE_TRAP2, _BF_FOCAL_CONCUSSION,
                _BF_EARTHEN_GRIP, _BF_METEOR_IMPACT };
            debugBuffId = new List<uint>();

            thread = new Thread(CombatThread);
            thread.Start();
        }