From 1ade8dabd827671fff531eaca6e555112e42291f Mon Sep 17 00:00:00 2001 From: Quick <577652+markdwags@users.noreply.github.com> Date: Thu, 6 Mar 2025 23:07:13 -0600 Subject: [PATCH] - Rewrite closest and random targeting - Implement Smart Closest & Random --- Razor/Core/Targeting.cs | 65 ++++---- Razor/Core/TargetingClosest.cs | 202 +---------------------- Razor/Core/TargetingProximity.cs | 270 ++++++++++++++++++++++++++++++ Razor/Core/TargetingRandom.cs | 143 +--------------- Razor/Razor.csproj | 1 + Razor/UI/Config.cs | 5 +- Razor/UI/Razor.Designer.cs | 271 ++++++++++++++++--------------- Razor/UI/Razor.cs | 9 +- etc/Language/Razor_lang.enu | 1 + etc/license.txt | 88 ---------- 10 files changed, 465 insertions(+), 590 deletions(-) create mode 100644 Razor/Core/TargetingProximity.cs delete mode 100644 etc/license.txt diff --git a/Razor/Core/Targeting.cs b/Razor/Core/Targeting.cs index 98f4baec..26314f25 100644 --- a/Razor/Core/Targeting.cs +++ b/Razor/Core/Targeting.cs @@ -1,6 +1,6 @@ #region license // Razor: An Ultima Online Assistant -// Copyright (c) 2022 Razor Development Community on GitHub +// Copyright (c) 2025 Razor Development Community on GitHub // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -638,54 +638,63 @@ private static void LastHarmfulTargetChanged() } } + public static bool LastTargetWasSet => _lastTargetWasSet; - public static bool LastTargetWasSet + public static void SetLastTargetTo(Mobile m, byte flagType = 0) { - get { return _lastTargetWasSet; } - } - - - public static void SetLastTargetTo(Mobile m) - { - SetLastTargetTo(m, 0); - } - - public static void SetLastTargetTo(Mobile m, byte flagType) - { - TargetInfo targ = new TargetInfo(); - _lastGroundTarget = _lastTarget = targ; + TargetInfo target = new TargetInfo(); + _lastGroundTarget = _lastTarget = target; if ((_hasTarget && _curFlags == 1) || flagType == 1) - _lastHarmTarget = targ; + { + _lastHarmTarget = target; + } else if ((_hasTarget && _curFlags == 2) || flagType == 2) - _lastBeneTarget = targ; + { + _lastBeneTarget = target; + } else if (flagType == 0) - _lastHarmTarget = _lastBeneTarget = targ; + { + _lastHarmTarget = _lastBeneTarget = target; + } - targ.Type = 0; + target.Type = 0; + if (_hasTarget) - targ.Flags = _curFlags; + { + target.Flags = _curFlags; + } else - targ.Flags = flagType; + { + target.Flags = flagType; + } - targ.Gfx = m.Body; - targ.Serial = m.Serial; - targ.X = m.Position.X; - targ.Y = m.Position.Y; - targ.Z = m.Position.Z; + target.Gfx = m.Body; + target.Serial = m.Serial; + target.X = m.Position.X; + target.Y = m.Position.Y; + target.Z = m.Position.Z; Client.Instance.SendToClient(new ChangeCombatant(m)); _lastCombatant = m.Serial; World.Player.SendMessage(MsgLevel.Force, LocString.NewTargSet); - OverheadTargetMessage(targ); + OverheadTargetMessage(target); - bool wasSmart = Config.GetBool("SmartLastTarget"); + bool wasSmart = IsSmartTargetingEnabled(); + if (wasSmart) + { Config.SetProperty("SmartLastTarget", false); + } + LastTarget(); + if (wasSmart) + { Config.SetProperty("SmartLastTarget", true); + } + LastTargetChanged(); } diff --git a/Razor/Core/TargetingClosest.cs b/Razor/Core/TargetingClosest.cs index b15e14b4..a73229ea 100644 --- a/Razor/Core/TargetingClosest.cs +++ b/Razor/Core/TargetingClosest.cs @@ -1,6 +1,6 @@ #region license // Razor: An Ultima Online Assistant -// Copyright (c) 2022 Razor Development Community on GitHub +// Copyright (c) 2025 Razor Development Community on GitHub // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -16,11 +16,6 @@ // along with this program. If not, see . #endregion -using System.Collections.Generic; -using Assistant.Core; -using Assistant.Filters; -using Assistant.Scripts; - namespace Assistant { public partial class Targeting @@ -199,200 +194,5 @@ public static void TargetClosest() { ClosestTarget(); } - - public static void ClosestTarget(params int[] noto) - { - if (!Client.Instance.AllowBit(FeatureBit.ClosestTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - if ((!FriendsManager.IsFriend(m.Serial) || noto.Length > 0 && noto[0] == 0) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - for (var i = 0; i < noto.Length; i++) - if (noto[i] == m.Notoriety) - { - list.Add(m); - break; - } - - if (noto.Length == 0) - list.Add(m); - } - - Mobile closest = null; - var closestDist = double.MaxValue; - - foreach (var m in list) - { - var dist = Utility.DistanceSqrt(m.Position, World.Player.Position); - - if (dist < closestDist || closest == null) - { - closestDist = dist; - closest = m; - } - } - - if (closest != null) - { - SetLastTargetTo(closest); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } - - public static void ClosestHumanoidTarget(params int[] noto) - { - if (!Client.Instance.AllowBit(FeatureBit.ClosestTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - { - if (m.Body != 0x0190 && m.Body != 0x0191 && m.Body != 0x025D && m.Body != 0x025E) - continue; - - if ((!FriendsManager.IsFriend(m.Serial) || noto.Length > 0 && noto[0] == 0) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - for (var i = 0; i < noto.Length; i++) - if (noto[i] == m.Notoriety) - { - list.Add(m); - break; - } - - if (noto.Length == 0) - list.Add(m); - } - } - - Mobile closest = null; - var closestDist = double.MaxValue; - - foreach (var m in list) - { - var dist = Utility.DistanceSqrt(m.Position, World.Player.Position); - - if (dist < closestDist || closest == null) - { - closestDist = dist; - closest = m; - } - } - - if (closest != null) - { - SetLastTargetTo(closest); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } - - public static void ClosestMonsterTarget(params int[] noto) - { - if (!Client.Instance.AllowBit(FeatureBit.ClosestTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - { - if (!m.IsMonster) - continue; - - if ((!FriendsManager.IsFriend(m.Serial) || noto.Length > 0 && noto[0] == 0) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - for (var i = 0; i < noto.Length; i++) - if (noto[i] == m.Notoriety) - { - list.Add(m); - break; - } - - if (noto.Length == 0) - list.Add(m); - } - } - - Mobile closest = null; - var closestDist = double.MaxValue; - - foreach (var m in list) - { - var dist = Utility.DistanceSqrt(m.Position, World.Player.Position); - - if (dist < closestDist || closest == null) - { - closestDist = dist; - closest = m; - } - } - - if (closest != null) - { - SetLastTargetTo(closest); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } - - public static void ClosestFriendTarget() - { - if (!Client.Instance.AllowBit(FeatureBit.ClosestTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - { - if (FriendsManager.IsFriend(m.Serial) && !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - list.Add(m); - } - } - - Mobile closest = null; - var closestDist = double.MaxValue; - - foreach (var m in list) - { - var dist = Utility.DistanceSqrt(m.Position, World.Player.Position); - - if (dist < closestDist || closest == null) - { - closestDist = dist; - closest = m; - } - } - - if (closest != null) - { - SetLastTargetTo(closest); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } } } \ No newline at end of file diff --git a/Razor/Core/TargetingProximity.cs b/Razor/Core/TargetingProximity.cs new file mode 100644 index 00000000..aaa31372 --- /dev/null +++ b/Razor/Core/TargetingProximity.cs @@ -0,0 +1,270 @@ +#region license +// Razor: An Ultima Online Assistant +// Copyright (c) 2025 Razor Development Community on GitHub +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +#endregion + +using System; +using System.Collections.Generic; +using Assistant.Core; +using Assistant.Filters; +using Assistant.Scripts; + +namespace Assistant +{ + public partial class Targeting + { + private enum TargetSelectionType + { + Closest, + Random + } + + private enum TargetFilterType + { + Any, + Humanoid, + Monster, + Friend + } + + /// + /// Checks if the mobile passes all filters based on the type and notoriety + /// + /// + /// + /// + /// + private static bool PassesFilters(Mobile m, TargetFilterType filterType, int[] notorietyTypes) + { + // Common exclusion criteria for all target types + if (m.Blessed || m.IsGhost || m.Serial == World.Player.Serial || + TargetFilterManager.IsFilteredTarget(m.Serial) || + !Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) + { + return false; + } + + // Body type filtering if humanoid filter is specified + if (filterType == TargetFilterType.Humanoid && + (m.Body != 0x0190 && m.Body != 0x0191 && m.Body != 0x025D && m.Body != 0x025E)) + { + return false; + } + + if (filterType == TargetFilterType.Monster && !m.IsMonster) + { + return false; + } + + // Friend filter handling is special + if (filterType == TargetFilterType.Friend) + { + return FriendsManager.IsFriend(m.Serial); + } + + // For non-friend targets, check if they're NOT in friends list (unless notoriety[0] is 0) + if (FriendsManager.IsFriend(m.Serial) && (notorietyTypes.Length == 0 || notorietyTypes[0] != 0)) + { + return false; + } + + // If no notoriety filters specified, include all targets that passed previous filters + if (notorietyTypes.Length == 0) + { + return true; + } + + // Check if mobile matches any of the specified notoriety types + for (var i = 0; i < notorietyTypes.Length; i++) + { + if (notorietyTypes[i] == m.Notoriety) + { + return true; + } + } + + return false; + } + + /// + /// Find a random target that matches the criteria + /// + /// + /// + /// + private static Mobile FindRandomTarget(TargetFilterType filterType, int[] notorietyTypes) + { + var list = new List(); + + foreach (var m in World.MobilesInRange(12)) + { + if (PassesFilters(m, filterType, notorietyTypes)) + { + list.Add(m); + } + } + + return list.Count > 0 ? list[Utility.Random(list.Count)] : null; + } + + /// + /// Find the closest target that matches the criteria + /// + /// + /// + /// + private static Mobile FindClosestTarget(TargetFilterType filterType, int[] notorietyTypes) + { + Mobile closest = null; + var closestDistSquared = double.MaxValue; + + foreach (var m in World.MobilesInRange(12)) + { + if (PassesFilters(m, filterType, notorietyTypes)) + { + float xDelta = Math.Abs(m.Position.X - World.Player.Position.X); + float yDelta = Math.Abs(m.Position.Y - World.Player.Position.Y); + var distSquared = xDelta * xDelta + yDelta * yDelta; + + if (closest == null || distSquared < closestDistSquared) + { + closestDistSquared = distSquared; + closest = m; + } + } + } + + return closest; + } + + /// + /// Determine the appropriate flagType based on target category + /// + /// + /// + private static byte DetermineFlagType(int[] notorietyTypes) + { + if (!IsSmartTargetingEnabled() || !Config.GetBool("SmartClosestRandom")) + { + return 0; + } + + if (notorietyTypes.Length == 0) + { + return 0; + } + + // Non-friendly targets (attackable, criminal, enemy, murderer) should use flag 1 (harmful) + foreach (var noto in notorietyTypes) + { + switch (noto) + { + case (int)TargetType.Attackable: + case (int)TargetType.Criminal: + case (int)TargetType.Enemy: + case (int)TargetType.Murderer: + return 1; // Harmful target + + case (int)TargetType.Innocent: + case (int)TargetType.GuildAlly: + case (int)TargetType.Invalid: + return 2; // Beneficial target + } + } + + return 0; // Default - sets both targets + } + + /// + /// Main targeting method that handles all targeting scenarios + /// + /// + /// + /// + private static void ProcessTargeting(TargetSelectionType selectionType, TargetFilterType filterType, params int[] notorietyTypes) + { + int requiredFeature = selectionType == TargetSelectionType.Closest ? + FeatureBit.ClosestTargets : FeatureBit.RandomTargets; + + if (!Client.Instance.AllowBit(requiredFeature)) + { + World.Player.SendMessage("This feature is not enabled on this server."); + return; + } + + Mobile selected = selectionType == TargetSelectionType.Closest + ? FindClosestTarget(filterType, notorietyTypes) + : FindRandomTarget(filterType, notorietyTypes); + + if (selected != null) + { + byte flagType = DetermineFlagType(notorietyTypes); + + if (filterType == TargetFilterType.Friend) + { + flagType = 2; + } + + SetLastTargetTo(selected, flagType); + ScriptManager.TargetFound = true; + } + else + { + World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); + } + } + + public static void RandomTarget(params int[] noto) + { + ProcessTargeting(TargetSelectionType.Random, TargetFilterType.Any, noto); + } + + public static void RandomHumanoidTarget(params int[] noto) + { + ProcessTargeting(TargetSelectionType.Random, TargetFilterType.Humanoid, noto); + } + + public static void RandomMonsterTarget(params int[] noto) + { + ProcessTargeting(TargetSelectionType.Random, TargetFilterType.Monster, noto); + } + + public static void RandomFriendTarget() + { + ProcessTargeting(TargetSelectionType.Random, TargetFilterType.Friend); + } + + public static void ClosestTarget(params int[] noto) + { + ProcessTargeting(TargetSelectionType.Closest, TargetFilterType.Any, noto); + } + + public static void ClosestHumanoidTarget(params int[] noto) + { + ProcessTargeting(TargetSelectionType.Closest, TargetFilterType.Humanoid, noto); + } + + public static void ClosestMonsterTarget(params int[] noto) + { + ProcessTargeting(TargetSelectionType.Closest, TargetFilterType.Monster, noto); + } + + public static void ClosestFriendTarget() + { + ProcessTargeting(TargetSelectionType.Closest, TargetFilterType.Friend); + } + } +} \ No newline at end of file diff --git a/Razor/Core/TargetingRandom.cs b/Razor/Core/TargetingRandom.cs index 9f332702..0bc87942 100644 --- a/Razor/Core/TargetingRandom.cs +++ b/Razor/Core/TargetingRandom.cs @@ -1,6 +1,6 @@ #region license // Razor: An Ultima Online Assistant -// Copyright (c) 2022 Razor Development Community on GitHub +// Copyright (c) 2025 Razor Development Community on GitHub // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -16,11 +16,6 @@ // along with this program. If not, see . #endregion -using System.Collections.Generic; -using Assistant.Core; -using Assistant.Filters; -using Assistant.Scripts; - namespace Assistant { public partial class Targeting @@ -198,141 +193,5 @@ public static void TargetRandAnyone() { RandomTarget(); } - - public static void RandomTarget(params int[] noto) - { - if (!Client.Instance.AllowBit(FeatureBit.RandomTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - if ((!FriendsManager.IsFriend(m.Serial) || noto.Length > 0 && noto[0] == 0) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - for (var i = 0; i < noto.Length; i++) - if (noto[i] == m.Notoriety) - { - list.Add(m); - break; - } - - if (noto.Length == 0) - list.Add(m); - } - - if (list.Count > 0) - { - SetLastTargetTo(list[Utility.Random(list.Count)]); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } - - public static void RandomHumanoidTarget(params int[] noto) - { - if (!Client.Instance.AllowBit(FeatureBit.RandomTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - { - if (m.Body != 0x0190 && m.Body != 0x0191 && m.Body != 0x025D && m.Body != 0x025E) - continue; - - if ((!FriendsManager.IsFriend(m.Serial) || noto.Length > 0 && noto[0] == 0) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - for (var i = 0; i < noto.Length; i++) - if (noto[i] == m.Notoriety) - { - list.Add(m); - break; - } - - if (noto.Length == 0) - list.Add(m); - } - } - - if (list.Count > 0) - { - SetLastTargetTo(list[Utility.Random(list.Count)]); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } - - public static void RandomMonsterTarget(params int[] noto) - { - if (!Client.Instance.AllowBit(FeatureBit.RandomTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - { - if (!m.IsMonster) - continue; - - if ((!FriendsManager.IsFriend(m.Serial) || noto.Length > 0 && noto[0] == 0) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - { - for (var i = 0; i < noto.Length; i++) - if (noto[i] == m.Notoriety) - { - list.Add(m); - break; - } - - if (noto.Length == 0) - list.Add(m); - } - } - - if (list.Count > 0) - { - SetLastTargetTo(list[Utility.Random(list.Count)]); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } - - public static void RandomFriendTarget() - { - if (!Client.Instance.AllowBit(FeatureBit.RandomTargets)) - return; - - var list = new List(); - foreach (var m in World.MobilesInRange(12)) - if (FriendsManager.IsFriend(m.Serial) && - !m.Blessed && !m.IsGhost && m.Serial != World.Player.Serial && - !TargetFilterManager.IsFilteredTarget(m.Serial) && - Utility.InRange(World.Player.Position, m.Position, Config.GetInt("LTRange"))) - list.Add(m); - - if (list.Count > 0) - { - SetLastTargetTo(list[Utility.Random(list.Count)]); - ScriptManager.TargetFound = true; - } - else - { - World.Player.SendMessage(MsgLevel.Warning, LocString.TargNoOne); - } - } } } \ No newline at end of file diff --git a/Razor/Razor.csproj b/Razor/Razor.csproj index 12f762b4..b6a37ee6 100644 --- a/Razor/Razor.csproj +++ b/Razor/Razor.csproj @@ -220,6 +220,7 @@ + diff --git a/Razor/UI/Config.cs b/Razor/UI/Config.cs index aca02f2f..08b814b0 100644 --- a/Razor/UI/Config.cs +++ b/Razor/UI/Config.cs @@ -1,6 +1,6 @@ #region license // Razor: An Ultima Online Assistant -// Copyright (c) 2022 Razor Development Community on GitHub +// Copyright (c) 2025 Razor Development Community on GitHub // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -340,6 +340,9 @@ public void MakeDefault() AddProperty("CooldownHeight", 28); AddProperty("CooldownWidth", 110); + + // Smart Closest/Random Targeting + AddProperty("SmartClosestRandom", false); Counter.Default(); Filter.DisableAll(); diff --git a/Razor/UI/Razor.Designer.cs b/Razor/UI/Razor.Designer.cs index 720cd247..ac30fa3f 100644 --- a/Razor/UI/Razor.Designer.cs +++ b/Razor/UI/Razor.Designer.cs @@ -560,6 +560,11 @@ private void InitializeComponent() this.btnAddWaypoint = new System.Windows.Forms.Button(); this.waypointList = new System.Windows.Forms.ListBox(); this.subBuffsDebuffs = new System.Windows.Forms.TabPage(); + this.cooldownGumpBox = new System.Windows.Forms.GroupBox(); + this.cooldownHeight = new System.Windows.Forms.TextBox(); + this.lblCooldownHeight = new System.Windows.Forms.Label(); + this.cooldownWidth = new System.Windows.Forms.TextBox(); + this.lblCooldownWidth = new System.Windows.Forms.Label(); this.buffBarGroupBox = new System.Windows.Forms.GroupBox(); this.showBuffDebuffTimeType = new System.Windows.Forms.ComboBox(); this.lblShowBuffTime = new System.Windows.Forms.Label(); @@ -804,7 +809,9 @@ private void InitializeComponent() this.itemTile = new System.Windows.Forms.Button(); this.itemAdd = new System.Windows.Forms.Button(); this.itemTree = new System.Windows.Forms.TreeView(); + this.artViewer = new Assistant.UI.ArtViewer(); this.advancedStaffDoors = new System.Windows.Forms.TabPage(); + this.doorViewer = new Assistant.UI.ArtViewer(); this.doorTree = new System.Windows.Forms.TreeView(); this.doorSouthCW = new System.Windows.Forms.Button(); this.doorSouthCCW = new System.Windows.Forms.Button(); @@ -825,13 +832,7 @@ private void InitializeComponent() this.linkMain = new System.Windows.Forms.LinkLabel(); this.label21 = new System.Windows.Forms.Label(); this.aboutVer = new System.Windows.Forms.Label(); - this.cooldownGumpBox = new System.Windows.Forms.GroupBox(); - this.cooldownHeight = new System.Windows.Forms.TextBox(); - this.lblCooldownHeight = new System.Windows.Forms.Label(); - this.cooldownWidth = new System.Windows.Forms.TextBox(); - this.lblCooldownWidth = new System.Windows.Forms.Label(); - this.artViewer = new Assistant.UI.ArtViewer(); - this.doorViewer = new Assistant.UI.ArtViewer(); + this.chkSmartClosestRandom = new System.Windows.Forms.CheckBox(); this.tabs.SuspendLayout(); this.generalTab.SuspendLayout(); this.subGeneralTab.SuspendLayout(); @@ -857,6 +858,7 @@ private void InitializeComponent() this.subOverheadTab.SuspendLayout(); this.subWaypoints.SuspendLayout(); this.subBuffsDebuffs.SuspendLayout(); + this.cooldownGumpBox.SuspendLayout(); this.buffBarGroupBox.SuspendLayout(); this.dressTab.SuspendLayout(); this.groupBox6.SuspendLayout(); @@ -903,7 +905,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.itemTileCount)).BeginInit(); this.advancedStaffDoors.SuspendLayout(); this.aboutTab.SuspendLayout(); - this.cooldownGumpBox.SuspendLayout(); this.SuspendLayout(); // // m_NotifyIcon @@ -1176,9 +1177,9 @@ private void InitializeComponent() // moreOptTab // this.moreOptTab.Controls.Add(this.optionsTabCtrl); - this.moreOptTab.Location = new System.Drawing.Point(4, 24); + this.moreOptTab.Location = new System.Drawing.Point(4, 44); this.moreOptTab.Name = "moreOptTab"; - this.moreOptTab.Size = new System.Drawing.Size(519, 342); + this.moreOptTab.Size = new System.Drawing.Size(519, 322); this.moreOptTab.TabIndex = 5; this.moreOptTab.Text = "Options"; // @@ -1193,7 +1194,7 @@ private void InitializeComponent() this.optionsTabCtrl.Location = new System.Drawing.Point(6, 3); this.optionsTabCtrl.Name = "optionsTabCtrl"; this.optionsTabCtrl.SelectedIndex = 0; - this.optionsTabCtrl.Size = new System.Drawing.Size(510, 334); + this.optionsTabCtrl.Size = new System.Drawing.Size(510, 314); this.optionsTabCtrl.TabIndex = 93; // // subOptionsSpeechTab @@ -1235,7 +1236,7 @@ private void InitializeComponent() this.subOptionsSpeechTab.Location = new System.Drawing.Point(4, 24); this.subOptionsSpeechTab.Name = "subOptionsSpeechTab"; this.subOptionsSpeechTab.Padding = new System.Windows.Forms.Padding(3); - this.subOptionsSpeechTab.Size = new System.Drawing.Size(502, 306); + this.subOptionsSpeechTab.Size = new System.Drawing.Size(502, 286); this.subOptionsSpeechTab.TabIndex = 0; this.subOptionsSpeechTab.Text = "Speech & Messages "; // @@ -1571,15 +1572,16 @@ private void InitializeComponent() this.subOptionsTargetTab.Controls.Add(this.label6); this.subOptionsTargetTab.Controls.Add(this.queueTargets); this.subOptionsTargetTab.Controls.Add(this.lblTargetFormat); - this.subOptionsTargetTab.Location = new System.Drawing.Point(4, 22); + this.subOptionsTargetTab.Location = new System.Drawing.Point(4, 24); this.subOptionsTargetTab.Name = "subOptionsTargetTab"; this.subOptionsTargetTab.Padding = new System.Windows.Forms.Padding(3); - this.subOptionsTargetTab.Size = new System.Drawing.Size(502, 308); + this.subOptionsTargetTab.Size = new System.Drawing.Size(502, 286); this.subOptionsTargetTab.TabIndex = 1; this.subOptionsTargetTab.Text = "Targeting & Queues "; // // groupSmartTarget // + this.groupSmartTarget.Controls.Add(this.chkSmartClosestRandom); this.groupSmartTarget.Controls.Add(this.nextPrevAbcOrder); this.groupSmartTarget.Controls.Add(this.nonFriendlyHarmfulOnly); this.groupSmartTarget.Controls.Add(this.friendBeneficialOnly); @@ -1587,7 +1589,7 @@ private void InitializeComponent() this.groupSmartTarget.Controls.Add(this.smartLT); this.groupSmartTarget.Location = new System.Drawing.Point(243, 11); this.groupSmartTarget.Name = "groupSmartTarget"; - this.groupSmartTarget.Size = new System.Drawing.Size(253, 153); + this.groupSmartTarget.Size = new System.Drawing.Size(253, 171); this.groupSmartTarget.TabIndex = 138; this.groupSmartTarget.TabStop = false; this.groupSmartTarget.Text = "Smart Targeting:"; @@ -1837,9 +1839,9 @@ private void InitializeComponent() this.subOptionsMiscTab.Controls.Add(this.label4); this.subOptionsMiscTab.Controls.Add(this.openCorpses); this.subOptionsMiscTab.Controls.Add(this.blockDis); - this.subOptionsMiscTab.Location = new System.Drawing.Point(4, 22); + this.subOptionsMiscTab.Location = new System.Drawing.Point(4, 24); this.subOptionsMiscTab.Name = "subOptionsMiscTab"; - this.subOptionsMiscTab.Size = new System.Drawing.Size(502, 308); + this.subOptionsMiscTab.Size = new System.Drawing.Size(502, 286); this.subOptionsMiscTab.TabIndex = 2; this.subOptionsMiscTab.Text = "Additional Options "; // @@ -3117,12 +3119,59 @@ private void InitializeComponent() this.subBuffsDebuffs.Controls.Add(this.buffBarGroupBox); this.subBuffsDebuffs.Controls.Add(this.buffDebuffOptions); this.subBuffsDebuffs.Controls.Add(this.showBuffDebuffOverhead); - this.subBuffsDebuffs.Location = new System.Drawing.Point(4, 24); + this.subBuffsDebuffs.Location = new System.Drawing.Point(4, 22); this.subBuffsDebuffs.Name = "subBuffsDebuffs"; - this.subBuffsDebuffs.Size = new System.Drawing.Size(502, 286); + this.subBuffsDebuffs.Size = new System.Drawing.Size(502, 288); this.subBuffsDebuffs.TabIndex = 5; this.subBuffsDebuffs.Text = "Buffs / Cooldowns"; // + // cooldownGumpBox + // + this.cooldownGumpBox.Controls.Add(this.cooldownHeight); + this.cooldownGumpBox.Controls.Add(this.lblCooldownHeight); + this.cooldownGumpBox.Controls.Add(this.cooldownWidth); + this.cooldownGumpBox.Controls.Add(this.lblCooldownWidth); + this.cooldownGumpBox.Location = new System.Drawing.Point(14, 124); + this.cooldownGumpBox.Name = "cooldownGumpBox"; + this.cooldownGumpBox.Size = new System.Drawing.Size(232, 151); + this.cooldownGumpBox.TabIndex = 133; + this.cooldownGumpBox.TabStop = false; + this.cooldownGumpBox.Text = "Cooldowns:"; + // + // cooldownHeight + // + this.cooldownHeight.Location = new System.Drawing.Point(75, 26); + this.cooldownHeight.Name = "cooldownHeight"; + this.cooldownHeight.Size = new System.Drawing.Size(36, 23); + this.cooldownHeight.TabIndex = 12; + this.cooldownHeight.TextChanged += new System.EventHandler(this.cooldownHeight_TextChanged); + // + // lblCooldownHeight + // + this.lblCooldownHeight.AutoSize = true; + this.lblCooldownHeight.Location = new System.Drawing.Point(9, 29); + this.lblCooldownHeight.Name = "lblCooldownHeight"; + this.lblCooldownHeight.Size = new System.Drawing.Size(64, 15); + this.lblCooldownHeight.TabIndex = 11; + this.lblCooldownHeight.Text = "Bar height:"; + // + // cooldownWidth + // + this.cooldownWidth.Location = new System.Drawing.Point(75, 54); + this.cooldownWidth.Name = "cooldownWidth"; + this.cooldownWidth.Size = new System.Drawing.Size(36, 23); + this.cooldownWidth.TabIndex = 10; + this.cooldownWidth.TextChanged += new System.EventHandler(this.cooldownWidth_TextChanged); + // + // lblCooldownWidth + // + this.lblCooldownWidth.AutoSize = true; + this.lblCooldownWidth.Location = new System.Drawing.Point(9, 57); + this.lblCooldownWidth.Name = "lblCooldownWidth"; + this.lblCooldownWidth.Size = new System.Drawing.Size(60, 15); + this.lblCooldownWidth.TabIndex = 9; + this.lblCooldownWidth.Text = "Bar width:"; + // // buffBarGroupBox // this.buffBarGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -3285,9 +3334,9 @@ private void InitializeComponent() // this.dressTab.Controls.Add(this.groupBox6); this.dressTab.Controls.Add(this.groupBox5); - this.dressTab.Location = new System.Drawing.Point(4, 24); + this.dressTab.Location = new System.Drawing.Point(4, 44); this.dressTab.Name = "dressTab"; - this.dressTab.Size = new System.Drawing.Size(519, 342); + this.dressTab.Size = new System.Drawing.Size(519, 322); this.dressTab.TabIndex = 3; this.dressTab.Text = "Arm/Dress"; // @@ -3306,7 +3355,7 @@ private void InitializeComponent() this.groupBox6.Controls.Add(this.dressNow); this.groupBox6.Location = new System.Drawing.Point(201, 3); this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(311, 329); + this.groupBox6.Size = new System.Drawing.Size(311, 309); this.groupBox6.TabIndex = 7; this.groupBox6.TabStop = false; this.groupBox6.Text = "Arm/Dress Items"; @@ -3381,7 +3430,7 @@ private void InitializeComponent() this.dressItems.ItemHeight = 15; this.dressItems.Location = new System.Drawing.Point(6, 18); this.dressItems.Name = "dressItems"; - this.dressItems.Size = new System.Drawing.Size(197, 305); + this.dressItems.Size = new System.Drawing.Size(197, 285); this.dressItems.TabIndex = 6; this.dressItems.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dressItems_KeyDown); this.dressItems.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dressItems_MouseDown); @@ -3406,7 +3455,7 @@ private void InitializeComponent() this.groupBox5.Controls.Add(this.undressConflicts); this.groupBox5.Location = new System.Drawing.Point(8, 3); this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(187, 329); + this.groupBox5.Size = new System.Drawing.Size(187, 309); this.groupBox5.TabIndex = 6; this.groupBox5.TabStop = false; this.groupBox5.Text = "Arm/Dress Selection"; @@ -3414,7 +3463,7 @@ private void InitializeComponent() // removeDress // this.removeDress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.removeDress.Location = new System.Drawing.Point(121, 274); + this.removeDress.Location = new System.Drawing.Point(121, 254); this.removeDress.Name = "removeDress"; this.removeDress.Size = new System.Drawing.Size(60, 25); this.removeDress.TabIndex = 5; @@ -3424,7 +3473,7 @@ private void InitializeComponent() // addDress // this.addDress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.addDress.Location = new System.Drawing.Point(6, 274); + this.addDress.Location = new System.Drawing.Point(6, 254); this.addDress.Name = "addDress"; this.addDress.Size = new System.Drawing.Size(60, 25); this.addDress.TabIndex = 4; @@ -3440,14 +3489,14 @@ private void InitializeComponent() this.dressList.ItemHeight = 15; this.dressList.Location = new System.Drawing.Point(6, 18); this.dressList.Name = "dressList"; - this.dressList.Size = new System.Drawing.Size(175, 250); + this.dressList.Size = new System.Drawing.Size(175, 230); this.dressList.TabIndex = 3; this.dressList.SelectedIndexChanged += new System.EventHandler(this.dressList_SelectedIndexChanged); // // undressConflicts // this.undressConflicts.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.undressConflicts.Location = new System.Drawing.Point(6, 305); + this.undressConflicts.Location = new System.Drawing.Point(6, 285); this.undressConflicts.Name = "undressConflicts"; this.undressConflicts.Size = new System.Drawing.Size(137, 18); this.undressConflicts.TabIndex = 6; @@ -3468,9 +3517,9 @@ private void InitializeComponent() this.skillsTab.Controls.Add(this.setlocks); this.skillsTab.Controls.Add(this.resetDelta); this.skillsTab.Controls.Add(this.skillList); - this.skillsTab.Location = new System.Drawing.Point(4, 24); + this.skillsTab.Location = new System.Drawing.Point(4, 44); this.skillsTab.Name = "skillsTab"; - this.skillsTab.Size = new System.Drawing.Size(519, 342); + this.skillsTab.Size = new System.Drawing.Size(519, 322); this.skillsTab.TabIndex = 2; this.skillsTab.Text = "Skills"; // @@ -3543,7 +3592,7 @@ private void InitializeComponent() // this.baseTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.baseTotal.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.baseTotal.Location = new System.Drawing.Point(428, 310); + this.baseTotal.Location = new System.Drawing.Point(428, 290); this.baseTotal.Name = "baseTotal"; this.baseTotal.ReadOnly = true; this.baseTotal.Size = new System.Drawing.Size(84, 23); @@ -3553,7 +3602,7 @@ private void InitializeComponent() // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.label1.Location = new System.Drawing.Point(356, 309); + this.label1.Location = new System.Drawing.Point(356, 289); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(75, 23); this.label1.TabIndex = 6; @@ -3610,7 +3659,7 @@ private void InitializeComponent() this.skillList.HideSelection = false; this.skillList.Location = new System.Drawing.Point(8, 5); this.skillList.Name = "skillList"; - this.skillList.Size = new System.Drawing.Size(342, 327); + this.skillList.Size = new System.Drawing.Size(342, 307); this.skillList.TabIndex = 1; this.skillList.UseCompatibleStateImageBehavior = false; this.skillList.View = System.Windows.Forms.View.Details; @@ -3658,9 +3707,9 @@ private void InitializeComponent() this.agentsTab.Controls.Add(this.agentB1); this.agentsTab.Controls.Add(this.agentB2); this.agentsTab.Controls.Add(this.agentB3); - this.agentsTab.Location = new System.Drawing.Point(4, 24); + this.agentsTab.Location = new System.Drawing.Point(4, 44); this.agentsTab.Name = "agentsTab"; - this.agentsTab.Size = new System.Drawing.Size(519, 342); + this.agentsTab.Size = new System.Drawing.Size(519, 322); this.agentsTab.TabIndex = 6; this.agentsTab.Text = "Agents"; // @@ -3708,7 +3757,7 @@ private void InitializeComponent() this.agentGroup.Controls.Add(this.agentSubList); this.agentGroup.Location = new System.Drawing.Point(144, 3); this.agentGroup.Name = "agentGroup"; - this.agentGroup.Size = new System.Drawing.Size(368, 329); + this.agentGroup.Size = new System.Drawing.Size(368, 309); this.agentGroup.TabIndex = 1; this.agentGroup.TabStop = false; // @@ -3722,7 +3771,7 @@ private void InitializeComponent() this.agentSubList.ItemHeight = 15; this.agentSubList.Location = new System.Drawing.Point(6, 22); this.agentSubList.Name = "agentSubList"; - this.agentSubList.Size = new System.Drawing.Size(356, 301); + this.agentSubList.Size = new System.Drawing.Size(356, 281); this.agentSubList.TabIndex = 0; this.agentSubList.MouseDown += new System.Windows.Forms.MouseEventHandler(this.agentSubList_MouseDown); // @@ -3762,9 +3811,9 @@ private void InitializeComponent() // this.filtersTab.BackColor = System.Drawing.SystemColors.Control; this.filtersTab.Controls.Add(this.filterTabs); - this.filtersTab.Location = new System.Drawing.Point(4, 24); + this.filtersTab.Location = new System.Drawing.Point(4, 44); this.filtersTab.Name = "filtersTab"; - this.filtersTab.Size = new System.Drawing.Size(519, 342); + this.filtersTab.Size = new System.Drawing.Size(519, 322); this.filtersTab.TabIndex = 15; this.filtersTab.Text = "Filters"; // @@ -3780,7 +3829,7 @@ private void InitializeComponent() this.filterTabs.Location = new System.Drawing.Point(6, 3); this.filterTabs.Name = "filterTabs"; this.filterTabs.SelectedIndex = 0; - this.filterTabs.Size = new System.Drawing.Size(506, 333); + this.filterTabs.Size = new System.Drawing.Size(506, 313); this.filterTabs.TabIndex = 1; this.filterTabs.SelectedIndexChanged += new System.EventHandler(this.filterTabs_IndexChanged); // @@ -3799,7 +3848,7 @@ private void InitializeComponent() this.subFilterTab.Location = new System.Drawing.Point(4, 24); this.subFilterTab.Name = "subFilterTab"; this.subFilterTab.Padding = new System.Windows.Forms.Padding(3); - this.subFilterTab.Size = new System.Drawing.Size(498, 305); + this.subFilterTab.Size = new System.Drawing.Size(498, 285); this.subFilterTab.TabIndex = 0; this.subFilterTab.Text = "General"; // @@ -3907,7 +3956,7 @@ private void InitializeComponent() this.filters.IntegralHeight = false; this.filters.Location = new System.Drawing.Point(6, 6); this.filters.Name = "filters"; - this.filters.Size = new System.Drawing.Size(197, 261); + this.filters.Size = new System.Drawing.Size(197, 241); this.filters.TabIndex = 114; this.filters.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.OnFilterCheck); // @@ -4263,9 +4312,9 @@ private void InitializeComponent() this.hotkeysTab.Controls.Add(this.hotkeyTree); this.hotkeysTab.Controls.Add(this.dohotkey); this.hotkeysTab.Controls.Add(this.groupBox8); - this.hotkeysTab.Location = new System.Drawing.Point(4, 24); + this.hotkeysTab.Location = new System.Drawing.Point(4, 44); this.hotkeysTab.Name = "hotkeysTab"; - this.hotkeysTab.Size = new System.Drawing.Size(519, 342); + this.hotkeysTab.Size = new System.Drawing.Size(519, 322); this.hotkeysTab.TabIndex = 4; this.hotkeysTab.Text = "Hot Keys"; // @@ -4306,7 +4355,7 @@ private void InitializeComponent() this.hotkeyTree.HideSelection = false; this.hotkeyTree.Location = new System.Drawing.Point(8, 37); this.hotkeyTree.Name = "hotkeyTree"; - this.hotkeyTree.Size = new System.Drawing.Size(323, 295); + this.hotkeyTree.Size = new System.Drawing.Size(323, 275); this.hotkeyTree.Sorted = true; this.hotkeyTree.TabIndex = 6; this.hotkeyTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.hotkeyTree_AfterSelect); @@ -4880,7 +4929,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.scriptDocMap.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(37)))), ((int)(((byte)(56))))); this.scriptDocMap.ForeColor = System.Drawing.Color.Maroon; - this.scriptDocMap.Location = new System.Drawing.Point(176, -4); + this.scriptDocMap.Location = new System.Drawing.Point(170, -4); this.scriptDocMap.Name = "scriptDocMap"; this.scriptDocMap.Size = new System.Drawing.Size(120, 266); this.scriptDocMap.TabIndex = 22; @@ -4902,7 +4951,7 @@ private void InitializeComponent() '\"', '\'', '\''}; - this.scriptEditor.AutoScrollMinSize = new System.Drawing.Size(25, 15); + this.scriptEditor.AutoScrollMinSize = new System.Drawing.Size(2, 15); this.scriptEditor.BackBrush = null; this.scriptEditor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(37)))), ((int)(((byte)(56))))); this.scriptEditor.CaretColor = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(150)))), ((int)(((byte)(150))))); @@ -4924,7 +4973,7 @@ private void InitializeComponent() this.scriptEditor.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); this.scriptEditor.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("scriptEditor.ServiceColors"))); this.scriptEditor.ShowCaretWhenInactive = false; - this.scriptEditor.Size = new System.Drawing.Size(174, 262); + this.scriptEditor.Size = new System.Drawing.Size(168, 262); this.scriptEditor.TabIndex = 21; this.scriptEditor.Zoom = 100; this.scriptEditor.KeyDown += new System.Windows.Forms.KeyEventHandler(this.scriptEditor_KeyDown); @@ -5929,6 +5978,22 @@ private void InitializeComponent() this.itemTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.itemTree_AfterSelect); this.itemTree.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.itemTree_MouseDoubleClick); // + // artViewer + // + this.artViewer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.artViewer.Animate = false; + this.artViewer.Art = Assistant.UI.Art.Items; + this.artViewer.ArtIndex = 0; + this.artViewer.Hue = 0; + this.artViewer.Location = new System.Drawing.Point(302, 6); + this.artViewer.Name = "artViewer"; + this.artViewer.ResizeTallItems = false; + this.artViewer.RoomView = true; + this.artViewer.ShowHexID = true; + this.artViewer.ShowID = true; + this.artViewer.Size = new System.Drawing.Size(190, 178); + this.artViewer.TabIndex = 0; + // // advancedStaffDoors // this.advancedStaffDoors.BackColor = System.Drawing.SystemColors.Control; @@ -5948,6 +6013,24 @@ private void InitializeComponent() this.advancedStaffDoors.TabIndex = 2; this.advancedStaffDoors.Text = "Doors"; // + // doorViewer + // + this.doorViewer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.doorViewer.Animate = false; + this.doorViewer.Art = Assistant.UI.Art.Items; + this.doorViewer.ArtIndex = 0; + this.doorViewer.Hue = 0; + this.doorViewer.Location = new System.Drawing.Point(177, 165); + this.doorViewer.MaximumSize = new System.Drawing.Size(318, 318); + this.doorViewer.Name = "doorViewer"; + this.doorViewer.ResizeTallItems = false; + this.doorViewer.RoomView = true; + this.doorViewer.ShowHexID = true; + this.doorViewer.ShowID = true; + this.doorViewer.Size = new System.Drawing.Size(318, 119); + this.doorViewer.TabIndex = 33; + // // doorTree // this.doorTree.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -6187,86 +6270,15 @@ private void InitializeComponent() this.aboutVer.Text = "Razor v{0}"; this.aboutVer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // cooldownGumpBox - // - this.cooldownGumpBox.Controls.Add(this.cooldownHeight); - this.cooldownGumpBox.Controls.Add(this.lblCooldownHeight); - this.cooldownGumpBox.Controls.Add(this.cooldownWidth); - this.cooldownGumpBox.Controls.Add(this.lblCooldownWidth); - this.cooldownGumpBox.Location = new System.Drawing.Point(14, 124); - this.cooldownGumpBox.Name = "cooldownGumpBox"; - this.cooldownGumpBox.Size = new System.Drawing.Size(232, 151); - this.cooldownGumpBox.TabIndex = 133; - this.cooldownGumpBox.TabStop = false; - this.cooldownGumpBox.Text = "Cooldowns:"; - // - // cooldownHeight - // - this.cooldownHeight.Location = new System.Drawing.Point(75, 26); - this.cooldownHeight.Name = "cooldownHeight"; - this.cooldownHeight.Size = new System.Drawing.Size(36, 23); - this.cooldownHeight.TabIndex = 12; - this.cooldownHeight.TextChanged += new System.EventHandler(this.cooldownHeight_TextChanged); - // - // lblCooldownHeight - // - this.lblCooldownHeight.AutoSize = true; - this.lblCooldownHeight.Location = new System.Drawing.Point(9, 29); - this.lblCooldownHeight.Name = "lblCooldownHeight"; - this.lblCooldownHeight.Size = new System.Drawing.Size(64, 15); - this.lblCooldownHeight.TabIndex = 11; - this.lblCooldownHeight.Text = "Bar height:"; - // - // cooldownWidth - // - this.cooldownWidth.Location = new System.Drawing.Point(75, 54); - this.cooldownWidth.Name = "cooldownWidth"; - this.cooldownWidth.Size = new System.Drawing.Size(36, 23); - this.cooldownWidth.TabIndex = 10; - this.cooldownWidth.TextChanged += new System.EventHandler(this.cooldownWidth_TextChanged); - // - // lblCooldownWidth - // - this.lblCooldownWidth.AutoSize = true; - this.lblCooldownWidth.Location = new System.Drawing.Point(9, 57); - this.lblCooldownWidth.Name = "lblCooldownWidth"; - this.lblCooldownWidth.Size = new System.Drawing.Size(60, 15); - this.lblCooldownWidth.TabIndex = 9; - this.lblCooldownWidth.Text = "Bar width:"; - // - // artViewer + // chkSmartClosestRandom // - this.artViewer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.artViewer.Animate = false; - this.artViewer.Art = Assistant.UI.Art.Items; - this.artViewer.ArtIndex = 0; - this.artViewer.Hue = 0; - this.artViewer.Location = new System.Drawing.Point(302, 6); - this.artViewer.Name = "artViewer"; - this.artViewer.ResizeTallItems = false; - this.artViewer.RoomView = true; - this.artViewer.ShowHexID = true; - this.artViewer.ShowID = true; - this.artViewer.Size = new System.Drawing.Size(190, 178); - this.artViewer.TabIndex = 0; - // - // doorViewer - // - this.doorViewer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.doorViewer.Animate = false; - this.doorViewer.Art = Assistant.UI.Art.Items; - this.doorViewer.ArtIndex = 0; - this.doorViewer.Hue = 0; - this.doorViewer.Location = new System.Drawing.Point(177, 165); - this.doorViewer.MaximumSize = new System.Drawing.Size(318, 318); - this.doorViewer.Name = "doorViewer"; - this.doorViewer.ResizeTallItems = false; - this.doorViewer.RoomView = true; - this.doorViewer.ShowHexID = true; - this.doorViewer.ShowID = true; - this.doorViewer.Size = new System.Drawing.Size(318, 119); - this.doorViewer.TabIndex = 33; + this.chkSmartClosestRandom.Location = new System.Drawing.Point(6, 148); + this.chkSmartClosestRandom.Name = "chkSmartClosestRandom"; + this.chkSmartClosestRandom.Size = new System.Drawing.Size(232, 19); + this.chkSmartClosestRandom.TabIndex = 143; + this.chkSmartClosestRandom.Text = "Smart Closest/Random Targeting"; + this.chkSmartClosestRandom.UseVisualStyleBackColor = true; + this.chkSmartClosestRandom.CheckedChanged += new System.EventHandler(this.chkSmartClosestRandom_CheckedChanged); // // MainForm // @@ -6325,6 +6337,8 @@ private void InitializeComponent() this.subWaypoints.PerformLayout(); this.subBuffsDebuffs.ResumeLayout(false); this.subBuffsDebuffs.PerformLayout(); + this.cooldownGumpBox.ResumeLayout(false); + this.cooldownGumpBox.PerformLayout(); this.buffBarGroupBox.ResumeLayout(false); this.buffBarGroupBox.PerformLayout(); this.dressTab.ResumeLayout(false); @@ -6391,8 +6405,6 @@ private void InitializeComponent() this.advancedStaffDoors.ResumeLayout(false); this.aboutTab.ResumeLayout(false); this.aboutTab.PerformLayout(); - this.cooldownGumpBox.ResumeLayout(false); - this.cooldownGumpBox.PerformLayout(); this.ResumeLayout(false); } @@ -6593,5 +6605,6 @@ private void InitializeComponent() private Label lblCooldownHeight; private TextBox cooldownWidth; private Label lblCooldownWidth; + private CheckBox chkSmartClosestRandom; } } diff --git a/Razor/UI/Razor.cs b/Razor/UI/Razor.cs index 4926951d..7fa6dbbd 100644 --- a/Razor/UI/Razor.cs +++ b/Razor/UI/Razor.cs @@ -540,6 +540,8 @@ public void InitConfig() cooldownWidth.SafeAction(s => { s.Text = Config.GetInt("CooldownWidth").ToString(); }); cooldownHeight.SafeAction(s => { s.Text = Config.GetInt("CooldownHeight").ToString(); }); + + chkSmartClosestRandom.SafeAction(s => { s.Checked = Config.GetBool("SmartClosestRandom"); }); Engine.MainWindow.Size = new Size(Config.GetInt("WindowSizeX"), Config.GetInt("WindowSizeY")); @@ -3468,7 +3470,7 @@ private void OnMacroActionMoveDown(object sender, System.EventArgs e) private void OnMacroKeyMoveUp() { Macro m = GetMacroSel(); - ; + if (m == null) return; @@ -8203,5 +8205,10 @@ private void cooldownWidth_TextChanged(object sender, EventArgs e) Config.SetProperty("CooldownWidth", width); } + + private void chkSmartClosestRandom_CheckedChanged(object sender, EventArgs e) + { + Config.SetProperty("SmartClosestRandom", chkSmartClosestRandom.Checked); + } } } diff --git a/etc/Language/Razor_lang.enu b/etc/Language/Razor_lang.enu index 83adfdac..437a58ff 100644 --- a/etc/Language/Razor_lang.enu +++ b/etc/Language/Razor_lang.enu @@ -178,6 +178,7 @@ MainForm::filterRazorMessages=Filter repeating Razor messages MainForm::filterOverheadMessages=Filter repeating overhead messages MainForm::overrideSpellFormat=Override spell format MainForm::buyAgentIgnoreGold=Buy Agents ignore player gold +MainForm::chkSmartClosestRandom=Smart Closest/Random Targeting HueEntry::Text=Select a Hue HueEntry::cancel=Cancel diff --git a/etc/license.txt b/etc/license.txt deleted file mode 100644 index 26c11d07..00000000 --- a/etc/license.txt +++ /dev/null @@ -1,88 +0,0 @@ -Razor Software License Agreement - - -This Agreement sets forth the terms and conditions under which -the software known as Razor(tm) will be licensed by the author(s) -("The Razor Author") to you ("Licensee"), and by which Derivative -Works (as hereafter defined) of Razor will be licensed by you -to The Razor Author. - -Definitions: - - "Derivative Work(s)" shall mean any revision, enhancement, - modification, translation, abridgement, condensation or - expansion created by Licensee or The Razor Author that is based upon the - Software or a portion thereof that would be a copyright - infringement if prepared without the authorization of the - copyright owners of the Software or portion thereof. - - "Standard Version" shall mean Razor, as originally created by - The Razor Author. - - "Software" shall mean Razor and the Derivative Works created - by Licensee and the collection of files distributed by the - Licensee with The Razor Author, and the collection of files created - through textual modifications. - - "Copyright Holder" is whoever is named in the copyright or - copyrights for the Derivative Works. - - "Licensee" is you, only if you agree to be bound by the terms - and conditions set forth in this Agreement. - - "Freely Available" means that no fee is charged for the item - It also means that recipients of the item may not redistribute - it in any way shape or form. - -1. The Razor Author maintains all rights, title and interest in and to -Razor, including all applicable copyrights, trade secrets, -patents and other intellectual rights therein. Licensee hereby -grants to The Razor Author all right, title and interest into the compilation -of Razor. - -2. The Razor Author hereby grants to Licensee a royalty free, worldwide right -and license to use, Razor in accordance with the terms and conditions -of this Agreement. - -3. Licensee hereby grants to The Razor Author a royalty free, worldwide right -and license to use, copy, distribute and make Derivative Works of -Derivative Works created by Licensee and sublicensing rights of -any of the foregoing. - -4. The data and images supplied as input to or produced as output -from the Software do not automatically fall under the copyright -of this Software, but belong to whomever generated them, and may -be sold commercially, but may not be aggregated with this Software. - -5. The Razor Author makes no representation about the suitability of Razor -for any purposes. The Razor Author shall have no duty or requirement to -include any Derivative Works into Razor. - -6. THIS PACKAGE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY -KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING (BUT NOT LIMITED TO) -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND -WITHOUT ANY WARRANTIES AS TO NONINFRINGEMENT. - -7. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES WHATSOEVER RESULTING -FROM LOSS OF USE OF DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS CONDUCT, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS PACKAGE. - -8. Without limitation of the foregoing, You agree to commit no -act which, directly or indirectly, would violate any U.S. law, -regulation, or treaty, or any other international treaty or -agreement to which the United States adheres or with which the -United States complies, relating to the export or re-export of -any commodities, software, or technical data. - -9. At no time shall anyone affiliated with Electronic Arts download -or use this software. This software is provided soley for end-users -who have purchased Ultima Online for use in non-profit ways. - -10. In addition to local, federal, and international laws -prohibiting reverse engineering, the Licensee herby agrees to at no -time make any attempts to decompile Razor or associated libraries -or alter them in any way other without express written consent -from the author. -