#W# MLQuest: Working on some new quests. Or trying to.

This commit is contained in:
WarrentyExpired 2026-10-08 15:35:25 -04:00
parent f961f484a5
commit b22a1495af
5 changed files with 179 additions and 309 deletions

View file

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using ModernUO.Serialization;
using Server.Engines.MLQuests;
using Server.Engines.MLQuests.Objectives;
using Server.Engines.MLQuests.Rewards;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.MLQuests.Definitions;
// ==========================================
// 1. BOUNTY BOARD ITEM
// ==========================================
[SerializationGenerator(0, false)]
public partial class DungeonBountyBoard : Item, IQuestGiver
{
// Implementation for IQuestGiver
public List<MLQuest> MLQuests => MLQuestSystem.FindQuestList(GetType());
[Constructible]
public DungeonBountyBoard() : base(0x1E5E) // Bulletin board Graphic ID
{
Name = "Dungeon Bounty Board";
Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if (from is PlayerMobile pm)
{
if (from.InRange(GetWorldLocation(), 3))
{
MLQuestSystem.OnDoubleClick(this, pm);
}
else
{
from.SendLocalizedMessage(500446); // That is too far away.
}
}
}
}
// ==========================================
// 2. DESTARD BOUNTY: DRAKES
// ==========================================
public class DestardDrakeBounty : MLQuest
{
public DestardDrakeBounty()
{
Activated = true;
Title = "Bounty: Destard Drakes";
Description = "Notice to all adventurers: Drake activity in the caverns of Destard has surged! Slay 10 Drakes to thin their numbers and keep the surrounding passes safe.";
RefusalMessage = "The bounty remains posted if you change your mind.";
InProgressMessage = "You haven't slain enough Drakes yet. Return once you've dispatched 10 of them in Destard.";
CompletionMessage = "Excellent work! The realm thanks you for your service. Here is your gold reward.";
CompletionNotice = CompletionNoticeShort;
// Objective: Slay 10 Drakes
Objectives.Add(new KillObjective(10, new[] { typeof(Drake) }, "Drakes"));
// Reward: 1,200 Gold
Rewards.Add(new ItemReward("1,200 Gold", typeof(Gold), 1200));
}
public override void Generate()
{
base.Generate();
MLQuestSystem.Register(this, typeof(DungeonBountyBoard));
}
}
// ==========================================
// 3. DECEIT BOUNTY: SKELETAL KNIGHTS
// ==========================================
public class DeceitSkeletalKnightBounty : MLQuest
{
public DeceitSkeletalKnightBounty()
{
Activated = true;
Title = "Bounty: Deceit Skeletal Knights";
Description = "Undead forces are amassing within the halls of Deceit. Slay 10 Skeletal Knights and report back to claim your reward.";
RefusalMessage = "The bounty remains posted on the board.";
InProgressMessage = "The skeletal knights still roam Deceit. Return when you have destroyed 10 of them.";
CompletionMessage = "The undead threat has been pushed back! Take your gold reward.";
CompletionNotice = CompletionNoticeShort;
// Objective: Slay 10 Skeletal Knights
Objectives.Add(new KillObjective(10, new[] { typeof(SkeletalKnight) }, "Skeletal Knights"));
// Reward: 1,500 Gold
Rewards.Add(new ItemReward("1,500 Gold", typeof(Gold), 1500));
}
public override void Generate()
{
base.Generate();
MLQuestSystem.Register(this, typeof(DungeonBountyBoard));
}
}

View file

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using ModernUO.Serialization;
using Server.Engines.MLQuests;
using Server.Engines.MLQuests.Objectives;
using Server.Engines.MLQuests.Rewards;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.MLQuests.Definitions;
public class IronForTheForge : MLQuest
{
public IronForTheForge()
{
Activated = true;
Title = "Iron for the Forge";
Description = "Greetings traveler! The local guards have ordered a heavy shipment of armor, and my forge is running completely cold. Bring me 10 Iron Ingots so I can get back to work, and I will compensate you well.";
RefusalMessage = "I understand. Raw iron is heavy work, but come back if you change your mind.";
InProgressMessage = "Still looking for that iron? Mine it or buy it from a smithy, then bring 10 ingots back to me.";
CompletionMessage = "Ah, magnificent quality iron! This will keep the forge roaring today. Here is your pay as promised.";
CompletionNotice = CompletionNoticeShort;
// Objective: Collect 10 Iron Ingots
Objectives.Add(new CollectObjective(10, typeof(IronIngot), "Iron Ingots"));
// Reward: 500 Gold
Rewards.Add(new ItemReward("500 Gold", typeof(Gold), 500));
}
public override void Generate()
{
base.Generate();
// Registers this quest and links it to QuestBlacksmith
MLQuestSystem.Register(this, typeof(QuestBlacksmith));
}
}
[SerializationGenerator(0, false)]
public partial class QuestBlacksmith : BaseCreature, IQuestGiver
{
// Implementation for IQuestGiver
public List<MLQuest> MLQuests => MLQuestSystem.FindQuestList(GetType());
[Constructible]
public QuestBlacksmith() : base(AIType.AI_Vendor, FightMode.None, 2)
{
Title = "the Blacksmith";
Race = Race.Human;
Body = 0x190;
Female = false;
Hue = Race.RandomSkinHue();
SetSpeed(0.5, 2.0);
InitStats(100, 100, 25);
Utility.AssignRandomHair(this);
AddItem(new Backpack());
AddItem(new ShortPants(0x755));
AddItem(new Shirt(Utility.RandomNeutralHue()));
AddItem(new FullApron(Utility.RandomNeutralHue()));
AddItem(new Boots());
AddItem(new SmithHammer());
}
public override bool IsInvulnerable => true;
public override string DefaultName => "Gareth";
}

View file

@ -3,7 +3,7 @@ using Server.Mobiles;
namespace Server.Regions
{
public class GreetingDungeonRegion : DungeonRegion
public class GreetingDungeonRegion : NoTravelSpellsAllowedRegion
{
public GreetingDungeonRegion(string name, Map map, int priority, params Rectangle3D[] area)
: base(name, map, priority, area)