#W# MLQuests: Escortable quests are now working. I just need to add more of them. Added moongate to Shiver Island.
This commit is contained in:
parent
ac47317723
commit
b23e5fdd52
17 changed files with 167 additions and 127 deletions
|
|
@ -0,0 +1,20 @@
|
|||
namespace Server.Engines.MLQuests.Definitions
|
||||
{
|
||||
// Base class for escorts providing the AwardHumanInNeed option
|
||||
public class BaseEscort : MLQuest
|
||||
{
|
||||
public BaseEscort() => CompletionNotice = CompletionNoticeShort;
|
||||
|
||||
public virtual bool AwardHumanInNeed => true;
|
||||
|
||||
public override void GetRewards(MLQuestInstance instance)
|
||||
{
|
||||
if (AwardHumanInNeed)
|
||||
{
|
||||
HumanInNeed.AwardTo(instance.Player);
|
||||
}
|
||||
|
||||
base.GetRewards(instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Projects/UOContent/Engines/ML Quests/Definitions/Heritage.cs
Normal file
28
Projects/UOContent/Engines/ML Quests/Definitions/Heritage.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Engines.MLQuests.Objectives;
|
||||
using Server.Engines.MLQuests.Rewards;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.MLQuests.Definitions;
|
||||
|
||||
// This is not a real quest, it is only used as a reference
|
||||
public class HumanInNeed : MLQuest
|
||||
{
|
||||
public HumanInNeed()
|
||||
{
|
||||
Title = 1075011;
|
||||
Description = 0;
|
||||
RefusalMessage = 0;
|
||||
InProgressMessage = 0;
|
||||
}
|
||||
|
||||
public override bool RecordCompletion => true;
|
||||
|
||||
public static void AwardTo(PlayerMobile pm)
|
||||
{
|
||||
MLQuestSystem.GetOrCreateContext(pm).SetDoneQuest(MLQuestSystem.FindQuest(typeof(HumanInNeed)));
|
||||
pm.SendLocalizedMessage(1074949, "", 0x2A);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using Server.Engines.MLQuests.Objectives;
|
||||
using Server.Engines.MLQuests.Rewards;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.MLQuests.Definitions
|
||||
{
|
||||
public class TownEscort : BaseEscort
|
||||
{
|
||||
// Escort reward
|
||||
private static readonly BaseReward m_Reward = new ItemReward("Gold", typeof(Gold), 500);
|
||||
|
||||
public TownEscort(int title, int progress, int destination, string region)
|
||||
{
|
||||
Activated = true;
|
||||
Title = title;
|
||||
Description =
|
||||
1072287;
|
||||
RefusalMessage =
|
||||
1072288;
|
||||
InProgressMessage = progress;
|
||||
|
||||
Objectives.Add(new EscortObjective(new QuestArea(destination, region)));
|
||||
|
||||
Rewards.Add(m_Reward);
|
||||
}
|
||||
}
|
||||
|
||||
public class EscortToBastion : TownEscort
|
||||
{
|
||||
public EscortToBastion()
|
||||
: base(1072275, 1072289, 1072227, "the town of Bastion")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue