From 0e3654fcbb0e6d5ad6b56f346cc3d0924aade633 Mon Sep 17 00:00:00 2001 From: WarrentyExpired Date: Wed, 29 Jul 2026 08:44:58 -0400 Subject: [PATCH] #W# Added [Status command for quick view of stat info. --- Scripts/Commands/Player/Status.cs | 104 ++++++++++++++++++++++++++++++ Scripts/Items/VirtueTome.cs | 25 ++++--- Scripts/Items/VirtueTomeBook.cs | 6 +- 3 files changed, 123 insertions(+), 12 deletions(-) create mode 100644 Scripts/Commands/Player/Status.cs diff --git a/Scripts/Commands/Player/Status.cs b/Scripts/Commands/Player/Status.cs new file mode 100644 index 0000000..0d45c88 --- /dev/null +++ b/Scripts/Commands/Player/Status.cs @@ -0,0 +1,104 @@ +using System; +using Server; +using Server.Commands; +using Server.Gumps; +using Server.Mobiles; +using Server.Network; + +namespace Server.Scripts.Commands +{ + // ------- STATUS COMMAND REGISTRATION START + public class StatusCommand + { + public static void Initialize() + { + // Registered at Player access level so everyone can use it + CommandSystem.Register("Status", AccessLevel.Player, new CommandEventHandler(StatusCommand_OnCommand)); + } + + [Usage("Status")] + [Description("Opens a gump displaying detailed character status.")] + private static void StatusCommand_OnCommand(CommandEventArgs e) + { + Mobile m = e.Mobile; + + if (m is PlayerMobile) + { + // Closes any existing status gump to prevent spamming duplicates + m.CloseGump(typeof(StatusGump)); + m.SendGump(new StatusGump((PlayerMobile)m)); + } + } + } + // ------- STATUS COMMAND REGISTRATION END +} + +namespace Server.Gumps +{ + // ------- STATUS GUMP UI START + public class StatusGump : Gump + { + public StatusGump(PlayerMobile pm) : base(50, 50) + { + this.Closable = true; + this.Disposable = true; + this.Dragable = true; + this.Resizable = false; + + AddPage(0); + + // Modern semi-transparent background (expanded height to 375 to fit Stat Cap) + AddBackground(0, 0, 300, 375, 9270); + AddAlphaRegion(10, 10, 280, 355); + + // Gump Title + AddLabel(75, 15, 1153, "CHARACTER STATUS"); + + int y = 55; + int spacing = 25; + + // --- ATTRIBUTES START --- + AddLabel(20, y, 1153, "Attributes"); + y += spacing; + + // Displays player's total stat cap limit + AddLabel(30, y, 1152, String.Format("Stat Cap: {0}", pm.StatCap)); + y += spacing; + + // Displays Raw Stat / Total Stat (including modifiers from spells/gear) + AddLabel(30, y, 1152, String.Format("Strength: {0} / {1}", pm.RawStr, pm.Str)); + y += spacing; + + AddLabel(30, y, 1152, String.Format("Dexterity: {0} / {1}", pm.RawDex, pm.Dex)); + y += spacing; + + AddLabel(30, y, 1152, String.Format("Intelligence: {0} / {1}", pm.RawInt, pm.Int)); + y += spacing + 10; + // --- ATTRIBUTES END --- + + + // --- REPUTATION START --- + AddLabel(20, y, 1153, "Reputation"); + y += spacing; + + AddLabel(30, y, 1152, String.Format("Fame: {0}", pm.Fame)); + y += spacing; + + AddLabel(30, y, 1152, String.Format("Karma: {0}", pm.Karma)); + y += spacing + 10; + // --- REPUTATION END --- + + + // --- SURVIVAL NEEDS START --- + AddLabel(20, y, 1153, "Survival Needs"); + y += spacing; + + AddLabel(30, y, 1152, String.Format("Hunger: {0}", pm.Hunger)); + y += spacing; + + AddLabel(30, y, 1152, String.Format("Thirst: {0}", pm.Thirst)); + // --- SURVIVAL NEEDS END --- + } + } + // ------- STATUS GUMP UI END +} diff --git a/Scripts/Items/VirtueTome.cs b/Scripts/Items/VirtueTome.cs index ed13ff6..6fe927a 100644 --- a/Scripts/Items/VirtueTome.cs +++ b/Scripts/Items/VirtueTome.cs @@ -116,13 +116,20 @@ namespace Server.Items m_Tome = tome; AddPage( 0 ); - AddBackground( 0, 0, 300, 380, 5054 ); - AddHtml( 10, 10, 280, 20, "
The Shrines of Virtue
", false, false ); - AddHtml( 10, 40, 280, 20, String.Format( "Available Virtue Points: {0}", from.VirtuePoints ), false, false ); - AddHtml( 10, 60, 280, 20, String.Format( "Travel Cost: {0} Points", m_TravelCost ), false, false ); + // --- NEW MODERN BACKGROUND START --- + AddBackground( 0, 0, 300, 420, 9270 ); // Dark semi-transparent border + AddAlphaRegion( 10, 10, 280, 400 ); // Darkened center panel + // --- NEW MODERN BACKGROUND END --- - int y = 90; + // Header Title + AddLabel( 75, 15, 1153, "THE SHRINES OF VIRTUE" ); + + // Point Information + AddLabel( 20, 45, 1152, String.Format( "Available Virtue Points: {0}", from.VirtuePoints ) ); + AddLabel( 20, 70, 1152, String.Format( "Travel Cost: {0} Points", m_TravelCost ) ); + + int y = 110; string[] shrineNames = { "Compassion", "Honesty", "Honor", "Humility", "Justice", "Sacrifice", "Spirituality", "Valor" }; for ( int i = 0; i < shrineNames.Length; i++ ) @@ -130,15 +137,15 @@ namespace Server.Items // Check if the shrine is unlocked if ( m_Tome.Unlocked[i] ) { - AddButton( 20, y, 4005, 4007, i + 1, GumpButtonType.Reply, 0 ); - AddLabel( 55, y, 0, shrineNames[i] ); + AddButton( 20, y, 4005, 4006, i + 1, GumpButtonType.Reply, 0 ); + AddLabel( 55, y, 1152, shrineNames[i] ); } else { - // If locked, hide the button and grey out the text + // If locked, hide the button and grey out the text (Hue 922 is a nice soft grey) AddLabel( 55, y, 922, shrineNames[i] + " (Locked)" ); } - y += 30; + y += 35; // Increased spacing slightly to fit the new button style } } diff --git a/Scripts/Items/VirtueTomeBook.cs b/Scripts/Items/VirtueTomeBook.cs index ffa93da..2d57386 100644 --- a/Scripts/Items/VirtueTomeBook.cs +++ b/Scripts/Items/VirtueTomeBook.cs @@ -6,10 +6,10 @@ namespace Server.Items public class VirtuousQuestBook : BlueBook { [Constructable] - public VirtuousQuestBook() : base( "The Virtuous Quest", "Lord British", 4, false ) // 3 pages, false means players can't edit it + public VirtuousQuestBook() : base( "The Virtuous Quest", "Lord British", 4, false ) // 4 pages, false means players can't edit it { - Hue = 1150; // Makes the book a royal white/silver - + Hue = 1150; + LootType = LootType.Blessed; Pages[0].Lines = new string[] { "Brave adventurer,",