v0.0.1-Alpha (#42)
This commit is contained in:
parent
d30f93c454
commit
a36796c2c1
3552 changed files with 2476 additions and 15223 deletions
207
Projects/Scripts/Engines/Quests/Dark Tides/Conversations.cs
Normal file
207
Projects/Scripts/Engines/Quests/Dark Tides/Conversations.cs
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class AcceptConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1049092;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
Container bag = BaseQuester.GetNewContainer();
|
||||
|
||||
bag.DropItem(new DarkTidesHorn());
|
||||
|
||||
System.From.AddToBackpack(bag);
|
||||
|
||||
System.AddConversation(new ReanimateMaabusConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReanimateMaabusConversation : QuestConversation
|
||||
{
|
||||
private static QuestItemInfo[] m_Info =
|
||||
{
|
||||
new QuestItemInfo(1026153, 6178), // teleporter
|
||||
new QuestItemInfo(1049117, 4036), // Horn of Retreat
|
||||
new QuestItemInfo(1048032, 3702) // a bag
|
||||
};
|
||||
|
||||
public override object Message => 1060099;
|
||||
|
||||
public override QuestItemInfo[] Info => m_Info;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindMaabusTombObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class MaabasConversation : QuestConversation
|
||||
{
|
||||
private static QuestItemInfo[] m_Info =
|
||||
{
|
||||
new QuestItemInfo(1026153, 6178) // teleporter
|
||||
};
|
||||
|
||||
public override object Message => 1060103;
|
||||
|
||||
public override QuestItemInfo[] Info => m_Info;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindCrystalCaveObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class HorusConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060105;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindMardothAboutVaultObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class MardothVaultConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060107;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindCityOfLightObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class VaultOfSecretsConversation : QuestConversation
|
||||
{
|
||||
private static QuestItemInfo[] m_Info =
|
||||
{
|
||||
new QuestItemInfo(1023643, 8787) // spellbook
|
||||
};
|
||||
|
||||
public override object Message => 1060110;
|
||||
|
||||
public override QuestItemInfo[] Info => m_Info;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FetchAbraxusScrollObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReadAbraxusScrollConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060114;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new ReadAbraxusScrollObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SecondHorusConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060118;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindCallingScrollObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class HealConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1061610;
|
||||
}
|
||||
|
||||
public class HorusRewardConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060717;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class LostCallingScrollConversation : QuestConversation
|
||||
{
|
||||
private bool m_FromMardoth;
|
||||
|
||||
public LostCallingScrollConversation(bool fromMardoth)
|
||||
{
|
||||
m_FromMardoth = fromMardoth;
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public LostCallingScrollConversation()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_FromMardoth) return 1062058;
|
||||
|
||||
/* You have arrived at the well, but no longer have the scroll
|
||||
* of calling. Use Mardoth's teleporter to return to the
|
||||
* Crystal Cave and fetch another scroll from the box.
|
||||
*/
|
||||
return 1060129;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Logged => false;
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_FromMardoth = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_FromMardoth);
|
||||
}
|
||||
}
|
||||
|
||||
public class MardothKronusConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060121;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindWellOfTearsObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class MardothEndConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060133;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindBankObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class BankerConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1060137;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
public class RadarConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1061692;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
}
|
||||
98
Projects/Scripts/Engines/Quests/Dark Tides/DarkTidesQuest.cs
Normal file
98
Projects/Scripts/Engines/Quests/Dark Tides/DarkTidesQuest.cs
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class DarkTidesQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable =
|
||||
{
|
||||
typeof(AcceptConversation),
|
||||
typeof(AnimateMaabusCorpseObjective),
|
||||
typeof(BankerConversation),
|
||||
typeof(CashBankCheckObjective),
|
||||
typeof(FetchAbraxusScrollObjective),
|
||||
typeof(FindBankObjective),
|
||||
typeof(FindCallingScrollObjective),
|
||||
typeof(FindCityOfLightObjective),
|
||||
typeof(FindCrystalCaveObjective),
|
||||
typeof(FindMaabusCorpseObjective),
|
||||
typeof(FindMaabusTombObjective),
|
||||
typeof(FindMardothAboutKronusObjective),
|
||||
typeof(FindMardothAboutVaultObjective),
|
||||
typeof(FindMardothEndObjective),
|
||||
typeof(FindVaultOfSecretsObjective),
|
||||
typeof(FindWellOfTearsObjective),
|
||||
typeof(HorusConversation),
|
||||
typeof(LostCallingScrollConversation),
|
||||
typeof(MaabasConversation),
|
||||
typeof(MardothEndConversation),
|
||||
typeof(MardothKronusConversation),
|
||||
typeof(MardothVaultConversation),
|
||||
typeof(RadarConversation),
|
||||
typeof(ReadAbraxusScrollConversation),
|
||||
typeof(ReadAbraxusScrollObjective),
|
||||
typeof(ReanimateMaabusConversation),
|
||||
typeof(RetrieveAbraxusScrollObjective),
|
||||
typeof(ReturnToCrystalCaveObjective),
|
||||
typeof(SecondHorusConversation),
|
||||
typeof(SpeakCavePasswordObjective),
|
||||
typeof(UseCallingScrollObjective),
|
||||
typeof(VaultOfSecretsConversation),
|
||||
typeof(FindHorusAboutRewardObjective),
|
||||
typeof(HealConversation),
|
||||
typeof(HorusRewardConversation)
|
||||
};
|
||||
|
||||
public DarkTidesQuest(PlayerMobile from) : base(from)
|
||||
{
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public DarkTidesQuest()
|
||||
{
|
||||
}
|
||||
|
||||
public override Type[] TypeReferenceTable => m_TypeReferenceTable;
|
||||
|
||||
public override object Name => 1060095;
|
||||
|
||||
public override object OfferMessage => 1060094;
|
||||
|
||||
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
|
||||
public override bool IsTutorial => true;
|
||||
|
||||
public override int Picture => 0x15B5;
|
||||
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
|
||||
AddConversation(new AcceptConversation());
|
||||
}
|
||||
|
||||
public override bool IgnoreYoungProtection(Mobile from)
|
||||
{
|
||||
if (from is SummonedPaladin)
|
||||
return true;
|
||||
|
||||
return base.IgnoreYoungProtection(from);
|
||||
}
|
||||
|
||||
public static bool HasLostCallingScroll(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMardothAboutKronusObjective)) ||
|
||||
qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)) ||
|
||||
qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
|
||||
return from.Backpack?.FindItemByType<KronusScroll>() == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class CrystalCaveBarrier : Item
|
||||
{
|
||||
[Constructible]
|
||||
public CrystalCaveBarrier() : base(0x3967)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public CrystalCaveBarrier(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
return true;
|
||||
|
||||
Mobile mob = m;
|
||||
|
||||
if (m is BaseCreature creature)
|
||||
mob = creature.ControlMaster;
|
||||
|
||||
if (!(mob is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
|
||||
if (obj?.Completed == true)
|
||||
{
|
||||
m.SendLocalizedMessage(
|
||||
1060648); // With Horus' permission, you are able to pass through the barrier.
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1060649, "",
|
||||
0x66D); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class DarkTidesHorn : HornOfRetreat
|
||||
{
|
||||
[Constructible]
|
||||
public DarkTidesHorn()
|
||||
{
|
||||
DestLoc = new Point3D(2103, 1319, -68);
|
||||
DestMap = Map.Malas;
|
||||
}
|
||||
|
||||
public DarkTidesHorn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ValidateUse(Mobile from)
|
||||
{
|
||||
return from is PlayerMobile pm && pm.Quest is DarkTidesQuest;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class DarkTidesTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructible]
|
||||
public DarkTidesTeleporter()
|
||||
{
|
||||
}
|
||||
|
||||
public DarkTidesTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMaabusTombObjective)))
|
||||
{
|
||||
loc = new Point3D(2038, 1263, -90);
|
||||
map = Map.Malas;
|
||||
qs.AddConversation(new RadarConversation());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective)))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(FindCityOfLightObjective)))
|
||||
{
|
||||
loc = new Point3D(1091, 519, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qs.IsObjectiveInProgress(typeof(ReturnToCrystalCaveObjective)))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DarkTidesQuest.HasLostCallingScroll(player))
|
||||
{
|
||||
loc = new Point3D(1194, 521, -90);
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
166
Projects/Scripts/Engines/Quests/Dark Tides/Items/KronusScroll.cs
Normal file
166
Projects/Scripts/Engines/Quests/Dark Tides/Items/KronusScroll.cs
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class KronusScroll : QuestItem
|
||||
{
|
||||
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D(2080, 1346, 10, 10);
|
||||
private static readonly Map m_WellOfTearsMap = Map.Malas;
|
||||
|
||||
[Constructible]
|
||||
public KronusScroll() : base(0x227A)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x44E;
|
||||
}
|
||||
|
||||
public KronusScroll(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1060149; // Calling of Kronus
|
||||
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is DarkTidesQuest);
|
||||
|
||||
/*return !( qs.IsObjectiveInProgress( typeof( FindCallingScrollObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( FindMardothAboutKronusObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( FindWellOfTearsObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( UseCallingScrollObjective ) ) );*/
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from))
|
||||
return;
|
||||
|
||||
if (from is PlayerMobile pm)
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(FindMardothAboutKronusObjective)))
|
||||
{
|
||||
pm.SendLocalizedMessage(1060151, "",
|
||||
0x41); // You read the scroll, but decide against performing the calling until you are instructed to do so by Mardoth.
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)))
|
||||
{
|
||||
pm.SendLocalizedMessage(1060152, "",
|
||||
0x41); // You must be at the Well of Tears in the city of Necromancers to use this scroll.
|
||||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
|
||||
{
|
||||
if (pm.Map == m_WellOfTearsMap && m_WellOfTearsArea.Contains(pm))
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<UseCallingScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj.Complete();
|
||||
|
||||
Delete();
|
||||
new CallingTimer(pm).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1060152, "",
|
||||
0x41); // You must be at the Well of Tears in the city of Necromancers to use this scroll.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1060150, "",
|
||||
0x41); // A strange terror grips your heart as you attempt to read the scroll. You decide it would be a bad idea to read it out loud.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class CallingTimer : Timer
|
||||
{
|
||||
private PlayerMobile m_Player;
|
||||
private int m_Step;
|
||||
|
||||
public CallingTimer(PlayerMobile player) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0), 6)
|
||||
{
|
||||
Priority = TimerPriority.TwentyFiveMS;
|
||||
|
||||
m_Player = player;
|
||||
m_Step = 0;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Player.Deleted)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_Player.Mounted)
|
||||
m_Player.Animate(Utility.RandomBool() ? 16 : 17, 7, 1, true, false, 0);
|
||||
|
||||
if (m_Step == 4)
|
||||
{
|
||||
int baseX = m_WellOfTearsArea.X;
|
||||
int baseY = m_WellOfTearsArea.Y;
|
||||
int width = m_WellOfTearsArea.Width;
|
||||
int height = m_WellOfTearsArea.Height;
|
||||
Map map = m_WellOfTearsMap;
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(m_Player.Location, m_Player.Map, TimeSpan.FromSeconds(1.0)), 0, 0, 0, 0x13C4);
|
||||
Effects.PlaySound(m_Player.Location, m_Player.Map, 0x243);
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int x = baseX + Utility.Random(width);
|
||||
int y = baseY + Utility.Random(height);
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
Point3D from = new Point3D(x, y, z + Utility.RandomMinMax(5, 20));
|
||||
Point3D to = new Point3D(x, y, z);
|
||||
|
||||
int hue = Utility.RandomList(0x481, 0x482, 0x489, 0x497, 0x66D);
|
||||
|
||||
Effects.SendPacket(from, map,
|
||||
new HuedEffect(EffectType.Moving, Serial.Zero, Serial.Zero, 0x36D4, from, to, 0, 0, false, true,
|
||||
hue, 0));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Step < 5)
|
||||
{
|
||||
m_Player.Frozen = true;
|
||||
}
|
||||
else // Cast completed
|
||||
{
|
||||
m_Player.Frozen = false;
|
||||
|
||||
SummonedPaladin.BeginSummon(m_Player);
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class KronusScrollBox : MetalBox
|
||||
{
|
||||
[Constructible]
|
||||
public KronusScrollBox()
|
||||
{
|
||||
ItemID = 0xE80;
|
||||
Movable = false;
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Item scroll = Loot.RandomScroll(0, 15, SpellbookType.Necromancer);
|
||||
scroll.Movable = false;
|
||||
DropItem(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
public KronusScrollBox(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile pm && pm.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindCallingScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false || DarkTidesQuest.HasLostCallingScroll(from))
|
||||
{
|
||||
Item scroll = new KronusScroll();
|
||||
|
||||
if (pm.PlaceInBackpack(scroll))
|
||||
{
|
||||
pm.SendLocalizedMessage(1060120, "",
|
||||
0x41); // You rummage through the scrolls until you find the Scroll of Calling. You quickly put it in your pack.
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
|
||||
scroll.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
154
Projects/Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs
Normal file
154
Projects/Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class MaabusCoffin : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public MaabusCoffin()
|
||||
{
|
||||
AddComponent(new MaabusCoffinComponent(0x1C2B, 0x1C2B), -1, -1, 0);
|
||||
|
||||
AddComponent(new MaabusCoffinComponent(0x1D16, 0x1C2C), 0, -1, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D17, 0x1C2D), 1, -1, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D51, 0x1C2E), 2, -1, 0);
|
||||
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4E, 0x1C2A), 0, 0, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4D, 0x1C29), 1, 0, 0);
|
||||
AddComponent(new MaabusCoffinComponent(0x1D4C, 0x1C28), 2, 0, 0);
|
||||
}
|
||||
|
||||
public MaabusCoffin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Maabus Maabus{ get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D SpawnLocation{ get; set; }
|
||||
|
||||
public void Awake(Mobile caller)
|
||||
{
|
||||
if (Maabus != null || SpawnLocation == Point3D.Zero)
|
||||
return;
|
||||
|
||||
foreach (AddonComponent c in Components)
|
||||
(c as MaabusCoffinComponent)?.TurnToEmpty();
|
||||
|
||||
Maabus = new Maabus { Location = SpawnLocation, Map = Map };
|
||||
Maabus.Direction = Maabus.GetDirectionTo(caller);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(7.5), BeginSleep);
|
||||
}
|
||||
|
||||
public void BeginSleep()
|
||||
{
|
||||
if (Maabus == null)
|
||||
return;
|
||||
|
||||
Effects.PlaySound(Maabus.Location, Maabus.Map, 0x48E);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(2.5), Sleep);
|
||||
}
|
||||
|
||||
public void Sleep()
|
||||
{
|
||||
if (Maabus == null)
|
||||
return;
|
||||
|
||||
Effects.SendLocationParticles(EffectItem.Create(Maabus.Location, Maabus.Map, EffectItem.DefaultDuration), 0x3728,
|
||||
10, 10, 0x7E7);
|
||||
Effects.PlaySound(Maabus.Location, Maabus.Map, 0x1FE);
|
||||
|
||||
Maabus.Delete();
|
||||
Maabus = null;
|
||||
|
||||
foreach (MaabusCoffinComponent c in Components)
|
||||
c.TurnToFull();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(Maabus);
|
||||
writer.Write(SpawnLocation);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Maabus = reader.ReadMobile() as Maabus;
|
||||
SpawnLocation = reader.ReadPoint3D();
|
||||
|
||||
Sleep();
|
||||
}
|
||||
}
|
||||
|
||||
public class MaabusCoffinComponent : AddonComponent
|
||||
{
|
||||
private int m_EmptyItemID;
|
||||
private int m_FullItemID;
|
||||
|
||||
public MaabusCoffinComponent(int itemID) : this(itemID, itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent(int fullItemID, int emptyItemID) : base(fullItemID)
|
||||
{
|
||||
m_FullItemID = fullItemID;
|
||||
m_EmptyItemID = emptyItemID;
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D SpawnLocation
|
||||
{
|
||||
get => Addon is MaabusCoffin coffin ? coffin.SpawnLocation : Point3D.Zero;
|
||||
set
|
||||
{
|
||||
if (Addon is MaabusCoffin coffin) coffin.SpawnLocation = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void TurnToEmpty()
|
||||
{
|
||||
ItemID = m_EmptyItemID;
|
||||
}
|
||||
|
||||
public void TurnToFull()
|
||||
{
|
||||
ItemID = m_FullItemID;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_FullItemID);
|
||||
writer.Write(m_EmptyItemID);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_FullItemID = reader.ReadInt();
|
||||
m_EmptyItemID = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class ScrollOfAbraxus : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public ScrollOfAbraxus() : base(0x227B)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public ScrollOfAbraxus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1028827; // Scroll of Abraxus
|
||||
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is DarkTidesQuest);
|
||||
|
||||
//return !( qs.IsObjectiveInProgress( typeof( RetrieveAbraxusScrollObjective ) ) || qs.IsObjectiveInProgress( typeof( ReadAbraxusScrollObjective ) ) );
|
||||
}
|
||||
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded(parent);
|
||||
|
||||
if (RootParent is PlayerMobile pm)
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<RetrieveAbraxusScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendGump(new ScrollOfAbraxusGump());
|
||||
|
||||
if (from is PlayerMobile pm)
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReadAbraxusScrollObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ScrollOfAbraxusGump : Gump
|
||||
{
|
||||
public ScrollOfAbraxusGump() : base(150, 50)
|
||||
{
|
||||
AddPage(0);
|
||||
|
||||
AddImage(0, 0, 1228);
|
||||
AddImage(340, 255, 9005);
|
||||
|
||||
/* Security at the Crystal Cave<BR><BR>
|
||||
*
|
||||
* We have taken great measuresto ensure the safety of the
|
||||
* Scroll of Calling, which we have so valiantly taken from
|
||||
* the Necromancer Maabus during the battle of the wood
|
||||
* nearly 200 years ago.<BR><BR>
|
||||
*
|
||||
* The scroll must never fall into the hands of the
|
||||
* Necromancers again, lest they use it to summon the ancient
|
||||
* daemon Kronus. The scroll of calling is a necessity in the
|
||||
* series of dark rites the Necromancers must perform to once again
|
||||
* re-awaken Kronus.<BR><BR>
|
||||
*
|
||||
* Should Kronus ever rise again, the days of the Paladins, and
|
||||
* indeed humanity as we know it will be numbered.<BR><BR>
|
||||
*
|
||||
* For this reason, we have posted the honorable Horus, former
|
||||
* General of the Northern Legions to guard the entrance of the
|
||||
* Crystal Cave where we keep the Scroll of Calling. Horus was
|
||||
* infused with magical life from the tree Urywen during his last
|
||||
* battle. The power gave him eternal life, but it also,
|
||||
* unfortunately, took his eye sight.<BR><BR>
|
||||
*
|
||||
* Since Horus cannot see those he admits to the Crystal Cave,
|
||||
* he will only allow those that know the secret password to enter.
|
||||
* Speak the following word to Horus and he shall grant you passage
|
||||
* to the Crystal Cave:<BR><BR>
|
||||
*
|
||||
* <I>Urywen</I><BR><BR>
|
||||
*
|
||||
* Do not speak this password anywhere except when seeking passage
|
||||
* into the Crystal Cave, as our adversaries are lurking in the
|
||||
* shadows <EFBFBD> they are everywhere.<BR><BR>Go with the light, friend.<BR><BR>
|
||||
*
|
||||
* <I>- Frater Melkeer</I>
|
||||
*/
|
||||
AddHtmlLocalized(25, 36, 350, 210, 1060116, 1, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class VaultOfSecretsBarrier : Item
|
||||
{
|
||||
[Constructible]
|
||||
public VaultOfSecretsBarrier() : base(0x49E)
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
public VaultOfSecretsBarrier(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
return true;
|
||||
|
||||
if (m is PlayerMobile pm && pm.Profession == 4)
|
||||
{
|
||||
m.SendLocalizedMessage(1060188, "", 0x24); // The wicked may not enter!
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
191
Projects/Scripts/Engines/Quests/Dark Tides/Mobiles/Horus.cs
Normal file
191
Projects/Scripts/Engines/Quests/Dark Tides/Mobiles/Horus.cs
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class Horus : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Horus() : base("the Guardian")
|
||||
{
|
||||
}
|
||||
|
||||
public Horus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Horus";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F3;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(SetHue(new PlateLegs(), 0x849));
|
||||
AddItem(SetHue(new PlateChest(), 0x849));
|
||||
AddItem(SetHue(new PlateArms(), 0x849));
|
||||
AddItem(SetHue(new PlateGloves(), 0x849));
|
||||
AddItem(SetHue(new PlateGorget(), 0x849));
|
||||
|
||||
AddItem(SetHue(new Bardiche(), 0x482));
|
||||
|
||||
AddItem(SetHue(new Boots(), 0x001));
|
||||
AddItem(SetHue(new Cloak(), 0x482));
|
||||
|
||||
Utility.AssignRandomHair(this, false);
|
||||
Utility.AssignRandomFacialHair(this, false);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
QuestSystem qs = to.Quest;
|
||||
|
||||
return qs is DarkTidesQuest && qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindCrystalCaveObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (InRange(m.Location, 2) && !InRange(oldLocation, 2) && m is PlayerMobile pm)
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnToCrystalCaveObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindHorusAboutRewardObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
cont.DropItem(new Gold(500));
|
||||
|
||||
BaseJewel jewel = new GoldBracelet();
|
||||
if (Core.AOS)
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, 3, 20, 40);
|
||||
cont.DropItem(jewel);
|
||||
|
||||
if (!pm.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
pm.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (from.Alive)
|
||||
if (from is PlayerMobile pm)
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
bool enabled = obj?.Completed == false;
|
||||
|
||||
list.Add(new SpeakPasswordEntry(this, pm, enabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnPasswordSpoken(PlayerMobile from)
|
||||
{
|
||||
QuestSystem qs = from.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SpeakCavePasswordObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1060185); // Horus ignores you.
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class SpeakPasswordEntry : ContextMenuEntry
|
||||
{
|
||||
private PlayerMobile m_From;
|
||||
private Horus m_Horus;
|
||||
|
||||
public SpeakPasswordEntry(Horus horus, PlayerMobile from, bool enabled) : base(6193, 3)
|
||||
{
|
||||
m_Horus = horus;
|
||||
m_From = from;
|
||||
|
||||
if (!enabled)
|
||||
Flags |= CMEFlags.Disabled;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (m_From.Alive)
|
||||
m_Horus.OnPasswordSpoken(m_From);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Projects/Scripts/Engines/Quests/Dark Tides/Mobiles/Maabus.cs
Normal file
45
Projects/Scripts/Engines/Quests/Dark Tides/Mobiles/Maabus.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class Maabus : BaseQuester
|
||||
{
|
||||
public Maabus()
|
||||
{
|
||||
}
|
||||
|
||||
public Maabus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Maabus";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
Body = 0x94;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
219
Projects/Scripts/Engines/Quests/Dark Tides/Mobiles/Mardoth.cs
Normal file
219
Projects/Scripts/Engines/Quests/Dark Tides/Mobiles/Mardoth.cs
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class Mardoth : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Mardoth() : base("the Ancient Necromancer")
|
||||
{
|
||||
}
|
||||
|
||||
public Mardoth(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Mardoth";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x8849;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
if (dropped is DarkTidesHorn horn)
|
||||
{
|
||||
if (player.Young)
|
||||
{
|
||||
if (horn.Charges < 10)
|
||||
{
|
||||
SayTo(from, 1049384); // I have recharged the item for you.
|
||||
horn.Charges = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049385); // That doesn't need recharging yet.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Sandals(0x1));
|
||||
AddItem(new Robe(0x66D));
|
||||
AddItem(new BlackStaff());
|
||||
AddItem(new WizardsHat(0x1));
|
||||
|
||||
FacialHairItemID = 0x2041;
|
||||
FacialHairHue = 0x482;
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x482;
|
||||
|
||||
Item gloves = new BoneGloves();
|
||||
gloves.Hue = 0x66D;
|
||||
AddItem(gloves);
|
||||
|
||||
Item gorget = new PlateGorget();
|
||||
gorget.Hue = 0x1;
|
||||
AddItem(gorget);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
if (!(to.Quest is DarkTidesQuest qs))
|
||||
return to.Quest == null && QuestSystem.CanOfferQuest(to, typeof(DarkTidesQuest));
|
||||
|
||||
return qs.FindObjective<FindMardothAboutVaultObjective>() != null;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
{
|
||||
if (DarkTidesQuest.HasLostCallingScroll(player))
|
||||
{
|
||||
qs.AddConversation(new LostCallingScrollConversation(true));
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindMardothAboutVaultObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindMardothAboutKronusObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindMardothEndObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
cont.DropItem(new PigIron(20));
|
||||
cont.DropItem(new NoxCrystal(20));
|
||||
cont.DropItem(new BatWing(25));
|
||||
cont.DropItem(new DaemonBlood(20));
|
||||
cont.DropItem(new GraveDust(20));
|
||||
|
||||
BaseWeapon weapon = new BoneHarvester();
|
||||
|
||||
weapon.Slayer = SlayerName.OrcSlaying;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 4);
|
||||
}
|
||||
|
||||
cont.DropItem(weapon);
|
||||
|
||||
cont.DropItem(new BankCheck(2000));
|
||||
cont.DropItem(new EnchantedSextant());
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
cont.Delete();
|
||||
player.SendLocalizedMessage(
|
||||
1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if (contextMenu)
|
||||
{
|
||||
FocusTo(player);
|
||||
player.SendLocalizedMessage(1061821); // Mardoth has nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (qs == null && QuestSystem.CanOfferQuest(player, typeof(DarkTidesQuest)))
|
||||
{
|
||||
new DarkTidesQuest(player).SendOffer();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class SummonedPaladin : BaseCreature
|
||||
{
|
||||
private PlayerMobile m_Necromancer;
|
||||
private bool m_ToDelete;
|
||||
|
||||
public SummonedPaladin(PlayerMobile necromancer) : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
m_Necromancer = necromancer;
|
||||
|
||||
InitStats(45, 30, 5);
|
||||
Title = "the Paladin";
|
||||
|
||||
Hue = 0x83F3;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, false);
|
||||
|
||||
FacialHairHue = HairHue;
|
||||
|
||||
AddItem(new Boots(0x1));
|
||||
AddItem(new ChainChest());
|
||||
AddItem(new ChainLegs());
|
||||
AddItem(new RingmailArms());
|
||||
AddItem(new PlateHelm());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateGorget());
|
||||
|
||||
AddItem(new Cloak(0xCF));
|
||||
|
||||
AddItem(new ThinLongsword());
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
|
||||
PackGold(500);
|
||||
}
|
||||
|
||||
public SummonedPaladin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override bool PlayerRangeSensitive => false;
|
||||
|
||||
public override bool IsHarmfulCriminal(Mobile target)
|
||||
{
|
||||
if (target == m_Necromancer)
|
||||
return false;
|
||||
|
||||
return base.IsHarmfulCriminal(target);
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (!m_ToDelete && !Frozen)
|
||||
{
|
||||
if (m_Necromancer?.Deleted != false || m_Necromancer.Map == Map.Internal)
|
||||
{
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Combatant != m_Necromancer)
|
||||
Combatant = m_Necromancer;
|
||||
|
||||
if (!m_Necromancer.Alive)
|
||||
{
|
||||
QuestSystem qs = m_Necromancer.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest && qs.FindObjective<FindMardothEndObjective>() == null)
|
||||
qs.AddObjective(new FindMardothEndObjective(false));
|
||||
|
||||
Say(1060139, m_Necromancer.Name); // You have made my work easy for me, ~1_NAME~. My task here is done.
|
||||
|
||||
m_ToDelete = true;
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Delete);
|
||||
}
|
||||
else if (m_Necromancer.Map != Map || GetDistanceToSqrt(m_Necromancer) > RangePerception + 1)
|
||||
{
|
||||
Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 10,
|
||||
10, 2023);
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(m_Necromancer.Location, m_Necromancer.Map, EffectItem.DefaultDuration), 0x3728, 10,
|
||||
10, 5023);
|
||||
|
||||
Map = m_Necromancer.Map;
|
||||
Location = m_Necromancer.Location;
|
||||
|
||||
PlaySound(0x1FE);
|
||||
|
||||
Say(1060140); // You cannot escape me, knave of evil!
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
QuestSystem qs = m_Necromancer.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest && qs.FindObjective<FindMardothEndObjective>() == null)
|
||||
qs.AddObjective(new FindMardothEndObjective(true));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Necromancer);
|
||||
writer.Write(m_ToDelete);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Necromancer = reader.ReadMobile() as PlayerMobile;
|
||||
m_ToDelete = reader.ReadBool();
|
||||
|
||||
if (m_ToDelete)
|
||||
Delete();
|
||||
}
|
||||
|
||||
public static void BeginSummon(PlayerMobile player)
|
||||
{
|
||||
new SummonTimer(player).Start();
|
||||
}
|
||||
|
||||
private class SummonTimer : Timer
|
||||
{
|
||||
private SummonedPaladin m_Paladin;
|
||||
private PlayerMobile m_Player;
|
||||
private int m_Step;
|
||||
|
||||
public SummonTimer(PlayerMobile player) : base(TimeSpan.FromSeconds(4.0))
|
||||
{
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
|
||||
m_Player = player;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Player.Deleted)
|
||||
{
|
||||
if (m_Step > 0)
|
||||
m_Paladin.Delete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Step > 0 && m_Paladin.Deleted)
|
||||
return;
|
||||
|
||||
if (m_Step == 0)
|
||||
{
|
||||
SummonedPaladinMoongate moongate = new SummonedPaladinMoongate();
|
||||
moongate.MoveToWorld(new Point3D(2091, 1348, -90), Map.Malas);
|
||||
|
||||
Effects.PlaySound(moongate.Location, moongate.Map, 0x20E);
|
||||
|
||||
m_Paladin = new SummonedPaladin(m_Player);
|
||||
m_Paladin.Frozen = true;
|
||||
|
||||
m_Paladin.Location = moongate.Location;
|
||||
m_Paladin.Map = moongate.Map;
|
||||
|
||||
Delay = TimeSpan.FromSeconds(2.0);
|
||||
Start();
|
||||
}
|
||||
else if (m_Step == 1)
|
||||
{
|
||||
m_Paladin.Direction = m_Paladin.GetDirectionTo(m_Player);
|
||||
m_Paladin.Say(1060122); // STOP WICKED ONE!
|
||||
|
||||
Delay = TimeSpan.FromSeconds(3.0);
|
||||
Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Paladin.Frozen = false;
|
||||
|
||||
m_Paladin.Say(1060123); // I will slay you before I allow you to complete your evil rites!
|
||||
|
||||
m_Paladin.Combatant = m_Player;
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SummonedPaladinMoongate : Item
|
||||
{
|
||||
public SummonedPaladinMoongate() : base(0xF6C)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 0x482;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(10.0), Delete);
|
||||
}
|
||||
|
||||
public SummonedPaladinMoongate(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
379
Projects/Scripts/Engines/Quests/Dark Tides/Objectives.cs
Normal file
379
Projects/Scripts/Engines/Quests/Dark Tides/Objectives.cs
Normal file
|
|
@ -0,0 +1,379 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells.Necromancy;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class AnimateMaabusCorpseObjective : QuestObjective
|
||||
{
|
||||
private static QuestItemInfo[] m_Info =
|
||||
{
|
||||
new QuestItemInfo(1023643, 8787) // spellbook
|
||||
};
|
||||
|
||||
public override object Message => 1060102;
|
||||
|
||||
public override QuestItemInfo[] Info => m_Info;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new MaabasConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindCrystalCaveObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060104;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new HorusConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindMardothAboutVaultObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060106;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new MardothVaultConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindMaabusTombObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060124;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(2024, 1240, -90), 3))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new FindMaabusCorpseObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindMaabusCorpseObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1061142;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(2024, 1223, -90), 3))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new AnimateMaabusCorpseObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindCityOfLightObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060108;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(1076, 519, -90), 5))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new FindVaultOfSecretsObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindVaultOfSecretsObjective : QuestObjective
|
||||
{
|
||||
private static QuestItemInfo[] m_Info =
|
||||
{
|
||||
new QuestItemInfo(1023676, 3679) // glowing rune
|
||||
};
|
||||
|
||||
public override object Message => 1060109;
|
||||
|
||||
public override QuestItemInfo[] Info => m_Info;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(1072, 455, -90), 1))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new VaultOfSecretsConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FetchAbraxusScrollObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060196;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map != Map.Malas || !System.From.InRange(new Point3D(1076, 450, -84), 5) ||
|
||||
!SummonFamiliarSpell.Table.TryGetValue(System.From, out BaseCreature bc) || !(bc is HordeMinionFamiliar hmf) ||
|
||||
!hmf.InRange(System.From, 5) || hmf.TargetLocation != null)
|
||||
return;
|
||||
|
||||
System.From.SendLocalizedMessage(
|
||||
1060113); // You instinctively will your familiar to fetch the scroll for you.
|
||||
hmf.TargetLocation = new Point2D(1076, 450);
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new RetrieveAbraxusScrollObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class RetrieveAbraxusScrollObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060199;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new ReadAbraxusScrollConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReadAbraxusScrollObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060125;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new ReturnToCrystalCaveObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnToCrystalCaveObjective : QuestObjective
|
||||
{
|
||||
private static QuestItemInfo[] m_Info =
|
||||
{
|
||||
new QuestItemInfo(1026153, 6178) // teleporter
|
||||
};
|
||||
|
||||
public override object Message => 1060115;
|
||||
|
||||
public override QuestItemInfo[] Info => m_Info;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new SpeakCavePasswordObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SpeakCavePasswordObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060117;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SecondHorusConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindCallingScrollObjective : QuestObjective
|
||||
{
|
||||
private bool m_HealConversationShown;
|
||||
private bool m_SkitteringHoppersDisposed;
|
||||
|
||||
private int m_SkitteringHoppersKilled;
|
||||
|
||||
public override object Message => 1060119;
|
||||
|
||||
public override bool IgnoreYoungProtection(Mobile from)
|
||||
{
|
||||
return !m_SkitteringHoppersDisposed && from is SkitteringHopper;
|
||||
}
|
||||
|
||||
public override bool GetKillEvent(BaseCreature creature, Container corpse)
|
||||
{
|
||||
return !m_SkitteringHoppersDisposed;
|
||||
}
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is SkitteringHopper)
|
||||
{
|
||||
if (!m_HealConversationShown)
|
||||
{
|
||||
m_HealConversationShown = true;
|
||||
System.AddConversation(new HealConversation());
|
||||
}
|
||||
|
||||
if (++m_SkitteringHoppersKilled >= 5)
|
||||
{
|
||||
m_SkitteringHoppersDisposed = true;
|
||||
System.AddObjective(new FindHorusAboutRewardObjective());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new FindMardothAboutKronusObjective());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_SkitteringHoppersKilled = reader.ReadEncodedInt();
|
||||
m_HealConversationShown = reader.ReadBool();
|
||||
m_SkitteringHoppersDisposed = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.WriteEncodedInt(m_SkitteringHoppersKilled);
|
||||
writer.Write(m_HealConversationShown);
|
||||
writer.Write(m_SkitteringHoppersDisposed);
|
||||
}
|
||||
}
|
||||
|
||||
public class FindHorusAboutRewardObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060126;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new HorusRewardConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindMardothAboutKronusObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060127;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new MardothKronusConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindWellOfTearsObjective : QuestObjective
|
||||
{
|
||||
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D(2080, 1346, 10, 10);
|
||||
|
||||
private bool m_Inside;
|
||||
|
||||
public override object Message => 1060128;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && m_WellOfTearsArea.Contains(System.From.Location))
|
||||
{
|
||||
if (DarkTidesQuest.HasLostCallingScroll(System.From))
|
||||
{
|
||||
if (!m_Inside)
|
||||
System.AddConversation(new LostCallingScrollConversation(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
Complete();
|
||||
}
|
||||
|
||||
m_Inside = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Inside = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new UseCallingScrollObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class UseCallingScrollObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060130;
|
||||
}
|
||||
|
||||
public class FindMardothEndObjective : QuestObjective
|
||||
{
|
||||
private bool m_Victory;
|
||||
|
||||
public FindMardothEndObjective(bool victory)
|
||||
{
|
||||
m_Victory = victory;
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public FindMardothEndObjective()
|
||||
{
|
||||
}
|
||||
|
||||
public override object Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Victory) return 1060131;
|
||||
|
||||
/* Although you were slain by the cowardly paladin,
|
||||
* you managed to complete the rite of calling as
|
||||
* instructed. Return to Mardoth.
|
||||
*/
|
||||
return 1060132;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new MardothEndConversation());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Victory = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_Victory);
|
||||
}
|
||||
}
|
||||
|
||||
public class FindBankObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060134;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(2048, 1345, -84), 5))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddObjective(new CashBankCheckObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class CashBankCheckObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1060644;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new BankerConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue