Esempio n. 1
0
        public PaladinProtection(AmeisenBotInterfaces bot) : base()
        {
            Bot = bot;

            //Spells Race
            //spellCoolDown.Add(EveryManforHimselfSpell, DateTime.Now);

            //Spell
            spellCoolDown.Add(avengersShieldSpell, DateTime.Now);
            spellCoolDown.Add(consecrationSpell, DateTime.Now);
            spellCoolDown.Add(judgementofLightSpell, DateTime.Now);
            spellCoolDown.Add(holyShieldSpell, DateTime.Now);
            spellCoolDown.Add(hammeroftheRighteousSpell, DateTime.Now);
            spellCoolDown.Add(hammerofWrathSpell, DateTime.Now);
            spellCoolDown.Add(exorcismSpell, DateTime.Now);
            spellCoolDown.Add(divineProtectionSpell, DateTime.Now);
            spellCoolDown.Add(handofReckoningSpell, DateTime.Now);
            spellCoolDown.Add(hammerofJusticeSpell, DateTime.Now);
            spellCoolDown.Add(layonHandsSpell, DateTime.Now);
            spellCoolDown.Add(holyLightSpell, DateTime.Now);
            spellCoolDown.Add(AvengingWrathSpell, DateTime.Now);
            spellCoolDown.Add(DivinePleaSpell, DateTime.Now);
            spellCoolDown.Add(SacredShieldSpell, DateTime.Now);

            //Buff
            spellCoolDown.Add(blessingofKingsSpell, DateTime.Now);
            spellCoolDown.Add(sealofLightSpell, DateTime.Now);
            spellCoolDown.Add(sealofWisdomSpell, DateTime.Now);
            spellCoolDown.Add(devotionAuraSpell, DateTime.Now);
            spellCoolDown.Add(righteousFurySpell, DateTime.Now);

            //Time event
            ShieldEvent = new(TimeSpan.FromSeconds(8));
        }
Esempio n. 2
0
        protected BasicCombatClass(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            SpellAbortFunctions = new();

            CooldownManager      = new(Bot.Character.SpellBook.Spells);
            RessurrectionTargets = new();

            TargetProviderDps  = new TargetManager(Bot, WowRole.Dps, TimeSpan.FromMilliseconds(250));
            TargetProviderTank = new TargetManager(Bot, WowRole.Tank, TimeSpan.FromMilliseconds(250));
            TargetProviderHeal = new TargetManager(Bot, WowRole.Heal, TimeSpan.FromMilliseconds(250));

            MyAuraManager     = new(Bot);
            TargetAuraManager = new(Bot);
            GroupAuraManager  = new(Bot);

            InterruptManager = new();

            EventCheckFacing = new(TimeSpan.FromMilliseconds(500));
            EventAutoAttack  = new(TimeSpan.FromMilliseconds(500));

            Configurables.TryAdd("HealthItemThreshold", 30.0);
            Configurables.TryAdd("ManaItemThreshold", 30.0);
        }
Esempio n. 3
0
        public PriestHoly(AmeisenBotInterfaces bot) : base()
        {
            Bot = bot;

            //Spells Race
            //spellCoolDown.Add(EveryManforHimselfSpell, DateTime.Now);

            //Spells / dmg
            spellCoolDown.Add(SmiteSpell, DateTime.Now);
            spellCoolDown.Add(HolyFireSpell, DateTime.Now);

            //Spells
            spellCoolDown.Add(RenewSpell, DateTime.Now);
            spellCoolDown.Add(FlashHealSpell, DateTime.Now);
            spellCoolDown.Add(GreaterHealSpell, DateTime.Now);
            spellCoolDown.Add(PowerWordShieldSpell, DateTime.Now);
            spellCoolDown.Add(CircleOfHealingSpell, DateTime.Now);
            spellCoolDown.Add(DesperatePrayerSpell, DateTime.Now);
            spellCoolDown.Add(FadeSpell, DateTime.Now);
            spellCoolDown.Add(PrayerofHealingSpell, DateTime.Now);
            spellCoolDown.Add(PrayerofMendingSpell, DateTime.Now);
            spellCoolDown.Add(GuardianSpiritSpell, DateTime.Now);
            spellCoolDown.Add(HymnofHopeSpell, DateTime.Now);
            spellCoolDown.Add(DivineHymnSpell, DateTime.Now);

            //Buffs
            spellCoolDown.Add(DivineSpiritSpell, DateTime.Now);
            spellCoolDown.Add(InnerFireSpell, DateTime.Now);
            spellCoolDown.Add(FearWardSpell, DateTime.Now);
            spellCoolDown.Add(PowerWordFortitudeSpell, DateTime.Now);
            spellCoolDown.Add(ShadowProtectionSpell, DateTime.Now);
            spellCoolDown.Add(PrayerofFortitude, DateTime.Now);
            spellCoolDown.Add(PrayerofShadowProtection, DateTime.Now);
        }
