示例#1
0
        /// <summary>
        /// Initializes settings and defines hotkeys.
        /// </summary>.
        public DemoBot()
        {
            TkBotFactory.Initialize();

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

            _client = _clients.GetRogue();
            _client.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}");
        }
示例#2
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);
        }
        public AutoFollowTrainer(AutoFollowConfiguration config)
        {
            _config = config;

            TkTrainerFactory.Initialize("AutoFollow");

            _isRunning = new AutoHotkeyToggle("ScrollLock", "isRunning", true);
            _isPaused  = new AutoHotkeyToggle("Pause", "isPaused", false);

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

            AutoHotkeyEngine.Instance.LoadToggles(toggles);
        }
示例#4
0
        public MageTrainer(MageConfiguration config)
        {
            TkTrainerFactory.Initialize(TkClient.BasePath.Mage.ToString());

            _clients = new ActiveClients(config.Process);

            _mage = string.IsNullOrWhiteSpace(config.Name)
                ? _clients.GetMage()
                : _clients.GetMage(config.Name);

            _mage.Activity.DefaultCommandCooldown = config.CommandDelay;

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

            _isRunning = new AutoHotkeyToggle("^F1", "isRunning", true);
            _isPaused  = new AutoHotkeySuspendToggle("F1", "isPaused", false);
            _shouldEsunaExternalGroupMembers = new AutoHotkeyToggle("F11", "shouldEsunaExternalGroupMembers", false);
            _shouldHeal       = new AutoHotkeyToggle("`", "shouldHeal", config.Heal.Value);
            _shouldBlind      = new AutoHotkeyToggle("1", "shouldBlind", config.Blind.Value);
            _shouldParalyze   = new AutoHotkeyToggle("2", "shouldParalyze", config.Paralyze.Value);
            _shouldVenom      = new AutoHotkeyToggle("3", "shouldVenom", config.Venom.Value);
            _shouldVex        = new AutoHotkeyToggle("4", "shouldVex", config.Vex.Value);
            _shouldZap        = new AutoHotkeyToggle("5", "shouldZap", config.Zap.Value);
            _shouldUpdateNpcs = new AutoHotkeyToggle("6", "shouldUpdateNpcs", false);

            var toggles = new[]
            {
                _isRunning,
                _isPaused,
                _shouldEsunaExternalGroupMembers,
                _shouldHeal,
                _shouldBlind,
                _shouldParalyze,
                _shouldVenom,
                _shouldVex,
                _shouldZap,
                _shouldUpdateNpcs
            };

            _ahk = AutoHotkeyEngine.Instance;
            _ahk.LoadToggles(toggles);
        }
示例#5
0
        public RogueTrainer(RogueConfiguration config)
        {
            TkTrainerFactory.Initialize(TkClient.BasePath.Rogue.ToString());

            _clients = new ActiveClients(config.Process);

            _rogue = string.IsNullOrWhiteSpace(config.Name)
                ? _clients.GetRogue()
                : _clients.GetRogue(config.Name);

            _rogue.Activity.DefaultCommandCooldown = config.CommandDelay;

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

            _shouldUpdateNpcs               = new AutoHotkeyBool("shouldUpdateNpcs", false);
            _isRunning                      = new AutoHotkeyToggle("^F3", "isRunning", true);
            _isPaused                       = new AutoHotkeySuspendToggle("F3", "isPaused", false);
            _shouldTaunt                    = new AutoHotkeyToggleWithPrerequisite("7", "shouldTaunt", false, _shouldUpdateNpcs);
            _shouldLethalStrikeOnAethers    = new AutoHotkeyToggle("8", "shouldLethalStrikeOnAethers", config.LethalStrike.Value);
            _shouldDesperateAttackOnAethers = new AutoHotkeyToggle("9", "shouldDesperateAttackOnAethers", config.DesperateAttack.Value);
            _shouldAutoMelee                = new AutoHotkeyToggle("0", "shouldAutoMelee", config.Attack.Value);
            _shouldAmbushOnMelee            = new AutoHotkeyToggle("-", "shouldAmbushOnMelee", config.Ambush.Value);

            var toggles = new[]
            {
                _isRunning,
                _isPaused,
                _shouldTaunt,
                _shouldLethalStrikeOnAethers,
                _shouldDesperateAttackOnAethers,
                _shouldAutoMelee,
                _shouldAmbushOnMelee
            };

            _ahk = AutoHotkeyEngine.Instance;
            _ahk.LoadToggles(toggles);
        }
示例#6
0
        public WarriorTrainer(WarriorConfiguration config)
        {
            TkTrainerFactory.Initialize(TkClient.BasePath.Warrior.ToString());

            _clients = new ActiveClients(config.Process);

            _warrior = string.IsNullOrWhiteSpace(config.Name)
                ? _clients.GetWarrior()
                : _clients.GetWarrior(config.Name);

            _warrior.Activity.DefaultCommandCooldown = config.CommandDelay;

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

            _shouldUpdateNpcs         = new AutoHotkeyBool("shouldUpdateNpcs", false);
            _isRunning                = new AutoHotkeyToggle("^F4", "isRunning", true);
            _isPaused                 = new AutoHotkeySuspendToggle("F4", "isPaused", false);
            _shouldSpotTrapsOnAethers = new AutoHotkeyToggle("F6", "shouldSpotTrapsOnAethers", false);
            _shouldTaunt              = new AutoHotkeyToggleWithPrerequisite("F7", "shouldTaunt", false, _shouldUpdateNpcs);
            _shouldWhirlwindOnAethers = new AutoHotkeyToggle("F8", "shouldWhirlwindOnAethers", config.Whirlwind.Value);
            _shouldBerserkOnAethers   = new AutoHotkeyToggle("F9", "shouldBerserkOnAethers", config.Berserk.Value);
            _shouldAutoMelee          = new AutoHotkeyToggle("F10", "shouldAutoMelee", config.Attack.Value);

            var toggles = new[]
            {
                _isRunning,
                _isPaused,
                _shouldTaunt,
                _shouldWhirlwindOnAethers,
                _shouldBerserkOnAethers,
                _shouldAutoMelee,
                _shouldSpotTrapsOnAethers
            };

            _ahk = AutoHotkeyEngine.Instance;
            _ahk.LoadToggles(toggles);
        }