From d5f10e58dcc09b0decb848a682715d09d98386fe Mon Sep 17 00:00:00 2001 From: WarrentyExpired Date: Wed, 14 Oct 2026 12:14:51 -0400 Subject: [PATCH] #W# Fixes/Tweaks: A few tweaks and fixes. Fixed escort quest locations. added names to dyetubs. Moongates now have checks and hide you. --- .../Data/Decoration/Overworld/Moongates.cfg | 4 + Distribution/Data/MLQuests.cfg | 11 +++ Distribution/Data/go.json | 1 + .../Engines/Bounties/BountyVendor.cs | 36 +++++++-- .../ML Quests/Definitions/TownEscorts.cs | 77 +++++++++++++++++++ Projects/UOContent/Gumps/MoongateGump.cs | 14 +++- Projects/UOContent/Items/CustomMoonGate.cs | 54 +++++++++++-- .../Tailor Items/Dyetubs/BlackDyeTub.cs | 1 + .../Tailor Items/Dyetubs/BlazeDyeTub.cs | 1 + .../Dyetubs/MetallicClothDyetub.cs | 10 ++- .../Dyetubs/MetallicLeatherDyeTub.cs | 10 ++- .../Mobiles/Townfolk/BaseEscortable.cs | 19 ++++- 12 files changed, 215 insertions(+), 23 deletions(-) diff --git a/Distribution/Data/Decoration/Overworld/Moongates.cfg b/Distribution/Data/Decoration/Overworld/Moongates.cfg index 44a4911b8..53525efc3 100644 --- a/Distribution/Data/Decoration/Overworld/Moongates.cfg +++ b/Distribution/Data/Decoration/Overworld/Moongates.cfg @@ -33,3 +33,7 @@ CustomMoonGate 0xF6C # Shiver Island CustomMoonGate 0xF6C 3012 445 8 + +# End Point Dock +CustomMoonGate 0xF6C +1505 1009 4 diff --git a/Distribution/Data/MLQuests.cfg b/Distribution/Data/MLQuests.cfg index b4a72b763..13883ce06 100644 --- a/Distribution/Data/MLQuests.cfg +++ b/Distribution/Data/MLQuests.cfg @@ -1,2 +1,13 @@ IronForTheForge EscortToBastion +EscortToMirePort +EscortToFairwinds +EscortToCrestHaven +EscortToLandow +EscortToEastRivermouth +EscortToWestRivermouth +EscortToStonehollow +EscortToColdbarrow +EscortToWharfsEnd +EscortToLandowDock +EscortToEndPointDock diff --git a/Distribution/Data/go.json b/Distribution/Data/go.json index a7174c1e9..3722795fd 100644 --- a/Distribution/Data/go.json +++ b/Distribution/Data/go.json @@ -123,6 +123,7 @@ "locations": [ { "name": "Bastion", "location": [1839, 2005, 0], "map": "Veridia" }, { "name": "Mireport", "location": [390, 1278, 0], "map": "Veridia" }, + { "name": "Fairwinds", "location": [2286, 2813, 0], "map": "Veridia" }, { "name": "Stonehollow", "location": [756, 1225, 0], "map": "Veridia" }, { "name": "Cresthaven", "location": [1604, 1164, 2], "map": "Veridia" }, { "name": "West Rivermouth", "location": [1162, 1723, 0], "map": "Veridia" }, diff --git a/Projects/UOContent/Engines/Bounties/BountyVendor.cs b/Projects/UOContent/Engines/Bounties/BountyVendor.cs index 0426f0f73..eef424b95 100644 --- a/Projects/UOContent/Engines/Bounties/BountyVendor.cs +++ b/Projects/UOContent/Engines/Bounties/BountyVendor.cs @@ -82,12 +82,38 @@ public class BountyRewardGump : Gump private static readonly (string Name, int Cost, Func CreateItem)[] Rewards = new (string, int, Func)[] { ("Dungeon Hunter Ring", 25, () => new GoldRing()), - ("Decorative Dragon Statue", 50, () => new MonsterStatuette(MonsterStatuetteType.Dragon)), - ("Monster Statue Dyetub", 75, () => new StatuetteDyeTub()), + + ("Random Monster Statue", 50, () => + { + var types = Enum.GetValues(typeof(MonsterStatuetteType)); + + var randomType = (MonsterStatuetteType)types.GetValue(Utility.Random(types.Length)); + + return new MonsterStatuette(randomType); + }), + + ("Random Specialty Dye Tub", 75, () => + { + var tubs = new Func[] + { + () => new BlackDyeTub(), + () => new BlazeDyeTub(), + () => new FurnitureDyeTub(), + () => new LeatherDyeTub(), + () => new MetallicLeatherDyeTub(), + () => new RunebookDyeTub(), + () => new SpecialDyeTub(), + () => new StatuetteDyeTub(), + () => new WhiteClothDyeTub(), + () => new WhiteLeatherDyeTub() + }; + + return tubs[Utility.Random(tubs.Length)](); + }), + ("Bag of Sending", 100, () => new BagOfSending()) }; - - public BountyRewardGump(PlayerMobile player, BountyVendor vendor) : base(50, 50) + public BountyRewardGump(PlayerMobile player, BountyVendor vendor) : base(50, 50) { _player = player; _vendor = vendor; @@ -96,11 +122,9 @@ public class BountyRewardGump : Gump AddPage(0); - // Matching BuildWorld.cs Frame Style AddBackground(0, 0, 450, 310, 9270); AddAlphaRegion(10, 10, 430, 290); - // Header Labels AddLabel(110, 15, 1152, "BOUNTY QUARTERMASTER STORE"); AddLabel(20, 40, 0x3F, $"Your Bounty Tokens: {totalTokens}"); diff --git a/Projects/UOContent/Engines/ML Quests/Definitions/TownEscorts.cs b/Projects/UOContent/Engines/ML Quests/Definitions/TownEscorts.cs index 1b97248d9..2a17dd865 100644 --- a/Projects/UOContent/Engines/ML Quests/Definitions/TownEscorts.cs +++ b/Projects/UOContent/Engines/ML Quests/Definitions/TownEscorts.cs @@ -32,4 +32,81 @@ namespace Server.Engines.MLQuests.Definitions { } } + public class EscortToMirePort : TownEscort + { + public EscortToMirePort() + : base(1072276, 1072290, 1072228, "the town of Mireport") + { + } + } + public class EscortToFairwinds : TownEscort + { + public EscortToFairwinds() + : base(1072277, 1072291, 1072229, "the town of Fairwinds") + { + } + } + public class EscortToCresthaven : TownEscort + { + public EscortToCresthaven() + : base(1072278, 1072292, 1072230, "the town of Cresthaven") + { + } + } + public class EscortToLandow : TownEscort + { + public EscortToLandow() + : base(1072279, 1072293, 1072231, "the town of Landow") + { + } + } + public class EscortToEastRivermouth : TownEscort + { + public EscortToEastRivermouth() + : base(1072280, 1072294, 1072232, "East Rivermouth") + { + } + } + public class EscortToWestRivermouth : TownEscort + { + public EscortToWestRivermouth() + : base(1072281, 1072295, 1072233, "West Rivermouth") + { + } + } + public class EscortToStonehollow : TownEscort + { + public EscortToStonehollow() + : base(1072282, 1072296, 1072234, "the town of Stonehollow") + { + } + } + public class EscortToColdbarrow : TownEscort + { + public EscortToColdbarrow() + : base(1072283, 1072297, 1072235, "the town of Coldbarrow") + { + } + } + public class EscortToWharfsEnd : TownEscort + { + public EscortToWharfsEnd() + : base(1072284, 1072298, 1072236, "the town of Wharf's End") + { + } + } + public class EscortToLandowDock : TownEscort + { + public EscortToLandowDock() + : base(1072285, 1072299, 1072237, "the Landow Docks") + { + } + } + public class EscortToEndPointDock : TownEscort + { + public EscortToEndPointDock() + : base(1072286, 1072300, 1072238, "the End Point Dock") + { + } + } } diff --git a/Projects/UOContent/Gumps/MoongateGump.cs b/Projects/UOContent/Gumps/MoongateGump.cs index 665dbd7f7..282645afb 100644 --- a/Projects/UOContent/Gumps/MoongateGump.cs +++ b/Projects/UOContent/Gumps/MoongateGump.cs @@ -21,7 +21,8 @@ public class CustomMoongateGump : Gump new("Coldbarrow Moongate", new Point3D(3285, 2331, 0), Map.Trammel), new("Draco Island Moongate", new Point3D(3495, 3491, 2), Map.Trammel), new("Piece Island Moongate", new Point3D(754, 3458, 0), Map.Trammel), - new("Shiver Island Moongate", new Point3D(3012, 445, 8), Map.Trammel) + new("Shiver Island Moongate", new Point3D(3012, 445, 8), Map.Trammel), + new("End Point Docks", new Point3D(1505, 1009, 4), Map.Trammel), }; private readonly CustomMoongate _gate; @@ -72,6 +73,11 @@ public class CustomMoongateGump : Gump return; } + if (!_gate.CanUseGate(mobile)) + { + return; // Stops players who entered combat while the gump was open + } + // Subtract 1 from the ButtonID to get the actual array index (0 through 7) var index = buttonId - 1; @@ -86,9 +92,11 @@ public class CustomMoongateGump : Gump } // Move the player to the selected destination + Server.Mobiles.BaseCreature.TeleportPets(mobile, dest.Location, dest.Map); mobile.MoveToWorld(dest.Location, dest.Map); - - // Play teleport sound and standard moongate visual effect + mobile.Combatant = null; + mobile.Warmode = false; + mobile.Hidden = true; mobile.PlaySound(0x1FE); Effects.SendLocationEffect(mobile.Location, mobile.Map, 0x3728, 10, 10); } diff --git a/Projects/UOContent/Items/CustomMoonGate.cs b/Projects/UOContent/Items/CustomMoonGate.cs index 8cba95098..043602654 100644 --- a/Projects/UOContent/Items/CustomMoonGate.cs +++ b/Projects/UOContent/Items/CustomMoonGate.cs @@ -1,8 +1,13 @@ using System; +using System.Collections.Generic; using ModernUO.Serialization; +using Server.Collections; +using Server.Factions; using Server.Gumps; +using Server.Maps; using Server.Mobiles; using Server.Network; +using Server.Spells; namespace Server.Items; @@ -17,22 +22,19 @@ public partial class CustomMoongate : Item Name = "a moongate"; } - // Required for ModernUO Serialization public CustomMoongate(Serial serial) : base(serial) { } - // Triggers when a player walks onto the gate public override bool OnMoveOver(Mobile m) { if (m.Player && m.Alive) { - SendGateGump(m); + UseGate(m); } - return true; // Return true to allow the player to step onto the tile + return true; } - // Triggers when a player double-clicks the gate public override void OnDoubleClick(Mobile from) { if (!from.Player || !from.Alive) @@ -42,7 +44,7 @@ public partial class CustomMoongate : Item if (from.InRange(GetWorldLocation(), 2)) { - SendGateGump(from); + UseGate(from); } else { @@ -50,13 +52,53 @@ public partial class CustomMoongate : Item } } + public bool CanUseGate(Mobile m, bool sendMessage = true) + { + if (m == null || !m.Alive || !m.Player) + return false; + + if (m.Criminal) + { + if (sendMessage) + m.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. + return false; + } + + if (SpellHelper.CheckCombat(m)) + { + if (sendMessage) + m.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? + return false; + } + + if (m.Spell != null) + { + if (sendMessage) + m.SendLocalizedMessage(1049616); // You are too busy to do that at the moment. + return false; + } + + return true; + } + + public bool UseGate(Mobile m) + { + if (!CanUseGate(m)) + return false; + + SendGateGump(m); + return true; + } + private void SendGateGump(Mobile m) { if (m is PlayerMobile pm) { + pm.Hidden = true; // Close any existing moongate gumps before opening a new one pm.CloseGump(); pm.SendGump(new CustomMoongateGump(this)); + Effects.PlaySound(pm.Location, pm.Map, 0x20E); } } } diff --git a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlackDyeTub.cs b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlackDyeTub.cs index d4e1e769e..c82f47a39 100644 --- a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlackDyeTub.cs +++ b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlackDyeTub.cs @@ -10,6 +10,7 @@ namespace Server.Items { Hue = DyedHue = 0x0001; Redyable = false; + Name = "Black Dyetub"; } } } diff --git a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlazeDyeTub.cs b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlazeDyeTub.cs index 04a733169..92c576641 100644 --- a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlazeDyeTub.cs +++ b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/BlazeDyeTub.cs @@ -10,6 +10,7 @@ namespace Server.Items { Hue = DyedHue = 0x489; Redyable = false; + Name = "Blaze Dyetub"; } } } diff --git a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicClothDyetub.cs b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicClothDyetub.cs index c917fbeb8..4d486ec71 100644 --- a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicClothDyetub.cs +++ b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicClothDyetub.cs @@ -6,9 +6,15 @@ namespace Server.Items public partial class MetallicClothDyetub : DyeTub { [Constructible] - public MetallicClothDyetub() => LootType = LootType.Blessed; + public MetallicClothDyetub() + { + LootType = LootType.Blessed; - public override int LabelNumber => 1152920; // Metallic Cloth ... + // Assign your custom string name here + Name = "a metallic cloth dyetub"; + } + + // The LabelNumber override has been removed so your custom Name displays correctly. public override bool MetallicHues => true; } diff --git a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicLeatherDyeTub.cs b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicLeatherDyeTub.cs index 18056ff06..06ff7e1cf 100644 --- a/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicLeatherDyeTub.cs +++ b/Projects/UOContent/Items/Skill Items/Tailor Items/Dyetubs/MetallicLeatherDyeTub.cs @@ -6,12 +6,16 @@ namespace Server.Items public partial class MetallicLeatherDyeTub : LeatherDyeTub { [Constructible] - public MetallicLeatherDyeTub() => LootType = LootType.Blessed; + public MetallicLeatherDyeTub() + { + LootType = LootType.Blessed; + + // Assign your custom string name here + Name = "a metallic leather dyetub"; + } public override CustomHuePicker CustomHuePicker => null; - public override int LabelNumber => 1153495; // Metallic Leather ... - public override bool MetallicHues => true; public override void GetProperties(IPropertyList list) diff --git a/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs b/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs index d27d24855..522711be6 100644 --- a/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs +++ b/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs @@ -39,7 +39,8 @@ public partial class BaseEscortable : BaseCreature "the town of Bastion", "the town of Myrish", "the town of Fairwinds", "the town of Stonehollow", "the town of Mireport", "the town of Cresthaven", "the town of Rivermouth", "the town of Teareek", "the town of Port Grim", - "the town of Coldbarrow", "the town of Wharf's End", "the town of Landow" + "the town of Coldbarrow", "the town of Wharf's End", "the town of Landow", + "East Rivermouth", "West Rivermouth" ]; // ML list, pre-ML quest system @@ -49,14 +50,26 @@ public partial class BaseEscortable : BaseCreature "the town of Bastion", "the town of Myrish", "the town of Fairwinds", "the town of Stonehollow", "the town of Mireport", "the town of Cresthaven", "the town of Rivermouth", "the town of Teareek", "the town of Port Grim", - "the town of Coldbarrow", "the town of Wharf's End", "the town of Landow" + "the town of Coldbarrow", "the town of Wharf's End", "the town of Landow", + "East Rivermouth", "West Rivermouth" ]; // ML quest system general list // Used when: MLQuestSystem.Enabled && !Region.IsPartOf( "Haven Island" ) private static readonly Dictionary _mlQuestTypes = new() { - { typeof(EscortToBastion), (Array.Empty(), 0) } + { typeof(EscortToBastion), (Array.Empty(), 0) }, + { typeof(EscortToMirePort), (Array.Empty(), 0) }, + { typeof(EscortToFairwinds), (Array.Empty(), 0) }, + { typeof(EscortToCresthaven), (Array.Empty(), 0) }, + { typeof(EscortToLandow), (Array.Empty(), 0) }, + { typeof(EscortToEastRivermouth), (Array.Empty(), 0) }, + { typeof(EscortToWestRivermouth), (Array.Empty(), 0) }, + { typeof(EscortToStonehollow), (Array.Empty(), 0) }, + { typeof(EscortToColdbarrow), (Array.Empty(), 0) }, + { typeof(EscortToWharfsEnd), (Array.Empty(), 0) }, + { typeof(EscortToLandowDock), (Array.Empty(), 0) }, + { typeof(EscortToEndPointDock), (Array.Empty(), 0) }, }; // ML quest system New Haven list