#W# Fixes/Tweaks: A few tweaks and fixes. Fixed escort quest locations. added names to dyetubs. Moongates now have checks and hide you.

This commit is contained in:
WarrentyExpired 2026-10-14 12:14:51 -04:00
parent b23e5fdd52
commit d5f10e58dc
12 changed files with 215 additions and 23 deletions

View file

@ -33,3 +33,7 @@ CustomMoonGate 0xF6C
# Shiver Island
CustomMoonGate 0xF6C
3012 445 8
# End Point Dock
CustomMoonGate 0xF6C
1505 1009 4

View file

@ -1,2 +1,13 @@
IronForTheForge
EscortToBastion
EscortToMirePort
EscortToFairwinds
EscortToCrestHaven
EscortToLandow
EscortToEastRivermouth
EscortToWestRivermouth
EscortToStonehollow
EscortToColdbarrow
EscortToWharfsEnd
EscortToLandowDock
EscortToEndPointDock

View file

@ -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" },

View file

@ -82,12 +82,38 @@ public class BountyRewardGump : Gump
private static readonly (string Name, int Cost, Func<Item> CreateItem)[] Rewards = new (string, int, Func<Item>)[]
{
("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<Item>[]
{
() => 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}");

View file

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

View file

@ -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);
}

View file

@ -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<CustomMoongateGump>();
pm.SendGump(new CustomMoongateGump(this));
Effects.PlaySound(pm.Location, pm.Map, 0x20E);
}
}
}

View file

@ -10,6 +10,7 @@ namespace Server.Items
{
Hue = DyedHue = 0x0001;
Redyable = false;
Name = "Black Dyetub";
}
}
}

View file

@ -10,6 +10,7 @@ namespace Server.Items
{
Hue = DyedHue = 0x489;
Redyable = false;
Name = "Blaze Dyetub";
}
}
}

View file

@ -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;
}

View file

@ -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)

View file

@ -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<Type, (int[], int)> _mlQuestTypes = new()
{
{ typeof(EscortToBastion), (Array.Empty<int>(), 0) }
{ typeof(EscortToBastion), (Array.Empty<int>(), 0) },
{ typeof(EscortToMirePort), (Array.Empty<int>(), 0) },
{ typeof(EscortToFairwinds), (Array.Empty<int>(), 0) },
{ typeof(EscortToCresthaven), (Array.Empty<int>(), 0) },
{ typeof(EscortToLandow), (Array.Empty<int>(), 0) },
{ typeof(EscortToEastRivermouth), (Array.Empty<int>(), 0) },
{ typeof(EscortToWestRivermouth), (Array.Empty<int>(), 0) },
{ typeof(EscortToStonehollow), (Array.Empty<int>(), 0) },
{ typeof(EscortToColdbarrow), (Array.Empty<int>(), 0) },
{ typeof(EscortToWharfsEnd), (Array.Empty<int>(), 0) },
{ typeof(EscortToLandowDock), (Array.Empty<int>(), 0) },
{ typeof(EscortToEndPointDock), (Array.Empty<int>(), 0) },
};
// ML quest system New Haven list