Esempio n. 4
0
        public DefaultTestEngine(AmeisenBotInterfaces bot, AmeisenBotConfig config)
        {
            Bot    = bot;
            Config = config;

            RootSelector = new Selector
                           (
                () => trainer != null,
                new Selector
                (
                    () => Bot.Wow.UiIsVisible("GossipFrame"),
                    new Selector
                    (
                        () => SelectedTraining(),
                        new Leaf(TrainAll),
                        new Leaf(Fail)
                    ),
                    new Leaf(OpenTrainer)
                ),
                new Leaf(GetTrainer)
                           );

            TestTree = new Tree
                       (
                RootSelector
                       );
        }
Esempio n. 5
0
        public RandomEmoteIdleAction(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            Emotes = new List <string>()
            {
                "flex",
                "train",
                "joke",
                "laugh",
                "dance",
                "sit",
                "sleep",
            };

            EmotesWithInteraction = new List <string>()
            {
                "hi",
                "wink",
                "salute",
                "fart",
                "flex",
                "laugh",
                "rude",
                "roar",
                "applaud",
                "shy",
            };

            Rnd = new Random();
        }
Esempio n. 6
0
        public PriestShadow(AmeisenBotInterfaces bot) : base(bot)
        {
            MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Priest335a.PowerWordFortitude, () =>
                                                         Bot.Player.ManaPercentage > 60.0 &&
                                                         ValidateSpell(Priest335a.PowerWordFortitude, true) &&
                                                         TryCastSpell(Priest335a.PowerWordFortitude, Bot.Player.Guid)));
            MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Priest335a.PowerWordShield, () =>
                                                         Bot.Player.Auras.All(e => Bot.Db.GetSpellName(e.SpellId) != "Weakened Soul") &&
                                                         Bot.Player.ManaPercentage > 60.0 &&
                                                         ValidateSpell(Priest335a.PowerWordShield, true) &&
                                                         TryCastSpell(Priest335a.PowerWordShield, Bot.Player.Guid)));
            MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Priest335a.InnerFire, () =>
                                                         Bot.Player.ManaPercentage > 60.0 &&
                                                         ValidateSpell(Priest335a.InnerFire, true) &&
                                                         TryCastSpell(Priest335a.InnerFire, Bot.Player.Guid)));
            MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Priest335a.Renew, () =>
                                                         Bot.Player.Auras.All(e => Bot.Db.GetSpellName(e.SpellId) != Priest335a.Renew) &&
                                                         Bot.Player.HealthPercentage <85 && Bot.Player.ManaPercentage> 65.0 &&
                                                         ValidateSpell(Priest335a.Renew, true) &&
                                                         TryCastSpell(Priest335a.Renew, Bot.Player.Guid)));

            TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Priest335a.ShadowWordPain, () =>
                                                             Bot.Target?.HealthPercentage >= 5 &&
                                                             ValidateSpell(Priest335a.ShadowWordPain, true) &&
                                                             TryCastSpell(Priest335a.ShadowWordPain, Bot.Wow.TargetGuid)));
        }
        public HunterBeastmastery(AmeisenBotInterfaces bot) : base(bot)
        {
            PetManager = new
                         (
                Bot,
                TimeSpan.FromSeconds(5),
                () => TryCastSpell(Hunter335a.MendPet, 0, true),
                () => TryCastSpell(Hunter335a.CallPet, 0),
                () => TryCastSpell(Hunter335a.RevivePet, 0)
                         );

            MyAuraManager.Jobs.Add(new KeepBestActiveAuraJob(bot.Db, new List <(string, Func <bool>)>()
            {
                (Hunter335a.AspectOfTheViper, () => Bot.Player.ManaPercentage < 25.0 && TryCastSpell(Hunter335a.AspectOfTheViper, 0, true)),
                (Hunter335a.AspectOfTheDragonhawk, () => (!bot.Character.SpellBook.IsSpellKnown(Hunter335a.AspectOfTheViper) || Bot.Player.ManaPercentage > 80.0) && TryCastSpell(Hunter335a.AspectOfTheDragonhawk, 0, true)),
                (Hunter335a.AspectOfTheHawk, () => TryCastSpell(Hunter335a.AspectOfTheHawk, 0, true))
            }));

            TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Hunter335a.HuntersMark, () => TryCastSpell(Hunter335a.HuntersMark, Bot.Wow.TargetGuid, true)));
            TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Hunter335a.SerpentSting, () => TryCastSpell(Hunter335a.SerpentSting, Bot.Wow.TargetGuid, true)));

            InterruptManager.InterruptSpells = new()
            {
                { 0, (x) => TryCastSpell(Hunter335a.ScatterShot, x.Guid, true) },
                { 1, (x) => TryCastSpell(Hunter335a.Intimidation, x.Guid, true) }
            };
