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); }
/// <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; }
/// <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; }
/// <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}"); }
/// <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); }
/// <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; }
/// <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); }
/// <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; }
/// <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); }
/// <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; }
/// <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; }
/// <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) { }
/// <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; }