public static bool CastSpell(RotationSpell spell, WoWUnit unit, bool force) { // targetfinder function already checks that they are in LoS if (unit == null || !spell.IsKnown() || !spell.CanCast() || !unit.IsValid || unit.IsDead) { return(false); } if (wManager.wManagerSetting.CurrentSetting.IgnoreFightGoundMount && ObjectManager.Me.IsMounted) { return(false); } MountTask.DismountMount(); if (ObjectManager.Me.IsCasting() && !force) { return(false); } if (ObjectManager.Me.GetMove && spell.Spell.CastTime > 0) { //MovementManager.StopMove(); MovementManager.StopMoveTo(false, Usefuls.Latency + 500); } if (force) { Lua.LuaDoString("SpellStopCasting();"); } if (AreaSpells.Contains(spell.Spell.Name)) { /*spell.Launch(true, true, false); * Thread.Sleep(Usefuls.Latency + 50); * ClickOnTerrain.Pulse(unit.Position);*/ Lua.LuaDoString("CastSpellByName(\"" + spell.FullName() + "\")"); //SpellManager.CastSpellByIDAndPosition(spell.Spell.Id, unit.Position); ClickOnTerrain.Pulse(unit.Position); } else { if (unit.Guid != ObjectManager.Me.Guid) { //FaceUnit(unit); MovementManager.Face(unit); } _disableTargeting = true; WoWUnit temp = ObjectManager.Target; TargetUnit(unit); Lua.LuaDoString("CastSpellByName(\"" + spell.FullName() + "\")"); TargetUnit(temp); //SpellManager.CastSpellByNameOn(spell.FullName(), GetLuaId(unit)); //Interact.InteractObject also works and can be used to target another unit _disableTargeting = false; } return(true); }
public static void UseBloodSkill() { if (Extension.GetAttackingUnits(5).Count() == DeathKnightLevelSettings.CurrentSetting.bloodstrike) { Extension.FightSpell(BloodStrike); return; } if (Extension.GetAttackingUnits(5).Count() == DeathKnightLevelSettings.CurrentSetting.hearthstrike) { Extension.FightSpell(HeartSTrike); return; } if (Extension.GetAttackingUnits(5).Count() > DeathKnightLevelSettings.CurrentSetting.bloodboil) { Extension.FightSpell(BloodBoil); return; } if (Extension.GetAttackingUnits(10).Count() > DeathKnightLevelSettings.CurrentSetting.dnd) { ClickOnTerrain.Spell(DeathAndDecay.Id, ObjectManager.Me.Position); } }
public void Damage() { if (Meteor.IsSpellUsable && MyHelpers.haveBuff(RuneofPower.Name) && (MyHelpers.haveBuffStack("Blaster Master") == 3 || (!MyHelpers.haveBuff(Combustion.Name) || MyHelpers.spellCharges(FireBlast.Name) == 0)) && MyHelpers.getTargetDistance() <= 40.0f ) { MyHelpers.castSpell(Meteor.Name); ClickOnTerrain.Pulse(ObjectManager.Target.Position); return; } if (MyHelpers.haveBuff("Hot Streak!") && !buffTime) { while (MyHelpers.haveBuff(Combustion.Name)) { if (MyHelpers.haveBuff("Hot Streak!")) { Pyroblast.Launch(); Thread.Sleep(200); if (MyHelpers.spellCharges(FireBlast.Name) == 0) { Thread.Sleep(200); } canBlast = true; continue; } if (!ObjectManager.Me.IsCast && MyHelpers.spellCharges(FireBlast.Name) > 0 && MyHelpers.haveBuff("Heating Up")) { canBlast = false; MyHelpers.castSpell(FireBlast.Name); continue; } if (MyHelpers.itemIsUsable("Hyperthread Wristwraps") && MyHelpers.spellCharges(FireBlast.Name) == 0 && !ObjectManager.Me.IsCast) { ItemsManager.UseItem(ItemsManager.GetIdByName("Hyperthread Wristwraps")); continue; } if (MyHelpers.spellCharges(FireBlast.Name) == 0 && !MyHelpers.haveBuff("Hot Streak!") && !ObjectManager.Me.IsCast) { Thread.Sleep(400); if (MyHelpers.spellCharges(FireBlast.Name) == 0 && !MyHelpers.haveBuff("Hot Streak!") && !ObjectManager.Me.IsCast) { MyHelpers.castSpell(Scorch.Name); while (ObjectManager.Me.IsCast) { Thread.Sleep(50); } continue; } else { continue; } } } if (MyHelpers.haveBuff("Hot Streak!")) { MyHelpers.castSpell(Pyroblast.Name); } return; } if (MyHelpers.spellCharges(FireBlast.Name) > 0 && !buffTime && MyHelpers.haveBuff("Heating Up") && !MyHelpers.haveBuff(Combustion.Name)) { MyHelpers.castSpell(FireBlast.Name); return; } if (BlazingBarrier.IsSpellUsable) { MyHelpers.castSpell(BlazingBarrier.Name); } if (!MyHelpers.haveBuff("Hot Streak!") && Scorch.IsSpellUsable && !buffTime && (ObjectManager.Me.SpeedMoving > 0 || ObjectManager.Target.HealthPercent < 30)) { Thread.Sleep(100); if (!MyHelpers.haveBuff("Hot Streak!") && Scorch.IsSpellUsable && !buffTime && (ObjectManager.Me.SpeedMoving > 0 || ObjectManager.Target.HealthPercent < 30)) { MyHelpers.castSpell(Scorch.Name); } return; } if (!MyHelpers.haveBuff("Hot Streak!") && !buffTime && !MyHelpers.haveBuff(Combustion.Name) && !(ObjectManager.Me.SpeedMoving > 0 || ObjectManager.Target.HealthPercent < 30)) { MyHelpers.castSpell(Fireball.Name); return; } }
public void burstPrepare() { buffTime = true; doBurst = false; while (!MyHelpers.itemIsUsable("Azshara's Font of Power") || ObjectManager.Me.IsCast) { Thread.Sleep(100); } while (MyHelpers.itemIsUsable("Azshara's Font of Power")) { ItemsManager.UseItem(ItemsManager.GetIdByName("Azshara's Font of Power")); } Thread.Sleep(4020); if (!MyHelpers.inCombat()) { if (MyHelpers.itemIsEquiped("Notorious Gladiator's Badge")) { Thread.Sleep(13000); } if (!MyHelpers.haveBuff("Hot Streak!") && !MyHelpers.haveBuff("Heating Up")) { MyHelpers.castSpell(Fireball.Name); Thread.Sleep(2300); } } if (MyHelpers.itemIsEquiped("Notorious Gladiator's Badge")) { while (!MyHelpers.itemIsUsable("Notorious Gladiator's Badge")) { if (MyHelpers.inCombat()) { if (ObjectManager.Target.HealthPercent < 30 || ObjectManager.Me.SpeedMoving > 0) { if (!MyHelpers.haveBuff("Hot Streak!") && Scorch.IsSpellUsable && (ObjectManager.Me.SpeedMoving > 0 || ObjectManager.Target.HealthPercent < 30)) { Thread.Sleep(100); if (!MyHelpers.haveBuff("Hot Streak!") && Scorch.IsSpellUsable && (ObjectManager.Me.SpeedMoving > 0 || ObjectManager.Target.HealthPercent < 30)) { MyHelpers.castSpell(Scorch.Name); } continue; } if (ObjectManager.Target.HealthPercent < 30 && MyHelpers.haveBuff("Hot Streak!")) { MyHelpers.castSpell(Pyroblast.Name); continue; } } else { if (MyHelpers.haveBuff("Hot Streak!") && MyHelpers.BuffTimeLeft("Hot Streak!") < 10) { MyHelpers.castSpell(Pyroblast.Name); continue; } else if (MyHelpers.spellCharges(FireBlast.Name) > 0 && MyHelpers.haveBuff("Heating Up")) { MyHelpers.castSpell(FireBlast.Name); continue; } else { MyHelpers.castSpell(Fireball.Name); continue; } } } } ; while (!MyHelpers.itemIsUsable("Notorious Gladiator's Badge") || ObjectManager.Me.IsCast) { Thread.Sleep(10); } while (MyHelpers.itemIsUsable("Notorious Gladiator's Badge")) { ItemsManager.UseItem(ItemsManager.GetIdByName("Notorious Gladiator's Badge")); } } if (!MyHelpers.haveBuff("Hot Streak!") && !MyHelpers.haveBuff("Heating Up")) { needBlast = true; } while (!MemoryofLucidDreams.IsSpellUsable || ObjectManager.Me.IsCast) { Thread.Sleep(10); } while (!MyHelpers.haveBuff(MemoryofLucidDreams.Name)) { MyHelpers.castSpell(MemoryofLucidDreams.Name); } Thread.Sleep(100); if (!MyHelpers.haveBuff("Hot Streak!")) { MyHelpers.castSpell(FireBlast.Name); } while (Berserking.IsSpellUsable) { MyHelpers.castSpell(Berserking.Name); } while (!RuneofPower.IsSpellUsable) { Thread.Sleep(10); } while (!MyHelpers.haveBuff(RuneofPower.Name)) { MyHelpers.castSpell(RuneofPower.Name); } while (!Meteor.IsSpellUsable || ObjectManager.Me.IsCast) { Thread.Sleep(10); } while (Meteor.IsSpellUsable) { MyHelpers.castSpell(Meteor.Name); ClickOnTerrain.Pulse(ObjectManager.Target.Position); } while (!Combustion.IsSpellUsable || ObjectManager.Me.IsCast) { Thread.Sleep(10); } while (!MyHelpers.haveBuff(Combustion.Name)) { MyHelpers.castSpell(Combustion.Name); } if (needBlast && !MyHelpers.haveBuff("Hot Streak!")) { MyHelpers.castSpell(FireBlast.Name); } needBlast = false; buffTime = false; return; }
public bool AdvancedCast(AIOSpell spell, bool stopWandAndCast = true, bool onSelf = false, WoWUnit onUnitFocus = null, Vector3 location = null) { WoWUnit Me = ObjectManager.Me; float buffer = 600; if (IsApproachingTarget) { return(true); } CurrentSpell = spell; CurrentSpellLocation = location; CombatDebug("*----------- INTO PRE CAST FOR " + CurrentSpell.Name); if (!CurrentSpell.KnownSpell || IsBackingUp || Me.CastingTimeLeft > buffer || !CurrentSpell.IsForcedCooldownReady || Me.IsStunned) { return(false); } // Define target if (onUnitFocus != null) { CurrentSpellTarget = onUnitFocus; } else if (CurrentSpellLocation != null) { CurrentSpellTarget = null; } else if (onSelf) { CurrentSpellTarget = ObjectManager.Me; } else { if (CurrentSpell.MaxRange <= 0 && ObjectManager.Target.GetDistance > RangeManager.GetMeleeRangeWithTarget()) { return(false); } CurrentSpellTarget = ObjectManager.Target; } // Now that we know the target if (CurrentSpellLocation == null) { if (CurrentSpellTarget == null || CurrentSpellTarget.GetDistance > 100 || (CurrentSpellTarget.IsDead && !CurrentSpell.OnDeadTarget) || (CurrentSpell.MinRange > 0 && CurrentSpellTarget.GetDistance <= CurrentSpell.MinRange) || UnitImmunities.Contains(CurrentSpellTarget, CurrentSpell.Name) || (!CurrentSpellTarget.IsValid && !CurrentSpell.OnDeadTarget)) // double check this { return(false); } } CombatDebug("*----------- INTO CAST FOR " + CurrentSpell.Name); // CHECK COST if (CurrentSpell.PowerType == -2 && Me.Health < CurrentSpell.Cost) { CombatDebug($"{CurrentSpell.Name}: Not enough health {CurrentSpell.Cost}/{Me.Health}, SKIPPING"); return(false); } else if (CurrentSpell.PowerType == 0 && Me.Mana < CurrentSpell.Cost) { CombatDebug($"{CurrentSpell.Name}: Not enough mana {CurrentSpell.Cost}/{Me.Mana}, SKIPPING"); return(false); } else if (CurrentSpell.PowerType == 1 && Me.Rage < CurrentSpell.Cost) { CombatDebug($"{CurrentSpell.Name}: Not enough rage {CurrentSpell.Cost}/{Me.Rage}, SKIPPING"); return(false); } else if (CurrentSpell.PowerType == 2 && ObjectManager.Pet.Focus < CurrentSpell.Cost) { CombatDebug($"{CurrentSpell.Name}: Not enough pet focus {CurrentSpell.Cost}/{ObjectManager.Pet.Focus}, SKIPPING"); return(false); } else if (CurrentSpell.PowerType == 3 && Me.Energy < CurrentSpell.Cost) { CombatDebug($"{CurrentSpell.Name}: Not enough energy {CurrentSpell.Cost}/{Me.Energy}, SKIPPING"); return(false); } // DON'T CAST BECAUSE WANDING if (WandSpell != null && ToolBox.UsingWand() && !stopWandAndCast) { CombatDebug("Didn't cast because we were wanding"); return(false); } // COOLDOWN CHECKS float _spellCD = CurrentSpell.GetCurrentCooldown; CombatDebug($"Cooldown is {_spellCD}"); if (_spellCD >= 500) { CombatDebug("Didn't cast because cd is too long"); return(false); } // STOP WAND FOR CAST if (WandSpell != null && ToolBox.UsingWand() && stopWandAndCast) { StopWandWaitGCD(WandSpell); } // Wait for remaining Cooldown if (_spellCD > 0f && _spellCD < buffer) { CombatDebug($"{CurrentSpell.Name} is almost ready, waiting"); while (CurrentSpell.GetCurrentCooldown > 0 && CurrentSpell.GetCurrentCooldown < 500) { Thread.Sleep(50); } Thread.Sleep(50); // safety } if (!CurrentSpell.IsSpellUsable) { CombatDebug("Didn't cast because spell somehow not usable"); return(false); } bool stopMove = CurrentSpell.CastTime > 0 || CurrentSpell.IsChannel; if (CurrentSpellLocation != null || CurrentSpellTarget.Guid != Me.Guid) { Vector3 spellPosition = CurrentSpellLocation != null ? CurrentSpellLocation : CurrentSpellTarget.Position; if (CurrentSpell.MaxRange > 0 && spellPosition.DistanceTo(Me.Position) > CurrentSpell.MaxRange || TraceLine.TraceLineGo(spellPosition)) { if (Me.HaveBuff("Spirit of Redemption")) { return(false); } Logger.LogFight($"Target not in range/sight, recycling {CurrentSpell.Name}"); if (Fight.InFight) { IsApproachingTarget = true; } else { ApproachSpellTarget(); } return(true); } } if (onUnitFocus != null) { ObjectManager.Me.FocusGuid = CurrentSpellTarget.Guid; } string unit = onUnitFocus != null ? "focus" : "target"; unit = onSelf || CurrentSpellLocation != null ? "player" : unit; // Wait for remaining cast in case of buffer while (Me.CastingTimeLeft > 0) { Thread.Sleep(25); } if (stopMove) { MovementManager.StopMoveNewThread(); } if (CombatLogON) { string rankString = CurrentSpell.Rank > 0 ? $"(Rank {CurrentSpell.Rank})" : ""; string target = CurrentSpellLocation != null?CurrentSpellLocation.ToString() : CurrentSpellTarget.Name; Logger.Log($"[Spell] Casting {CurrentSpell.Name.Replace("()", "")} {rankString} on {target}"); } CurrentSpell.Launch(stopMove, false, true, unit); if (CurrentSpell.IsClickOnTerrain) { ClickOnTerrain.Pulse(CurrentSpellLocation); } Thread.Sleep(50); ToolBox.ClearCursor(); // Wait for channel to end if (CurrentSpell.IsChannel) { CombatDebug($"{CurrentSpell.Name} is channel, wait cast"); while (ToolBox.GetChannelTimeLeft("player") < 0) { Thread.Sleep(50); } CurrentSpell.StartForcedCooldown(); return(true); } // Wait for instant cast GCD if (CurrentSpell.CastTime <= 0) { CurrentSpell.StartForcedCooldown(); Timer gcdLimit = new Timer(1500); CombatDebug($"{CurrentSpell.Name} is instant, wait GCD"); while (DefaultBaseSpell.GetCurrentCooldown > buffer && !gcdLimit.IsReady) { Thread.Sleep(50); } if (gcdLimit.IsReady) { Logger.LogError("We had to resort to timer wait (GCD)"); } return(true); } if (CurrentSpell.CastTime > 0) { // Wait for cast to end buffer = CurrentSpell.PreventDoubleCast ? 0 : buffer; CombatDebug($"{CurrentSpell.Name} is normal, wait until {buffer} left"); while (Me.CastingTimeLeft > buffer) { if (CurrentSpell.IsResurrectionSpell && CurrentSpellTarget.IsAlive) { Lua.RunMacroText("/stopcasting"); } Thread.Sleep(50); } CurrentSpell.StartForcedCooldown(); } return(true); }
public static bool CastSpell(RotationSpell spell, WoWUnit unit, bool force) { //silly vanilla logic if (unit != null && unit.IsValid && unit.IsAlive && spell.IsKnown() && spell.GetCooldown() == 0 && !spell.IsUsable() && !spell.NotEnoughMana()) { if (ObjectManager.Me.HaveBuff("Bear Form")) { Lua.LuaDoString(@"CastSpellByName(""Bear Form"", true)"); } if (ObjectManager.Me.HaveBuff("Dire Bear Form")) { Lua.LuaDoString(@"CastSpellByName(""Dire Bear Form"", true)"); } if (ObjectManager.Me.HaveBuff("Cat Form")) { Lua.LuaDoString(@"CastSpellByName(""Cat Form"", true)"); } if (ObjectManager.Me.HaveBuff("Ghost Wolf")) { Lua.LuaDoString(@"CastSpellByName(""Ghost Wolf"", true)"); } } // targetfinder function already checks that they are in LoS if (unit == null || !spell.IsKnown() || !spell.CanCast() || !unit.IsValid || unit.IsDead) { return(false); } if (wManager.wManagerSetting.CurrentSetting.IgnoreFightGoundMount && ObjectManager.Me.IsMounted) { return(false); } MountTask.DismountMount(); //already wanding, don't turn it on again! if (spell.Spell.Name == "Shoot" && IsAutoRepeating("Shoot")) { return(true); } if (ObjectManager.Me.IsCasting() && !force) { return(false); } if (ObjectManager.Me.GetMove && spell.Spell.CastTime > 0) { //MovementManager.StopMove(); MovementManager.StopMoveTo(false, Usefuls.Latency + 500); } if (force) { Lua.LuaDoString("SpellStopCasting();"); } if (AreaSpells.Contains(spell.Spell.Name)) { /*spell.Launch(true, true, false); * Thread.Sleep(Usefuls.Latency + 50); * ClickOnTerrain.Pulse(unit.Position);*/ Lua.LuaDoString("CastSpellByName(\"" + spell.FullName() + "\")"); //SpellManager.CastSpellByIDAndPosition(spell.Spell.Id, unit.Position); ClickOnTerrain.Pulse(unit.Position); } else { //don't switch target if targeting enemy - rely on auto selfcast WoWUnit temp = ObjectManager.Target; bool onSelf = unit.Guid == ObjectManager.Me.Guid; if (!onSelf) { //FaceUnit(unit); MovementManager.Face(unit); _disableTargeting = true; TargetUnit(unit); } Lua.LuaDoString($"CastSpellByName('{spell.FullName()}', {onSelf.ToString().ToLower()})"); if (!onSelf) { if (temp.Guid == 0 || !temp.IsValid) { Lua.LuaDoString("ClearTarget();"); } else { TargetUnit(temp); } //SpellManager.CastSpellByNameOn(spell.FullName(), GetLuaId(unit)); //Interact.InteractObject also works and can be used to target another unit _disableTargeting = false; } } return(true); }
/* * CombatRotation() */ public void CombatRotation() { if (OutlawSettings.CurrentSetting.EnableInterrupt) { WoWUnit toInterrupt = MyHelpers.InterruptableUnits(); if (toInterrupt != null) { ObjectManager.Me.FocusGuid = toInterrupt.Guid; if (Kick.IsSpellUsable && Kick.KnownSpell) { MovementManager.Face(toInterrupt.Position); Kick.Launch(false, false, false, "focus"); Lua.LuaDoString("dRotationFrame.text:SetText(\"Kick " + MyHelpers.getTargetDistance() + " / " + MyHelpers.GetMeleeRangeWithTarget() + "\")"); return; } if (Gouge.IsSpellUsable && Gouge.KnownSpell) { MovementManager.Face(toInterrupt.Position); Gouge.Launch(false, false, false, "focus"); Lua.LuaDoString("dRotationFrame.text:SetText(\"Gouge " + MyHelpers.getTargetDistance() + " / " + MyHelpers.GetMeleeRangeWithTarget() + "\")"); return; } if (Blind.IsSpellUsable && Blind.KnownSpell) { MovementManager.Face(toInterrupt.Position); Blind.Launch(false, false, false, "focus"); Lua.LuaDoString("dRotationFrame.text:SetText(\"Blind " + MyHelpers.getTargetDistance() + " / " + MyHelpers.GetMeleeRangeWithTarget() + "\")"); return; } } } if (ObjectManager.Me.Health < ObjectManager.Me.MaxHealth * 0.7) { if (CrimsonVial.KnownSpell && CrimsonVial.IsSpellUsable) { CrimsonVial.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Crimson Vial"")"); return; } if (Feint.KnownSpell && Feint.IsSpellUsable) { Feint.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Feint"")"); return; } } if (ObjectManager.Me.Health < ObjectManager.Me.MaxHealth * 0.3) { if (SmokeBomb.KnownSpell && SmokeBomb.IsSpellUsable) { SmokeBomb.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Smoke Bomb"")"); return; } if (Riposte.KnownSpell && Riposte.IsSpellUsable) { Riposte.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Riposte"")"); return; } } if (ObjectManager.Me.IsStunned || ObjectManager.Me.Rooted || ObjectManager.Me.Confused) { if (GladiatorsMedallion.KnownSpell && GladiatorsMedallion.IsSpellUsable) { GladiatorsMedallion.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Gladiators Medallion"")"); return; } } if (ObjectManager.Me.SpeedMoving < 8.05 && ObjectManager.Me.SpeedMoving > 0) { if (OutlawSettings.CurrentSetting.EnableCloakOfShadows && CloakOfShadows.KnownSpell && CloakOfShadows.IsSpellUsable) { CloakOfShadows.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Cloak Of Shadows"")"); return; } } if (OutlawSettings.CurrentSetting.EnableRazorCoral && EquippedItems.GetEquippedItems().Find(x => x.GetItemInfo.ItemName == ItemsManager.GetNameById(169311)) != null && MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() && Lua.LuaDoString("result = \"\"; local cooldown = GetItemCooldown(169311) if (cooldown == 0 ) then result = true else result = false end ", "result") == "true" && (!ObjectManager.Target.BuffCastedByAll("Razor Coral").Contains(ObjectManager.Me.Guid) || ObjectManager.Target.BuffStack("Razor Coral") >= 10)) { ItemsManager.UseItem(169311); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Razor Coral"")"); return; } if (OutlawSettings.CurrentSetting.EnableBladeFlurry && BladeFlurry.KnownSpell && !MyHelpers.haveBuff("Blade Flurry") && BladeFlurry.IsSpellUsable && (MyHelpers.getAttackers(10) > 1)) { BladeFlurry.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Blade Flurry"")"); return; } if (OutlawSettings.CurrentSetting.EnableBloodoftheEnemy && BloodoftheEnemy.KnownSpell && BloodoftheEnemy.IsSpellUsable && MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() && !MyHelpers.rtbReroll() && BetweenTheEyes.IsSpellUsable && (ObjectManager.Target.IsLocalPlayer || ObjectManager.Target.Type == WoWObjectType.Player) ) { BloodoftheEnemy.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Bloodof the Enemy"")"); return; } if (OutlawSettings.CurrentSetting.EnableGrapplingHook && !ObjectManager.Me.IsMounted && GrapplingHook.KnownSpell && GrapplingHook.IsSpellUsable && MyHelpers.getTargetDistance() <= 20.0f && MyHelpers.getTargetDistance() > MyHelpers.getMeleeRange() ) { ClickOnTerrain.Spell(195457, ObjectManager.Target.Position); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Grappling Hook"")"); return; } if (OutlawSettings.CurrentSetting.EnableSprint && !ObjectManager.Me.IsMounted && Sprint.KnownSpell && Sprint.IsSpellUsable && MyHelpers.getTargetDistance() > 20.0f ) { Sprint.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Sprint"")"); return; } if (OutlawSettings.CurrentSetting.EnableRolltheBones && RolltheBones.KnownSpell && RolltheBones.IsSpellUsable && MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() && MyHelpers.getComboPoint() >= 4 && MyHelpers.rtbReroll() ) { RolltheBones.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Roll the Bones"")"); return; } if (OutlawSettings.CurrentSetting.EnableAdrenalineRush && AdrenalineRush.KnownSpell && AdrenalineRush.IsSpellUsable && MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() && (ObjectManager.Target.IsBoss || ObjectManager.Target.IsElite || ObjectManager.Target.IsLocalPlayer || ObjectManager.Target.Type == WoWObjectType.Player || MyHelpers.getAttackers(10) > 3)) { AdrenalineRush.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Adrenaline Rush"")"); return; } if (BladeRush.KnownSpell && BladeRush.IsSpellUsable && MyHelpers.getTargetDistance() <= 20.0f && MyHelpers.getTargetDistance() > MyHelpers.getMeleeRange() && !ObjectManager.Me.IsMounted ) { BladeRush.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Blade Rush"")"); return; } if (OutlawSettings.CurrentSetting.EnablePistolShot && PistolShot.KnownSpell && PistolShot.IsSpellUsable && MyHelpers.getTargetDistance() <= 20.0f && ((MyHelpers.haveBuff("Opportunity") && MyHelpers.getComboPoint() <= 4) || (MyHelpers.getTargetDistance() > MyHelpers.getMeleeRange() && !(BetweenTheEyes.IsSpellUsable && MyHelpers.getComboPoint() == 6)) || (MyHelpers.haveBuff("Deadshot") && MyHelpers.haveBuff("Seething Rage") && !BetweenTheEyes.IsSpellUsable) )) { PistolShot.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Pistol Shot"")"); return; } if (OutlawSettings.CurrentSetting.EnableSinisterStrike && SinisterStrike.KnownSpell && SinisterStrike.IsSpellUsable && MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() && MyHelpers.getComboPoint() <= 5) { SinisterStrike.Launch(); Lua.LuaDoString("dRotationFrame.text:SetText(\"Sinister Strike " + MyHelpers.getTargetDistance() + " / " + MyHelpers.GetMeleeRangeWithTarget() + "\")"); return; } if (OutlawSettings.CurrentSetting.EnableBetweenTheEyes && BetweenTheEyes.KnownSpell && BetweenTheEyes.IsSpellUsable && MyHelpers.getTargetDistance() <= 20.0f && MyHelpers.getComboPoint() == 6) { BetweenTheEyes.Launch(); Lua.LuaDoString(@"dRotationFrame.text:SetText(""Between the Eyes"")"); return; } if (OutlawSettings.CurrentSetting.EnableDispatch && Dispatch.KnownSpell && Dispatch.IsSpellUsable && MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() && MyHelpers.getComboPoint() == 6) { Dispatch.Launch(); Lua.LuaDoString("dRotationFrame.text:SetText(\"Dispatch " + MyHelpers.getTargetDistance() + " / " + MyHelpers.GetMeleeRangeWithTarget() + "\")"); return; } }