private async Task <bool> Completed() { EntryPortals.AddEntryPortal(); await Coroutine.Sleep(1000); _isDone = true; return(false); }
public static void GameEvents_OnWorldChanged(object sender, EventArgs e) { if (!Adventurer.IsAdventurerTagRunning()) { Logger.Debug("[BotEvents] Reseting the grids."); ScenesStorage.Reset(); } WorldChangeTime = PluginTime.CurrentMillisecond; Logger.Debug("[BotEvents] World has changed to WorldId: {0} LevelAreaSnoIdId: {1}", AdvDia.CurrentWorldId, AdvDia.CurrentLevelAreaId); EntryPortals.AddEntryPortal(); }
public static Vector3 TryFindObjectivePosition(IList <ObjectiveActor> objectives, int searchRadius, out ObjectiveActor foundObjective) { var objectiveMarkers = new HashSet <int>(objectives.Select(o => o.MarkerNameHash)); var miniMapMarker = AdvDia.CurrentWorldMarkers .FirstOrDefault(m => objectiveMarkers.Contains(m.NameHash) && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash)); if (miniMapMarker != null) { foundObjective = objectives.FirstOrDefault(o => o.MarkerNameHash == miniMapMarker.Id); return(miniMapMarker.Position); } foundObjective = null; return(Vector3.Zero); }
public static TrinityMarker ScanForMarker(WorldMarkerType type, int searchRadius) { return(Core.Markers.FirstOrDefault(m => m.MarkerType == type && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash))); }
public static TrinityMarker ScanForMarker(int markerNameHash, WorldMarkerType type, int searchRadius) { return(Core.Markers.Where(m => m.NameHash == markerNameHash && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash)).OrderByDescending(a => a.MarkerType == type).FirstOrDefault()); }
public static Vector3 ScanForRiftExitMarkerLocation(int searchRadius = 2000) { var marker = Core.Markers.FirstOrDefault(m => m.MarkerType == WorldMarkerType.QuestSceneEntrance || m.MarkerType == WorldMarkerType.RiftPortalForward && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash)); return(marker?.Position ?? Vector3.Zero); }
public static Vector3 ScanForMarkerLocation(WorldMarkerType type, int searchRadius) { var marker = Core.Markers.FirstOrDefault(m => m.MarkerType == type && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash)); return(marker?.Position ?? Vector3.Zero); }
public static Vector3 ScanForMarkerLocation(int markerNameHash, int searchRadius) { var miniMapMarker = AdvDia.CurrentWorldMarkers .FirstOrDefault(m => m.NameHash == markerNameHash && m.Position.Distance2D(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash)); if (miniMapMarker != null) { return(miniMapMarker.Position); } return(Vector3.Zero); }
public static TrinityMarker ScanForMarker(string name, int searchRadius) { return(Core.Markers.FirstOrDefault(m => m.Name.ToLowerInvariant().Contains(name.ToLowerInvariant()) && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash))); }
public static Vector3 ScanForMarkerLocation(string name, int searchRadius) { var marker = Core.Markers.FirstOrDefault(m => m.Name.ToLowerInvariant().Contains(name.ToLowerInvariant()) && m.Position.Distance(AdvDia.MyPosition) <= searchRadius && !EntryPortals.IsEntryPortal(AdvDia.CurrentWorldDynamicId, m.NameHash)); return(marker?.Position ?? Vector3.Zero); }
protected override void OnWorldChanged(ChangeEventArgs <SNOWorld> args) { PluginEvents.WorldChangeTime = PluginTime.CurrentMillisecond; Core.Logger.Debug("[BotEvents] World has changed to WorldId: {0} LevelAreaSnoIdId: {1}", ZetaDia.Globals.WorldSnoId, ZetaDia.CurrentLevelAreaSnoId); EntryPortals.AddEntryPortal(); }