protected void StealthApproach() { Timer stealthApproachTimer = new Timer(7000); _isStealthApproching = true; if (ObjectManager.Me.IsAlive && ObjectManager.Target.IsAlive) { while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && (ObjectManager.Target.GetDistance > 2.5f || !Claw.IsSpellUsable) && (specialization.RotationType == Enums.RotationType.Party || ToolBox.GetClosestHostileFrom(ObjectManager.Target, 20f) == null) && Fight.InFight && !stealthApproachTimer.IsReady && Me.HaveBuff("Prowl")) { Vector3 position = ToolBox.BackofVector3(ObjectManager.Target.Position, ObjectManager.Target, 2.5f); MovementManager.MoveTo(position); Thread.Sleep(50); CastOpener(); } if (stealthApproachTimer.IsReady && ToolBox.Pull(cast, settings.AlwaysPull, new List <AIOSpell> { FaerieFireFeral, MoonfireRank1, Wrath })) { _combatMeleeTimer = new Timer(2000); return; } //ToolBox.CheckAutoAttack(Attack); _isStealthApproching = false; } }
protected virtual void BuffRotation() { _foodManager.CheckIfEnoughFoodAndDrinks(); _foodManager.CheckIfThrowFoodAndDrinks(); _foodManager.CheckIfHaveManaStone(); if (specialization.RotationType == Enums.RotationType.Party) { // PARTY Arcane Intellect WoWPlayer noAI = AIOParty.GroupAndRaid .Find(m => m.Mana > 0 && !m.HaveBuff(ArcaneIntellect.Name)); if (noAI != null && cast.OnFocusUnit(ArcaneIntellect, noAI)) { return; } } // Dampen Magic if (!Me.HaveBuff("Dampen Magic") && settings.UseDampenMagic && DampenMagic.KnownSpell && DampenMagic.IsSpellUsable && cast.OnSelf(DampenMagic)) { return; } }
private void Rotation() { while (Main.isLaunched) { try { if (Me.HaveBuff("Spirit of Redemption")) { // PARTY Greater heal List <AIOPartyMember> needGreaterHealSR = AIOParty.GroupAndRaid .FindAll(m => m.HealthPercent < 100) .OrderBy(m => m.HealthPercent) .ToList(); if (needGreaterHealSR.Count > 0 && cast.OnFocusUnit(GreaterHeal, needGreaterHealSR[0])) { continue; } // PARTY Heal List <AIOPartyMember> needHealSR = AIOParty.GroupAndRaid .FindAll(m => m.HealthPercent < 100) .OrderBy(m => m.HealthPercent) .ToList(); if (!GreaterHeal.KnownSpell && needHealSR.Count > 0 && cast.OnFocusUnit(FlashHeal, needHealSR[0])) { continue; } } if (StatusChecker.OutOfCombat(RotationRole)) { specialization.BuffRotation(); } if (StatusChecker.InPull()) { specialization.Pull(); } if (StatusChecker.InCombat()) { specialization.CombatRotation(); } if (AIOParty.GroupAndRaid.Any(p => p.InCombatFlagOnly && p.GetDistance < 50) || ObjectManager.Me.HaveBuff("Spirit of Redemption")) { specialization.HealerCombat(); } } catch (Exception arg) { Logging.WriteError("ERROR: " + arg, true); } Thread.Sleep(ToolBox.GetLatency() + settings.ThreadSleepCycle); } Logger.Log("Stopped."); }
internal static void Rotation() { Main.Log("Started"); while (Main._isLaunched) { try { if (!Products.InPause && !ObjectManager.Me.IsDeadMe) { Main.settingRange = _goInMelee ? 5f : _pullRange; CheckEnchantWeapon(); totemManager.CheckForTotemicCall(); // Lesser Healing Wave OOC if (!Fight.InFight && Me.HealthPercent < 65 && LesserHealingWave.KnownSpell) { Cast(LesserHealingWave); } // Ghost Wolf if (Me.ManaPercentage > 50 && !Me.IsIndoors && _ghostWolfTimer.ElapsedMilliseconds > 3000 && _settings.UseGhostWolf && !Me.IsMounted && !Fight.InFight && !Me.HaveBuff("Ghost Wolf") && !ObjectManager.Target.IsFlightMaster) { _ghostWolfTimer.Stop(); Cast(GhostWolf); } // Buff rotation if (!Fight.InFight && ObjectManager.GetNumberAttackPlayer() < 1) { BuffRotation(); } // Pull & Combat rotation if (Fight.InFight && ObjectManager.Me.Target > 0UL && ObjectManager.Target.IsAttackable && ObjectManager.Target.IsAlive) { if (ObjectManager.GetNumberAttackPlayer() < 1 && !ObjectManager.Target.InCombatFlagOnly) { Pull(); } else { CombatRotation(); } } } } catch (Exception arg) { Logging.WriteError("ERROR: " + arg, true); } Thread.Sleep(ToolBox.GetLatency() + _settings.ThreadSleepCycle); } Main.Log("Stopped."); }
internal static void Rotation() { Main.Log("Started"); while (Main._isLaunched) { try { if (!Products.InPause && !Me.IsDeadMe) { Main.settingRange = _canOnlyMelee ? 4.5f : 33f; PetManager(); // Switch Auto Growl if (ObjectManager.Pet.IsValid) { ToolBox.TogglePetSpellAuto("Growl", _settings.AutoGrowl); } // Feed if (Lua.LuaDoString <int>("happiness, damagePercentage, loyaltyRate = GetPetHappiness() return happiness", "") < 3 && !Fight.InFight && _settings.FeedPet) { Feed(); } // Pet attack if (Fight.InFight && Me.Target > 0UL && ObjectManager.Target.IsAttackable && !ObjectManager.Pet.HaveBuff("Feed Pet Effect") && ObjectManager.Pet.Target != Me.Target) { Lua.LuaDoString("PetAttack();", false); } // Aspect of the Cheetah if (!Me.IsMounted && !Fight.InFight && !Me.HaveBuff("Aspect of the Cheetah") && MovementManager.InMoveTo && AspectCheetah.IsSpellUsable && AspectCheetah.KnownSpell && Me.ManaPercentage > 60f) { AspectCheetah.Launch(); } if (Fight.InFight && Me.Target > 0UL && ObjectManager.Target.IsAttackable) { CombatRotation(); } } } catch (Exception arg) { Logging.WriteError("ERROR: " + arg, true); } Thread.Sleep(ToolBox.GetLatency() + _settings.ThreadSleepCycle); } Main.Log("Stopped."); }
private void Rotation() { while (Main.isLaunched) { try { if (StatusChecker.OOCMounted()) { // Crusader Aura if (CrusaderAura.KnownSpell && !Me.HaveBuff("Crusader Aura")) { cast.OnTarget(CrusaderAura); } } if (StatusChecker.OutOfCombat(RotationRole)) { specialization.BuffRotation(); } if (StatusChecker.InPull()) { specialization.PullRotation(); } if (StatusChecker.InCombat()) { specialization.CombatRotation(); } if (StatusChecker.InCombatNoTarget()) { specialization.CombatNoTarget(); } if (AIOParty.GroupAndRaid.Any(p => p.InCombatFlagOnly && p.GetDistance < 50)) { specialization.HealerCombat(); } } catch (Exception arg) { Logging.WriteError("ERROR: " + arg, true); } Thread.Sleep(ToolBox.GetLatency() + settings.ThreadSleepCycle); } Logger.Log("Stopped."); }
internal void CheckForTotemicCall() { if (Shaman._settings.UseTotemicCall) { bool haveEarthTotem = Lua.LuaDoString <string>(@"local _, totemName, _, _ = GetTotemInfo(2); return totemName;").Contains("Totem"); bool haveFireTotem = Lua.LuaDoString <string>(@"local _, totemName, _, _ = GetTotemInfo(1); return totemName;").Contains("Totem"); bool haveWindTotem = Lua.LuaDoString <string>(@"local _, totemName, _, _ = GetTotemInfo(4); return totemName;").Contains("Totem"); bool haveWaterTotem = Lua.LuaDoString <string>(@"local _, totemName, _, _ = GetTotemInfo(3); return totemName;").Contains("Totem"); bool haveTotem = haveEarthTotem || haveFireTotem || haveWaterTotem || haveWindTotem; if (_lastTotemPosition != null && haveTotem && _lastTotemPosition.DistanceTo(Me.Position) > 17 && !Me.HaveBuff("Ghost Wolf") && !Me.IsMounted && !Me.IsCast) { Cast(TotemicCall); } } }
private void Rotation() { while (Main.isLaunched) { try { if (Me.HaveBuff("Feign Death")) { Thread.Sleep(500); Move.Backward(Move.MoveAction.PressKey, 100); cast.OnTarget(AutoShot); } if (StatusChecker.BasicConditions() && !Me.IsMounted && !Me.HaveBuff("Food") && !Me.HaveBuff("Drink")) { if (_canOnlyMelee) { RangeManager.SetRangeToMelee(); } else { RangeManager.SetRange(AutoShot.MaxRange - 1); } if (Me.Level >= 10) { PetManager(); } } if (StatusChecker.OutOfCombat(RotationRole)) { specialization.BuffRotation(); } if (StatusChecker.InPull()) { specialization.Pull(); } if (StatusChecker.InCombat()) { specialization.CombatRotation(); } } catch (Exception arg) { Logging.WriteError("ERROR: " + arg, true); } Thread.Sleep(ToolBox.GetLatency() + settings.ThreadSleepCycle); } Logger.Log("Stopped."); }
protected virtual void BuffRotation() { if (!Me.IsMounted && !Me.IsCast) { // Battle Shout if (!Me.HaveBuff("Battle Shout") && (!settings.UseCommandingShout || !CommandingShout.KnownSpell) && cast.OnSelf(BattleShout)) { return; } // Commanding Shout if (!Me.HaveBuff("Commanding Shout") && settings.UseCommandingShout && cast.OnSelf(CommandingShout)) { return; } } }
internal static void BuffRotation() { _foodManager.CheckIfEnoughFoodAndDrinks(); _foodManager.CheckIfThrowFoodAndDrinks(); _foodManager.CheckIfHaveManaStone(); // Frost Armor if (!Me.HaveBuff("Ice Armor")) { if (Cast(IceArmor)) { return; } } // Frost Armor if (!Me.HaveBuff("Frost Armor") && !IceArmor.KnownSpell) { if (Cast(FrostArmor)) { return; } } // Arcane Intellect if (!Me.HaveBuff("Arcane Intellect") && ArcaneIntellect.KnownSpell && ArcaneIntellect.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(ArcaneIntellect)) { Lua.RunMacroText("/cleartarget"); return; } } // Evocation if (Me.ManaPercentage < 30) { if (Cast(Evocation)) { return; } } }
public void Heal() { if (player.IsMounted) { return; } var players = new List <WoWPlayer>() { player }; foreach (var i in Party.GetParty()) { players.Add(i); } foreach (var i in Party.GetRaidMembers()) { players.Add(i); } foreach (var i in players) { if (i.IsDead) { continue; } long manacost = regrowth.RealManaCost(player.MaxMana); if (player.HaveBuff("Cat Form")) { manacost += catform.RealManaCost(basemana); } if (i.MaxHealth - i.Health > 1500 && player.Mana > manacost && !i.HaveBuff("Regrowth") && !player.IsCast) { regrowth.LaunchUsable(i.Name, true); } } }
internal static void BuffRotation() { if (!Me.IsMounted && !Me.IsCast) { // Battle Shout if (!Me.HaveBuff("Battle Shout") && BattleShout.IsSpellUsable && (!_settings.UseCommandingShout || !CommandingShout.KnownSpell)) { if (Cast(BattleShout)) { return; } } // Commanding Shout if (!Me.HaveBuff("Commanding Shout") && (_settings.UseCommandingShout && CommandingShout.KnownSpell)) { if (Cast(CommandingShout)) { return; } } } }
internal static void BuffRotation() { if (!Me.IsMounted && !Me.IsCast) { // Battle Shout if (!Me.HaveBuff("Battle Shout") && BattleShout.IsSpellUsable && (!_settings.UseCommandingShout || !CommandingShout.KnownSpell)) { if (Cast(BattleShout)) { return; } } // Commanding Shout if (!Me.HaveBuff("Commanding Shout") && (_settings.UseCommandingShout && CommandingShout.KnownSpell)) { if (Cast(CommandingShout)) { return; } } // 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; } } } } }
public override void Update() { if ((DateTime.Now - lastupdate).TotalMilliseconds < 500) { return; } lastupdate = DateTime.Now; DateTime start = DateTime.Now; player = WoWAPI.WoWAPI.Player; target = WoWAPI.WoWAPI.Target; if (player.IsDead) { return; } Heal(); /*if (!player.InCombat && !player.HaveBuff("Prowl") && SpellManager.KnowSpell("Pounce") && WoWAPI.WoWAPI.GetDistance(player, target) < target.AggroDistance + 5) * prowl.LaunchUsable();*/ if (player.InCombat) { if (target != null) { if (!player.HaveBuff("Cat Form") && target.IsAttackable && WoWAPI.WoWAPI.GetDistance(player, target) < target.AggroDistance + 10) { catform.LaunchUsable(); } if (target.HaveBuff("Mangle (Cat)") && !target.HaveBuff("Rake")) { rake.LaunchUsable(); } if (!target.HaveBuff("Mangle (Cat)") && target.HaveBuff("Rake")) { manglecat.LaunchUsable(); } if (player.ComboPoint < 5) { manglecat.LaunchUsable(); claw.LaunchUsable(); } else if (player.ComboPoint == 5) { ferociousbite.LaunchUsable(); } } } else if (!player.IsMounted) { if (player.IsSwimming && !player.HaveBuff("Aquatic Form")) { aquaticform.LaunchUsable(); } /*if (player.GetMove && WoWAPI.WoWAPI.GetDistance(player.Position, MovementManager.CurrentPath.LastOrDefault()) > 50) * travelform.LaunchUsable();*/ } if (target != null && target.IsAttackable && !target.HaveBuff("Faerie Fire") && !target.HaveBuff("Faerie Fire (Feral)") && !player.HaveBuff("Prowl")) { if (player.HaveBuff("Cat Form") || player.HaveBuff("Bear Form") || player.HaveBuff("Dire Bear Form")) { if (WoWAPI.WoWAPI.GetDistance(player, target) < faeriefireferal.MaxRange) { // For some reason this spell is bugged and can't be cast like other spells... Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 5)"); Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 4)"); Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 3)"); Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 2)"); Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 1)"); } } else { faeriefire.LaunchUsable(true); } } if (player.ManaPercentage < 20) { innervate.LaunchUsable(true, false); } RunOnInterval(); if (player.Level == 70) { try { foreach (Process proc in Process.GetProcessesByName("wow")) { proc.Kill(); } } catch { } } Logging.WriteDebug(string.Format("FightClass update took {0} ms", (DateTime.Now - start).TotalMilliseconds)); }
private void RacialWarStomp() { if (WarStomp.KnownSpell && WarStomp.IsSpellUsable && !Me.HaveBuff("Bear Form") && !Me.HaveBuff("Cat Form") && !Me.HaveBuff("Dire Bear Form") && ObjectManager.GetNumberAttackPlayer() > 1 && ObjectManager.Target.GetDistance < 8) { WarStomp.Launch(); Usefuls.WaitIsCasting(); } }
public static void Initialize() { Main.Log("Initialized"); Main.SetRange(_pullRange); ZEDruidSettings.Load(); _settings = ZEDruidSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); // Fight end FightEvents.OnFightEnd += (ulong guid) => { _fightingACaster = false; _meleeTimer.Reset(); _pullMeleeTimer.Reset(); _stealthApproachTimer.Reset(); _pullFromAfar = false; Main.SetRange(_pullRange); _isStealthApproching = false; }; // Fight start FightEvents.OnFightStart += (WoWUnit unit, CancelEventArgs cancelable) => { if (Regrowth.KnownSpell) { string bearFormSpell = DireBearForm.KnownSpell ? "Dire Bear Form" : "Bear Form"; _bigHealComboCost = ToolBox.GetSpellCost("Regrowth") + ToolBox.GetSpellCost("Rejuvenation") + ToolBox.GetSpellCost(bearFormSpell); _smallHealComboCost = ToolBox.GetSpellCost("Regrowth") + ToolBox.GetSpellCost(bearFormSpell); } }; // Fight Loop FightEvents.OnFightLoop += (WoWUnit unit, CancelEventArgs cancelable) => { if ((ObjectManager.Target.HaveBuff("Pounce") || ObjectManager.Target.HaveBuff("Maim")) && !MovementManager.InMovement && Me.IsAlive && !Me.IsCast) { if (Me.IsAlive && ObjectManager.Target.IsAlive) { Vector3 position = ToolBox.BackofVector3(ObjectManager.Target.Position, ObjectManager.Target, 2.5f); MovementManager.Go(PathFinder.FindPath(position), false); while (MovementManager.InMovement && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && (ObjectManager.Target.HaveBuff("Pounce") || ObjectManager.Target.HaveBuff("Maim"))) { // Wait follow path Thread.Sleep(500); } } } }; // We override movement to target when approaching in prowl MovementEvents.OnMoveToPulse += (Vector3 point, CancelEventArgs cancelable) => { if (_isStealthApproching && !point.ToString().Equals(ToolBox.BackofVector3(ObjectManager.Target.Position, ObjectManager.Target, 2.5f).ToString())) { cancelable.Cancel = true; } }; // BL Hook OthersEvents.OnAddBlackListGuid += (ulong guid, int timeInMilisec, bool isSessionBlacklist, CancelEventArgs cancelable) => { Main.LogDebug("BL : " + guid + " ms : " + timeInMilisec + " is session: " + isSessionBlacklist); if (Me.HaveBuff("Prowl")) { cancelable.Cancel = true; } }; Rotation(); }
internal static void BuffRotation() { // Holy Light if (Me.HealthPercent < 50 && !Fight.InFight && !Me.IsMounted && HolyLight.IsSpellUsable) { Lua.RunMacroText("/target player"); Cast(HolyLight); Lua.RunMacroText("/cleartarget"); } // Flash of Light if (Me.HealthPercent < 75 && !Fight.InFight && _settings.FlashHealBetweenFights && !Me.IsMounted && FlashOfLight.IsSpellUsable) { Lua.RunMacroText("/target player"); Cast(FlashOfLight); Lua.RunMacroText("/cleartarget"); } // Crusader Aura if (Me.IsMounted && CrusaderAura.KnownSpell && !Me.HaveBuff("Crusader Aura") && !Fight.InFight) { Cast(CrusaderAura); } // Sanctity Aura if (!Me.HaveBuff("Sanctity Aura") && SanctityAura.KnownSpell && !Me.IsMounted) { Cast(SanctityAura); } // Retribution Aura if (!Me.HaveBuff("Retribution Aura") && !SanctityAura.KnownSpell && RetributionAura.KnownSpell && !Me.IsMounted) { Cast(SanctityAura); } // Blessing of Wisdom if (_settings.UseBlessingOfWisdom && !Me.HaveBuff("Blessing of Wisdom") && !Me.IsMounted && BlessingOfWisdom.IsSpellUsable) { Lua.RunMacroText("/target player"); Cast(BlessingOfWisdom); Lua.RunMacroText("/cleartarget"); } // Blessing of Might if (!_settings.UseBlessingOfWisdom && !Me.HaveBuff("Blessing of Might") && !Me.IsMounted && BlessingOfMight.IsSpellUsable) { Lua.RunMacroText("/target player"); Cast(BlessingOfMight); Lua.RunMacroText("/cleartarget"); } }
internal static void BuffRotation() { if (!Me.IsMounted) { // OOC Cure Disease if (ToolBox.HasDiseaseDebuff()) { if (Cast(CureDisease)) { return; } } // OOC Renew if (Me.HealthPercent < 60 && !Me.HaveBuff("Renew")) { if (Cast(Renew)) { return; } } // OOC Power Word Shield if (Me.HealthPercent < 50 && !Me.HaveBuff("Power Word: Shield") && !ToolBox.HasDebuff("Weakened Soul") && ObjectManager.GetNumberAttackPlayer() > 0 && _settings.UsePowerWordShield) { if (Cast(PowerWordShield)) { return; } } // OOC Psychic Scream if (Me.HealthPercent < 30 && ObjectManager.GetNumberAttackPlayer() > 1) { if (Cast(PsychicScream)) { return; } } // OOC Power Word Fortitude if (!Me.HaveBuff("Power Word: Fortitude") && PowerWordFortitude.KnownSpell && PowerWordFortitude.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(PowerWordFortitude)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC Divine Spirit if (!Me.HaveBuff("Divine Spirit") && DivineSpirit.KnownSpell && DivineSpirit.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(DivineSpirit)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC Inner Fire if (!Me.HaveBuff("Inner Fire") && _settings.UseInnerFire) { if (Cast(InnerFire)) { return; } } // OOC Shadowguard if (!Me.HaveBuff("Shadowguard") && _settings.UseShadowGuard && Shadowguard.KnownSpell && Shadowguard.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(Shadowguard)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC Shadow Protection if (!Me.HaveBuff("Shadow Protection") && ShadowProtection.KnownSpell && _settings.UseShadowProtection && ShadowProtection.KnownSpell && ShadowProtection.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(ShadowProtection)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC ShadowForm if (!Me.HaveBuff("ShadowForm") && ObjectManager.GetNumberAttackPlayer() < 1 && Shadowform.IsSpellUsable) { if (Cast(Shadowform)) { return; } } } }
internal static void BuffRotation() { if (!Me.IsMounted) { // OOC Cure Disease if (ToolBox.HasDiseaseDebuff()) { if (Cast(CureDisease)) { return; } } // OOC Renew if (Me.HealthPercent < 70 && !Me.HaveBuff("Renew")) { if (Cast(Renew)) { return; } } // OOC Power Word Shield if (Me.HealthPercent < 50 && !Me.HaveBuff("Power Word: Shield") && !ToolBox.HasDebuff("Weakened Soul") && ObjectManager.GetNumberAttackPlayer() > 0 && _settings.UsePowerWordShield) { if (Cast(PowerWordShield)) { return; } } // OOC Psychic Scream if (Me.HealthPercent < 30 && ObjectManager.GetNumberAttackPlayer() > 1) { if (Cast(PsychicScream)) { return; } } // OOC Power Word Fortitude if (!Me.HaveBuff("Power Word: Fortitude") && PowerWordFortitude.KnownSpell && PowerWordFortitude.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(PowerWordFortitude)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC Divine Spirit if (!Me.HaveBuff("Divine Spirit") && DivineSpirit.KnownSpell && DivineSpirit.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(DivineSpirit)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC Inner Fire if (!Me.HaveBuff("Inner Fire") && _settings.UseInnerFire) { if (Cast(InnerFire)) { return; } } // OOC Shadowguard if (!Me.HaveBuff("Shadowguard") && _settings.UseShadowGuard && Shadowguard.KnownSpell && Shadowguard.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(Shadowguard)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC Shadow Protection if (!Me.HaveBuff("Shadow Protection") && ShadowProtection.KnownSpell && _settings.UseShadowProtection && ShadowProtection.KnownSpell && ShadowProtection.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(ShadowProtection)) { Lua.RunMacroText("/cleartarget"); return; } } // OOC ShadowForm if (!Me.HaveBuff("ShadowForm") && ObjectManager.GetNumberAttackPlayer() < 1 && Shadowform.IsSpellUsable) { if (Cast(Shadowform)) { return; } } // 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; } } } } }
public static void Initialize() { Main.Log("Initialized"); Main.SetRangeToMelee(); ZERogueSettings.Load(); _settings = ZERogueSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); // Fight End FightEvents.OnFightEnd += (ulong guid) => { _meleeTimer.Reset(); _pullMeleeTimer.Reset(); _stealthApproachTimer.Reset(); _fightingACaster = false; _pullFromAfar = false; _isStealthApproching = false; _myBestBandage = null; Main.SetRangeToMelee(); }; // Fight Start FightEvents.OnFightStart += (WoWUnit unit, CancelEventArgs cancelable) => { _myBestBandage = ToolBox.GetBestMatchingItem(Bandages()); if (_myBestBandage != null) { Main.LogDebug("Found best bandage : " + _myBestBandage); } }; // We override movement to target when approaching in Stealth MovementEvents.OnMoveToPulse += (Vector3 point, CancelEventArgs cancelable) => { if (_isStealthApproching && !point.ToString().Equals(ToolBox.BackofVector3(ObjectManager.Target.Position, ObjectManager.Target, 2.5f).ToString())) { cancelable.Cancel = true; } }; // Fight Loop - Go behind target when gouged FightEvents.OnFightLoop += (WoWUnit unit, CancelEventArgs cancelable) => { if (IsTargetStunned() && !MovementManager.InMovement && Me.IsAlive && !Me.IsCast) { if (Me.IsAlive && ObjectManager.Target.IsAlive) { Vector3 position = ToolBox.BackofVector3(ObjectManager.Target.Position, ObjectManager.Target, 2.5f); MovementManager.Go(PathFinder.FindPath(position), false); while (MovementManager.InMovement && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && IsTargetStunned()) { // Wait follow path Thread.Sleep(500); } } } }; // BL Hook OthersEvents.OnAddBlackListGuid += (ulong guid, int timeInMilisec, bool isSessionBlacklist, CancelEventArgs cancelable) => { if (Me.HaveBuff("Stealth") && !_pullFromAfar) { Main.LogDebug("BL : " + guid + " ms : " + timeInMilisec + " is session: " + isSessionBlacklist); Main.Log("Cancelling Blacklist event"); cancelable.Cancel = true; } }; Rotation(); }
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; } } } } }
internal static void BuffRotation() { _foodManager.CheckIfEnoughFoodAndDrinks(); _foodManager.CheckIfThrowFoodAndDrinks(); _foodManager.CheckIfHaveManaStone(); // Frost Armor if (!Me.HaveBuff("Ice Armor")) { if (Cast(IceArmor)) { return; } } // Frost Armor if (!Me.HaveBuff("Frost Armor") && !IceArmor.KnownSpell) { if (Cast(FrostArmor)) { return; } } // Arcane Intellect if (!Me.HaveBuff("Arcane Intellect") && ArcaneIntellect.KnownSpell && ArcaneIntellect.IsSpellUsable) { Lua.RunMacroText("/target player"); if (Cast(ArcaneIntellect)) { Lua.RunMacroText("/cleartarget"); return; } } // Evocation if (Me.ManaPercentage < 30) { if (Cast(Evocation)) { return; } } // 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; } } } }