// To Kalimdor public static void HordeEKToKalimdor() { if (Usefuls.ContinentId == (int)ContinentId.Azeroth) { GoToTask.ToPosition(tirisfalPlatformZepOrgrimmar); WaitForTransport(ZeppelinTirisfalToOrgrimmarId, 15); GoToTask.ToPosition(insideZeppelinTirisfalToOrgrimmar, 1); WaitOnTransport(kalimdorlPlatformZepTirisfal, 15, ContinentId.Kalimdor); } }
// ******************************** HORDE ******************************** // ********** FROM EK ********** // To Outland public static void HordeEKToOutland() { if (Usefuls.ContinentId == (int)ContinentId.Azeroth) { GoToTask.ToPosition(new Vector3(-11920.39, -3206.81, -15.35475f)); Thread.Sleep(5000); GoToTask.ToPosition(new Vector3(-182.5485, 1023.459, 54.23014)); Thread.Sleep(5000); } }
// To Northrend public static void HordeKalimdorToNorthrend() { if (Usefuls.ContinentId == (int)ContinentId.Kalimdor) { // first go down the tower GoToTask.ToPosition(new Vector3(1168.775, -4164.387, 22.71999)); // then almost all the way up the tower GoToTask.ToPosition(new Vector3(1166.608, -4157.879, 49.74893)); GoToTask.ToPosition(kalimdorlPlatformZepNorthrend, 0, true); WaitForTransport(ZeppelinKalidmdorToNorthrendId, 30); GoToTask.ToPosition(insideZeppelinKalimdorToNorthrend, 1); WaitOnTransport(northrendPlatformZepKalimdor, 25, ContinentId.Northrend); } }
// Token: 0x06000017 RID: 23 private static void discoverTaxi(FlightMasterDB flightMasterToDiscover) { FNVFlightMasterSettings.Load(); Main.fillDB(); if (GoToTask.ToPosition(flightMasterToDiscover.position, 3.5f, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore)) { GoToTask.ToPosition(flightMasterToDiscover.position, 3.5f, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore); if (GoToTask.ToPositionAndIntecractWithNpc(flightMasterToDiscover.position, flightMasterToDiscover.NPCId, -1, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false)) { wManagerSetting.ClearBlacklistOfCurrentProductSession(); GoToTask.ToPositionAndIntecractWithNpc(flightMasterToDiscover.position, flightMasterToDiscover.NPCId, -1, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false); if (ObjectManager.Me.IsMounted) { MountTask.DismountMount(false, false, 100); } Usefuls.SelectGossipOption(GossipOptionsType.taxi); Thread.Sleep(Usefuls.Latency + 1500); while (Main._updateNodes) { Logging.Write("[tbcFlightMaster]: Taxi node update in progress..."); Thread.Sleep(10000); } Logging.Write("[tbcFlightMaster]: Flight Master " + flightMasterToDiscover.name + " discovered"); flightMasterToDiscover.alreadyDiscovered = true; FNVFlightMasterSettings.flightMasterSaveChanges(flightMasterToDiscover, true); Thread.Sleep(Usefuls.Latency * 5); Main.timer = 0; Main.discoverTaxiNode = null; Main._taxiToDiscover = false; Main._discoverInProessing = false; Main._discoverTaxiTimer = true; Main.Reenable(); return; } } Main._discoverInProessing = false; }
// Token: 0x06000016 RID: 22 private static void takeTaxi(FlightMasterDB from, FlightMasterDB to) { if (GoToTask.ToPosition(from.position, 3.5f, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore)) { if (GoToTask.ToPositionAndIntecractWithNpc(from.position, from.NPCId, -1, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false)) { while (!ObjectManager.Me.IsOnTaxi) { if (ObjectManager.Me.IsMounted) { MountTask.DismountMount(false, false, 100); } Usefuls.SelectGossipOption(GossipOptionsType.taxi); Thread.Sleep(Usefuls.Latency + 1500); while (Main._updateNodes) { Logging.Write("[tbcFlightMaster]: Taxi node update in progress, waiting..."); Thread.Sleep(10000); } int num = Lua.LuaDoString <int>("for i=0,30 do if string.find(TaxiNodeName(i),\'" + to.name.Replace("'", "\\'") + "\') then return i end end", ""); Lua.LuaDoString("TakeTaxiNode(" + num + ")", false); Logging.Write("[tbcFlightMaster]: Taking Taxi from " + from.name + " to " + to.name); Thread.Sleep(Usefuls.Latency + 500); Keyboard.DownKey(Memory.WowMemory.Memory.WindowHandle, Keys.Escape); Thread.Sleep(Usefuls.Latency + 2500); if (!ObjectManager.Me.IsOnTaxi) { GoToTask.ToPositionAndIntecractWithNpc(from.position, from.NPCId, -1, false, (object context) => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false); } } if (ObjectManager.Me.IsOnTaxi) { Main.waitFlying(to.name); } } } }
public static void LoadNewProfile(string profession, string profileName) { Profile = new GrinderProfile(); string filePath = Application.StartupPath + "\\Profiles\\Wholesome Professions\\" + profileName; Bot.ProfileName = profileName; // If grinder School Load Profile if (!string.IsNullOrWhiteSpace(profileName) && File.Exists(filePath)) { Profile = XmlSerializer.Deserialize <GrinderProfile>(filePath); if (Profile.GrinderZones.Count <= 0) { Logger.Log($"Profile '{filePath}' seems incorrect. Please use a Grinder profile."); UnloadCurrentProfile(); return; } else { Logger.Log("Profile loaded"); } } else { Logger.LogLineBroadcastImportant($"Profile file '{filePath}' not found"); UnloadCurrentProfile(); return; } SelectZone(); // Black List: var blackListDic = Profile.GrinderZones.SelectMany(zone => zone.BlackListRadius).ToDictionary(b => b.Position, b => b.Radius); //wManager.wManagerSetting.AddRangeBlackListZone(blackListDic); // Add Npc foreach (var zone in Profile.GrinderZones) { NpcDB.AddNpcRange(zone.Npc); } // Go to first hotspot or travel if (Profile.GrinderZones.Count > 0) { string zoneName = Profile.GrinderZones[ZoneIdProfile].Name; int continentId = TravelHelper.GetContinentFromZoneName(zoneName); Logger.LogDebug($"Zone {zoneName} is on continent {continentId.ToString()}"); if (continentId == -1) { Logger.LogLineBroadcastImportant($"ERROR : The zone name {zoneName} from your profile is incorrect. Please use default zone names."); UnloadCurrentProfile(); return; } if (continentId != Usefuls.ContinentId) { Logger.Log($"{Profile.GrinderZones[ZoneIdProfile].Name} is on another continent ({continentId}). Launching traveler."); Bot.SetContinent((ContinentId)continentId); return; } Bot.ProfileProfession = profession; Logger.Log($"Heading to first spot {Profile.GrinderZones[ZoneIdProfile].Vectors3[0]} in {Profile.GrinderZones[ZoneIdProfile].Name}"); Broadcaster.autoBroadcast = false; Broadcaster.BroadCastSituation(); GoToTask.ToPosition(Profile.GrinderZones[ZoneIdProfile].Vectors3[0], 50); Broadcaster.autoBroadcast = true; } else { Logger.LogDebug("No grinder zone found"); UnloadCurrentProfile(); } }
public static bool GoInteractwithFM(FlightMaster fm, bool openMapRequired = false) { if (GoToTask.ToPosition(fm.Position, 5f)) { if (!Main.isLaunched || !Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause || ObjectManager.Me.Position.DistanceTo(fm.Position) > 10f) { return(false); } // We're in fight (possibly on mount) if (ObjectManager.Me.InCombatFlagOnly) { if (ObjectManager.Me.IsMounted) { MountTask.DismountMount(); } return(false); } // We have reached the FM if (ObjectManager.Me.IsMounted) { MountTask.DismountMount(); } // Check if FM is here or dead WoWUnit nearbyFM = FindNearbyAliveFM(fm); if (nearbyFM == null) { fm.Disable("FlightMaster is absent or dead."); ResetFlags(); return(false); } // Approach FM if (!GoToTask.ToPosition(nearbyFM.Position, 1f)) { return(false); } Interact.InteractGameObject(ObjectManager.GetWoWUnitByEntry(fm.NPCId).First().GetBaseAddress); // Check if interaction successful if (!InteractWithFm(fm)) { fm.Disable("Unable to interact with NPC"); ResetFlags(); return(false); } Usefuls.SelectGossipOption(GossipOptionsType.taxi); // Check if map open if (openMapRequired && !FmMapIsOpen(fm)) { fm.Disable("Unable to open FM map"); ResetFlags(); return(false); } return(true); } // We haven't reach the FM yet return(false); }