//Old Version #region Check Interruptspell Casting public static bool InterruptSpell(Spell spell, bool CanBeMounted = false) { var resultLua = Lua.LuaDoString("ret = \"false\"; spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo(\"target\"); if interrupt then ret = \"true\" end", "ret"); if (spell.KnownSpell && spell.IsSpellUsable && resultLua == "true") { if (ObjectManager.Me.IsMounted == CanBeMounted) { Frameunlock(); spell.Launch(); Usefuls.WaitIsCasting(); return(true); } } return(false); }
public static bool BuffSpell(Spell spell, bool CanBeMounted = false, bool force = false) { if (spell.KnownSpell && spell.IsSpellUsable && !ObjectManager.Me.HaveBuff(spell.Name)) { if (force) { Lua.LuaDoString("SpellStopCasting();"); } if (ObjectManager.Me.IsMounted == CanBeMounted) { spell.Launch(); Usefuls.WaitIsCasting(); Logging.Write("Casting Buffspell: " + spell); return(true); } } return(false); }
private void TargetInfoButton_Click(object sender, EventArgs e) { try { TargetInfoButton.Enabled = false; InformationArea.Text = ""; if (!ObjectManager.Target.IsValid) { TargetInfoButton.Enabled = true; return; } Point pos = ObjectManager.Target.Position; if (Usefuls.IsOutdoors) { pos.Type = "Flying"; } InformationArea.Text = " <Npc>" + Environment.NewLine + " <Entry>" + ObjectManager.Target.Entry + "</Entry>" + Environment.NewLine + " <Name>" + ObjectManager.Target.Name + "</Name>" + Environment.NewLine + " <Position>" + Environment.NewLine + " <X>" + pos.X + "</X>" + Environment.NewLine + " <Y>" + pos.Y + "</Y>" + Environment.NewLine + " <Z>" + pos.Z + "</Z>" + Environment.NewLine + " <Type>" + pos.Type + "</Type>" + Environment.NewLine + " </Position>" + Environment.NewLine + " <Faction>" + (Npc.FactionType)Enum.Parse(typeof(Npc.FactionType), ObjectManager.Me.PlayerFaction, true) + "</Faction>" + Environment.NewLine + " <Type>None</Type>" + Environment.NewLine + " <ContinentId>" + Usefuls.ContinentNameByContinentId(Usefuls.ContinentId) + "</ContinentId>" + Environment.NewLine + " </Npc>" + Environment.NewLine + Environment.NewLine + "Distance: " + pos.DistanceTo(ObjectManager.Me.Position) + Environment.NewLine + Environment.NewLine + "Distance2D: " + pos.DistanceTo2D(ObjectManager.Me.Position); } catch (Exception ex) { Logging.WriteError("DeveloperToolsMainFrame > TargetInfoButton_Click(object sender, EventArgs e): " + ex); } TargetInfoButton.Enabled = true; }
private static void takeTaxi(FlightMasterDB from, FlightMasterDB to) { if (wManager.Wow.Bot.Tasks.GoToTask.ToPosition(from.position, 3.5f, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore)) { if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(from.position, from.NPCId, -1, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false)) { while (!ObjectManager.Me.IsOnTaxi) { if (ObjectManager.Me.IsMounted) { wManager.Wow.Bot.Tasks.MountTask.DismountMount(false, false, 100); } Usefuls.SelectGossipOption(GossipOptionsType.taxi); Thread.Sleep(Usefuls.Latency + 1500); while (_updateNodes) { Logging.Write("[VanillaFlightMaster]: Taxi node update in progress, waiting..."); Thread.Sleep(10000); } int node = Lua.LuaDoString <int>("for i=0,30 do if string.find(TaxiNodeName(i),'" + to.name + "') then return i end end"); Lua.LuaDoString("TakeTaxiNode(" + node + ")"); Logging.Write("[VanillaFlightMaster]: Taking Taxi from " + from.name + " to " + to.name); Thread.Sleep(Usefuls.Latency + 500); robotManager.Helpful.Keyboard.DownKey(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, System.Windows.Forms.Keys.Escape); Thread.Sleep(Usefuls.Latency + 2500); if (!ObjectManager.Me.IsOnTaxi) { wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(from.position, from.NPCId, -1, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore, false); } } if (ObjectManager.Me.IsOnTaxi) { waitFlying(to.name); } } } }
public void EatOrDrink(string itemName, bool isMana = false) { try { if (FishingTask.IsLaunched) { FishingTask.StopLoopFish(); } // isMana = false => Health if (ObjectManager.ObjectManager.Me.IsMounted) { Usefuls.DisMount(); } MovementManager.StopMove(); Thread.Sleep(500); ObjectManager.ObjectManager.Me.ForceIsCasting = true; // Make the bot believe it's casting something. (we set it to false in Finally()) ItemsManager.UseItem(itemName); for (int i = 0; i < 30; i++) { if (ObjectManager.ObjectManager.Me.IsDeadMe || ObjectManager.ObjectManager.Me.InCombat) { return; } if (!isMana && ObjectManager.ObjectManager.Me.HealthPercent > 95 || isMana && ObjectManager.ObjectManager.Me.ManaPercentage > 95) { break; } Thread.Sleep(500); // Eat/Drink for 15 seconds or until we get to high HP/Mana } } catch (Exception e) { Logging.WriteError("public void EatOrDrink(string itemName, bool isMana = false): " + e); } finally { ObjectManager.ObjectManager.Me.ForceIsCasting = false; // In case we set it to true and crash, prevent the bot from believing that its constantly casting. } }
private static void PetRevivehandler() { if (RevivePet.IsSpellUsable && RevivePet.KnownSpell && ObjectManager.Pet.IsDead && !ObjectManager.Me.IsMounted) { RevivePet.Launch(); Usefuls.WaitIsCasting(); } if (CallPet.IsSpellUsable && CallPet.KnownSpell && !ObjectManager.Pet.IsValid && !ObjectManager.Me.IsMounted) { CallPet.Launch(); Usefuls.WaitIsCasting(); } }
private void Heal() { Usefuls.SleepGlobalCooldown(); try { Memory.WowMemory.GameFrameLock(); // !!! WARNING - DONT SLEEP WHILE LOCKED - DO FINALLY(GameFrameUnLock()) !!! //Gift of the Naaru if (ObjectManager.Me.HealthPercent < MySettings.UseGiftoftheNaaruBelowPercentage && GiftoftheNaaru.IsSpellUsable) { GiftoftheNaaru.Cast(); return; } } finally { Memory.WowMemory.GameFrameUnLock(); } }
// For the Ability Priority Logic private void Rotation() { Usefuls.SleepGlobalCooldown(); try { Memory.WowMemory.GameFrameLock(); // !!! WARNING - DONT SLEEP WHILE LOCKED - DO FINALLY(GameFrameUnLock()) !!! // Independant of Target Count if (MySettings.UseTEMPLATEOFFENSIVESPELL && TEMPLATEOFFENSIVESPELL.IsSpellUsable && TEMPLATEOFFENSIVESPELL.IsHostileDistanceGood && ObjectManager.Me.CLASS_RESOURCE > MySettings.UseTEMPLATEOFFENSIVESPELLAbovePercentage && // Resource Check TEMPLATEBUFF.HaveBuff && // Buff Check TEMPLATEDOT.TargetHaveBuff && // Buff Check (ObjectManager.Me.GetUnitInSpellRange(5f) > 1 || ObjectManager.Target.GetUnitInSpellRange(5f) > 1) && // Unit Count Check TEMPLATEOFFENSIVESPELLTimer.IsReady) // Timer Check { TEMPLATEOFFENSIVESPELL.Cast(); TEMPLATEOFFENSIVESPELLTimer = new Timer(1000 * 10); // for timings that don't depend on a buff return; } if (MySettings.UseTEMPLATEARTIFACTSPELL && TEMPLATEARTIFACTSPELL.IsSpellUsable && TEMPLATEARTIFACTSPELL.IsHostileDistanceGood) { TEMPLATEARTIFACTSPELL.Cast(); return; } //Single Target if (ObjectManager.Target.GetUnitInSpellRange(5f) == 1) { } //Multiple Targets else { } } finally { Memory.WowMemory.GameFrameUnLock(); } }
// For Offensive Buffs (only return if a Cast triggered Global Cooldown) private bool Offensive() { Usefuls.SleepGlobalCooldown(); try { Memory.WowMemory.GameFrameLock(); // !!! WARNING - DONT SLEEP WHILE LOCKED - DO FINALLY(GameFrameUnLock()) !!! if (MySettings.UseTrinketOne && !ItemsManager.IsItemOnCooldown(_firstTrinket.Entry) && ItemsManager.IsItemUsable(_firstTrinket.Entry)) { ItemsManager.UseItem(_firstTrinket.Name); Logging.WriteFight("Use First Trinket Slot"); } if (MySettings.UseTrinketTwo && !ItemsManager.IsItemOnCooldown(_secondTrinket.Entry) && ItemsManager.IsItemUsable(_secondTrinket.Entry)) { ItemsManager.UseItem(_secondTrinket.Name); Logging.WriteFight("Use Second Trinket Slot"); } if (MySettings.UseBerserking && Berserking.IsSpellUsable) { Berserking.Cast(); } if (MySettings.UseBloodFury && BloodFury.IsSpellUsable) { BloodFury.Cast(); } //TEMPLATE_OFFENSIVE_BUFF_SPELL if (MySettings.UseTEMPLATEOFFENSIVEBUFFSPELL && TEMPLATEOFFENSIVEBUFFSPELL.IsSpellUsable && !TEMPLATEOFFENSIVEBUFFSPELL.HaveBuff) { TEMPLATEOFFENSIVEBUFFSPELL.Cast(); return(true); // only return if Global Cooldown is triggered } return(false); } finally { Memory.WowMemory.GameFrameUnLock(); } }
// For Spots (always return after Casting) private bool AggroManagement() { Usefuls.SleepGlobalCooldown(); try { Memory.WowMemory.GameFrameLock(); // !!! WARNING - DONT SLEEP WHILE LOCKED - DO FINALLY(GameFrameUnLock()) !!! //TEMPLATE_AGGRO_SPELL if (MySettings.UseTEMPLATEAGGROSPELL && TEMPLATEAGGROSPELL.IsSpellUsable && TEMPLATEAGGROSPELL.IsHostileDistanceGood && ObjectManager.Target.Target != ObjectManager.Me.Guid) { TEMPLATEAGGROSPELL.Cast(); return(true); } return(false); } finally { Memory.WowMemory.GameFrameUnLock(); } }
public static void Craft(string skillName, Item item, int quantity) { OpenProfessionFrame(skillName); if (item.IsAnEnchant) { UseProfessionSkill(item, 1); WoWItem itemToEnchant = EquippedItems.GetEquippedItems().Find(i => i.GetItemInfo.ItemEquipLoc == item.EnchantGearType); for (var i = 0; i < quantity; i++) { int itemSlot = GetGearSlot(itemToEnchant); Logger.Log($"Enchanting {itemToEnchant.Name}"); Lua.RunMacroText($"/use {itemSlot}"); Lua.LuaDoString("ReplaceEnchant()"); Usefuls.WaitIsCasting(); } } else { UseProfessionSkill(item, quantity); } Usefuls.WaitIsCasting(); }
public static void DismountMount(bool stopMove = true) { try { if (Products.Products.IsStarted) { if (stopMove) { MovementManager.StopMove(); } else { MovementManager.StopMoveTo(); } Thread.Sleep(200); if (ObjectManager.ObjectManager.Me.IsMounted) { Logging.Write("Dismount in progress."); bool flying = Usefuls.IsFlying; if (flying) { Land(); } Usefuls.DisMount(); if (flying) { _flyDismountTimer = new Timer(5000); } Thread.Sleep(200 + Usefuls.Latency); } } } catch (Exception ex) { Logging.WriteError("MountTask > DismountMount(): " + ex); } }
private static bool FmMapIsOpen(FlightMaster fm) { Usefuls.SelectGossipOption(GossipOptionsType.taxi); for (int i = 1; i <= 5; i++) { if (!Main.isFMMapOpen) { Logger.LogDebug($"Failed to open FM map, retrying ({i}/5)"); Lua.LuaDoString("CloseGossip()"); Thread.Sleep(500); if (InteractWithFm(fm)) { Usefuls.SelectGossipOption(GossipOptionsType.taxi); Thread.Sleep(500); } } else { return(true); } } return(false); }
// 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 bool FightSpell(Spell spell, bool focus = false, bool force = false, bool stopMoving = false, bool debuff = true) { if (spell.KnownSpell && spell.IsSpellUsable && spell.IsDistanceGood && ObjectManager.Me.HasTarget && ObjectManager.Target.IsAttackable && !TraceLine.TraceLineGo(ObjectManager.Me.Position, ObjectManager.Target.Position)) { if (debuff) { if (ObjectManager.Target.HaveBuff(spell.Name)) { return(false); } } if (force) { Lua.LuaDoString("SpellStopCasting();"); } if (stopMoving) { MovementManager.StopMove(); } if (focus) { Lua.LuaDoString($"CastSpellByID({ spell.Id}, \"focus\")"); Usefuls.WaitIsCasting(); Logging.Write("Casting Fightspell @ focus: " + spell); return(true); } else { spell.Launch(); Usefuls.WaitIsCasting(); Logging.Write("Casting Fightspell: " + spell); return(true); } } return(false); }
private void GCDCycle() { Usefuls.SleepGlobalCooldown(); try { Memory.WowMemory.GameFrameLock(); // !!! WARNING - DONT SLEEP WHILE LOCKED - DO FINALLY(GameFrameUnLock()) !!! if (MySettings.UseSoulCarver && SoulCarver.IsSpellUsable && SoulCarver.IsHostileDistanceGood) { SoulCarver.Cast(); return; } if (MySettings.UseFelDevastation && FelDevastation.IsSpellUsable && FelDevastation.IsHostileDistanceGood) { FelDevastation.Cast(); return; } if (MySettings.UseSoulCleave && SoulCleave.IsSpellUsable && SoulCleave.IsHostileDistanceGood && //Spend Pain ObjectManager.Me.Pain >= 80) { SoulCleave.Cast(); return; } if (MySettings.UseImmolationAura && ImmolationAura.IsSpellUsable && ImmolationAura.IsHostileDistanceGood) { ImmolationAura.Cast(); return; } //Single Target if (ObjectManager.GetUnitInSpellRange(5f) == 1) { if (MySettings.UseFelblade && Felblade.IsSpellUsable && Felblade.IsHostileDistanceGood) { Felblade.Cast(); return; } if (MySettings.UseFelEruption && FelEruption.IsSpellUsable && FelEruption.IsHostileDistanceGood) { FelEruption.Cast(); return; } if (MySettings.UseSpiritBomb && SpiritBomb.IsSpellUsable && SoulFragments.BuffStack >= 1 && SpiritBomb.IsHostileDistanceGood && !Frailty.TargetHaveBuff) { SpiritBomb.Cast(); return; } if (MySettings.UseShear && Shear.IsSpellUsable && Shear.IsHostileDistanceGood && BladeTurningBuff.HaveBuff) { Shear.Cast(); return; } if (MySettings.UseFracture && Fracture.IsSpellUsable && Fracture.IsHostileDistanceGood && //Spend Pain ObjectManager.Me.Pain >= 60 && ObjectManager.Me.Health > 50) { Fracture.Cast(); return; } if (SigilofFlameTimer.IsReady) { if (MySettings.UseSigilofFlame && SigilofFlame.IsSpellUsable && SigilofFlame.IsHostileDistanceGood) { SigilofFlame.Cast(); SigilofFlameTimer = new Timer(1000 * 8); return; } if (MySettings.UseInfernalStrike && InfernalStrike.IsSpellUsable && InfernalStrike.IsHostileDistanceGood && FlameCrash.HaveBuff) { InfernalStrike.Cast(); SigilofFlameTimer = new Timer(1000 * 8); return; } } if (MySettings.UseShear && Shear.IsSpellUsable && Shear.IsHostileDistanceGood) { Shear.Cast(); return; } } //Multiple Target else { if (MySettings.UseSpiritBomb && SpiritBomb.IsSpellUsable && SoulFragments.BuffStack >= 1 && SpiritBomb.IsHostileDistanceGood && !Frailty.TargetHaveBuff) { SpiritBomb.Cast(); return; } if (MySettings.UseFelblade && Felblade.IsSpellUsable && Felblade.IsHostileDistanceGood) { Felblade.Cast(); return; } if (MySettings.UseShear && Shear.IsSpellUsable && Shear.IsHostileDistanceGood && BladeTurningBuff.HaveBuff) { Shear.Cast(); return; } if (SigilofFlameTimer.IsReady) { if (MySettings.UseSigilofFlame && SigilofFlame.IsSpellUsable && SigilofFlame.IsHostileDistanceGood) { SigilofFlame.CastAtPosition(ObjectManager.Target.Position); SigilofFlameTimer = new Timer(1000 * 8); return; } if (FlameCrash.HaveBuff && MySettings.UseInfernalStrike && InfernalStrike.IsSpellUsable && InfernalStrike.IsHostileDistanceGood) { InfernalStrike.CastAtPosition(ObjectManager.Target.Position); SigilofFlameTimer = new Timer(1000 * 8); return; } } if (MySettings.UseFelEruption && FelEruption.IsSpellUsable && FelEruption.IsHostileDistanceGood) { FelEruption.Cast(); return; } if (MySettings.UseShear && Shear.IsSpellUsable && Shear.IsHostileDistanceGood) { Shear.Cast(); return; } if (MySettings.UseInfernalStrike && InfernalStrike.IsSpellUsable && InfernalStrike.IsHostileDistanceGood) { InfernalStrike.CastAtPosition(ObjectManager.Target.Position); if (FlameCrash.HaveBuff) { SigilofFlameTimer = new Timer(1000 * 8); } return; } } } finally { Memory.WowMemory.GameFrameUnLock(); } }
protected override void HealerCombat() { base.HealerCombat(); WoWUnit Target = ObjectManager.Target; List <AIOPartyMember> lisPartyOrdered = AIOParty.GroupAndRaid .OrderBy(m => m.HealthPercent) .ToList(); // Party Tranquility if (settings.PartyTranquility && !AIOParty.GroupAndRaid.Any(e => e.IsTargetingMe)) { bool needTranquility = AIOParty.GroupAndRaid .FindAll(m => m.HealthPercent < 50) .Count > 2; if (needTranquility && cast.OnTarget(Tranquility)) { Usefuls.WaitIsCasting(); return; } } // PARTY Rebirth if (settings.PartyUseRebirth) { WoWPlayer needRebirth = lisPartyOrdered .Find(m => m.IsDead); if (needRebirth != null && cast.OnFocusUnit(Rebirth, needRebirth)) { return; } } // PARTY Innervate if (settings.PartyUseInnervate) { WoWPlayer needInnervate = lisPartyOrdered .Find(m => m.ManaPercentage < 10 && !m.HaveBuff("Innervate")); if (needInnervate != null && cast.OnFocusUnit(Innervate, needInnervate)) { return; } } if (settings.PartyRemoveCurse) { // PARTY Remove Curse WoWPlayer needRemoveCurse = lisPartyOrdered .Find(m => ToolBox.HasCurseDebuff(m.Name)); if (needRemoveCurse != null && cast.OnFocusUnit(RemoveCurse, needRemoveCurse)) { return; } } if (settings.PartyAbolishPoison) { // PARTY Abolish Poison WoWPlayer needAbolishPoison = lisPartyOrdered .Find(m => ToolBox.HasPoisonDebuff(m.Name)); if (needAbolishPoison != null && cast.OnFocusUnit(AbolishPoison, needAbolishPoison)) { return; } } // PARTY Burst Heal WoWPlayer needBurstHeal = lisPartyOrdered .Find(m => m.HealthPercent < 30); if (needBurstHeal != null && Me.ManaPercentage > 10 && cast.OnTarget(NaturesSwiftness)) { return; } if (needBurstHeal != null && Me.HaveBuff("Nature's Swiftness")) { cast.OnFocusUnit(HealingTouch, needBurstHeal); return; } // Tree form if (!Me.HaveBuff("Tree of Life") && Me.ManaPercentage > 20 && cast.OnSelf(TreeOfLife)) { return; } // Swiftmend WoWPlayer needBigHeal = lisPartyOrdered .Find(m => m.HealthPercent < 60 && (m.HaveBuff("Regrowth") || m.HaveBuff("Rejuvenation"))); if (needBigHeal != null && cast.OnFocusUnit(Swiftmend, needBigHeal)) { return; } // Healing Touch if (!Me.HaveBuff("Tree of Life")) { if (needBigHeal != null && cast.OnFocusUnit(HealingTouch, needBigHeal)) { return; } } // Regrowth WoWPlayer needRegrowth = lisPartyOrdered .Find(m => m.HealthPercent < 70 && !m.HaveBuff("Regrowth")); if (needRegrowth != null && cast.OnFocusUnit(Regrowth, needRegrowth)) { return; } // Rejuvenation WoWPlayer needRejuvenation = lisPartyOrdered .Find(m => m.HealthPercent < 80 && !m.HaveBuff("Rejuvenation")); if (needRejuvenation != null && cast.OnFocusUnit(Rejuvenation, needRejuvenation)) { return; } // Lifebloom 1 WoWPlayer needLifeBloom1 = lisPartyOrdered .Find(m => m.HealthPercent < 90 && ToolBox.CountBuff("Lifebloom", m.Name) < 1); if (needLifeBloom1 != null && cast.OnFocusUnit(Lifebloom, needLifeBloom1)) { return; } // Lifebloom 2 WoWPlayer needLifeBloom2 = lisPartyOrdered .Find(m => m.HealthPercent < 85 && ToolBox.CountBuff("Lifebloom", m.Name) < 2); if (needLifeBloom2 != null && cast.OnFocusUnit(Lifebloom, needLifeBloom2)) { return; } // Lifebloom 3 WoWPlayer needLifeBloom3 = lisPartyOrdered .Find(m => m.HealthPercent < 80 && ToolBox.CountBuff("Lifebloom", m.Name) < 3); if (needLifeBloom3 != null && cast.OnFocusUnit(Lifebloom, needLifeBloom3)) { return; } }
private static bool Cast(Spell s, bool castEvenIfWanding = true) { if (!s.KnownSpell) { return(false); } CombatDebug("*----------- INTO CAST FOR " + s.Name); float _spellCD = ToolBox.GetSpellCooldown(s.Name); CombatDebug("Cooldown is " + _spellCD); if (ToolBox.GetSpellCost(s.Name) > Me.Mana) { CombatDebug(s.Name + ": Not enough mana, SKIPPING"); return(false); } if (_usingWand && !castEvenIfWanding) { CombatDebug("Didn't cast because we were backing up or wanding"); return(false); } if (_spellCD >= 2f) { CombatDebug("Didn't cast because cd is too long"); return(false); } if (_usingWand && castEvenIfWanding) { ToolBox.StopWandWaitGCD(UseWand, ShadowBolt); } if (_spellCD < 2f && _spellCD > 0f) { if (ToolBox.GetSpellCastTime(s.Name) < 1f) { CombatDebug(s.Name + " is instant and low CD, recycle"); return(true); } int t = 0; while (ToolBox.GetSpellCooldown(s.Name) > 0) { Thread.Sleep(50); t += 50; if (t > 2000) { CombatDebug(s.Name + ": waited for tool long, give up"); return(false); } } Thread.Sleep(100 + Usefuls.Latency); CombatDebug(s.Name + ": waited " + (t + 100) + " for it to be ready"); } if (!s.IsSpellUsable) { CombatDebug("Didn't cast because spell somehow not usable"); return(false); } CombatDebug("Launching"); if (ObjectManager.Target.IsAlive || (!Fight.InFight && ObjectManager.Target.Guid < 1)) { s.Launch(); Usefuls.WaitIsCasting(); } return(true); }
private void FightLoopHandler(WoWUnit unit, CancelEventArgs cancelable) { float minDistance = RangeManager.GetMeleeRangeWithTarget() + 3f; // Do we need to backup? if ((ObjectManager.Target.HaveBuff("Frostbite") || ObjectManager.Target.HaveBuff("Frost Nova")) && ObjectManager.Target.GetDistance < minDistance && Me.IsAlive && ObjectManager.Target.IsAlive && !cast.IsBackingUp && !Me.IsCast && !RangeManager.CurrentRangeIsMelee() && ObjectManager.Target.HealthPercent > 5 && !_isPolymorphing) { cast.IsBackingUp = true; Timer timer = new Timer(3000); // Using CTM if (settings.BackupUsingCTM) { Vector3 position = ToolBox.BackofVector3(Me.Position, Me, 15f); MovementManager.Go(PathFinder.FindPath(position), false); Thread.Sleep(500); // Backup loop while (MovementManager.InMoveTo && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && ObjectManager.Target.GetDistance < minDistance && ObjectManager.Me.IsAlive && ObjectManager.Target.IsAlive && (ObjectManager.Target.HaveBuff("Frostbite") || ObjectManager.Target.HaveBuff("Frost Nova")) && !timer.IsReady) { // Wait follow path Thread.Sleep(300); if (settings.BlinkWhenBackup) { cast.OnSelf(Blink); } } MovementManager.StopMove(); Thread.Sleep(500); } // Using Keyboard else { while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && ObjectManager.Me.IsAlive && ObjectManager.Target.IsAlive && ObjectManager.Target.GetDistance < minDistance && (ObjectManager.Target.HaveBuff("Frostbite") || ObjectManager.Target.HaveBuff("Frost Nova")) && !timer.IsReady) { Move.Backward(Move.MoveAction.PressKey, 500); } } cast.IsBackingUp = false; } // Polymorph if (settings.UsePolymorph && ObjectManager.GetNumberAttackPlayer() > 1 && Polymorph.KnownSpell && !cast.IsBackingUp && !cast.IsApproachingTarget && specialization.RotationType != Enums.RotationType.Party && _polymorphableEnemyInThisFight) { WoWUnit myNearbyPolymorphed = null; // Detect if a polymorph cast has succeeded if (_polymorphedEnemy != null) { myNearbyPolymorphed = ObjectManager.GetObjectWoWUnit().Find(u => u.HaveBuff("Polymorph") && u.Guid == _polymorphedEnemy.Guid); } // If we don't have a polymorphed enemy if (myNearbyPolymorphed == null) { _polymorphedEnemy = null; _isPolymorphing = true; WoWUnit firstTarget = ObjectManager.Target; WoWUnit potentialPolymorphTarget = null; // Select our attackers one by one for potential polymorphs foreach (WoWUnit enemy in ObjectManager.GetUnitAttackPlayer()) { Interact.InteractGameObject(enemy.GetBaseAddress); if ((enemy.CreatureTypeTarget == "Beast" || enemy.CreatureTypeTarget == "Humanoid") && enemy.Guid != firstTarget.Guid) { potentialPolymorphTarget = enemy; break; } } if (potentialPolymorphTarget == null) { _polymorphableEnemyInThisFight = false; } // Polymorph cast if (potentialPolymorphTarget != null && _polymorphedEnemy == null && cast.OnFocusUnit(Polymorph, potentialPolymorphTarget)) { Usefuls.WaitIsCasting(); _polymorphedEnemy = potentialPolymorphTarget; } _isPolymorphing = false; } } }
internal void CombatRotation() { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && Fight.InFight) { if (Lua.LuaDoString <bool>(@"return (UnitIsTapped(""target"")) and (not UnitIsTappedByPlayer(""target""));")) { Fight.StopFight(); Lua.LuaDoString("ClearTarget();"); System.Threading.Thread.Sleep(400); } } if (ObjectManager.Me.HealthPercent <= 40 && !FlashHeal.KnownSpell) { LesserHeal.Launch(); } if (ObjectManager.Me.HealthPercent <= 40 && FlashHeal.KnownSpell && !ObjectManager.Me.HaveBuff("Shadowform")) { FlashHeal.Launch(); } if (ObjectManager.Me.HealthPercent <= 70 && Shield.KnownSpell && !ObjectManager.Me.HaveBuff("Power Word: Shield") && !ObjectManager.Me.HaveBuff("Weakened Soul")) { Shield.Launch(); } if (VampiricEmbrace.KnownSpell && !ObjectManager.Target.HaveBuff("Vampiric Embrace") && ObjectManager.Target.GetDistance < 28) { VampiricEmbrace.Launch(); } if (MindBlast.KnownSpell && ObjectManager.Me.ManaPercentage > 60 && ObjectManager.Target.GetDistance < 28) { this.MindBlast.Launch(); } if (HolyFire.KnownSpell && !Shadowform.KnownSpell && ObjectManager.Me.ManaPercentage > 60 && ObjectManager.Target.GetDistance < 25 && ObjectManager.Target.GetDistance > 8 && ObjectManager.Target.HealthPercent >= 85) { this.HolyFire.Launch(); } if (ShadowWordPain.KnownSpell && !ObjectManager.Target.HaveBuff("Shadow Word: Pain") && ObjectManager.Target.GetDistance < 28) { ShadowWordPain.Launch(); } if (Mindflay.KnownSpell && ObjectManager.Me.ManaPercentage > 40 && ObjectManager.Target.GetDistance < 20 && ObjectManager.Me.HaveBuff("Power Word: Shield")) { Mindflay.Launch(); Thread.Sleep(Usefuls.Latency); Usefuls.WaitIsCasting(); } if (Smite.KnownSpell && ObjectManager.Me.ManaPercentage > 20 && ObjectManager.Me.HealthPercent >= 40 && ObjectManager.Me.Level < 5 && ObjectManager.Target.GetDistance < 25) { Smite.Launch(); } if (DevouringPlague.KnownSpell && ObjectManager.Target.GetDistance < 25) { DevouringPlague.Launch(); } if (!Lua.LuaDoString <bool>("return IsAutoRepeatAction(" + (SpellManager.GetSpellSlotId(SpellListManager.SpellIdByName("Shoot")) + 1) + ")") && ObjectManager.Me.HealthPercent >= 40) { if (Shoot.KnownSpell) { SpellManager.CastSpellByNameLUA("Shoot"); } return; } }
public override void Run() { #region Player try { if (!string.IsNullOrEmpty(nManagerSetting.CurrentSetting.FoodName) && ItemsManager.GetItemCount(nManagerSetting.CurrentSetting.FoodName) > 0) { if (ObjectManager.ObjectManager.Me.HealthPercent <= nManagerSetting.CurrentSetting.EatFoodWhenHealthIsUnderXPercent) { Logging.Write("Health regeneration started: Food mode"); EatOrDrink(nManagerSetting.CurrentSetting.FoodName); Logging.Write("Health regeneration done: Food mode"); } } // We check for Mana -after- we eat food, to make sure we still need it since most food now gives mana too. if (!string.IsNullOrEmpty(nManagerSetting.CurrentSetting.BeverageName) && ItemsManager.GetItemCount(nManagerSetting.CurrentSetting.BeverageName) > 0) { if (nManagerSetting.CurrentSetting.DoRegenManaIfLow && ObjectManager.ObjectManager.Me.ManaPercentage <= nManagerSetting.CurrentSetting.DrinkBeverageWhenManaIsUnderXPercent) { Logging.Write("Mana regeneration started: Beverage mode"); EatOrDrink(nManagerSetting.CurrentSetting.BeverageName, true); Logging.Write("Mana regeneration done: Beverage mode"); } } if (ObjectManager.ObjectManager.Me.WowClass == WoWClass.Mage && _mageConjureActive) { int targetItem = GetBestMageFoodInBags(); while (targetItem <= 0) { if (!NeedToRun) { return; } if (_mageConjureSpell.IsSpellUsable) { _mageConjureCount++; _mageConjureSpell.Cast(true); Thread.Sleep(300); } Thread.Sleep(1000); targetItem = GetBestMageFoodInBags(); if (_mageConjureCount > 4) { _mageConjureActive = false; } if (ObjectManager.ObjectManager.Me.InInevitableCombat) { return; } } if (targetItem > 0) { _mageConjureCount = 0; Logging.Write("Health regeneration started: Mage Food mode"); EatOrDrink(ItemsManager.GetItemNameById(targetItem)); Logging.Write("Health regeneration done: Mage Food mode"); } } if (CombatClass.GetLightHealingSpell == null) { return; } // In case we did not use food/beverage, we check if we need to heal ourself. if (CombatClass.GetLightHealingSpell.IsSpellUsable && NeedToRun) { Logging.Write("Regeneration started: Light Heal mode"); if (ObjectManager.ObjectManager.Me.IsMounted) { Usefuls.DisMount(); } MovementManager.StopMove(); Thread.Sleep(500); var timer = new Timer(10000); while (CombatClass.GetLightHealingSpell.IsSpellUsable && NeedToRun) { Thread.Sleep(250); if (ObjectManager.ObjectManager.Me.IsCasting) { continue; } if (Math.Abs(ObjectManager.ObjectManager.Me.HealthPercent) < 0.001f) { return; } if (ObjectManager.ObjectManager.Me.InCombat || ObjectManager.ObjectManager.Me.IsDeadMe) { return; } if (timer.IsReady) { break; } CombatClass.GetLightHealingSpell.CastOnSelf(true); } Logging.Write(!NeedToRun ? "Regeneration done (success): Light Heal mode" : "Regeneration done (timer): Light Heal mode"); } } catch (Exception e) { Logging.WriteError("Regeneration.Run(): " + e); } #endregion }
protected override void CombatRotation() { base.CombatRotation(); bool _shouldBeInterrupted = ToolBox.TargetIsCasting(); WoWUnit Target = ObjectManager.Target; // Force melee if (_combatMeleeTimer.IsReady) { RangeManager.SetRangeToMelee(); } // Check Auto-Attacking ToolBox.CheckAutoAttack(Attack); // Check if interruptable enemy is in list if (_shouldBeInterrupted) { _fightingACaster = true; RangeManager.SetRangeToMelee(); if (!_casterEnemies.Contains(ObjectManager.Target.Name)) { _casterEnemies.Add(ObjectManager.Target.Name); } } // Kick interrupt if (_shouldBeInterrupted && cast.OnTarget(Kick)) { return; } // Adrenaline Rush if (!Me.HaveBuff("Adrenaline Rush") && cast.OnSelf(AdrenalineRush)) { return; } // Blade Flurry if (!Me.HaveBuff("Blade Flurry") && cast.OnSelf(BladeFlurry)) { return; } // Riposte if (Riposte.IsSpellUsable && (Target.CreatureTypeTarget.Equals("Humanoid") || settings.RiposteAll) && cast.OnTarget(Riposte)) { return; } // Bandage if (!ObjectManager.Target.IsTargetingMe && Me.HealthPercent < 40) { MovementManager.StopMoveTo(true, 500); ItemsManager.UseItemByNameOrId(_myBestBandage); Logger.Log("Using " + _myBestBandage); Usefuls.WaitIsCasting(); return; } // Blind if (Me.HealthPercent < 40 && Target.IsTargetingMe && !ToolBox.HasDebuff("Recently Bandaged") && _myBestBandage != null && settings.UseBlindBandage && cast.OnTarget(Blind)) { return; } // Evasion if (Me.HealthPercent < 30 && !Me.HaveBuff("Evasion") && cast.OnSelf(Evasion)) { return; } // Cloak of Shadows if (Me.HealthPercent < 30 && !Me.HaveBuff("Cloak of Shadows") && Target.HealthPercent > 50 && cast.OnSelf(CloakOfShadows)) { return; } // DPS ROTATION // Slice and Dice if ((!Me.HaveBuff("Slice and Dice") || ToolBox.BuffTimeLeft("Slice and Dice") < 4) && Me.ComboPoint > 0 && cast.OnTarget(SliceAndDice)) { return; } // Shiv if (Target.HaveBuff("Deadly Poison") && ToolBox.DeBuffTimeLeft("Deadly Poison", "target") < 3 && cast.OnTarget(Shiv)) { return; } // Rupture if (!Target.HaveBuff("Rupture") && Me.ComboPoint > 1 && cast.OnTarget(Rupture)) { return; } // Eviscerate if (ToolBox.DeBuffTimeLeft("Rupture", "target") > 5 && Me.ComboPoint > 3 && cast.OnTarget(Eviscerate)) { return; } // GhostlyStrike if (Me.ComboPoint < 5 && cast.OnTarget(GhostlyStrike)) { return; } // Hemohrrage if (Me.ComboPoint < 5 && cast.OnTarget(Hemorrhage)) { return; } // Backstab if (Me.ComboPoint < 5 && Me.Energy >= 60 && BehindTargetCheck && cast.OnTarget(Backstab)) { return; } // Sinister Strike if (Me.ComboPoint < 5 && Me.Energy >= 60 && cast.OnTarget(SinisterStrike)) { return; } }
protected override void CombatRotation() { base.CombatRotation(); bool _shouldBeInterrupted = ToolBox.TargetIsCasting(); bool _inMeleeRange = ObjectManager.Target.GetDistance < 6f; WoWUnit Target = ObjectManager.Target; // Force melee if (_combatMeleeTimer.IsReady) { RangeManager.SetRangeToMelee(); } // Check if fighting a caster if (_shouldBeInterrupted) { _fightingACaster = true; RangeManager.SetRangeToMelee(); if (!_casterEnemies.Contains(Target.Name)) { _casterEnemies.Add(Target.Name); } } // Check Auto-Attacking ToolBox.CheckAutoAttack(Attack); // Party Tranquility if (settings.PartyTranquility && !AIOParty.GroupAndRaid.Any(e => e.IsTargetingMe)) { bool needTranquility = AIOParty.GroupAndRaid .FindAll(m => m.HealthPercent < 50) .Count > 2; if (needTranquility && cast.OnTarget(Tranquility)) { Usefuls.WaitIsCasting(); return; } } // PARTY Rebirth if (settings.PartyUseRebirth) { WoWPlayer needRebirth = AIOParty.GroupAndRaid .Find(m => m.IsDead); if (needRebirth != null && cast.OnFocusUnit(Rebirth, needRebirth)) { return; } } // PARTY Innervate if (settings.PartyUseInnervate) { WoWPlayer needInnervate = AIOParty.GroupAndRaid .Find(m => m.ManaPercentage < 10 && !m.HaveBuff("Innervate")); if (needInnervate != null && cast.OnFocusUnit(Innervate, needInnervate)) { return; } } if (settings.PartyRemoveCurse) { // PARTY Remove Curse WoWPlayer needRemoveCurse = AIOParty.GroupAndRaid .Find(m => ToolBox.HasCurseDebuff(m.Name)); if (needRemoveCurse != null && cast.OnFocusUnit(RemoveCurse, needRemoveCurse)) { return; } } if (settings.PartyAbolishPoison) { // PARTY Abolish Poison WoWPlayer needAbolishPoison = AIOParty.GroupAndRaid .Find(m => ToolBox.HasPoisonDebuff(m.Name)); if (needAbolishPoison != null && cast.OnFocusUnit(AbolishPoison, needAbolishPoison)) { return; } } // Catorm if (!Me.HaveBuff(CatForm.Name) && cast.OnSelf(CatForm)) { return; } // Bear Form if (!Me.HaveBuff(BearForm.Name) && !Me.HaveBuff(DireBearForm.Name) && !CatForm.KnownSpell) { if (cast.OnSelf(DireBearForm) || cast.OnSelf(BearForm)) { return; } } #region Cat Form Rotation // **************** CAT FORM ROTATION **************** if (Me.HaveBuff(CatForm.Name)) { RangeManager.SetRangeToMelee(); // Shred (when behind) if (Me.HaveBuff("Clearcasting") && Me.Energy < 80 && cast.OnTarget(Shred)) { return; } // Faerie Fire if (!Target.HaveBuff("Faerie Fire (Feral)") && cast.OnTarget(FaerieFireFeral)) { return; } // Mangle if (Me.ComboPoint < 5 && Me.Energy > 40 && MangleCat.KnownSpell && cast.OnTarget(MangleCat)) { return; } // Rip if (Me.ComboPoint >= 5 && Me.Energy >= 80 && cast.OnTarget(Rip)) { return; } // Rip if (Me.ComboPoint >= 4 && Me.Energy >= 80 && !Target.HaveBuff("Mangle (Cat)") && cast.OnTarget(Rip)) { return; } // Ferocious bite (Rip is banned) if (Me.ComboPoint >= 5 && Me.Energy >= 90 && cast.OnTarget(FerociousBite)) { return; } // Claw if (Me.ComboPoint < 5 && !MangleCat.KnownSpell && cast.OnTarget(Claw)) { return; } } #endregion #region Bear form rotation // **************** BEAR FORM ROTATION **************** if (Me.HaveBuff(BearForm.Name) || Me.HaveBuff(DireBearForm.Name)) { RangeManager.SetRangeToMelee(); // Frenzied Regeneration if (Me.HealthPercent < 50 && cast.OnSelf(FrenziedRegeneration)) { return; } // Faerie Fire if (!Target.HaveBuff("Faerie Fire (Feral)") && cast.OnTarget(FaerieFireFeral)) { return; } // Swipe if (ObjectManager.GetNumberAttackPlayer() > 1 && ToolBox.GetNbEnemiesClose(8f) > 1 && cast.OnTarget(Swipe)) { return; } // Interrupt with Bash if (_shouldBeInterrupted) { Thread.Sleep(Main.humanReflexTime); if (cast.OnTarget(Bash)) { return; } } // Enrage if (settings.UseEnrage && cast.OnSelf(Enrage)) { return; } // Demoralizing Roar if (!Target.HaveBuff("Demoralizing Roar") && !Target.HaveBuff("Demoralizing Shout") && Target.GetDistance < 9f && cast.OnTarget(DemoralizingRoar)) { return; } // Maul if (!MaulOn() && (!_fightingACaster || Me.Rage > 30) && cast.OnTarget(Maul)) { return; } } #endregion #region Human form rotation // **************** HUMAN FORM ROTATION **************** // Avoid accidental Human Form stay if (CatForm.KnownSpell && CatForm.Cost < Me.Mana) { return; } if (BearForm.KnownSpell && BearForm.Cost < Me.Mana) { return; } if (!Me.HaveBuff(BearForm.Name) && !Me.HaveBuff(CatForm.Name) && !Me.HaveBuff(DireBearForm.Name)) { // Moonfire if (!Target.HaveBuff(Moonfire.Name) && Me.ManaPercentage > 15 && Target.HealthPercent > 15 && Me.Level >= 8 && cast.OnTarget(Moonfire)) { return; } // Wrath if (Me.ManaPercentage > 45 && Target.HealthPercent > 30 && Me.Level >= 8 && cast.OnTarget(Wrath)) { return; } // Moonfire Low level DPS if (!Target.HaveBuff(Moonfire.Name) && Me.ManaPercentage > 50 && Target.HealthPercent > 30 && Me.Level < 8 && cast.OnTarget(Moonfire)) { return; } // Wrath Low level DPS if (Me.ManaPercentage > 60 && Target.HealthPercent > 30 && Me.Level < 8 && cast.OnTarget(Wrath)) { return; } } #endregion }
private void GCDCycle() { Usefuls.SleepGlobalCooldown(); try { Memory.WowMemory.GameFrameLock(); // !!! WARNING - DONT SLEEP WHILE LOCKED - DO FINALLY(GameFrameUnLock()) !!! if (MySettings.UseFelRush && FelRush.IsSpellUsable && CombatClass.InSpellRange(ObjectManager.Target, 0, 20 /*FelRush Range*/) && //Keep Recharging (FelRush.GetSpellCharges == 2 || //Generate Fury (FelMastery.HaveBuff && (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 30) || //Trigger Momentum (Momentum.HaveBuff && !MomentumBuff.HaveBuff))) { FelRush.Cast(); return; } if (MySettings.UseVengefulRetreat && VengefulRetreat.IsSpellUsable && CombatClass.InSpellRange(ObjectManager.Target, 0, 20 /*Vengeful Retreat Range*/) && //Generate Fury ((Prepared.HaveBuff && (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 20) || //Trigger Momentum (Momentum.HaveBuff && !MomentumBuff.HaveBuff))) { VengefulRetreat.Cast(); return; } //Single Target if (ObjectManager.GetUnitInSpellRange(5f) == 1) { if (MySettings.UseNemesis && Nemesis.IsSpellUsable && Nemesis.IsHostileDistanceGood) { Nemesis.Cast(); return; } if (Demonic.HaveBuff && MySettings.UseEyeBeam && EyeBeam.IsSpellUsable && EyeBeam.IsHostileDistanceGood) { EyeBeam.Cast(); return; } if (MySettings.UseFelEruption && FelEruption.IsSpellUsable && FelEruption.IsHostileDistanceGood) { FelEruption.Cast(); return; } if (MySettings.UseFuryoftheIllidari && FuryoftheIllidari.IsSpellUsable && FuryoftheIllidari.IsHostileDistanceGood && //Only with Momentum (!Momentum.HaveBuff || MomentumBuff.HaveBuff)) { FuryoftheIllidari.Cast(); return; } if (FirstBlood.HaveBuff && (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { if (MySettings.UseBladeDance && BladeDance.IsSpellUsable && BladeDance.IsHostileDistanceGood) { BladeDance.Cast(); return; } if (MySettings.UseDeathSweep && DeathSweep.IsSpellUsable && DeathSweep.IsHostileDistanceGood) { DeathSweep.Cast(); return; } } if (MySettings.UseFelblade && Felblade.IsSpellUsable && Felblade.IsHostileDistanceGood && //Generate Fury (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 30) { Felblade.Cast(); return; } if (Bloodlet.HaveBuff && MySettings.UseThrowGlaive && ThrowGlaive.IsSpellUsable && ThrowGlaive.IsHostileDistanceGood && //Only with Momentum (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { ThrowGlaive.Cast(); return; } if (MySettings.UseFelBarrage && FelBarrage.IsSpellUsable && FelBarrage.IsHostileDistanceGood && //Keep Recharging FelBarrage.GetSpellCharges == 5 && //Only with Momentum (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { FelBarrage.Cast(); return; } if (MySettings.UseAnnihilation && Annihilation.IsSpellUsable && Annihilation.IsHostileDistanceGood && //Generate Fury (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 30) { Annihilation.Cast(); return; } if (AnguishoftheDeceiver.HaveBuff && MySettings.UseEyeBeam && EyeBeam.IsSpellUsable && EyeBeam.IsHostileDistanceGood) { EyeBeam.Cast(); return; } if (MySettings.UseChaosStrike && ChaosStrike.IsSpellUsable && ChaosStrike.IsHostileDistanceGood && //Generate Fury (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 30) { ChaosStrike.Cast(); return; } if (MySettings.UseFelBarrage && FelBarrage.IsSpellUsable && FelBarrage.IsHostileDistanceGood && //Keep Recharging FelBarrage.GetSpellCharges >= 4 && //Only with Momentum (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { FelBarrage.Cast(); return; } if (!DemonBlades.HaveBuff && MySettings.UseDemonsBite && DemonsBite.IsSpellUsable && DemonsBite.IsHostileDistanceGood) { DemonsBite.Cast(); return; } if (MySettings.UseFelRush && FelRush.IsSpellUsable && CombatClass.InSpellRange(ObjectManager.Target, 6, 20 /*FelRush Range*/)) { FelRush.Cast(); return; } if (MySettings.UseThrowGlaive && ThrowGlaive.IsSpellUsable && (!CombatClass.InMeleeRange(ObjectManager.Target) || DemonBlades.HaveBuff)) { ThrowGlaive.Cast(); return; } } //Multiple Target else { if (MySettings.UseFuryoftheIllidari && FuryoftheIllidari.IsSpellUsable && FuryoftheIllidari.IsHostileDistanceGood && //Only with Momentum (!Momentum.HaveBuff || MomentumBuff.HaveBuff)) { FuryoftheIllidari.Cast(); return; } if (MySettings.UseFelBarrage && FelBarrage.IsSpellUsable && FelBarrage.IsHostileDistanceGood && //Keep Recharging FelBarrage.GetSpellCharges >= 4 && //Only with Momentum (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { FelBarrage.Cast(); return; } if (MySettings.UseEyeBeam && EyeBeam.IsSpellUsable && EyeBeam.IsHostileDistanceGood && //Only with Momentum (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { EyeBeam.Cast(); return; } if (FirstBlood.HaveBuff && ObjectManager.GetUnitInSpellRange(5f) > 2 && (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { if (MySettings.UseBladeDance && BladeDance.IsSpellUsable && BladeDance.IsHostileDistanceGood) { BladeDance.Cast(); return; } if (MySettings.UseDeathSweep && DeathSweep.IsSpellUsable && DeathSweep.IsHostileDistanceGood) { DeathSweep.Cast(); return; } } if (Bloodlet.HaveBuff && MySettings.UseThrowGlaive && ThrowGlaive.IsSpellUsable && ThrowGlaive.IsHostileDistanceGood && //Only with Momentum (!MomentumBuff.HaveBuff || MomentumBuff.HaveBuff)) { ThrowGlaive.Cast(); return; } if (MySettings.UseChaosStrike && ChaosStrike.IsSpellUsable && ChaosCleave.HaveBuff && ObjectManager.GetUnitInSpellRange(ChaosStrike.MaxRangeHostile) <= 3) { ChaosStrike.Cast(); return; } if (MySettings.UseThrowGlaive && ThrowGlaive.IsSpellUsable && ThrowGlaive.IsHostileDistanceGood) { ThrowGlaive.Cast(); return; } if (MySettings.UseChaosStrike && ChaosStrike.IsSpellUsable && ChaosStrike.IsHostileDistanceGood && //Generate Fury (!DemonBlades.HaveBuff || (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 40) && (ObjectManager.Me.MaxFury - ObjectManager.Me.Fury) < 30) { ChaosStrike.Cast(); return; } if (!DemonBlades.HaveBuff && MySettings.UseDemonsBite && DemonsBite.IsSpellUsable && DemonsBite.IsHostileDistanceGood) { DemonsBite.Cast(); return; } if (MySettings.UseInfernalStrike && InfernalStrike.IsSpellUsable && InfernalStrike.IsHostileDistanceGood) { InfernalStrike.CastAtPosition(ObjectManager.Target.Position); return; } } } finally { Memory.WowMemory.GameFrameUnLock(); } }
internal static void Pull() { // Melee ? if (_pullMeleeTimer.ElapsedMilliseconds <= 0 && ObjectManager.Target.GetDistance <= _pullRange + 3) { _pullMeleeTimer.Start(); } if (_pullMeleeTimer.ElapsedMilliseconds > 8000 && !_goInMelee) { _goInMelee = true; _pullMeleeTimer.Reset(); } // Check if caster if (_casterEnemies.Contains(ObjectManager.Target.Name)) { _fightingACaster = true; } // Water Shield if (!Me.HaveBuff("Water Shield") && !Me.HaveBuff("Lightning Shield") && (_settings.UseWaterShield || !_settings.UseLightningShield) || Me.ManaPercentage < _lowManaThreshold) { if (Cast(WaterShield)) { return; } } // Ligntning Shield if (Me.ManaPercentage > _lowManaThreshold && !Me.HaveBuff("Lightning Shield") && !Me.HaveBuff("Water Shield") && _settings.UseLightningShield && (!WaterShield.KnownSpell || !_settings.UseWaterShield)) { if (Cast(LightningShield)) { return; } } // Pull with Lightning Bolt if (ObjectManager.Target.GetDistance <= _pullRange && !_goInMelee) { // pull with rank one if (_settings.PullRankOneLightningBolt && LightningBolt.IsSpellUsable) { MovementManager.StopMove(); Lua.RunMacroText("/cast Lightning Bolt(Rank 1)"); } // pull with max rank if (_settings.PullWithLightningBolt && !_settings.PullRankOneLightningBolt && LightningBolt.IsSpellUsable) { MovementManager.StopMove(); Lua.RunMacroText("/cast Lightning Bolt"); } _pullAttempt++; Thread.Sleep(300); // Check if we're NOT casting if (!Me.IsCast) { Main.Log($"Pull attempt failed ({_pullAttempt})"); if (_pullAttempt > 3) { Main.Log("Cast unsuccesful, going in melee"); _goInMelee = true; } return; } // If we're casting Usefuls.WaitIsCasting(); int limit = 1500; while (!Me.InCombatFlagOnly && limit > 0) { Thread.Sleep(100); limit -= 100; } } }
internal static void BuffRotation() { if (!Me.IsMounted) { // Make sure we have mana to summon if (!ObjectManager.Pet.IsValid && ObjectManager.Me.ManaPercentage < 95 && !ObjectManager.Me.HaveBuff("Drink") && (SummonVoidwalker.KnownSpell && !SummonVoidwalker.IsSpellUsable && ToolBox.CountItemStacks("Soul Shard") > 0 || (SummonImp.KnownSpell && !SummonImp.IsSpellUsable && !SummonVoidwalker.KnownSpell))) { Main.Log("Not enough mana to summon, forcing regen"); wManager.wManagerSetting.CurrentSetting.DrinkPercent = 95; Thread.Sleep(1000); return; } else { wManager.wManagerSetting.CurrentSetting.DrinkPercent = _saveDrinkPercent; } // Switch Auto Torment & Suffering off if (PetAndConsumables.MyWarlockPet().Equals("Voidwalker")) { ToolBox.TogglePetSpellAuto("Torment", _settings.AutoTorment); ToolBox.TogglePetSpellAuto("Suffering", false); } // Summon Felguard if ((!ObjectManager.Pet.IsValid || PetAndConsumables.MyWarlockPet().Equals("Voidwalker") || PetAndConsumables.MyWarlockPet().Equals("Imp")) && SummonFelguard.KnownSpell) { Thread.Sleep(Usefuls.Latency + 500); // Safety for Mount check if (!ObjectManager.Me.IsMounted) { if (Cast(FelDomination)) { Thread.Sleep(200); } if (Cast(SummonFelguard)) { return; } } } // Summon Felguard for mana or health if (SummonFelguard.KnownSpell && (ObjectManager.Pet.ManaPercentage < 20 || ObjectManager.Pet.HealthPercent < 20) && ObjectManager.Pet.IsValid) { Thread.Sleep(Usefuls.Latency + 500); // Safety for Mount check if (!ObjectManager.Me.IsMounted) { if (Cast(FelDomination)) { Thread.Sleep(200); } if (Cast(SummonFelguard)) { return; } } } // Summon Void Walker if ((!ObjectManager.Pet.IsValid || !PetAndConsumables.MyWarlockPet().Equals("Voidwalker")) && SummonVoidwalker.KnownSpell && !SummonFelguard.KnownSpell) { Thread.Sleep(Usefuls.Latency + 500); // Safety for Mount check if (!ObjectManager.Me.IsMounted) { if (Cast(FelDomination)) { Thread.Sleep(200); } if (Cast(SummonVoidwalker)) { return; } } } // Summon Void Walker for mana if (PetAndConsumables.MyWarlockPet().Equals("Voidwalker") && SummonVoidwalker.KnownSpell && ObjectManager.Pet.ManaPercentage < 20 && !SummonFelguard.KnownSpell) { Thread.Sleep(Usefuls.Latency + 500); // Safety for Mount check if (!ObjectManager.Me.IsMounted) { if (Cast(FelDomination)) { Thread.Sleep(200); } if (Cast(SummonVoidwalker)) { return; } } } // Summon Imp if (!ObjectManager.Pet.IsValid && SummonImp.KnownSpell && (!SummonVoidwalker.KnownSpell || ToolBox.CountItemStacks("Soul Shard") < 1)) { Thread.Sleep(Usefuls.Latency + 500); // Safety for Mount check if (!ObjectManager.Me.IsMounted) { if (Cast(FelDomination)) { Thread.Sleep(200); } if (Cast(SummonImp)) { return; } } } // Life Tap if (Me.HealthPercent > Me.ManaPercentage && _settings.UseLifeTap) { if (Cast(LifeTap)) { return; } } // Unending Breath if (!Me.HaveBuff("Unending Breath") && UnendingBreath.KnownSpell && UnendingBreath.IsSpellUsable && _settings.UseUnendingBreath) { Lua.RunMacroText("/target player"); if (Cast(UnendingBreath)) { Lua.RunMacroText("/cleartarget"); return; } } // Demon Skin if (!Me.HaveBuff("Demon Skin") && !DemonArmor.KnownSpell && DemonSkin.KnownSpell) { if (Cast(DemonSkin)) { return; } } // Demon Armor if ((!Me.HaveBuff("Demon Armor") || Me.HaveBuff("Demon Skin")) && DemonArmor.KnownSpell && (!FelArmor.KnownSpell || (FelArmor.KnownSpell && !_settings.UseFelArmor))) { if (Cast(DemonArmor)) { return; } } // Soul Link if (SoulLink.KnownSpell && !Me.HaveBuff("Soul Link")) { if (Cast(SoulLink)) { return; } } // Fel Armor if (!Me.HaveBuff("Fel Armor") && FelArmor.KnownSpell && _settings.UseFelArmor) { if (Cast(FelArmor)) { return; } } // Health Funnel if (ObjectManager.Pet.HealthPercent < 50 && Me.HealthPercent > 40 && ObjectManager.Pet.GetDistance < 19 && !ObjectManager.Pet.InCombatFlagOnly && HealthFunnel.KnownSpell) { Fight.StopFight(); MovementManager.StopMove(); if (PetAndConsumables.MyWarlockPet().Equals("Voidwalker") && ToolBox.GetPetSpellIndex("Consume Shadows") != 0) { ToolBox.PetSpellCast("Consume Shadows"); Usefuls.WaitIsCasting(); MovementManager.StopMove(); Thread.Sleep(500); } ToolBox.StopWandWaitGCD(UseWand, ShadowBolt); MovementManager.StopMove(); MovementManager.StopMoveNewThread(); if (Cast(HealthFunnel)) { Thread.Sleep(500); Usefuls.WaitIsCasting(); return; } } // Health Stone if (!PetAndConsumables.HaveHealthstone()) { if (Cast(CreateHealthStone)) { return; } } // Create Soul Stone if (!PetAndConsumables.HaveSoulstone() && CreateSoulstone.KnownSpell) { if (Cast(CreateSoulstone)) { return; } } // Use Soul Stone if (!Me.HaveBuff("Soulstone Resurrection") && CreateSoulstone.KnownSpell && ToolBox.HaveOneInList(PetAndConsumables.SoulStones()) && ToolBox.GetItemCooldown(PetAndConsumables.SoulStones()) <= 0) { MovementManager.StopMove(); Lua.RunMacroText("/target player"); PetAndConsumables.UseSoulstone(); Usefuls.WaitIsCasting(); Lua.RunMacroText("/cleartarget"); } // Cannibalize if (ObjectManager.GetObjectWoWUnit().Where(u => u.GetDistance <= 8 && u.IsDead && (u.CreatureTypeTarget == "Humanoid" || u.CreatureTypeTarget == "Undead")).Count() > 0) { if (Me.HealthPercent < 50 && !Me.HaveBuff("Drink") && !Me.HaveBuff("Food") && Me.IsAlive && Cannibalize.KnownSpell && Cannibalize.IsSpellUsable) { if (Cast(Cannibalize)) { return; } } } } }
protected override void BuffRotation() { if (!Me.HaveBuff("Drink") || Me.ManaPercentage > 95) { base.BuffRotation(); // Unending Breath if (!Me.HaveBuff("Unending Breath") && settings.UseUnendingBreath && cast.OnSelf(UnendingBreath)) { return; } // Demon Skin if (!Me.HaveBuff("Demon Skin") && !DemonArmor.KnownSpell && !FelArmor.KnownSpell && cast.OnSelf(DemonSkin)) { return; } // Demon Armor if ((!Me.HaveBuff("Demon Armor")) && !FelArmor.KnownSpell && cast.OnSelf(DemonArmor)) { return; } // Fel Armor if (!Me.HaveBuff("Fel Armor") && cast.OnSelf(FelArmor)) { return; } // Health Funnel OOC if (ObjectManager.Pet.HealthPercent < 50 && Me.HealthPercent > 40 && ObjectManager.Pet.GetDistance < 19 && !ObjectManager.Pet.InCombatFlagOnly && settings.HealthFunnelOOC) { Lua.LuaDoString("PetWait();"); MovementManager.StopMove(); Fight.StopFight(); if (WarlockPetAndConsumables.MyWarlockPet().Equals("Voidwalker")) { cast.PetSpell("Consume Shadows", false, true); } if (cast.OnSelf(HealthFunnel)) { Thread.Sleep(500); Usefuls.WaitIsCasting(); Lua.LuaDoString("PetFollow();"); return; } Lua.LuaDoString("PetFollow();"); } // Health Stone if (!WarlockPetAndConsumables.HaveHealthstone() && cast.OnSelf(CreateHealthStone)) { return; } // Create Soul Stone if (!WarlockPetAndConsumables.HaveSoulstone() && cast.OnSelf(CreateSoulstone)) { return; } // PARTY Soul Stone if (CreateSoulstone.KnownSpell && ToolBox.HaveOneInList(WarlockPetAndConsumables.SoulStones()) && ToolBox.GetItemCooldown(WarlockPetAndConsumables.SoulStones()) <= 0) { WoWPlayer noSoulstone = AIOParty.GroupAndRaid .Find(m => !m.HaveBuff("Soulstone Resurrection") && m.GetDistance < 20 && m.Name != "Unknown" && !TraceLine.TraceLineGo(Me.Position, m.Position) && (m.WowClass == WoWClass.Paladin || m.WowClass == WoWClass.Priest || m.WowClass == WoWClass.Shaman || m.WowClass == WoWClass.Druid)); if (noSoulstone != null) { Logger.Log($"Using Soulstone on {noSoulstone.Name}"); MovementManager.StopMoveNewThread(); MovementManager.StopMoveToNewThread(); Lua.RunMacroText($"/target {noSoulstone.Name}"); if (ObjectManager.Target.Name == noSoulstone.Name) { ToolBox.UseFirstMatchingItem(WarlockPetAndConsumables.SoulStones()); Usefuls.WaitIsCasting(); Lua.RunMacroText("/cleartarget"); ToolBox.ClearCursor(); } } } // PARTY Drink if (AIOParty.PartyDrink(settings.PartyDrinkName, settings.PartyDrinkThreshold)) { return; } // Life Tap if (Me.HealthPercent > Me.ManaPercentage && settings.UseLifeTap && cast.OnSelf(LifeTap)) { return; } } }
private static void Main(string[] args) { var processName = Process.GetCurrentProcess().ProcessName.ToLower(); if (!processName.Contains("vshost") && (processName.Contains("bot") || processName.Contains("noob") || processName.Contains("tnb"))) { MessageBox.Show( "You must rename " + Process.GetCurrentProcess().ProcessName + ".exe to something else prior to launch." + Environment.NewLine + "The new name should not contains the words: \"bot, noob, tnb\"", "Security Warning - Follow instructions to avoid automatic detections."); Process.GetCurrentProcess().Kill(); } if (!processName.Contains("vshost")) { var account = Others.GetProcessOwner(Process.GetCurrentProcess().Id); Others.RemoveFileSecurity(Process.GetCurrentProcess().ProcessName + ".exe", account, FileSystemRights.ReadData, AccessControlType.Allow); Others.AddFileSecurity(Process.GetCurrentProcess().ProcessName + ".exe", account, FileSystemRights.ReadData, AccessControlType.Deny); DialogResult resulMb = MessageBox.Show( "World of Warcraft 7.3 is able to detect any hacks or bots, including passives tools. (pixels bot, etc) " + Environment.NewLine + "At the moment, TheNoobBot does not seems to be a target." + Environment.NewLine + "Do you want to ignore this warning and run the bot anyway ?", @"WARNING / ATTENTION / ARTUNG / внимание / 注意", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resulMb != DialogResult.Yes) { MessageBox.Show("You probably made the right decision. We'll notify you if we find a way to effectively protect the bot against detections."); Process.GetCurrentProcess().Kill(); } } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var loginForm = new Login(); /* Begin AutoStart code */ int sId = Others.ToInt32(ExtractArgs(args, "sessId")); if (sId > 0) { string productName = ExtractArgs(args, "product"); string profileName = ExtractArgs(args, "profile"); string battleNet = Others.DecryptString(ExtractArgs(args, "account")); string wowEmail = Others.DecryptString(ExtractArgs(args, "email")); string wowPassword = Others.DecryptString(ExtractArgs(args, "password")); string realmName = Others.DecryptString(ExtractArgs(args, "realm")); string character = Others.DecryptString(ExtractArgs(args, "character")); bool loginInfoProvided = false; Logging.Write("TheNoobBot started automatically. WoW Session Id = " + sId); if (!string.IsNullOrEmpty(battleNet) && !string.IsNullOrEmpty(wowEmail) && !string.IsNullOrEmpty(wowPassword) && !string.IsNullOrEmpty(realmName) && !string.IsNullOrEmpty(character)) { Logging.Write("The game will be connected automatically with player " + character + " if not yet connected."); ScriptOnlineManager.LoadScript(); loginInfoProvided = true; } loginForm.AutoStart(sId, productName, profileName, battleNet, wowEmail, wowPassword, realmName, character, loginInfoProvided); } /* End AutoStart code */ Usefuls.DisableFIPS(); Application.Run(loginForm); }
protected override void CombatRotation() { base.CombatRotation(); bool _shouldBeInterrupted = ToolBox.TargetIsCasting(); WoWUnit Target = ObjectManager.Target; // Force melee if (_combatMeleeTimer.IsReady) { RangeManager.SetRangeToMelee(); } // Check Auto-Attacking ToolBox.CheckAutoAttack(Attack); // Check if interruptable enemy is in list if (_shouldBeInterrupted) { _fightingACaster = true; RangeManager.SetRangeToMelee(); if (!_casterEnemies.Contains(ObjectManager.Target.Name)) { _casterEnemies.Add(ObjectManager.Target.Name); } } // Kick interrupt if (_shouldBeInterrupted) { Thread.Sleep(Main.humanReflexTime); if (cast.OnTarget(Kick) || cast.OnTarget(Gouge) || cast.OnTarget(KidneyShot)) { return; } } // Adrenaline Rush if ((ObjectManager.GetNumberAttackPlayer() > 1 || Target.IsElite) && !Me.HaveBuff("Adrenaline Rush")) { if (cast.OnTarget(AdrenalineRush)) { return; } } // Blade Flurry if (ObjectManager.GetNumberAttackPlayer() > 1 && !Me.HaveBuff("Blade Flurry")) { if (cast.OnTarget(BladeFlurry)) { return; } } // Riposte if (Riposte.IsSpellUsable && (Target.CreatureTypeTarget.Equals("Humanoid") || settings.RiposteAll)) { if (cast.OnTarget(Riposte)) { return; } } // Bandage if (Target.HaveBuff("Blind")) { MovementManager.StopMoveTo(true, 500); ItemsManager.UseItemByNameOrId(_myBestBandage); Logger.Log("Using " + _myBestBandage); Usefuls.WaitIsCasting(); return; } // Blind if (Me.HealthPercent < 40 && !ToolBox.HasDebuff("Recently Bandaged") && _myBestBandage != null && settings.UseBlindBandage) { if (cast.OnTarget(Blind)) { return; } } // Evasion if (ObjectManager.GetNumberAttackPlayer() > 1 || Me.HealthPercent < 30 && !Me.HaveBuff("Evasion") && Target.HealthPercent > 50) { if (cast.OnTarget(Evasion)) { return; } } // Cloak of Shadows if (Me.HealthPercent < 30 && !Me.HaveBuff("Cloak of Shadows") && Target.HealthPercent > 50) { if (cast.OnTarget(CloakOfShadows)) { return; } } // Backstab in combat if (IsTargetStunned() && ToolBox.GetMHWeaponType().Equals("Daggers")) { if (cast.OnTarget(Backstab)) { return; } } // Slice and Dice if (!Me.HaveBuff("Slice and Dice") && Me.ComboPoint > 1 && Target.HealthPercent > 40) { if (cast.OnTarget(SliceAndDice)) { return; } } // Eviscerate logic if (Me.ComboPoint > 0 && Target.HealthPercent < 30 || Me.ComboPoint > 1 && Target.HealthPercent < 45 || Me.ComboPoint > 2 && Target.HealthPercent < 60 || Me.ComboPoint > 3 && Target.HealthPercent < 70) { if (cast.OnTarget(Eviscerate)) { return; } } // GhostlyStrike if (Me.ComboPoint < 5 && !IsTargetStunned() && (!_fightingACaster || !Kick.KnownSpell || Me.Energy > GhostlyStrike.Cost + Kick.Cost)) { if (cast.OnTarget(GhostlyStrike)) { return; } } // Hemohrrage if (Me.ComboPoint < 5 && !IsTargetStunned() && (!_fightingACaster || !Kick.KnownSpell || Me.Energy > Hemorrhage.Cost + Kick.Cost)) { if (cast.OnTarget(Hemorrhage)) { return; } } // Sinister Strike if (Me.ComboPoint < 5 && !IsTargetStunned() && (!_fightingACaster || !Kick.KnownSpell || Me.Energy > SinisterStrike.Cost + Kick.Cost)) { if (cast.OnTarget(SinisterStrike)) { return; } } }