protected override async Task <bool> Main() { await CommonTasks.HandleLoading(); if (FateActive) { if (NeoProfileManager.CurrentGrindArea == null && ThisFate.Within2D(Core.Player.Location) && await CreateGrindArea()) { return(true); } if (NeoProfileManager.CurrentGrindArea != null) { if (await MoveAndStop(ThisFate.Location, ThisFate.Radius / 5f, $"Moving to {ThisFate.Name}.", true)) { return(true); } if (ThisFate.Within2D(Core.Player.Location) && !Core.Player.IsLevelSynced && ThisFate.MaxLevel < Core.Player.ClassLevel) { RemoteWindows.ToDoList.LevelSync(); await Coroutine.Wait(1000, () => Core.Player.IsLevelSynced); } return(await CommonTasks.ExecuteCoroutine(new HookExecutor("HotspotPoi"))); } } else if (await MoveAndStop(Destination, Distance * Distance, "Moving to Hotspot", true, (ushort)MapId, MountDistance)) { return(true); } return(false); }
protected override async Task Main() { await CommonTasks.HandleLoading(); await GoThere(); if (FateActive) { if (NeoProfileManager.CurrentGrindArea == null) { if (ThisFate.Within2D(Me.Location)) { await CreateGrindArea(); NeoProfileManager.CurrentGrindArea = FateGrindArea; // Debug foreach (var mob in FateGrindArea.TargetMobs) { Log("Added NpcId {0} with Weight {1} to the GrindArea.", mob.Id, mob.Weight); } } else { await MoveAndStop(ThisFate.Location, ThisFate.Radius / 5f, "Moving to " + ThisFate.Name); } } else { if (ThisFate.Within2D(Me.Location) && !Me.IsLevelSynced && ThisFate.MaxLevel < Me.ClassLevel) { RemoteWindows.ToDoList.LevelSync(); await Coroutine.Wait(1000, () => Me.IsLevelSynced); } if (NeoProfileManager.CurrentGrindArea == FateGrindArea) { await HookExecutor(); } } } else { await MoveAndStop(Destination, Distance *Distance, "Moving to Hotspot"); } }