Esempio n. 8
0
        public AnubRekhan10Tactic(AmeisenBotInterfaces bot)
        {
            Bot = bot;
            TankingPathQueue = new();

            Configurables.TryAdd("isOffTank", false);
        }
Esempio n. 9
0
        public WarlockDemonology(AmeisenBotInterfaces bot) : base(bot)
        {
            PetManager = new PetManager
                         (
                Bot,
                TimeSpan.FromSeconds(1),
                null,
                () => (Bot.Character.SpellBook.IsSpellKnown(Warlock335a.SummonFelguard) &&
                       Bot.Character.Inventory.HasItemByName("Soul Shard") &&
                       TryCastSpell(Warlock335a.SummonFelguard, 0, true)) ||
                (Bot.Character.SpellBook.IsSpellKnown(Warlock335a.SummonImp) &&
                 TryCastSpell(Warlock335a.SummonImp, 0, true)),
                () => (Bot.Character.SpellBook.IsSpellKnown(Warlock335a.SummonFelguard) &&
                       Bot.Character.Inventory.HasItemByName("Soul Shard") &&
                       TryCastSpell(Warlock335a.SummonFelguard, 0, true)) ||
                (Bot.Character.SpellBook.IsSpellKnown(Warlock335a.SummonImp) &&
                 TryCastSpell(Warlock335a.SummonImp, 0, true))
                         );

            MyAuraManager.Jobs.Add(new KeepBestActiveAuraJob(bot.Db, new List <(string, Func <bool>)>()
            {
                (Warlock335a.FelArmor, () => TryCastSpell(Warlock335a.FelArmor, 0, true)),
                (Warlock335a.DemonArmor, () => TryCastSpell(Warlock335a.DemonArmor, 0, true)),
                (Warlock335a.DemonSkin, () => TryCastSpell(Warlock335a.DemonSkin, 0, true)),
            }));

            TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Warlock335a.Corruption, () => Bot.Target != null && !Bot.Target.Auras.Any(e => Bot.Db.GetSpellName(e.SpellId) == Warlock335a.SeedOfCorruption) && TryCastSpell(Warlock335a.Corruption, Bot.Wow.TargetGuid, true)));
            TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Warlock335a.CurseOfTongues, () => TryCastSpell(Warlock335a.CurseOfTongues, Bot.Wow.TargetGuid, true)));
            TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Warlock335a.Immolate, () => TryCastSpell(Warlock335a.Immolate, Bot.Wow.TargetGuid, true)));
        }
Esempio n. 10
0
        /// <summary>
        /// Create a new instance of the HealingManager that is used to choose healing spell in a smart way.
        /// It observes the heals done by the bot and remembers how much each spell healed. Based of that
        /// knoweledge it is able to cancel spells to prevent overheal an chose fast heals when the target
        /// is going to die in a few seconds.
        /// </summary>
        /// <param name="bot">AmeisenBotInterfaces collection</param>
        /// <param name="tryCastSpellAction">Function to cast a spell</param>
        /// <param name="damageMonitorSeconds">How many seconds to use for the incoming damage simulation</param>
        /// <param name="healthWeight">How much weight should the health of a target have on its priority</param>
        /// <param name="incomingDamageWeight">How much weight should the incoming damage have on its priority</param>
        /// <param name="targetDyingSeconds">How many seconds should we try to simulate damage to recognized dying targets</param>
        /// <param name="overhealingStopThreshold">How much percent of a spell needs to be overhealing to cancel it (0.0f - 1.0f)</param>
        public HealingManager
        (
            AmeisenBotInterfaces bot,
            Func <string, ulong, bool> tryCastSpellAction,
            int damageMonitorSeconds       = 10,
            float healthWeight             = 0.7f,
            float incomingDamageWeight     = 0.3f,
            int targetDyingSeconds         = 4,
            float overhealingStopThreshold = 0.75f
        )
        {
            Bot = bot;
            TryCastSpellAction = tryCastSpellAction;

            // configureables
            DamageMonitorSeconds     = damageMonitorSeconds;
            HealthWeightMod          = healthWeight;
            IncomingDamageMod        = incomingDamageWeight;
            TargetDyingSeconds       = targetDyingSeconds;
            OverhealingStopThreshold = 1.0f - overhealingStopThreshold;

            HealingSpells        = new();
            MeasurementEvent     = new(TimeSpan.FromSeconds(1));
            IncomingDamage       = new();
            IncomingDamageBuffer = new();
            SpellHealingBuffer   = new();
            SpellHealing         = new();

            Bot.CombatLog.OnDamage += OnDamage;
            Bot.CombatLog.OnHeal   += OnHeal;
        }
