hey,
ive been toying around with singular to get a grasp on some ways of wrting a cc and i started checking through the class's and saw a few problems so this is my attempt at resolving those issues.
Credit to the cc owner Apoc http://www.thebuddyforum.com/honorb...riven-all-one-cc-just-plain-works-pt-2-a.html
I want the hunter to cast Arcane shot only if it has >60 focus
Section of code:
I want the hunter to cast Explosive Trap when he can and when the buff from target has no Explosive Trap
section of code:
Whole combat logic:
ive been toying around with singular to get a grasp on some ways of wrting a cc and i started checking through the class's and saw a few problems so this is my attempt at resolving those issues.
Credit to the cc owner Apoc http://www.thebuddyforum.com/honorb...riven-all-one-cc-just-plain-works-pt-2-a.html
I want the hunter to cast Arcane shot only if it has >60 focus
Section of code:
Code:
CreateSpellCast(
"Arcane Shot",
ret => Me.Focus.....?
),
section of code:
Code:
// Trap Launcher
new PrioritySelector(
ret => ret != null && CanCast("Explosive Trap", (WoWUnit)ret, false),
CreateSpellCastOnSelf("Trap Launcher"),
new Sequence(
new Action(ret => Lua.DoString("RunMacroText(\"/cast Explosive Trap\")")),
new Action(ret => LegacySpellManager.ClickRemoteLocation(((WoWUnit)ret).Location))))));
Whole combat logic:
Code:
#region Revision Info
// This file is part of Singular - A community driven Honorbuddy CC
// $Author: Nuok $
// $Date: 2011-03-18 16:36:36 +0000 (Fri, 18 Mar 2011) $
// $HeadURL: http://svn.apocdev.com/singular/trunk/Singular/ClassSpecific/Hunter/Marksman.cs $
// $LastChangedBy: Nuok $
#endregion
using Styx.Combat.CombatRoutine;
using Styx.Logic.Combat;
using TreeSharp;
namespace Singular
{
partial class SingularRoutine
{
[Class(WoWClass.Hunter)]
[Spec(TalentSpec.MarksmanshipHunter)]
[Behavior(BehaviorType.Combat)]
[Context(WoWContext.All)]
public Composite CreateMarksmanshipCombat()
{
WantedPet = "1";
return new PrioritySelector(
CreateEnsureTarget(),
CreateWaitForCast(true),
CreateAutoAttack(true),
CreateHunterBackPedal(),
CreateMoveToAndFace(35f, ret => Me.CurrentTarget),
CreateSpellCast("Raptor Strike", ret => Me.CurrentTarget.DistanceSqr < 5 * 5),
//Interupt
CreateSpellCast("Silencing Shot", ret => Me.CurrentTarget.IsCasting),
// Always keep it up on our target!
CreateSpellBuff("Hunter's Mark"),
//Rapid fire on elite
CreateSpellBuff("Rapid Fire", ret => CurrentTargetIsElite),
//Cast when mob Hp below 20
CreateSpellCast("Kill Shot", ret => Me.CurrentTarget.HealthPercent < 19),
// Heal pet when below 70
CreateSpellCast("Mend Pet", ret => Me.Pet.HealthPercent < 70 && !Me.Pet.HasAura("Mend Pet")),
// Cast only when close to mob to try and gain aggro with pet
CreateSpellCast("Kill Command", ret => Me.CurrentTarget.DistanceSqr < 5 * 5),
CreateSpellBuff("Serpent Sting"),
CreateSpellCast("Chimera Shot", ret => Me.CurrentTarget.HasAura("Serpent Sting")),
CreateSpellCast("Aimed Shot", ret => Me.CurrentTarget.HealthPercent > 80 || Me.Auras["Ready, Set, Aim..."].StackCount == 5),
CreateSpellCast("Arcane Shot"),
CreateSpellCast("Steady Shot")
);
}
}
}
Last edited: