/// <summary> /// Taken from singulars PVP helper function file, and then modified /// </summary> /// <param name="unit"></param> protected void TargetUnit(WoWUnit unit) { Logging.Write("Targeting " + unit.Name); WoWMovement.ConstantFace(unit.Guid); BotPoi.Current = new BotPoi(unit, PoiType.Kill); Tar(unit); }
protected override Composite CreateBehavior() { return(_root ?? (_root = new PrioritySelector( new Decorator(ret => me.QuestLog.GetQuestById(26058) != null && me.QuestLog.GetQuestById(26058).IsCompleted, new Sequence( new Action(ret => TreeRoot.StatusText = "Finished!"), new Action(ret => Lua.DoString("VehicleExit()")), new WaitContinue(120, new Action(delegate { _isDone = true; return RunStatus.Success; })) )), new Decorator(ret => !InVehicle, new Action(ret => { if (Turret.Count > 0 && Turret[0].Location.Distance(me.Location) <= 5) { WoWMovement.MoveStop(); Turret[0].Interact(); } else if (Turret.Count > 0 && Turret[0].Location.Distance(me.Location) > 5) { Navigator.MoveTo(Turret[0].Location); } } )), new Action(ret => { Lua.DoString("CastPetAction({0})", 1); if (mob1List.Count == 0) { return; } mob1List[0].Target(); while (me.CurrentTarget != null && me.CurrentTarget.IsAlive && me.CurrentTarget.X > 935 && me.CurrentTarget.Y > 5) { WoWMovement.ConstantFace(me.CurrentTarget.Guid); angle = (me.CurrentTarget.Z - me.Z) / (me.CurrentTarget.Location.Distance(me.Location)); CurentAngle = Lua.GetReturnVal <double>("return VehicleAimGetAngle()", 0); if (CurentAngle < angle) { Lua.DoString(string.Format("VehicleAimIncrement(\"{0}\")", (angle - CurentAngle))); } if (CurentAngle > angle) { Lua.DoString(string.Format("VehicleAimDecrement(\"{0}\")", (CurentAngle - angle))); } Lua.DoString("CastPetAction({0})", 1); } } ) ) )); }
private void Tar(WoWUnit tar) { if (Styx.BotManager.Current.Name != "LazyRaider") { tar.Target(); WoWMovement.ConstantFace(tar.Guid); } }
private void Tar(WoWUnit tar) { if (Manual) { tar.Target(); WoWMovement.ConstantFace(tar.Guid); } }
public bool HeadingSet(WoWObject wowObject) { if (Query.IsInVehicle() && Query.IsViable(wowObject)) { // ClickToMoveInfo.InteractGuid contains the GUID of the wowObject that player is auto-facing // We don't want to spam ConstantFace since that causes issues. if (WoWMovement.ClickToMoveInfo.InteractGuid != wowObject.Guid) { WoWMovement.ConstantFace(wowObject.Guid); } return(true); } WoWMovement.StopFace(); return(false); }
protected override Composite CreateBehavior() { return(_root ?? (_root = new PrioritySelector( new Decorator(ret => me.QuestLog.GetQuestById(28454) != null && me.QuestLog.GetQuestById(28454).IsCompleted, new Sequence( new Action(ret => TreeRoot.StatusText = "Finished!"), new Action(ret => Lua.DoString("CastPetAction({0})", 5)), new WaitContinue(120, new Action(delegate { _isDone = true; return RunStatus.Success; })) )), new Decorator(ret => !Obj1Done && mob1List.Count > 0, new Action(ret => { if (mob1List.Count == 0) { return; } mob1List[0].Target(); while (me.CurrentTarget != null && mob1List.Count > 0 && me.CurrentTarget.Guid == mob1List[0].Guid && me.CurrentTarget.IsAlive) { WoWMovement.ConstantFace(me.CurrentTarget.Guid); angle = -((me.Z - me.CurrentTarget.Z) / (me.CurrentTarget.Location.Distance(me.Location))) + ((me.CurrentTarget.Location.Distance2D(me.Location) - 20) / me.CurrentTarget.Location.Distance(me.Location) / 10); CurentAngle = Lua.GetReturnVal <double>("return VehicleAimGetAngle()", 0); if (CurentAngle < angle) { Lua.DoString(string.Format("VehicleAimIncrement(\"{0}\")", (angle - CurentAngle))); } if (CurentAngle > angle) { Lua.DoString(string.Format("VehicleAimDecrement(\"{0}\")", (CurentAngle - angle))); } Lua.DoString("CastPetAction(1)"); } } )) ) )); }
public override void Pulse() { #region Disable if Alliance /*if (Me.IsAlliance) { * hlog("This plugin is not meant for Alliance (yet!) Disabling."); * PluginContainer plugin = PluginManager.Plugins.FirstOrDefault(p => p.Name.ToLower().Contains("azenius".ToLower())); * * if(plugin != null) { * plugin.Enabled =! plugin.Enabled; * hlog("Successfuly disabled. Goodbye!"); * } else { * hlog("Unable to disable plugin. Weird!"); * } * } */ #endregion #region Quest 14239 - Don't Go Into the Light! if (Me.Race == WoWRace.Goblin && Me.HasAura("Near Death!") && Me.ZoneId == 4720 && RessGoblin.Count > 0) { // RessGoblin = Doc Zapnozzle RessGoblin[0].Interact(); Thread.Sleep(1000); Lua.DoString("RunMacroText('/click QuestFrameCompleteQuestButton')"); } #endregion #region Quest 6544 - Torek's Assault if (IsOnQuest(6544) && QuestFailed(6544)) { Me.QuestLog.AbandonQuestById(6544); } #endregion #region Quest 6641 - Vorsha the Lasher // Bot has issues pulling the target. Force it to pull everything if (IsOnQuest(6641)) { if (Me.CurrentTarget == null) { return; } if (Me.CurrentTarget != null && Me.CurrentTarget.CurrentTargetGuid != Me.Guid) { RoutineManager.Current.Pull(); } } #endregion #region Quest 13980 - They're Out There! // Keep Jinx's Goggles (quest item) on during the entirety of the quest if (IsOnQuest(13980) && (Me.MinimapZoneText == "The Skunkworks" || Me.MinimapZoneText == "Talondeep Vale") && !Me.HasAura("Jinx's Elf Detection Ray")) { Lua.DoString("UseItemByName(46776)"); // Jinx's Goggles Thread.Sleep(500); } #endregion #region Quest 14236 - Weed Whacker * // Activate the Weed Whacker and cycle through points until the quest is complete // @TODO - Do we need to disable this aura once the quest is complete? if (!Me.Dead && IsOnQuest(14236)) { WoWPoint wpWeed1 = new WoWPoint(638.7761, 2780.211, 88.81393); WoWPoint wpWeed2 = new WoWPoint(634.825, 2824.758, 87.50606); WoWPoint wpWeed3 = new WoWPoint(684.2277, 2821.671, 86.48402); WoWPoint wpWeed4 = new WoWPoint(646.324, 2859.586, 87.25509); WoWPoint wpWeed5 = new WoWPoint(700.0909, 2848.549, 84.93351); WoWPoint wpWeed6 = new WoWPoint(610.5126, 2908.886, 91.3634); WoWPoint wpWeed7 = new WoWPoint(574.0838, 2886.616, 90.26514); WoWPoint wpWeed8 = new WoWPoint(582.1985, 2797.607, 88.356); WoWPoint wpWeed9 = new WoWPoint(602.7809, 2784.686, 88.45428); while (!Me.HasAura("Weed Whacker")) { Lua.DoString("UseItemByName(49108)"); // Weed Whacker Thread.Sleep(1000); } while (!Me.QuestLog.GetQuestById(14236).IsCompleted) { WoWMovement.ClickToMove(wpWeed1); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed2); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed3); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed4); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed5); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed6); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed7); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed8); Thread.Sleep(20000); WoWMovement.ClickToMove(wpWeed9); Thread.Sleep(20000); } } #endregion #region Quest 24958 - Volcanoth! if (IsOnQuest(24958) && !Me.Dead) { WoWPoint wpTurtle = new WoWPoint(1305.009, 1183.095, 121.1527); while (Me.Location.Distance(wpTurtle) > 5) { Navigator.MoveTo(wpTurtle); Thread.Sleep(500); } if (q24958_Giant_Turtle.Count != 0) { q24958_Giant_Turtle[0].Target(); q24958_Giant_Turtle[0].Face(); } while (IsOnQuest(24958) && Me.CurrentTarget != null && Me.CurrentTarget.IsAlive) { WoWMovement.MoveStop(); Thread.Sleep(100); Lua.DoString("UseItemByName(52043)"); // Bootzooka Thread.Sleep(100); } } #endregion #region Quest 13961 - Drag it Out of Them if (IsOnQuest(13961)) { if (Me.CurrentTargetGuid != 0 && Me.CurrentTarget.Name == "Razormane Pillager" && !Me.HasAura("Dragging a Razormane")) { // Attempt to throw the net to pacify it while (!Me.CurrentTarget.IsFriendly) { Lua.DoString("UseItemByName(46722)"); // Grol'dom Net Thread.Sleep(500); } // Pillager has been caught.. Move towards it // This conditional is theoretically unnecessary... if (Me.CurrentTarget.IsFriendly) { while (Me.CurrentTarget.Distance > 5) { Navigator.MoveTo(Me.CurrentTarget.Location); Thread.Sleep(100); } Me.CurrentTarget.Interact(); Thread.Sleep(500); Lua.DoString("SelectGossipOption(1)"); Thread.Sleep(500); } } } #endregion #region Quest 25165 - Never Trust a Big Barb and a Smile if (IsOnQuest(25165) && !Me.HasAura("Poison Extraction Totem")) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(52505)", 0); // Object has a 15 second cooldown.. Rather long. if (!IsOnCD) { Lua.DoString("UseItemByName(52505)"); // Poison Extraction Totem } } #endregion #region Lashtail Hatchling Quests - 26321, 26325 if (IsOnQuest(26321) || IsOnQuest(23625)) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(58165)", 0); if (!IsOnCD && !Me.HasAura("A Lashtail Hatchling: Hatchling Guardian Aura")) { Lua.DoString("UseItemByName(58165)"); } } #endregion #region Quest 26953 - Zen'Kiki, the Druid if (IsOnQuest(26953) && !Me.HasAura("Zen'Kiki Guardian Aura")) { if (AdrineTowhide.Count > 0 && AdrineTowhide[0].Distance < 5) { AdrineTowhide[0].Interact(); Thread.Sleep(1000); Lua.DoString("SelectGossipOption(1)"); } else if (AdrineTowhide.Count > 0 && AdrineTowhide[0].Distance > 5) { while (AdrineTowhide[0].Distance > 5) { Navigator.MoveTo(AdrineTowhide[0].Location); Thread.Sleep(100); } } else if (AdrineTowhide.Count < 1) { WoWPoint TowHide = new WoWPoint(1796.26, -1684.78, 60.1698); while (Me.Location.Distance(TowHide) > 5) { Navigator.MoveTo(TowHide); Thread.Sleep(100); } } } #endregion #region Quest 26925 - Araj the Summoner if (IsOnQuest(26925) && (StickboneBerserker.Count >= 1)) { if (!ItemOnCooldown(60678)) // Jearl's Hand Grenades { UseQuestItem(60678); LegacySpellManager.ClickRemoteLocation(StickboneBerserker[0].Location); } } #endregion #region Quest 26648 - Our Mortal Enemies if (IsOnQuest(26648)) { if (!ItemOnCooldown(59226) && !Me.HasAura("Dead Eye's Intuition")) { UseQuestItem(59226); // Dead-Eye's Flare Gun } } #endregion #region Quest 14238 - Infrared = Infradead if (IsOnQuest(14238) && !Me.HasAura("Infrared Heat Focals")) { UseIfNotOnCooldown(49611); // Infrared Heat Focals } #endregion #region Quest 27789 - Troggish Troubles * // @TODO - Document the Pet Actions here if (IsOnQuest(27789)) { while (IsOnQuest(27789)) { StonevaultRuffian[0].Target(); WoWMovement.ConstantFace(Me.CurrentTarget.Guid); Lua.DoString("CastPetAction(1)"); StonevaultGoon[0].Target(); WoWMovement.ConstantFace(Me.CurrentTarget.Guid); Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(2)"); } } #endregion #region Quest 27771 - Third Sample: Implanted Eggs // Need to loot eggs which take 10 seconds if (IsOnQuest(27771)) { while (IsOnQuest(27771)) { Lua.DoString("RunMacroText('/cleartarget')"); GlobalTimer.Start(); if (GlobalTimer.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27885 - The Warden's Game if (IsOnQuest(27885)) { WoWPoint wpPawn1 = new WoWPoint(-6970.479, -3439.854, 200.8959); WoWPoint wpPawn2 = new WoWPoint(-6968.06, -3440.255, 200.8969); WoWPoint wpPawn3 = new WoWPoint(-6964.444, -3440.112, 200.8969); WoWPoint wpPawn4 = new WoWPoint(-6961.984, -3439.921, 200.8963); WoWPoint wpPawn5 = new WoWPoint(-6959.851, -3445.163, 201.2538); WoWPoint wpPawn6 = new WoWPoint(-6959.738, -3447.433, 201.6079); WoWPoint wpPawn7 = new WoWPoint(-6964.568, -3450.362, 200.8965); WoWPoint wpPawn8 = new WoWPoint(-6966.959, -3450.602, 200.8965); WoWPoint wpPawn9 = new WoWPoint(-6969.584, -3445.054, 200.8965); WoWPoint wpPawn10 = new WoWPoint(-6969.789, -3442.688, 200.8965); WoWPoint wpPawn11 = new WoWPoint(-6964.177, -3440.75, 200.8958); WoWPoint wpPawn12 = new WoWPoint(-6961.631, -3440.965, 200.8958); WoWPoint wpPawn13 = new WoWPoint(-6960.158, -3445.682, 200.8958); WoWPoint wpPawn14 = new WoWPoint(-6960.385, -3447.647, 200.8958); WoWPoint wpPawn15 = new WoWPoint(-6964.737, -3449.662, 200.8958); WoWPoint wpPawn16 = new WoWPoint(-6967, -3449.534, 200.8955); WoWPoint wpPawn17 = new WoWPoint(-6968.355, -3445.081, 200.8955); WoWPoint wpPawn18 = new WoWPoint(-6968.267, -3442.952, 200.8955); WoWPoint wpPawn19 = new WoWPoint(-6964.177, -3440.75, 200.8958); WoWPoint wpPawn20 = new WoWPoint(-6961.631, -3440.965, 200.8958); WoWPoint wpPawn21 = new WoWPoint(-6960.158, -3445.682, 200.8958); WoWPoint wpPawn22 = new WoWPoint(-6960.385, -3447.647, 200.8958); WoWPoint wpPawn23 = new WoWPoint(-6964.737, -3449.662, 200.8958); WoWPoint wpPawn24 = new WoWPoint(-6967, -3449.534, 200.8955); WoWPoint wpPawn25 = new WoWPoint(-6968.355, -3445.081, 200.8955); WoWPoint wpPawn26 = new WoWPoint(-6968.267, -3442.952, 200.8955); WoWPoint wpPawn27 = new WoWPoint(-6964.177, -3440.75, 200.8958); WoWPoint wpPawn28 = new WoWPoint(-6961.631, -3440.965, 200.8958); WoWPoint wpPawn29 = new WoWPoint(-6960.158, -3445.682, 200.8958); WoWPoint wpPawn30 = new WoWPoint(-6961.002, -3447.482, 200.8966); WoWPoint wpPawn31 = new WoWPoint(-6964.568, -3445.147, 200.8966); while (!Me.QuestLog.GetQuestById(27885).IsCompleted) { WoWMovement.ClickToMove(wpPawn1); Thread.Sleep(3000); WoWMovement.ClickToMove(wpPawn2); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn3); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn4); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn5); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn6); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn7); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn8); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn9); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn10); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn11); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn12); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn13); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn14); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn15); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn16); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn17); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn18); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn19); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn20); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn21); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn22); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn23); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn24); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn25); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn26); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn27); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn28); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn29); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn30); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(wpPawn31); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); } } #endregion #region Quest 27893 - Gargal, the Behemot if (IsOnQuest(27893)) { WoWPoint wpDarkflight1 = new WoWPoint(-6730.564, -2448.625, 272.7784); WoWPoint wpDarkflight2 = new WoWPoint(-6805.746, -2435.204, 272.7776); while (!QuestComplete(27893)) { WoWMovement.ClickToMove(wpDarkflight1); Thread.Sleep(10000); WoWMovement.ClickToMove(wpDarkflight2); Thread.Sleep(13000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(1)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(4)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(8)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(2)"); Thread.Sleep(5000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(5)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(7)"); Thread.Sleep(5000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(1)"); Thread.Sleep(5000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(1)"); } } #endregion #region Quest 27894 - The Wrath of a Dragonflight if (IsOnQuest(27894)) { while (!QuestComplete(27894) && (Kalaran.Count >= 1)) { Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); GlobalTimer.Start(); if (GlobalTimer.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27895 - Their Hunt Continues if (IsOnQuest(27895)) { while (!QuestComplete(27895) && (Moldarr.Count >= 1)) { Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); Lua.DoString("AttackTarget()"); GlobalTimer.Start(); if (GlobalTimer.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27896 - The Sorrow and the Fury if (IsOnQuest(27896)) { while (!QuestComplete(27896) && (Nyxondra.Count >= 1)) { Lua.DoString("RunMacroText('/target Nyxondra')"); Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); GlobalTimer.Start(); if (GlobalTimer.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 28226 - Scrapped Golems if (IsOnQuest(28226)) { if (GossipFrame.Instance.IsVisible) { // If we have two options it means that the Stone Power Core dropped (rare) so select it! if (!QuestObjectiveComplete(28226, 4) && GossipFrame.Instance.GossipOptionEntries.Count > 1) { Lua.DoString("SelectGossipOption(2)"); Thread.Sleep(1000); } else { Lua.DoString("SelectGossipOption(1)"); Thread.Sleep(1000); } } } #endregion #region Quest 26922 -The Endless Flow * // @TODO - Find out why this doesn't check for quest completion if (Me.QuestLog.GetQuestById(26922) != null) { if (StickboneBerserker.Count > 0) // Near StickboneBerserker { StickboneBerserker[0].Target(); Thread.Sleep(500); UseQuestItem(60678); // Jearl's Hand Grenades Thread.Sleep(500); LegacySpellManager.ClickRemoteLocation(StickboneBerserker[0].Location); Thread.Sleep(1000); } if (ScourgeBoneAnimus.Count > 0) { UseQuestItem(60678); // Jearl's Hand Grenades Thread.Sleep(500); LegacySpellManager.ClickRemoteLocation(ScourgeBoneAnimus[0].Location); Thread.Sleep(1000); } } #endregion #region Quest 10129 - Mission: Gateways Murketh and Shaadraz // Use Grenade on Murkey and Shaadraz if (IsOnQuest(10129)) { if (!ItemOnCooldown(28038)) { UseQuestItem(28038); // Seaforium PU-36 Explosive Nether Modulator LegacySpellManager.ClickRemoteLocation(GatewayShaadraz[0].Location); UseQuestItem(28038); LegacySpellManager.ClickRemoteLocation(GatewayMurketh[0].Location); } } #endregion #region Quest 10162 - Mission: The Abyssal Shelf if (IsOnQuest(10162)) { if (!ItemOnCooldown(28132)) // Area 52 Special { if (!QuestObjectiveComplete(10162, 1)) { UseQuestItem(28132); LegacySpellManager.ClickRemoteLocation(MoargOverseer[0].Location); } if (!QuestObjectiveComplete(10162, 2)) { UseQuestItem(28132); LegacySpellManager.ClickRemoteLocation(GanArgPeon[0].Location); } if (!QuestObjectiveComplete(10162, 3)) { UseQuestItem(28132); LegacySpellManager.ClickRemoteLocation(FelCannon[0].Location); } } } #endregion #region Quest 26305 - Saving Yenniku if (IsOnQuest(26305)) { if (TargetingNpc(2530)) // Yenniku { UseQuestItem(3912); // Soul Gem } } #endregion #region Disguise Quests in Burning Steppes 28439, 28440, 28432, 28433, 28434, 28435 // 28439 = I Am the Law and I Am the Lash // 28440 = Abuse of Power // 28432 = Into the Black Tooth Hovel // 28433 = Grunt Work // 28434 = Strategic Cuts // 28435 = The Kodocaller's Horn if (HasQuest(28439) || HasQuest(28440) || HasQuest(28432) || HasQuest(28433) || HasQuest(28434) || HasQuest(28435)) { bool disguiseFound = false; foreach (WoWAura s in ObjectManager.Me.ActiveAuras.Values) { if (s.Name.Contains("Disguise")) { disguiseFound = true; } } if (!disguiseFound) { UseQuestItem(63357); Thread.Sleep(6000); } } #endregion }
protected override Composite CreateBehavior() { return(_root ?? (_root = new PrioritySelector( new Decorator(c => Counter > NumOfTimes, new Action(c => { TreeRoot.StatusText = "Finished!"; if (GoHomeButton > 0) { Lua.DoString("CastPetAction({0})", GoHomeButton); } _isBehaviorDone = true; return RunStatus.Success; }) ), new Decorator(c => NpcVehicleList.Count > 0 && !InVehicle, new Action(c => { if (!NpcVehicleList[0].WithinInteractRange) { Navigator.MoveTo(NpcVehicleList[0].Location); TreeRoot.StatusText = "Moving To Vehicle - " + NpcVehicleList[0].Name + " Yards Away: " + NpcVehicleList[0].Location.Distance(Me.Location); } else { NpcVehicleList[0].Interact(); MountedPoint = Me.Location; } }) ), new Decorator(c => InVehicle && SpellType == 1, new Action(c => { if (NpcList.Count == 0 || NpcList[0].Location.Distance(VehicleList[0].Location) > 15) { TreeRoot.StatusText = "Waiting for Mob to Come Into Range or Appear."; return RunStatus.Running; } else if (NpcList.Count >= 1 && NpcList[0].Location.Distance(VehicleList[0].Location) <= 15) { TreeRoot.StatusText = "Attacking: " + NpcList[0].Name + ", AttackButton: " + AttackButton; NpcList[0].Target(); Lua.DoString("CastPetAction({0})", AttackButton); Thread.Sleep(WaitTime); Counter++; return RunStatus.Success; } return RunStatus.Running; })), new Decorator(c => InVehicle && SpellType == 2, new Action(c => { if (NpcList.Count >= 1) { Thread.Sleep(OftenToUse); TreeRoot.StatusText = "Attacking: " + NpcList[0].Name + ", AttackButton: " + AttackButton + ", Times Used: " + Counter; if ((Counter > NumOfTimes && QuestId == 0) || (Me.QuestLog.GetQuestById((uint)QuestId) != null && Me.QuestLog.GetQuestById((uint)QuestId).IsCompleted&& QuestId > 0)) { Lua.DoString("VehicleExit()"); _isBehaviorDone = true; return RunStatus.Success; } NpcList[0].Target(); Lua.DoString("CastPetAction({0})", AttackButton); LegacySpellManager.ClickRemoteLocation(NpcList[0].Location); Thread.Sleep(WaitTime); Counter++; return RunStatus.Running; } return RunStatus.Running; })), new Decorator(c => InVehicle && SpellType == 3, new PrioritySelector( ret => NpcList.OrderBy(u => u.DistanceSqr).FirstOrDefault(u => Me.Transport.IsSafelyFacing(u)), new Decorator( ret => ret != null, new PrioritySelector( new Decorator( ret => Me.CurrentTarget == null || Me.CurrentTarget != (WoWUnit)ret, new Action(ret => ((WoWUnit)ret).Target())), new Decorator( ret => !Me.Transport.IsSafelyFacing(((WoWUnit)ret), 10), new Action(ret => Me.CurrentTarget.Face())), new Action(ret => { Vector3 v = Me.CurrentTarget.Location - StyxWoW.Me.Location; v.Normalize(); Lua.DoString(string.Format( "local pitch = {0}; local delta = pitch - VehicleAimGetAngle(); VehicleAimIncrement(delta); CastPetAction({1});", Math.Asin(v.Z).ToString(CultureInfo.InvariantCulture), AttackButton)); Thread.Sleep(WaitTime); Counter++; return RunStatus.Success; }))))), new Decorator(c => InVehicle && SpellType == 4, new Action(c => { if (NpcList.Count >= 1) { using (new FrameLock()) { if ((Counter > NumOfTimes && QuestId == 0) || (Me.QuestLog.GetQuestById((uint)QuestId) != null && Me.QuestLog.GetQuestById((uint)QuestId).IsCompleted&& QuestId > 0)) { Lua.DoString("VehicleExit()"); _isBehaviorDone = true; return RunStatus.Success; } NpcList[0].Target(); WoWMovement.ClickToMove(NpcList[0].Location); Lua.DoString("CastPetAction({0})", AttackButton); LegacySpellManager.ClickRemoteLocation(NpcList[0].Location); Counter++; return RunStatus.Running; } } return RunStatus.Running; })), new Decorator(c => InVehicle && SpellType == 5, new Action(c => { if (NpcList.Count >= 1 || NpcListSecondary.Count >= 1) { using (new FrameLock()) { if ((Counter > NumOfTimes && QuestId == 0) || (Me.QuestLog.GetQuestById((uint)QuestId) != null && Me.QuestLog.GetQuestById((uint)QuestId).IsCompleted&& QuestId > 0)) { Lua.DoString("VehicleExit()"); _isBehaviorDone = true; return RunStatus.Success; } if (NpcList.Count > 0) { NpcList[0].Target(); WoWMovement.ConstantFace(Me.CurrentTargetGuid); Lua.DoString("CastPetAction({0})", AttackButton); } if (NpcListSecondary.Count > 0) { NpcListSecondary[0].Target(); WoWMovement.ConstantFace(Me.CurrentTargetGuid); Lua.DoString("CastPetAction({0})", AttackButton); } Lua.DoString("CastPetAction({0})", AttackButton2); if (QuestId == 0) { Counter++; } return RunStatus.Running; } } return RunStatus.Running; })) ))); }
protected override Composite CreateBehavior() { return(_root ?? (_root = new PrioritySelector( // exit vehicle if quest is done. new Decorator(ret => Me.QuestLog.GetQuestById(27232) != null && Me.QuestLog.GetQuestById(27232).IsCompleted, new Sequence( new Action(ret => TreeRoot.StatusText = "Finished!"), new Action(ret => Lua.DoString("VehicleExit()")), new WaitContinue(120, new Action(delegate { _isBehaviorDone = true; return RunStatus.Success; })))), // Get in a vehicle if not in one. new Decorator(ret => !Query.IsInVehicle(), new Sequence( new DecoratorContinue(ret => Turret.Count == 0, new Sequence( new Action(ret => Navigator.MoveTo(_turretLoc)), new Sleep(1000) )), new DecoratorContinue(ret => Turret.Count > 0 && Turret[0].Location.Distance(Me.Location) > 5, new Sequence( new Action(ret => Navigator.MoveTo(Turret[0].Location)), new Sleep(1000) )), new DecoratorContinue(ret => Turret.Count > 0 && Turret[0].Location.Distance(Me.Location) <= 5, new Sequence( new Action(ret => WoWMovement.MoveStop()), new Action(ret => Turret[0].Interact()), new Sleep(1000) )))), new Decorator(ret => MobWorgenList.Count == 0, new Sequence( new Action(ret => WoWMovement.ClickToMove(_firstshot)), new DecoratorContinue(ret => Me.CurrentTarget == null, new Sequence( new Action(ret => WoWMovement.ConstantFace(Me.CurrentTarget.Guid)), new Action(ret => Angle = (_firstshot.Z - Me.Z) / (Me.Location.Distance(_firstshot))), new Action(ret => CurentAngle = Lua.GetReturnVal <double>("return VehicleAimGetAngle()", 0)), new Decorator(ret => CurentAngle < Angle, new Action(ret => Lua.DoString(string.Format("VehicleAimIncrement(\"{0}\")", (Angle - CurentAngle))))), new Decorator(ret => CurentAngle > Angle, new Action(ret => Lua.DoString(string.Format("VehicleAimDecrement(\"{0}\")", (CurentAngle - Angle))))), new Sleep(1000) )))), new Decorator(ret => MobWorgenList.Count > 0, new Sequence( new Action(ret => MobWorgenList[0].Target()), new DecoratorContinue(ret => Me.CurrentTarget != null && Me.CurrentTarget.IsAlive, new Sequence( new Action(ret => WoWMovement.ConstantFace(Me.CurrentTarget.Guid)), new Action(ret => Angle = (Me.CurrentTarget.Z - Me.Z) / (Me.CurrentTarget.Location.Distance(Me.Location))), new Action(ret => CurentAngle = Lua.GetReturnVal <double>("return VehicleAimGetAngle()", 0)), new Decorator(ret => CurentAngle < Angle, new Action(ret => Lua.DoString(string.Format("VehicleAimIncrement(\"{0}\")", (Angle - CurentAngle))))), new Decorator(ret => CurentAngle > Angle, new Action(ret => Lua.DoString(string.Format("VehicleAimDecrement(\"{0}\")", (CurentAngle - Angle))))), new Sleep(1000) )))), new Action(ret => Lua.DoString("RunMacroText('/click OverrideActionBarButton1','0')")) ) )); }
public override void Pulse() { #region Goblin Death if (Me.Race == WoWRace.Goblin && Me.HasAura("Near Death!") && Me.ZoneId == 4720 && RessGoblin.Count > 0) { RessGoblin[0].Interact(); Thread.Sleep(1000); Lua.DoString("RunMacroText('/click QuestFrameCompleteQuestButton')"); } #endregion #region Quest 6544 if (Me.QuestLog.GetQuestById(6544) != null && !Me.QuestLog.GetQuestById(6544).IsCompleted&& Me.QuestLog.GetQuestById(6544).IsFailed) { Me.QuestLog.AbandonQuestById(6544); } #endregion #region Quest 6641 if (Me.QuestLog.GetQuestById(6641) != null && !Me.QuestLog.GetQuestById(6641).IsCompleted) { if (Me.CurrentTarget == null) { return; } if (Me.CurrentTarget != null && Me.CurrentTarget.CurrentTargetGuid != Me.Guid) { RoutineManager.Current.Pull(); } } #endregion #region Quest 13980 if (Me.QuestLog.GetQuestById(13980) != null && !Me.QuestLog.GetQuestById(13980).IsCompleted&& (Me.MinimapZoneText == "The Skunkworks" || Me.MinimapZoneText == "Talondeep Vale") && !Me.HasAura("Jinx's Elf Detection Ray")) { Lua.DoString("UseItemByName(46776)"); Thread.Sleep(500); } #endregion #region Quest 14236 if (!Me.Dead && Me.QuestLog.GetQuestById(14236) != null && !Me.QuestLog.GetQuestById(14236).IsCompleted) { WoWPoint q142361 = new WoWPoint(638.7761, 2780.211, 88.81393); WoWPoint q142362 = new WoWPoint(634.825, 2824.758, 87.50606); WoWPoint q142363 = new WoWPoint(684.2277, 2821.671, 86.48402); WoWPoint q142364 = new WoWPoint(646.324, 2859.586, 87.25509); WoWPoint q142365 = new WoWPoint(700.0909, 2848.549, 84.93351); WoWPoint q142366 = new WoWPoint(610.5126, 2908.886, 91.3634); WoWPoint q142367 = new WoWPoint(574.0838, 2886.616, 90.26514); WoWPoint q142368 = new WoWPoint(582.1985, 2797.607, 88.356); WoWPoint q142369 = new WoWPoint(602.7809, 2784.686, 88.45428); while (!Me.HasAura("Weed Whacker")) { Lua.DoString("UseItemByName(49108)"); Thread.Sleep(1000); } while (!Me.QuestLog.GetQuestById(14236).IsCompleted) { WoWMovement.ClickToMove(q142361); Thread.Sleep(20000); WoWMovement.ClickToMove(q142362); Thread.Sleep(20000); WoWMovement.ClickToMove(q142363); Thread.Sleep(20000); WoWMovement.ClickToMove(q142364); Thread.Sleep(20000); WoWMovement.ClickToMove(q142365); Thread.Sleep(20000); WoWMovement.ClickToMove(q142366); Thread.Sleep(20000); WoWMovement.ClickToMove(q142367); Thread.Sleep(20000); WoWMovement.ClickToMove(q142368); Thread.Sleep(20000); WoWMovement.ClickToMove(q142369); Thread.Sleep(20000); } } #endregion #region Quest 24958 if (Me.QuestLog.GetQuestById(24958) != null && !Me.QuestLog.GetQuestById(24958).IsCompleted&& !Me.Dead) { WoWPoint wowpoint = new WoWPoint(1305.009, 1183.095, 121.1527); while (Me.Location.Distance(wowpoint) > 5) { Navigator.MoveTo(wowpoint); Thread.Sleep(500); } if (q24958_Giant_Turtle.Count != 0) { q24958_Giant_Turtle[0].Target(); q24958_Giant_Turtle[0].Face(); } while (Me.QuestLog.GetQuestById(24958) != null && !Me.QuestLog.GetQuestById(24958).IsCompleted&& Me.CurrentTarget != null && Me.CurrentTarget.IsAlive) { WoWMovement.MoveStop(); Thread.Sleep(100); Lua.DoString("UseItemByName(52043)"); Thread.Sleep(100); } } #endregion #region Quest 13961 if (Me.QuestLog.GetQuestById(13961) != null && !Me.QuestLog.GetQuestById(13961).IsCompleted) { if (Me.CurrentTargetGuid != 0 && Me.CurrentTarget.Name == "Razormane Pillager" && !Me.HasAura("Dragging a Razormane")) { while (!Me.CurrentTarget.IsFriendly) { Lua.DoString("UseItemByName(46722)"); Thread.Sleep(500); } if (Me.CurrentTarget.IsFriendly) { while (Me.CurrentTarget.Distance > 5) { Navigator.MoveTo(Me.CurrentTarget.Location); Thread.Sleep(100); } Me.CurrentTarget.Interact(); Thread.Sleep(500); Lua.DoString("SelectGossipOption(1)"); Thread.Sleep(500); } } } #endregion #region Quest 25165 if (Me.QuestLog.GetQuestById(25165) != null && !Me.QuestLog.GetQuestById(25165).IsCompleted&& !Me.HasAura("Poison Extraction Totem")) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(52505)", 0); if (!IsOnCD) { Lua.DoString("UseItemByName(52505)"); } } #endregion #region Quest 26321 if (Me.QuestLog.GetQuestById(26321) != null && !Me.QuestLog.GetQuestById(26321).IsCompleted) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(58165)", 0); if (!IsOnCD && !Me.HasAura("A Lashtail Hatchling: Hatchling Guardian Aura")) { Lua.DoString("UseItemByName(58165)"); } } #endregion #region Quest 26325 if (Me.QuestLog.GetQuestById(26325) != null && !Me.QuestLog.GetQuestById(26325).IsCompleted) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(58165)", 0); if (!IsOnCD && !Me.HasAura("A Lashtail Hatchling: Hatchling Guardian Aura")) { Lua.DoString("UseItemByName(58165)"); } } #endregion #region Quest 26953 if (Me.QuestLog.GetQuestById(26953) != null && !Me.QuestLog.GetQuestById(26953).IsCompleted&& !Me.HasAura("Zen'Kiki Guardian Aura")) { if (AdrineTowhide.Count > 0 && AdrineTowhide[0].Distance < 5) { AdrineTowhide[0].Interact(); Thread.Sleep(1000); Lua.DoString("SelectGossipOption(1)"); } else if (AdrineTowhide.Count > 0 && AdrineTowhide[0].Distance > 5) { while (AdrineTowhide[0].Distance > 5) { Navigator.MoveTo(AdrineTowhide[0].Location); Thread.Sleep(100); } } else if (AdrineTowhide.Count < 1) { WoWPoint TowHide = new WoWPoint(1796.26, -1684.78, 60.1698); while (Me.Location.Distance(TowHide) > 5) { Navigator.MoveTo(TowHide); Thread.Sleep(100); } } } #endregion #region Quest 26925 if (Me.QuestLog.GetQuestById(26925) != null && !Me.QuestLog.GetQuestById(26925).IsCompleted&& (StickboneBerserker.Count >= 1)) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(60678)", 0); if (!IsOnCD) { Lua.DoString("UseItemByName(60678)"); LegacySpellManager.ClickRemoteLocation(StickboneBerserker[0].Location); } } #endregion #region Quest 26648 if (Me.QuestLog.GetQuestById(26648) != null && !Me.QuestLog.GetQuestById(26648).IsCompleted) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(59226)", 0); if (!IsOnCD && !Me.HasAura("Dead Eye's Intuition")) { Lua.DoString("UseItemByName(59226)"); } } #endregion #region Quest 14238 if (Me.QuestLog.GetQuestById(14238) != null && !Me.QuestLog.GetQuestById(14238).IsCompleted&& !Me.HasAura("Infrared Heat Focals")) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(49611)", 0); if (!IsOnCD) { Lua.DoString("UseItemByName(49611)"); } } #endregion #region Quest 27789 if (Me.QuestLog.GetQuestById(27789) != null && !Me.QuestLog.GetQuestById(27789).IsCompleted) { while (Me.QuestLog.GetQuestById(27789) != null && !Me.QuestLog.GetQuestById(27789).IsCompleted) { StonevaultRuffian[0].Target(); WoWMovement.ConstantFace(Me.CurrentTarget.Guid); Lua.DoString("CastPetAction(1)"); StonevaultGoon[0].Target(); WoWMovement.ConstantFace(Me.CurrentTarget.Guid); Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(2)"); } } #endregion #region Quest 27771 if (Me.QuestLog.GetQuestById(27771) != null && !Me.QuestLog.GetQuestById(27771).IsCompleted) { while (Me.QuestLog.GetQuestById(27771) != null && !Me.QuestLog.GetQuestById(27771).IsCompleted) { Lua.DoString("RunMacroText('/cleartarget')"); FuckingWait.Start(); if (FuckingWait.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27885 if (!Me.Dead && Me.QuestLog.GetQuestById(27885) != null && !Me.QuestLog.GetQuestById(27885).IsCompleted) { WoWPoint q278850 = new WoWPoint(-6970.479, -3439.854, 200.8959); WoWPoint q278851 = new WoWPoint(-6968.06, -3440.255, 200.8969); WoWPoint q278852 = new WoWPoint(-6964.444, -3440.112, 200.8969); WoWPoint q278853 = new WoWPoint(-6961.984, -3439.921, 200.8963); WoWPoint q278854 = new WoWPoint(-6959.851, -3445.163, 201.2538); WoWPoint q278855 = new WoWPoint(-6959.738, -3447.433, 201.6079); WoWPoint q278856 = new WoWPoint(-6964.568, -3450.362, 200.8965); WoWPoint q278857 = new WoWPoint(-6966.959, -3450.602, 200.8965); WoWPoint q278858 = new WoWPoint(-6969.584, -3445.054, 200.8965); WoWPoint q278859 = new WoWPoint(-6969.789, -3442.688, 200.8965); WoWPoint q278811 = new WoWPoint(-6964.177, -3440.75, 200.8958); WoWPoint q278812 = new WoWPoint(-6961.631, -3440.965, 200.8958); WoWPoint q278813 = new WoWPoint(-6960.158, -3445.682, 200.8958); WoWPoint q278814 = new WoWPoint(-6960.385, -3447.647, 200.8958); WoWPoint q278815 = new WoWPoint(-6964.737, -3449.662, 200.8958); WoWPoint q278816 = new WoWPoint(-6967, -3449.534, 200.8955); WoWPoint q278817 = new WoWPoint(-6968.355, -3445.081, 200.8955); WoWPoint q278818 = new WoWPoint(-6968.267, -3442.952, 200.8955); WoWPoint q278821 = new WoWPoint(-6964.177, -3440.75, 200.8958); WoWPoint q278822 = new WoWPoint(-6961.631, -3440.965, 200.8958); WoWPoint q278823 = new WoWPoint(-6960.158, -3445.682, 200.8958); WoWPoint q278824 = new WoWPoint(-6960.385, -3447.647, 200.8958); WoWPoint q278825 = new WoWPoint(-6964.737, -3449.662, 200.8958); WoWPoint q278826 = new WoWPoint(-6967, -3449.534, 200.8955); WoWPoint q278827 = new WoWPoint(-6968.355, -3445.081, 200.8955); WoWPoint q278828 = new WoWPoint(-6968.267, -3442.952, 200.8955); WoWPoint q278841 = new WoWPoint(-6964.177, -3440.75, 200.8958); WoWPoint q278842 = new WoWPoint(-6961.631, -3440.965, 200.8958); WoWPoint q278843 = new WoWPoint(-6960.158, -3445.682, 200.8958); WoWPoint q278844 = new WoWPoint(-6961.002, -3447.482, 200.8966); WoWPoint q278845 = new WoWPoint(-6964.568, -3445.147, 200.8966); while (!Me.QuestLog.GetQuestById(27885).IsCompleted) { WoWMovement.ClickToMove(q278850); Thread.Sleep(3000); WoWMovement.ClickToMove(q278851); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278852); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278853); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278854); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278855); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278856); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278857); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278858); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278859); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278811); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278812); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278813); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278814); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278815); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278816); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278817); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278818); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278821); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278822); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278823); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278824); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278825); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278826); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278827); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278828); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278841); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278842); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278843); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278844); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); WoWMovement.ClickToMove(q278845); Thread.Sleep(1000); WardensPawn[0].Target(); WardensPawn[0].Interact(); Thread.Sleep(1000); } } #endregion #region Quest 27893 if (Me.QuestLog.GetQuestById(27893) != null && !Me.QuestLog.GetQuestById(27893).IsCompleted) { WoWPoint q278931 = new WoWPoint(-6730.564, -2448.625, 272.7784); WoWPoint q278932 = new WoWPoint(-6805.746, -2435.204, 272.7776); while (!Me.QuestLog.GetQuestById(27893).IsCompleted) { WoWMovement.ClickToMove(q278931); Thread.Sleep(10000); WoWMovement.ClickToMove(q278932); Thread.Sleep(13000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(1)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(4)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(8)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(2)"); Thread.Sleep(5000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(5)"); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(7)"); Thread.Sleep(5000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(1)"); Thread.Sleep(5000); Lua.DoString("RunMacroText('/target Darkflight Flameblade')"); Lua.DoString("CastPetAction(1)"); } } #endregion #region Quest 27894 if (Me.QuestLog.GetQuestById(27894) != null && !Me.QuestLog.GetQuestById(27894).IsCompleted) { while (!Me.QuestLog.GetQuestById(27894).IsCompleted&& (Kalaran.Count >= 1)) { Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); FuckingWait.Start(); if (FuckingWait.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27895 if (Me.QuestLog.GetQuestById(27895) != null && !Me.QuestLog.GetQuestById(27895).IsCompleted) { while (!Me.QuestLog.GetQuestById(27895).IsCompleted&& (Moldarr.Count >= 1)) { Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); Lua.DoString("AttackTarget()"); FuckingWait.Start(); if (FuckingWait.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27895 if (Me.QuestLog.GetQuestById(27895) != null && !Me.QuestLog.GetQuestById(27895).IsCompleted) { while (!Me.QuestLog.GetQuestById(27895).IsCompleted&& (Jirakka.Count >= 1)) { Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); Lua.DoString("AttackTarget()"); FuckingWait.Start(); if (FuckingWait.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27896 if (Me.QuestLog.GetQuestById(27896) != null && !Me.QuestLog.GetQuestById(27896).IsCompleted) { while (!Me.QuestLog.GetQuestById(27896).IsCompleted&& (Nyxondra.Count >= 1)) { Lua.DoString("RunMacroText('/target Nyxondra')"); Lua.DoString("CastPetAction(1)"); Lua.DoString("CastPetAction(4)"); Lua.DoString("CastPetAction(8)"); Lua.DoString("CastPetAction(2)"); Lua.DoString("CastPetAction(5)"); Lua.DoString("CastPetAction(7)"); FuckingWait.Start(); if (FuckingWait.Elapsed.Seconds > 12) { return; } } } #endregion #region Quest 27964 if (Me.QuestLog.GetQuestById(27964) != null && !Me.QuestLog.GetQuestById(27964).IsCompleted&& !IsAttached27964) { Lua.Events.AttachEvent("CHAT_MSG_MONSTER_YELL", MY_27964); IsAttached27964 = true; } if (Me.QuestLog.GetQuestById(27964) != null && Me.QuestLog.GetQuestById(27964).IsCompleted&& IsAttached27964) { Lua.Events.DetachEvent("CHAT_MSG_MONSTER_YELL", MY_27964); IsAttached27964 = false; } if (Me.QuestLog.GetQuestById(27964) != null && !Me.QuestLog.GetQuestById(27964).IsCompleted) { WoWObject wo = null; try { wo = ObjectManager.GetObjectsOfType <WoWObject>().Where(u => u.Entry == 206573 && !Me.Combat && !Me.Dead).FirstOrDefault(); } catch { } if (wo != null) { while (!Me.QuestLog.GetQuestById(27964).IsCompleted) { while (wo.Distance > 5) { Navigator.MoveTo(wo.Location); Thread.Sleep(100); } if (wo.Distance < 5) { wo.Interact(); Thread.Sleep(500); } } } } #endregion #region Quest 28226 if (Me.QuestLog.GetQuestById(28226) != null && !Me.QuestLog.GetQuestById(28226).IsCompleted) { if (GossipFrame.Instance.IsVisible) { if (!Obj4Done28226 && GossipFrame.Instance.GossipOptionEntries.Count > 1) { Lua.DoString("SelectGossipOption(2)"); Thread.Sleep(1000); } else { Lua.DoString("SelectGossipOption(1)"); Thread.Sleep(1000); } } } #endregion #region Quest 26922 if (Me.QuestLog.GetQuestById(26922) != null) { if (StickboneBerserker.Count > 0) { StickboneBerserker[0].Target(); Thread.Sleep(500); Lua.DoString("UseItemByName(60678)"); Thread.Sleep(500); LegacySpellManager.ClickRemoteLocation(StickboneBerserker[0].Location); Thread.Sleep(1000); } if (ScourgeBoneAnimus.Count > 0) { Lua.DoString("UseItemByName(60678)"); Thread.Sleep(500); LegacySpellManager.ClickRemoteLocation(ScourgeBoneAnimus[0].Location); Thread.Sleep(1000); } } #endregion #region Quest 10129 if (Me.QuestLog.GetQuestById(10129) != null && !Me.QuestLog.GetQuestById(10129).IsCompleted) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(28038)", 0); if (!IsOnCD) { Lua.DoString("UseItemByName(28038)"); LegacySpellManager.ClickRemoteLocation(GatewayShaadraz[0].Location); Lua.DoString("UseItemByName(28038)"); LegacySpellManager.ClickRemoteLocation(GatewayMurketh[0].Location); } } #endregion #region Quest 10162 if (Me.QuestLog.GetQuestById(10162) != null && !Me.QuestLog.GetQuestById(10162).IsCompleted) { bool IsOnCD = Lua.GetReturnVal <bool>("GetItemCooldown(28132)", 0); if (!IsOnCD) { if (!Obj1Done10162) { Lua.DoString("UseItemByName(28132)"); LegacySpellManager.ClickRemoteLocation(MoargOverseer[0].Location); } if (Obj1Done10162) { Lua.DoString("UseItemByName(28132)"); LegacySpellManager.ClickRemoteLocation(GanArgPeon[0].Location); } if (Obj2Done10162) { Lua.DoString("UseItemByName(28132)"); LegacySpellManager.ClickRemoteLocation(FelCannon[0].Location); } } #endregion #region Quest 26305 if (Me.QuestLog.GetQuestById(26305) != null && !Me.QuestLog.GetQuestById(26305).IsCompleted) { if (Me.CurrentTarget.Entry == 2530) { Lua.DoString("UseItemByName(3912)"); } } #endregion #region Disguise Quests if (Me.QuestLog.GetQuestById(28439) != null || Me.QuestLog.GetQuestById(28440) != null || Me.QuestLog.GetQuestById(28432) != null || Me.QuestLog.GetQuestById(28433) != null || Me.QuestLog.GetQuestById(28434) != null || Me.QuestLog.GetQuestById(28435) != null) { int counter = 0; foreach (WoWAura s in ObjectManager.Me.ActiveAuras.Values) { if (s.Name.Contains("Disguise")) { counter++; } } if (counter > 0) { Lua.DoString("UseItemByName(63357)"); Thread.Sleep(6000); } } #endregion #region Quest 27001 if (Me.QuestLog.GetQuestById(27001) != null && !Me.QuestLog.GetQuestById(27001).IsCompleted&& SpiderThingy.Count > 0) { WoWPoint wp = new WoWPoint(2432.375, -1650.377, 104.1796); while (Me.Location.Distance(wp) > 3) { Navigator.MoveTo(wp); Thread.Sleep(100); } } #endregion #region Quest 10813 if (Me.QuestLog.GetQuestById(10813) != null && !Me.QuestLog.GetQuestById(10813).IsCompleted&& EyeOfGrillok.Count > 0) { if (!Me.HasAura("Eye of Grillok")) { EyeOfGrillok[0].Target(); while (Me.Location.Distance(EyeOfGrillok[0].Location) > 10) { Navigator.MoveTo(EyeOfGrillok[0].Location); Thread.Sleep(200); } Lua.DoString("UseItemByName(31463)"); Thread.Sleep(1000); } } if (Me.QuestLog.GetQuestById(10813) != null && !Me.QuestLog.GetQuestById(10813).IsCompleted&& Me.HasAura("Eye of Grillok")) { WoWPoint wp = new WoWPoint(-1325.649, 2356.759, 88.95618); if (!Me.Combat) { while (Me.Location.Distance(wp) > 5) { Flightor.MoveTo(wp); Thread.Sleep(200); } } } #endregion } }
protected override Composite CreateBehavior() { return(_root ?? (_root = new PrioritySelector( new Decorator(c => (Counter > NumOfTimes) || Me.IsQuestComplete(QuestId), new Action(c => { TreeRoot.StatusText = "Finished!"; if (GoHomeButton > 0) { Lua.DoString("CastPetAction({0})", GoHomeButton); } _isBehaviorDone = true; return RunStatus.Success; }) ), // Enable combat while not in a vehicle new Decorator(ctx => (LevelBot.BehaviorFlags & BehaviorFlags.Combat) == 0 && !Query.IsInVehicle(), new Action(ctx => LevelBot.BehaviorFlags |= BehaviorFlags.Combat)), // Disable combat while in a vehicle new Decorator(ctx => (LevelBot.BehaviorFlags & BehaviorFlags.Combat) != 0 && Query.IsInVehicle(), new Action(ctx => LevelBot.BehaviorFlags &= ~BehaviorFlags.Combat)), new Decorator(c => NpcVehicleList.Any() && !Query.IsInVehicle(), new Action(c => { if (!NpcVehicleList[0].WithinInteractRange) { Navigator.MoveTo(NpcVehicleList[0].Location); TreeRoot.StatusText = "Moving To Vehicle - " + NpcVehicleList[0].SafeName + " Yards Away: " + NpcVehicleList[0].Location.Distance(Me.Location); } else { NpcVehicleList[0].Interact(); MountedPoint = Me.Location; } }) ), new Decorator(c => SpellType == 1, new ActionRunCoroutine(ctx => TypeOneVehicleBehavior())), new Decorator(c => SpellType == 2, new ActionRunCoroutine(ctx => TypeTwoVehicleBehavior())), new Decorator(c => Query.IsInVehicle() && SpellType == 3, new PrioritySelector( ret => NpcList.OrderBy(u => u.DistanceSqr).FirstOrDefault(u => Me.Transport.IsSafelyFacing(u)), new Decorator( ret => ret != null, new PrioritySelector( new Decorator( ret => Me.CurrentTarget == null || Me.CurrentTarget != (WoWUnit)ret, new Action(ret => ((WoWUnit)ret).Target())), new Decorator( ret => !Me.Transport.IsSafelyFacing(((WoWUnit)ret), 10), new Action(ret => Me.CurrentTarget.Face())), new Sequence( new Action( ctx => { Vector3 v = Vector3.Normalize(Me.CurrentTarget.Location - StyxWoW.Me.Location); Lua.DoString( string.Format( "local pitch = {0}; local delta = pitch - VehicleAimGetAngle(); VehicleAimIncrement(delta); CastPetAction({1});", Math.Asin(v.Z).ToString(CultureInfo.InvariantCulture), AttackButton)); }), new Sleep(WaitTime), new Action(ctx => Counter++)))))), new Decorator(c => SpellType == 4, new Action(c => { if (!Query.IsInVehicle()) { return RunStatus.Failure; } if (Counter > NumOfTimes && QuestId == 0 || Me.IsQuestComplete(QuestId)) { Lua.DoString("VehicleExit()"); _isBehaviorDone = true; return RunStatus.Success; } var target = NpcList.FirstOrDefault(); if (target != null) { if (Me.CurrentTargetGuid != target.Guid) { target.Target(); } WoWMovement.ClickToMove(target.Location); Lua.DoString("CastPetAction({0})", AttackButton); SpellManager.ClickRemoteLocation(target.Location); Counter++; } return RunStatus.Running; })), new Decorator(c => SpellType == 5, new Action(c => { if (!Query.IsInVehicle()) { return RunStatus.Failure; } if (Counter > NumOfTimes && QuestId == 0 || Me.IsQuestComplete(QuestId)) { Lua.DoString("VehicleExit()"); _isBehaviorDone = true; return RunStatus.Success; } var target = NpcList.FirstOrDefault(); if (target != null) { if (Me.CurrentTargetGuid != target.Guid) { target.Target(); } WoWMovement.ConstantFace(Me.CurrentTargetGuid); Lua.DoString("CastPetAction({0})", AttackButton); if (QuestId == 0) { Counter++; } } var target2 = NpcListSecondary.FirstOrDefault(); if (target2 != null) { if (Me.CurrentTargetGuid != target2.Guid) { target2.Target(); } WoWMovement.ConstantFace(Me.CurrentTargetGuid); Lua.DoString("CastPetAction({0})", AttackButton); if (QuestId == 0) { Counter++; } } Lua.DoString("CastPetAction({0})", AttackButton2); return RunStatus.Running; })) ))); }
protected override Composite CreateBehavior() { return(_root ?? (_root = new PrioritySelector( new Decorator(ret => me.QuestLog.GetQuestById(26649) != null && me.QuestLog.GetQuestById(26649).IsCompleted, new Sequence( new Action(ret => TreeRoot.StatusText = "Finished!"), new Action(ret => Lua.DoString("CastPetAction({0})", 5)), new WaitContinue(120, new Action(delegate { _isDone = true; return RunStatus.Success; })) )), new Decorator(ret => !InVehicle, new Action(ret => { while (ObjectManager.Me.Location.Distance(wp) > 5) { Navigator.MoveTo(wp); Thread.Sleep(100); } if (BloodsailOarsman.BaseAddress != 0) { BloodsailOarsman.Interact(); Thread.Sleep(1000); Lua.DoString("SelectGossipOption(1)"); Thread.Sleep(5000); } } )), new Decorator(ret => !Obj1Done && mob1List.Count > 0, new Action(ret => { if (mob1List.Count == 0) { return; } mob1List[0].Target(); while (me.CurrentTarget != null && mob1List.Count > 0 && me.CurrentTarget.Guid == mob1List[0].Guid && me.CurrentTarget.IsAlive) { WoWMovement.ConstantFace(me.CurrentTarget.Guid); angle = -((me.Z - me.CurrentTarget.Z) / (me.CurrentTarget.Location.Distance(me.Location))) + ((me.CurrentTarget.Location.Distance2D(me.Location) - 20) / me.CurrentTarget.Location.Distance(me.Location) / 10); CurentAngle = Lua.GetReturnVal <double>("return VehicleAimGetAngle()", 0); if (CurentAngle < angle) { Lua.DoString(string.Format("VehicleAimIncrement(\"{0}\")", (angle - CurentAngle))); } if (CurentAngle > angle) { Lua.DoString(string.Format("VehicleAimDecrement(\"{0}\")", (CurentAngle - angle))); } Lua.DoString("CastPetAction(1) CastPetAction(2) CastPetAction(3)"); } } )) ) )); }
public void SetConstantFace() { WoWMovement.ConstantFace(Me.CurrentTargetGuid); IsConstantFacingtoggle = true; LastFacingGuid = Me.CurrentTargetGuid; }