Esempio n. 11
0
        public DruidRestoration(AmeisenBotInterfaces bot) : base(bot)
        {
            MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Druid335a.TreeOfLife, () => Bot.Objects.PartymemberGuids.Any() && TryCastSpell(Druid335a.TreeOfLife, Bot.Wow.PlayerGuid, true)));
            MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Druid335a.MarkOfTheWild, () => TryCastSpell(Druid335a.MarkOfTheWild, Bot.Wow.PlayerGuid, true)));

            GroupAuraManager.SpellsToKeepActiveOnParty.Add((Druid335a.MarkOfTheWild, (spellName, guid) => TryCastSpell(spellName, guid, true)));

            HealingManager = new(bot, (string spellName, ulong guid) => { return(TryCastSpell(spellName, guid)); });

            // make sure all new spells get added to the healing manager
            Bot.Character.SpellBook.OnSpellBookUpdate += () =>
            {
                if (Bot.Character.SpellBook.TryGetSpellByName(Druid335a.Nourish, out Spell spellNourish))
                {
                    HealingManager.AddSpell(spellNourish);
                }

                if (Bot.Character.SpellBook.TryGetSpellByName(Druid335a.HealingTouch, out Spell spellHealingTouch))
                {
                    HealingManager.AddSpell(spellHealingTouch);
                }

                if (Bot.Character.SpellBook.TryGetSpellByName(Druid335a.Regrowth, out Spell spellRegrowth))
                {
                    HealingManager.AddSpell(spellRegrowth);
                }
            };

            SpellAbortFunctions.Add(HealingManager.ShouldAbortCasting);

            SwiftmendEvent = new(TimeSpan.FromSeconds(15));
        }
Esempio n. 12
0
        public EyeOfTheStorm(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            CaptureFlagEvent = new(TimeSpan.FromSeconds(1));
            CombatEvent      = new(TimeSpan.FromSeconds(2));
        }
Esempio n. 13
0
 public GroupAuraManager(AmeisenBotInterfaces bot)
 {
     Bot = bot;
     SpellsToKeepActiveOnParty = new();
     RemoveBadAurasSpells      = new();
     LastBuffed = new();
 }
