Example #1
0
        public override async Task <bool> InGameTask()
        {
            // Returning True => go to next tick immediately, execution starts again from top of the tree.
            // Returning False => allow execution to continue to lower hooks. Such as profiles, Adventurer.

            if (!AutoFollow.CurrentLeader.IsValid)
            {
                return(false);
            }

            //if (!Service.IsConnected || AutoFollow.NumberOfConnectedBots == 0)
            //    return false;

            if (Player.IsInTown && AdvDia.CurrentWorldId != ExplorationData.ActHubWorldIds[Act.A1])
            {
                return(!await WaypointCoroutine.UseWaypoint(WaypointFactory.ActHubs[Act.A1]));
            }

            if (Player.IsFollower)
            {
                if (await Party.LeaveWhenInWrongGame())
                {
                    return(true);
                }
            }

            if (await Coordination.WaitForGameStartDelay())
            {
                return(true);
            }

            if (await Coordination.WaitBeforeStartingRift())
            {
                return(true);
            }

            if (await Coordination.WaitAfterChangingWorlds())
            {
                return(true);
            }

            if (await WaitForGemUpgraded())
            {
                return(true);
            }
            return(false);
        }
Example #2
0
        public override async Task <bool> InGameTask()
        {
            // Returning True => go to next tick immediately, execution starts again from top of the tree.
            // Returning False => allow execution to continue to lower hooks. Such as profiles, Adventurer.

            if (!AutoFollow.CurrentLeader.IsValid)
            {
                return(false);
            }

            if (!Service.IsConnected || AutoFollow.NumberOfConnectedBots == 0)
            {
                return(false);
            }

            if (await Coordination.WaitForGameStartDelay())
            {
                return(true);
            }

            if (await Coordination.WaitBeforeStartingRift())
            {
                return(true);
            }

            if (await Coordination.WaitAfterChangingWorlds())
            {
                return(true);
            }

            if (Player.IsFollower)
            {
                if (await Party.LeaveWhenInWrongGame())
                {
                    return(true);
                }
            }

            if (await WaitForGemUpgraded())
            {
                return(true);
            }

            return(false);
        }