// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // namespace MUnique.OpenMU.GameServer.RemoteView.MuHelper; using MUnique.OpenMU.GameLogic.MuHelper; /// /// Deserialized representation of the 257-byte PRECEIVE_MUHELPER_DATA blob. /// public sealed class MuHelperSettings : IMuHelperSettings { /// Gets the always-active basic attack skill ID (0 = no skill, use normal attack). public int BasicSkillId { get; init; } /// Gets the first conditional skill ID. public int ActivationSkill1Id { get; init; } /// Gets the second conditional skill ID. public int ActivationSkill2Id { get; init; } /// Gets the timer interval (seconds) for ActivationSkill1 when Skill1Delay is set. public int DelayMinSkill1 { get; init; } /// Gets the timer interval (seconds) for ActivationSkill2 when Skill2Delay is set. public int DelayMinSkill2 { get; init; } /// Gets a value indicating whether to use a timer for skill 1. public bool Skill1UseTimer { get; init; } /// Gets a value indicating whether to use a condition for skill 1. public bool Skill1UseCondition { get; init; } /// Gets a value indicating whether to use the precondition for Skill1 (false = nearby, true = attacking). public bool Skill1ConditionAttacking { get; init; } /// Gets the mob count threshold for Skill1 condition: 0=2+, 1=3+, 2=4+, 3=5+. public int Skill1SubCondition { get; init; } /// Gets a value indicating whether to use a timer for skill 2. public bool Skill2UseTimer { get; init; } /// Gets a value indicating whether to use a condition for skill 2. public bool Skill2UseCondition { get; init; } /// Gets a value indicating whether to use the precondition for Skill2 (false = nearby, true = attacking). public bool Skill2ConditionAttacking { get; init; } /// Gets the mob count threshold for Skill2 condition. public int Skill2SubCondition { get; init; } /// Gets a value indicating whether to use combo mode. public bool UseCombo { get; init; } /// Gets the hunting range nibble (0-15); multiply to get tile distance. public int HuntingRange { get; init; } /// Gets the max seconds away from the original position before regrouping. public int MaxSecondsAway { get; init; } /// Gets a value indicating whether to counter-attack enemies that attack from long range. public bool LongRangeCounterAttack { get; init; } /// Gets a value indicating whether to return to the original spawn position when away too long. public bool ReturnToOriginalPosition { get; init; } /// Gets the Buff 0 skill id. public int BuffSkill0Id { get; init; } /// Gets the Buff 1 skill id. public int BuffSkill1Id { get; init; } /// Gets the Buff 2 skill id. public int BuffSkill2Id { get; init; } /// Gets a value indicating whether to apply buffs based on duration (i.e. when the buff expires). public bool BuffOnDuration { get; init; } /// Gets a value indicating whether to apply buff duration logic to party members too. public bool BuffDurationForParty { get; init; } /// Gets the buff cast interval in seconds (0 = disabled). public int BuffCastIntervalSeconds { get; init; } /// Gets a value indicating whether to use auto-heal. public bool AutoHeal { get; init; } /// Gets the self-heal threshold (% HP, e.g. 30 means heal when below 30%). public int HealThresholdPercent { get; init; } /// Gets a value indicating whether to use drain life. public bool UseDrainLife { get; init; } /// Gets a value indicating whether to use a healing potion. public bool UseHealPotion { get; init; } /// Gets the potion use threshold (% HP). public int PotionThresholdPercent { get; init; } /// Gets a value indicating whether to support a party. public bool SupportParty { get; init; } /// Gets a value indicating whether to auto heal party. public bool AutoHealParty { get; init; } /// Gets the party member HP threshold (%) below which healing is applied. public int HealPartyThresholdPercent { get; init; } /// Gets a value indicating whether to use dark raven. public bool UseDarkRaven { get; init; } /// Gets the dark raven mode 0 = cease, 1 = auto-attack, 2 = attack with an owner. public int DarkRavenMode { get; init; } /// Gets the range to obtain. public int ObtainRange { get; init; } /// Gets a value indicating whether to pick up all items. public bool PickAllItems { get; init; } /// Gets a value indicating whether to pick up selected items. public bool PickSelectItems { get; init; } /// Gets a value indicating whether to pick up jewels. public bool PickJewel { get; init; } /// Gets a value indicating whether to pick up zen. public bool PickZen { get; init; } /// Gets a value indicating whether to pick up ancient items. public bool PickAncient { get; init; } /// Gets a value indicating whether to pick up excellent items. public bool PickExcellent { get; init; } /// Gets a value indicating whether to pick up extra items. public bool PickExtraItems { get; init; } /// Gets the extra item names. Up to 12 item name substrings; pick any dropped item whose name contains one of these. public IReadOnlyList ExtraItemNames { get; init; } = []; /// Gets a value indicating whether to repair items. public bool RepairItem { get; init; } /// Gets a value indicating whether to automatically defend against players attacking the character. public bool UseSelfDefense { get; init; } /// Gets a value indicating whether to automatically accept requests from friends. public bool AutoAcceptFriend { get; init; } /// Gets a value indicating whether to automatically accept requests from guild. public bool AutoAcceptGuild { get; init; } /// Gets a value indicating whether to use basic attack as fallback when the configured skill cannot be used. public bool FallbackBasicAttack { get; init; } /// /// Human MU Helper sessions drive their skills through the explicit client configuration, so this is always false. public bool AutoSelectBestSkill => false; /// /// Human MU Helper sessions configure their buff slots explicitly, so this is always false. public bool AutoSelectBuffs => false; /// /// The client-side MU Helper has no mana potion setting; this only exists for server-side bots. public bool UseManaPotion => false; /// /// A human picked their hunting spot deliberately, so their offline session fights whatever is there. public bool OnlyHuntSafeMonsters => false; /// /// Equipment progression is a server-side bot behavior only. public bool PickUpgradeItems => false; /// public override string ToString() { return $"[MuHelperSettings: BasicSkill={this.BasicSkillId}, Act1={this.ActivationSkill1Id}, Act2={this.ActivationSkill2Id}, Buffs={this.BuffSkill0Id}/{this.BuffSkill1Id}/{this.BuffSkill2Id}, HP={this.PotionThresholdPercent}%, Party={this.SupportParty}, PickAll={this.PickAllItems}, PickZen={this.PickZen}]"; } }