using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Runtime.Remoting.Messaging; using System.Text; using System.Windows.Forms; using ff14bot; using ff14bot.Behavior; using ff14bot.Enums; using ff14bot.Helpers; using ff14bot.Managers; using ff14bot.Navigation; using ff14bot.Objects; using TreeSharp; using Action = TreeSharp.Action; namespace Kupo.Rotations { public class ArcherBard : KupoRoutine { public override int PullRange { get { return 20; } } public override ClassJobType[] Class { get { return new ClassJobType[] { ClassJobType.Archer, ClassJobType.Bard, }; } } protected override Composite CreatePreCombatBuffs() { return SummonChocobo(); } protected override Composite CreateRest() { return DefaultRestBehavior(r => Core.Player.CurrentTPPercent); } private string[] PullSpells = new[] { "Heavy Shot", "Bloodletter" }; 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 = "Bloodletter"; return "Bloodletter"; } 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( Apply("Raging Strikes", r=> true, r => Core.Player), Cast("Misery's End"), Cast("Straight Shot", r => !Core.Player.HasAura("Straight Shot") || Core.Player.HasAura("Straighter Shot")), Cast("Bloodletter"), // Apply("Wind Bite", r=> Core.Player.ClassLevel >= 30), Apply("Venomous Bite"),// r => !Core.Player.HasAura("Straight Shot")), Cast("Heavy Shot", r => true)// r => Actionmanager.LastSpellId == 0 || Actionmanager.LastSpell.Name == "Full Thrust" ) //Cast("", r => Core.Player.TargetCharacter.IsCasting) possible interrupt ); } } }