protected override void Script()
        {
            Scaling.Init();

            new Location(1400, 1120).Click();
            new Location(1600, 1120).Click();

            while (true)
            {
                new Location(1600, 1420).Click();
                new Location(1600, 1120).Click();
                AutomataApi.Wait(3);

                AutomataApi.ContinueClick(new Location(1600, 1300), 15);
                AutomataApi.Wait(0.5);
            }
        }
Exemple #2
0
        // Click through reward screen, continue if option presents itself, otherwise continue clicking through
        void Result()
        {
            // Validator document https://github.com/29988122/Fate-Grand-Order_Lua/wiki/In-Game-Result-Screen-Flow for detail.
            AutomataApi.ContinueClick(Game.ResultNextClick, 55);

            // Checking if there was a Bond CE reward
            if (Game.ResultCeRewardRegion.Exists(ImageLocator.Bond10Reward))
            {
                if (Preferences.Instance.StopAfterBond10)
                {
                    throw new ScriptExitException("Bond 10 CE GET!");
                }

                Game.ResultCeRewardCloseClick.Click();

                // Still need to proceed through reward screen.
                AutomataApi.ContinueClick(Game.ResultNextClick, 35);
            }

            AutomataApi.Wait(5);

            // Friend request dialogue. Appears when non-friend support was selected this battle. Ofc it's defaulted not sending request.
            if (Game.ResultFriendRequestRegion.Exists(ImageLocator.FriendRequest))
            {
                Game.ResultFriendRequestRejectClick.Click();
            }

            AutomataApi.Wait(1);

            // Only for JP currently. Searches for the Continue option after select Free Quests
            if (Preferences.Instance.GameServer == GameServer.Jp && Game.ContinueRegion.Exists(ImageLocator.Confirm))
            {
                // Needed to show we don't need to enter the "StartQuest" function
                _isContinuing = true;

                // Pressing Continue option after completing a quest, reseting the state as would occur in "Menu" function
                Game.ContinueClick.Click();
                _battle.ResetState();

                AutomataApi.Wait(1.5);

                // If Stamina is empty, follow same protocol as is in "Menu" function Auto refill.
                while (Game.StaminaScreenRegion.Exists(ImageLocator.Stamina))
                {
                    RefillStamina();
                }

                return;
            }

            // Post-battle story is sometimes there.
            if (Preferences.Instance.StorySkip)
            {
                if (Game.MenuStorySkipRegion.Exists(ImageLocator.StorySkip))
                {
                    Game.MenuStorySkipClick.Click();
                    AutomataApi.Wait(0.5);
                    Game.MenuStorySkipYesClick.Click();
                }
            }

            AutomataApi.Wait(10);

            // Quest Completion reward. Exits the screen when it is presented.
            if (Game.ResultCeRewardRegion.Exists(ImageLocator.Bond10Reward))
            {
                Game.ResultCeRewardCloseClick.Click();
                AutomataApi.Wait(1);
                Game.ResultCeRewardCloseClick.Click();
            }

            AutomataApi.Wait(5);

            // 1st time quest reward screen, eg. Mana Prisms, Event CE, Materials, etc.
            if (Game.ResultQuestRewardRegion.Exists(ImageLocator.QuestReward))
            {
                AutomataApi.Wait(1);
                Game.ResultNextClick.Click();
            }
        }
Exemple #3
0
 void Spin()
 {
     AutomataApi.ContinueClick(SpinClick, 480);
 }