示例#1
0
        public PoetTrainer(PoetConfiguration config)
        {
            TkTrainerFactory.Initialize(TkClient.BasePath.Poet.ToString());

            _clients = new ActiveClients(config.Process);

            _poet = string.IsNullOrWhiteSpace(config.Name)
                ? _clients.GetPoet()
                : _clients.GetPoet(config.Name);

            _poet.Activity.DefaultCommandCooldown = config.CommandDelay;

            Log.Debug($"Key item assignments:\n{_poet.Inventory.KeyItems}\n");
            Log.Debug($"Key spell assignments:\n{_poet.Spells.KeySpells}\n");

            _isRunning        = new AutoHotkeyToggle("^F2", "isRunning", true);
            _isPaused         = new AutoHotkeySuspendToggle("F2", "isPaused", false);
            _shouldHardenBody = new AutoHotkeyToggle("F5", "shouldHardenBody", config.HardenBody.Value);
            _resetCurses      = new AutoHotkeyToggle("F12", "resetCurses", false);
            _shouldEsunaExternalGroupMembers = new AutoHotkeyToggle("^F12", "shouldEsunaExternalGroupMembers", false);

            var toggles = new[]
            {
                _isRunning,
                _isPaused,
                _shouldHardenBody,
                _resetCurses,
                _shouldEsunaExternalGroupMembers
            };

            _ahk = AutoHotkeyEngine.Instance;
            _ahk.LoadToggles(toggles);
        }
示例#2
0
 /// <summary>
 /// Assigns Harden Armor, Sanctuary, and Valor spells from the Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 public CasterAsvCommands(PoetClient self)
 {
     _self             = self;
     _hardenArmorSpell = self.Spells.KeySpells.HardenArmor;
     _sanctuarySpell   = self.Spells.KeySpells.Sanctuary;
     _valorSpell       = self.Spells.KeySpells.Valor;
 }
示例#3
0
        /// <summary>
        /// Assigns debuff spells from the Poet's spell inventory.
        /// </summary>
        /// <param name="self">The game client data for the Poet.</param>
        public PoetDebuffCommands(PoetClient self) : base(self)
        {
            _self = self;

            _atoneSpell      = _self.Spells.KeySpells.Atone;
            _removeVeilSpell = _self.Spells.KeySpells.RemoveVeil;
        }
示例#4
0
        /// <summary>
        /// Initializes settings and defines hotkeys.
        /// </summary>
        public DemoBot()
        {
            TkBotFactory.Initialize();

            _clients = new ActiveClients(TkBotFactory.ProcessName);
            //Log.Information("Got list of clients");

            _poet = _clients.GetPoet();
            _poet.Activity.DefaultCommandCooldown = TkBotFactory.CommandCooldown;

            _isBotRunning = new AutoHotkeyToggle("^F2", "isBotRunning", true);
            _isBotPaused  = new AutoHotkeyToggle("F2", "isBotPaused", false);
            _shouldEsunaExternalGroupMembers = new AutoHotkeyToggle("F12", "shouldEsunaExternalGroupMembers", false);
            _shouldRing   = new AutoHotkeyToggle("NumpadDiv", "shouldRing", false);
            _shouldGate   = new AutoHotkeyToggle("^NumpadDiv", "shouldGate", false);
            _shouldReturn = new AutoHotkeyToggle("!NumpadDiv", "shouldReturn", false);

            var toggles = new[]
            {
                _isBotRunning,
                _isBotPaused,
                _shouldEsunaExternalGroupMembers,
                _shouldRing,
                _shouldGate,
                _shouldReturn
            };

            var ahk = AutoHotkeyEngine.Instance;

            ahk.LoadToggles(toggles);
            ahk.LoadScript("NumpadAdd::Send {Ctrl down},{Ctrl up}");
        }
示例#5
0
        /// <summary>
        /// Assigns spells and items from the Poet's spell and item inventories.
        /// </summary>
        /// <param name="self">The game client data for the Poet.</param>
        protected PeasantCommands(PoetClient self)
        {
            Self          = self;
            _gatewaySpell = self.Spells.KeySpells.Gateway;

            Items    = new PeasantItemCommands(self);
            Movement = new PeasantMovementCommands(self);
        }
示例#6
0
        /// <summary>
        /// Assigns debuff and debuff cure spells from a Poet's spell inventory.
        /// </summary>
        /// <param name="self">The game client data for the Poet.</param>
        protected CasterDebuffCommands(PoetClient self)
        {
            _self = self;

            _cureParalysisSpell = self.Spells.KeySpells.CureParalysis;
            CurseSpell          = self.Spells.KeySpells.Curse;
            _purgeSpell         = self.Spells.KeySpells.Purge;
            _removeCurseSpell   = self.Spells.KeySpells.RemoveCurse;
        }
示例#7
0
        /// <summary>
        /// Assigns spells from the Poet's spell inventory.
        /// </summary>
        /// <param name="self">The game client data for the Poet.</param>
        public PoetCommands(PoetClient self) : base(self)
        {
            _hardenBodySpell  = self.Spells.KeySpells.HardenBody;
            _hardenBodyStatus = self.Status.HardenBody;

            Attacks = new PoetAttackCommands(self);
            Debuffs = new PoetDebuffCommands(self);
            Heal    = new PoetHealCommands(self);
            Mana    = new PoetManaCommands(self);
        }
示例#8
0
        /// <summary>
        /// Assigns mana restoration spells from a Poet's spell inventory.
        /// </summary>
        /// <param name="self">The game client data for the Poet.</param>
        protected CasterManaCommands(PoetClient self)
        {
            Self = self;

            InvokeSpell  = self.Spells.KeySpells.Invoke;
            InvokeStatus = self.Status.Invoke;

            if (InvokeSpell == null)
            {
                Log.Warning($"{self.Self.Name} does not have an Invoke spell. Mana restoration item consumption will be very high.");
            }
        }
 /// <summary>
 /// Assigns heal spells from the Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 public PeasantHealCommands(PoetClient self)
 {
     _self          = self;
     _healSpell     = self.Spells.KeySpells.Heal;
     _healSelfSpell = self.Spells.KeySpells.HealSelf;
 }
示例#10
0
 /// <summary>
 /// Assigns spells from the Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 public CasterCommands(PoetClient self) : base(self)
 {
     Asv = new CasterAsvCommands(self);
 }
示例#11
0
 /// <summary>
 /// Assigns heal spells from the Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 public PoetHealCommands(PoetClient self) : base(self)
 {
     _self         = self;
     _restoreSpell = _self.Spells.KeySpells.Restore;
 }
示例#12
0
 /// <summary>
 /// Assigns attack spells from the Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 protected PeasantAttackCommands(PoetClient self)
 {
     Self     = self;
     ZapSpell = self.Spells.KeySpells.Zap;
 }
示例#13
0
 /// <summary>
 /// Assigns attack spells from the Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 public PoetAttackCommands(PoetClient self) : base(self)
 {
 }
示例#14
0
 /// <summary>
 /// Assigns mana restoration spells from a Poet's spell inventory.
 /// </summary>
 /// <param name="self">The game client data for the Poet.</param>
 public PoetManaCommands(PoetClient self) : base(self)
 {
     _inspireSpell = self.Spells.KeySpells.Inspire;
 }