What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Help with hunter in Singular focus check and trap launcher

mctrix

Member
Joined
Jan 15, 2010
Messages
225
Reaction score
1
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:
Code:
CreateSpellCast(
                "Arcane Shot",
                ret => Me.Focus.....?
                ),
I want the hunter to cast Explosive Trap when he can and when the buff from target has no Explosive Trap
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:
I got the focus working
CreateSpellCast("Arcane Shot", ret => Me.FocusPercent == 64),

i may have got it working...

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 System.Threading;
using System.Linq;

using CommonBehaviors.Actions;

using Singular.Settings;

using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;

using TreeSharp;
using Styx.WoWInternals.WoWObjects;
using Styx.WoWInternals;
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", ret => Me.FocusPercent == 64),
                CreateSpellCast("Steady Shot")

                );
        }
             protected Composite CreateHunterTrapOnAddBehavior()
        {
            return new PrioritySelector(
                    ctx => NearbyUnfriendlyUnits.FirstOrDefault(u =>
                            u.IsTargetingMeOrPet && u != Me.CurrentTarget && !u.IsMoving),
                    new Decorator(
                        ret => ret != null && CanCast("Explosive Trap", (WoWUnit)ret, false),
                        new PrioritySelector(
                            CreateSpellBuffOnSelf("Trap Launcher"),
                            new Sequence(
                                new Action(ret => Lua.DoString("RunMacroText(\"/cast Explosive Trap\")")),
                                new Action(ret => LegacySpellManager.ClickRemoteLocation(((WoWUnit)ret).Location))))));
        }

        }

        }
 
Last edited:
you may want to use the singular cc thread for this - or at least link it
 
Why is mm hunter disabled in singular?

How do i enable it i have had a quick look but i dont understand the code enough.

Code:
Chose Singular $Revision: 254 $ as your combat class!
[Singular] Starting Singular v0.1.0.0
[Singular] Determining talent spec.
[Singular] Current spec is  Marksmanship Hunter
[Singular] Using CreateMarksmanshipCombat for Marksmanship Hunter - Combat (Priority: 0)
[Singular] Singular currently does not support Pull for this class/spec combination, in this context! [Hunter, MarksmanshipHunter, Normal]
You are a level 85 Marksmanship Hunter
Loading settings ...

edit: oh i forgot i fixed the mage when in arcane it use to just keep swapping between fire and frost buff....
 
you may want to use the singular cc thread for this - or at least link it

done in the original post.

Also why are some class's disabled...? How do i enable them i cant test my mm hunter if it doesnt let the cc start mm class
 
Back
Top