Exemplo n.º 1
0
        internal static void DoAllocations(this CustomAllocation allocation)
        {
            if (!Settings.GlobalEnabled)
            {
                return;
            }

            if (allocation.IsAllocationRunning)
            {
                return;
            }
            try
            {
                var originalInput = Main.Character.energyMagicPanel.energyMagicInput;

                allocation.IsAllocationRunning = true;

                if (Settings.ManageNGUDiff)
                {
                    allocation.SwapNGUDiff();
                }
                if (Settings.ManageGear)
                {
                    allocation.EquipGear();
                }
                if (Settings.ManageEnergy)
                {
                    allocation.AllocateEnergy();
                }
                if (Settings.ManageMagic)
                {
                    allocation.AllocateMagic();
                }
                if (Settings.ManageR3)
                {
                    allocation.AllocateR3();
                }

                if (Settings.ManageDiggers && Main.Character.buttons.diggers.interactable)
                {
                    allocation.EquipDiggers();
                    DiggerManager.RecapDiggers();
                }

                if (Settings.ManageWandoos && Main.Character.buttons.wandoos.interactable)
                {
                    allocation.SwapOS();
                }

                Main.Character.energyMagicPanel.energyRequested.text = originalInput.ToString();
                Main.Character.energyMagicPanel.validateInput();
            }
            finally
            {
                allocation.IsAllocationRunning = false;
            }
        }
Exemplo n.º 2
0
        void QuickStuff()
        {
            //Turn on autoattack if we're in ITOPOD and its not on
            if (Settings.AutoQuestITOPOD && Character.adventureController.zone >= 1000 && !Character.adventure.autoattacking && !Settings.CombatEnabled)
            {
                Character.adventureController.idleAttackMove.setToggle();
            }

            if (Settings.AutoFight)
            {
                var needsAllocation = false;
                var bc = Character.bossController;
                if (!bc.isFighting && !bc.nukeBoss)
                {
                    if (Character.bossID == 0)
                    {
                        needsAllocation = true;
                    }

                    if (bc.character.attack / 5.0 > bc.character.bossDefense && bc.character.defense / 5.0 > bc.character.bossAttack)
                    {
                        bc.startNuke();
                    }
                    else
                    {
                        if (bc.character.attack > (bc.character.bossDefense * 1.4) && bc.character.defense > bc.character.bossAttack * 1.4)
                        {
                            bc.beginFight();
                            bc.stopButton.gameObject.SetActive(true);
                        }
                    }
                }

                if (needsAllocation)
                {
                    if (Settings.ManageGear)
                    {
                        _profile.EquipGear();
                    }
                    if (Settings.ManageEnergy)
                    {
                        _profile.AllocateEnergy();
                    }
                    if (Settings.ManageMagic)
                    {
                        _profile.AllocateMagic();
                    }
                    if (Settings.ManageDiggers && Character.buttons.diggers.interactable)
                    {
                        _profile.EquipDiggers();
                        DiggerManager.RecapDiggers();
                    }

                    if (Settings.ManageR3 && Character.buttons.hacks.interactable)
                    {
                        _profile.AllocateR3();
                    }

                    if (Settings.ManageWandoos && Character.buttons.wandoos.interactable)
                    {
                        _profile.SwapOS();
                    }
                }
            }

            if (Settings.AutoMoneyPit)
            {
                MoneyPitManager.CheckMoneyPit();
            }

            if (Settings.AutoSpin)
            {
                MoneyPitManager.DoDailySpin();
            }

            if (Settings.AutoQuestITOPOD)
            {
                MoveToITOPOD();
            }

            if (Settings.AutoSpellSwap)
            {
                var spaghetti   = (Character.bloodMagicController.lootBonus() - 1) * 100;
                var counterfeit = ((Character.bloodMagicController.goldBonus() - 1)) * 100;
                var number      = Character.bloodMagic.rebirthPower;
                Character.bloodMagic.rebirthAutoSpell = Settings.BloodNumberThreshold >= number;
                Character.bloodMagic.goldAutoSpell    = Settings.CounterfeitThreshold >= counterfeit;
                Character.bloodMagic.lootAutoSpell    = Settings.SpaghettiThreshold >= spaghetti;
                Character.bloodSpells.updateGoldToggleState();
                Character.bloodSpells.updateLootToggleState();
                Character.bloodSpells.updateRebirthToggleState();
            }
        }