public static async Task <bool> RestBehavior() { if (Me.HealthPercent < GeneralSettings.Instance.GeneralRestingRestHp || minimumRestTime.ElapsedMilliseconds >= (GeneralSettings.Instance.GeneralRestingRestHpSecondsTimeout * 1000)) { if (Me.IsCasting || Me.IsChanneling || C.IsEatingOrDrinking) { return(false); } WoWItem bandage = I.FindBestBandage(); if (bandage != null) { await I.UseItem(bandage, GeneralSettings.Instance.GeneralRestingUseBandages); await Coroutine.Sleep(500); } WoWItem food = Styx.CommonBot.Inventory.Consumable.GetBestFood(GeneralSettings.Instance.GeneralRestingUseSpecialtyFood); if (food != null) { await I.UseItem(food, true); await Coroutine.Sleep(500); } } return(false); }
public static async Task <bool> CombatBuffing() { if (HK.manualOn || !Me.IsAlive || (!Me.GotTarget || !CurrentTarget.IsAlive) || (Me.OnTaxi)) { return(true); } if (!Me.IsAutoAttacking && CurrentTarget.IsValidCombatUnit()) { Lua.DoString("StartAttack()"); return(true); } // // use potion - Change "true" to configurable var potion = I.GetItemByName("Draenic Agility Potion"); if (potion != null) { return(await I.UseItem(potion, true)); } return(false); }
public static async Task <bool> RotationSelector() { // we are playing manual, i am not alive, or I am mounted or on taxi, do not continue if (HK.manualOn || !Me.IsAlive || (Me.OnTaxi) || Me.IsCasting || Me.IsChanneling) { return(true); } // if I // i don't want facing to interfere with vengeful retreat opener. if (openingRotationSkillsUsed != OpenerSteps.FaceAwayFromTarget && openingRotationSkillsUsed != OpenerSteps.VengefulRetreat) { if (GS.GeneralFacing) { // check to see if we need to face target await C.FaceTarget(CurrentTarget); } } if (GS.GeneralMovement) { // ensure we are in melee range and not too close await C.EnsureMeleeRange(CurrentTarget); } if (CurrentTarget.IsValidCombatUnit()) { if (await OpeningRotationSingleTarget()) { return(true); } #region Offensive Hotkey if (HK.HavocOffensiveOn) { // we have offensive cooldowns enabled, let's use them if they are available first. if (await I.UseItem(I.GetItemByID(HS.HavocHealthPotionID), HKS.HotkeyHavocOffensiveAgilityPotion)) { return(true); } if (await S.Cast(SB.MetamorphosisSpell, C.CombatColor, HKS.HotkeyHavocOffensiveMetamorphosis)) { return(true); } if (await S.Cast(SB.FuryOfTheIllidari, C.CombatColor, HKS.HotkeyHavocOffensiveFoTI)) { return(true); } if (await S.Cast(SB.Nemesis, C.CombatColor, HKS.HotkeyHavocOffensiveNemesis)) { return(true); } if (await S.Cast(SB.ChaosBlades, C.CombatColor, HKS.HotkeyHavocOffensiveChaosBlades)) { return(true); } } #endregion // see if we need any defensive cooldowns if (await SaveMe()) { return(true); } if ((HK.HavocAoEOn || U.activeEnemies(Me.Location, 8f).Count() >= 2)) { // try to use aoe abilities if (await AoE(U.activeEnemies(Me.Location, 8f).Count())) { return(true); } // we were supposed to aoe, but nothing to use for aoe (or jumped back out of melee), so use single target if (await AoEDashing(U.activeEnemies(Me.Location, 8f).Count())) { return(true); } } // default to single target if nothing else return(await SingleTarget()); } return(false); }