Esempio n. 14
0
        public RuneforgingQuestObjective(AmeisenBotInterfaces bot, EnchantItemQuestObjectiveCondition condition)
        {
            Bot       = bot;
            Condition = condition;

            EnchantEvent = new(TimeSpan.FromSeconds(1));
        }
 public Horde1To60GrinderProfile(AmeisenBotInterfaces bot)
 {
     Quests = new Queue <List <IBotQuest> >();
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QDurotarGrindToLevel6(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QDurotarGrindToLevel9(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QDurotarGrindToLevel11(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QTheBarrensGrindToLevel14(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QTheBarrensGrindToLevel16(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QTheBarrensGrindToLevel19(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QStonetalonGrindToLevel23(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QStonetalonGrindToLevel31(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QDesolaceGrindToLevel35(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QDesolaceGrindToLevel40(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QTanarisGrindToLevel44(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QTanarisGrindToLevel49(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QUngoroGrindToLevel54(bot)
     });
     Quests.Enqueue(new List <IBotQuest>()
     {
         new QSilithusGrindToLevel60(bot)
     });
 }
Esempio n. 16
0
        public DefaultQuestEngine(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            CompletedQuests           = new();
            QueryCompletedQuestsEvent = new(TimeSpan.FromSeconds(2));
        }
Esempio n. 17
0
 public MoveToPositionQuestObjective(AmeisenBotInterfaces bot, Vector3 position, double distance, MovementAction movementAction = MovementAction.Move)
 {
     Bot            = bot;
     WantedPosition = position;
     Distance       = distance;
     MovementAction = movementAction;
 }
Esempio n. 18
0
 public static void Run(AmeisenBotInterfaces bot, AmeisenBotConfig config)
 {
     // this can fail for myriad of reasons like not having enough money to buy service, or npc getting rekt/trainerFrame bugging out
     // this basically assumes unlimited cash supply and stable trainer frame open while executing
     bot.Wow.ClickOnTrainButton();
     bot.Wow.ClearTarget();
 }
Esempio n. 19
0
 public UseUnitQuestObjective(AmeisenBotInterfaces bot, List <int> objectDisplayIds, bool questgiversOnly, UseUnitQuestObjectiveCondition condition)
 {
     Bot = bot;
     ObjectDisplayIds = objectDisplayIds;
     Condition        = condition;
     QuestgiversOnly  = questgiversOnly;
 }
Esempio n. 20
0
 public GrindingObjective(AmeisenBotInterfaces bot, int targetLevel,
                          List <List <Vector3> > grindingAreas, List <Vector3> vendorsLocation = null)
 {
     Bot             = bot;
     WantedLevel     = targetLevel;
     SearchAreas     = new SearchAreaEnsamble(grindingAreas);
     VendorsLocation = vendorsLocation;
 }
Esempio n. 21
0
        public ArathiBasin(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            CaptureFlagEvent = new(TimeSpan.FromSeconds(1));
            CombatEvent      = new(TimeSpan.FromSeconds(2));
            FlagsNodelist    = new();
        }
Esempio n. 22
0
        public UseObjectQuestObjective(AmeisenBotInterfaces bot, List <int> objectDisplayIds, UseObjectQuestObjectiveCondition condition)
        {
            Bot = bot;
            ObjectDisplayIds = objectDisplayIds;
            Condition        = condition;

            UseEvent = new(TimeSpan.FromSeconds(1));
        }
Esempio n. 23
0
        public FollowMovementProvider(AmeisenBotInterfaces bot, AmeisenBotConfig config)
        {
            Bot    = bot;
            Config = config;

            Random           = new();
            OffsetCheckEvent = new(TimeSpan.FromMilliseconds(30000));
        }
Esempio n. 24
0
        public BronjahmTactic(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            Configurables = new()
            {
                { "isOffTank", false },
            };
        }
Esempio n. 25
0
 public CollectQuestObjective(AmeisenBotInterfaces bot, int itemId, int itemAmount, List <int> gameObjectIds, List <Vector3> positions)
 {
     Bot              = bot;
     ItemId           = itemId;
     WantedItemAmount = itemAmount;
     GameObjectIds    = gameObjectIds;
     Area             = positions.Select(pos => new AreaNode(pos, 10.0)).ToList();
     RightClickEvent  = new(TimeSpan.FromMilliseconds(1500));
 }
Esempio n. 26
0
        public IckAndKrickTactic(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            Configurables = new()
            {
                { "isOffTank", false },
            };
        }
Esempio n. 27
0
 public KillUnitQuestObjective(AmeisenBotInterfaces bot, int objectDisplayId, KillUnitQuestObjectiveCondition condition)
 {
     Bot = bot;
     ObjectDisplayIds = new Dictionary <int, int>()
     {
         { 0, objectDisplayId }
     };
     Condition = condition;
 }
        public DevourerOfSoulsTactic(AmeisenBotInterfaces bot)
        {
            Bot = bot;

            Configurables = new()
            {
                { "isOffTank", false },
            };
        }
        public TalkToUnitQuestObjective(AmeisenBotInterfaces bot, List <int> displayIds, List <int> gossipIds, TalkToUnitQuestObjectiveCondition condition)
        {
            Bot        = bot;
            DisplayIds = displayIds;
            GossipIds  = gossipIds;
            Condition  = condition;

            TalkEvent = new(TimeSpan.FromMilliseconds(500));
        }
Esempio n. 30
0
 public MoveToUnitQuestObjective(AmeisenBotInterfaces bot, int unitDisplayId, double distance)
 {
     Bot            = bot;
     UnitDisplayIds = new List <int>()
     {
         unitDisplayId
     };
     Distance = distance;
 }