DroidFanBoyJP
Member
- Joined
- Aug 13, 2011
- Messages
- 515
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ff14bot;
using ff14bot.Enums;
using ff14bot.Managers;
using ff14bot.Navigation;
using Kupo;
using TreeSharp;
using Action = TreeSharp.Action;
namespace Kupo.Rotations
{
class BlackMage : KupoRoutine
{
public override ClassJobType[] Class
{
get { return new[] { ClassJobType.BlackMage }; }
}
public override int PullRange
{
get { return 20; }
}
protected override Composite CreatePreCombatBuffs()
{
return SummonChocobo();
}
protected override Composite CreateRest()
{
return DefaultRestBehavior(r => Core.Player.CurrentManaPercent);
}
private string[] PullSpells = new[] { "Thunder II", "Thunder" };
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 = "Blizzard";
return "Blizzard";
}
else
{
return _BestPullSpell;
}
}
}
protected override Composite CreatePull()
{
return new PrioritySelector(
r => Actionmanager.InSpellInRangeLOS(BestPullSpell, Core.Target),
new Decorator(r => (r as SpellRangeCheck?) == SpellRangeCheck.ErrorNotInRange, new Action(r => Navigator.MoveTo(Core.Target.Location))),
//new Decorator(r => (r as SpellRangeCheck?) == SpellRangeCheck.ErrorNotInRange, new Action(r => Navigator.MoveTo(Core.Target.Location))),
Apply(BestPullSpell, r => (r as SpellRangeCheck?) == SpellRangeCheck.Success || (r as SpellRangeCheck?) == SpellRangeCheck.ErrorNotInFront)
);
}
protected override Composite CreateCombatBuffs()
{
return new PrioritySelector(
//Dem deepz
Apply("Raging Strikes"),
Apply("Swiftcast")
);
}
protected override Composite CreateHeal()
{
return new PrioritySelector(
Apply("Manaward", r => Core.Player.CurrentHealthPercent <= 80),
Apply("Manawall", r => Core.Player.CurrentHealthPercent <= 80),
Cast("Physick", r => Core.Player.CurrentHealthPercent <= 40, r => Core.Player)
);
}
protected override Composite CreateCombat()
{
return new PrioritySelector(
//Need to check for insta procs first and foremost
Cast("Thunder III", r => Core.Player.HasAura("Thundercloud")),
Cast("Fire III", r => Core.Player.HasAura("Firestarter")),
//If we're low on mana we need to make sure we get it back
Cast("Blizzard III", r => Core.Player.CurrentMana < 638 && Core.Player.ClassLevel >= 38),
Cast("Blizzard", r => Core.Player.CurrentManaPercent <= 10 && Core.Player.ClassLevel < 38),
Cast("Convert", r => Core.Player.CurrentMana < 79 && Core.Player.ClassLevel >= 30), //79 Mana is how much Blizzard III is with AstralFire ... don't want to be stuck with no mana
Apply("Thunder II", r => Core.Player.ClassLevel >= 22 && !Core.Target.HasAura("Thunder")),
Apply("Thunder", r => Core.Player.ClassLevel < 22),
Cast("Fire III", r => Core.Player.ClassLevel >= 34 && !Core.Player.HasAura("Astral Fire III") && Core.Player.CurrentMana > 638),
//Bread and butter Fire spam
Cast("Fire")
);
}
}
}
Wanting to learn to edit these on my own, to make it do what I want it to do. But for now, what would the command be, and where would I put it, to cast Transpose once it hits a certain mana level. It's doing just fine, but it's not casting Blizzard at all, and I suspect it's because the things I'm killing are such low level, that it kills them, and ends up low on mana (at the rest spot), and won't target anything to cast Blizzard, and then waits on mana, and goes back to normal Fire rotation. Also, it's casting Fire 3 twice in a row, because it doesn't wait long enough to see if Fire 3 buff is on the target.