Is this the right line of code to use flash when 2 or more enemies are in range? The code is a bit old (before 2.1) if it helps. It just wont activate flash with that code.. Cast("Flash", r => EnemiesNearTarget(7) >= 1 && Core.Player.CurrentManaPercent > 80),
I think Flash should be an Apply since it applies Blind onto the targets. If it DOESN'T work with Cast, try it with Apply. The problem with Apply is it won't use Flash again until the Blind debuff wears off, but i'm sure you wanna use it as long as your mana is above 80 in your case. Code: [COLOR=#333333]Apply("Flash", r => EnemiesNearTarget(7) >= 2 && Core.Player.CurrentManaPercent > 80),[/COLOR] >= 1 would use it when there's only one mob as well. Try that.
Cast("Flash", r => EnemiesNearTarget(7) >= 1 && Core.Player.CurrentManaPercent > 80, r => Core.Player), Seems to have worked, is it possible to make it use flash only when the enemies are closer to me? for example: i aggro the first enemy, select (not attack) the 2nd enemy and it starts flashing even though the second enemy isnt in range.
It's flashing because >= 1 is greater than or equal to 1, so it'll use Flash even if there's only 1 mob.
EnemiesNearTarget It counts enemies near your target, not yourself. If you select another target then it would count enemies near the 2nd enemy(which probably is near another enemy). At work right now so I can't be sure if this is the correct code. Add this to your rotation like... so and change EnemiesNearTarget to EnemiesNearMe to count enemies near you. Speaking of which, EnemiesNearTarget doesn't count your target. So if you have only one enemy in the radius you specify, it would return a zero.
Have i edited it in right? using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; using ff14bot; using ff14bot.Enums; using ff14bot.Managers; using ff14bot.Navigation; using ff14bot.Objects; using TreeSharp; using Action = TreeSharp.Action; namespace Kupo.Rotations { public class GladiatorPaladin : KupoRoutine { protected int EnemiesNearMe(float range) { var tarLoc = Core.Player.Location; return UnfriendlyUnits.Count(u => u.Location.Distance3D(tarLoc) <= range); } public override int PullRange { get { return 5; } } protected override Composite CreatePreCombatBuffs() { return new PrioritySelector( SummonChocobo(), Apply("Shield Oath", r => Core.Player.ClassLevel >= 40, r => Core.Player) ); } protected override Composite CreateRest() { return DefaultRestBehavior(r => Core.Player.CurrentTPPercent); } private string[] PullSpells = new[] { "Shield Lob", "Fast Blade" }; private string _BestPullSpell; private string BestPullSpell { get { if (string.IsNullOrEmpty(_BestPullSpell)) { foreach (var spell in PullSpells) { if (Actionmanager.HasSpell(spell)) { _BestPullSpell = spell; return spell; } } _BestPullSpell = "Shield Lob"; return "Shield Lob"; } else { return _BestPullSpell; } } } protected override Composite CreatePull() { return new PrioritySelector( EnsureTarget, //Stop double casting due to delay new Decorator(r => Actionmanager.InSpellInRangeLOS(BestPullSpell, Core.Target) == SpellRangeCheck.ErrorNotInRange, new Action(r => Navigator.MoveTo(Core.Target.Location))), new Decorator(r => Actionmanager.InSpellInRangeLOS(BestPullSpell, Core.Target) == SpellRangeCheck.ErrorNotInFront, new Action(r => Core.Target.Face())), Apply(r => BestPullSpell, r => Actionmanager.InSpellInRangeLOS(BestPullSpell, Core.Target) == SpellRangeCheck.Success) ); } protected override Composite CreateCombat() { return new PrioritySelector( Cast("Spirits Within", r => Core.Player.ClassLevel <= 45), Apply("Rampart", r => true && Core.Player.CurrentHealthPercent < 70, r => Core.Player), Apply("Bulwark", r => true && Core.Player.ClassLevel <= 46 && Core.Player.CurrentHealthPercent <= 50, r => Core.Player), Apply("Sentinel", r => true && Core.Player.ClassLevel <= 38 && Core.Player.CurrentHealthPercent <= 50, r => Core.Player), Cast("Riot Blade", r => Core.Player.CurrentManaPercent <= 40 && Actionmanager.LastSpell.Name == "Fast Blade"),//Check for mana level at higher level when theother combo action is avail Cast("Savage Blade", r => Actionmanager.LastSpell.Name == "Fast Blade"), Cast("Fast Blade", r => true),// r => Actionmanager.LastSpellId == 0 || Actionmanager.LastSpell.Name == "Full Thrust" ) Cast("Rage of Halone", r=> Core.Player.ClassLevel >= 26 && Actionmanager.LastSpell.Name == "Savage Blade") ); } } }
yeah i just changed the RoH priority, didnt notice that. Although when i load the profile, i get: [23:53:57.750 D] Reloading AssemblyLoader<ff14bot.AClasses.BotBase> - Initializing[23:54:00.010 D] [BotManager] Botbases have been reloaded. [23:54:00.010 D] Raidbro v1.0.46.0 [23:54:00.010 D] GrindBot v1.0.46.0 [23:54:00.010 D] Gatherbro v1.0.46.0 [23:54:00.029 D] Reloading AssemblyLoader<ff14bot.Interfaces.IBotPlugin> - Initializing [23:54:03.263 D] Reloading AssemblyLoader<ff14bot.Interfaces.ICombatRoutine> - Initializing [23:54:03.991 D] Compiler Error: c:\Users\Scott\RebornBuddy\Routines\Kupo\KupoRoutine.cs(14,7) : warning CS0105: The using directive for 'Kupo.Settings' appeared previously in this namespace [23:54:03.991 D] Compiler Error: c:\Users\Scott\RebornBuddy\Routines\Kupo\Rotations\GladiatorPaladin.cs(17,14) : error CS0534: 'Kupo.Rotations.GladiatorPaladin' does not implement inherited abstract member 'ff14bot.AClasses.CombatRoutine.Class.get'