Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
308
Scripts/Quests/The Ritual/Items.cs
Normal file
308
Scripts/Quests/The Ritual/Items.cs
Normal file
@@ -0,0 +1,308 @@
|
||||
using System;
|
||||
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Spells;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.RitualQuest
|
||||
{
|
||||
public class DreamSerpentScale : BaseDecayingItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1151167; } } // Dream Serpent Scales
|
||||
public override int Lifespan { get { return 86400; } }
|
||||
public override bool HiddenQuestItemHue { get { return true; } }
|
||||
|
||||
public DreamSerpentScale()
|
||||
: base(0x1F13)
|
||||
{
|
||||
Hue = 2069;
|
||||
QuestItem = true;
|
||||
}
|
||||
|
||||
public override bool DropToWorld(Mobile from, Point3D p)
|
||||
{
|
||||
Delete();
|
||||
|
||||
from.SendLocalizedMessage(500461); // You destroy the item.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1075269); // Destroyed when dropped
|
||||
}
|
||||
|
||||
public DreamSerpentScale(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class DreamSerpentCharm : BaseDecayingItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1151187; } } // Dream Serpent Charm
|
||||
public override int Lifespan { get { return 86400; } }
|
||||
|
||||
public DreamSerpentCharm()
|
||||
: base(6463)
|
||||
{
|
||||
Hue = 91;
|
||||
}
|
||||
|
||||
private static Rectangle2D WarpBounds = new Rectangle2D(659, 3815, 6, 8);
|
||||
private static TimeSpan WarpTime = TimeSpan.FromSeconds(30);
|
||||
private static TimeSpan Cooldown = TimeSpan.FromMinutes(1);
|
||||
|
||||
private DateTime _NextUse;
|
||||
private Timer _Timer;
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (_NextUse > DateTime.UtcNow)
|
||||
{
|
||||
m.SendLocalizedMessage(1072529, String.Format("{0}\t{1}", ((int)(_NextUse - DateTime.UtcNow).TotalSeconds).ToString(), "seconds"));
|
||||
}
|
||||
else if (m is PlayerMobile)
|
||||
{
|
||||
var quest = QuestHelper.GetQuest<CatchMeIfYouCanQuest>((PlayerMobile)m);
|
||||
|
||||
if (quest != null && SpellHelper.CheckCanTravel(m) && _Timer == null && WarpBounds.Contains(m.Location))
|
||||
{
|
||||
TeleportTo(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TeleportTo(Mobile m)
|
||||
{
|
||||
BaseCreature.TeleportPets(m, new Point3D(403, 3391, 38), Map.TerMur);
|
||||
m.MoveToWorld(new Point3D(403, 3391, 38), Map.TerMur);
|
||||
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
||||
|
||||
_Timer = Timer.DelayCall(WarpTime, () =>
|
||||
{
|
||||
TeleportFrom(m, this, false);
|
||||
});
|
||||
}
|
||||
|
||||
public static void CompleteQuest(Mobile m)
|
||||
{
|
||||
DreamSerpentCharm charm = m.Backpack.FindItemByType<DreamSerpentCharm>();
|
||||
|
||||
TeleportFrom(m, charm, true);
|
||||
}
|
||||
|
||||
public static void TeleportFrom(Mobile m, DreamSerpentCharm charm, bool completeQuest)
|
||||
{
|
||||
BaseCreature.TeleportPets(m, new Point3D(662, 3819, -43), Map.TerMur);
|
||||
m.MoveToWorld(new Point3D(662, 3819, -43), Map.TerMur);
|
||||
m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
|
||||
|
||||
if (charm._Timer != null)
|
||||
{
|
||||
charm._Timer.Stop();
|
||||
charm._Timer = null;
|
||||
}
|
||||
|
||||
charm._NextUse = DateTime.UtcNow + Cooldown;
|
||||
|
||||
if (!completeQuest && m is PlayerMobile)
|
||||
{
|
||||
var quest = QuestHelper.GetQuest<CatchMeIfYouCanQuest>((PlayerMobile)m);
|
||||
|
||||
quest.Objectives[0].CurProgress = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public DreamSerpentCharm(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class SoulbinderTear : BaseDecayingItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1151170; } } // Soulbinder's Tears
|
||||
public override int Lifespan { get { return 86400; } }
|
||||
public override bool HiddenQuestItemHue { get { return true; } }
|
||||
|
||||
public SoulbinderTear()
|
||||
: base(0xE2A)
|
||||
{
|
||||
Hue = 2076;
|
||||
QuestItem = true;
|
||||
}
|
||||
|
||||
public override bool DropToWorld(Mobile from, Point3D p)
|
||||
{
|
||||
Delete();
|
||||
|
||||
from.SendLocalizedMessage(500461); // You destroy the item.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1075269); // Destroyed when dropped
|
||||
}
|
||||
|
||||
public SoulbinderTear(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class PristineCrystalLotus : BaseDecayingItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1151169; } } // Pristine Crystal Lotus
|
||||
public override int Lifespan { get { return 86400; } }
|
||||
public override bool HiddenQuestItemHue { get { return true; } }
|
||||
|
||||
public PristineCrystalLotus()
|
||||
: base(0x283B)
|
||||
{
|
||||
Hue = 1152;
|
||||
QuestItem = true;
|
||||
}
|
||||
|
||||
public override bool DropToWorld(Mobile from, Point3D p)
|
||||
{
|
||||
Delete();
|
||||
|
||||
from.SendLocalizedMessage(500461); // You destroy the item.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1075269); // Destroyed when dropped
|
||||
}
|
||||
|
||||
public PristineCrystalLotus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class ChronicleOfTheGargoyleQueen2 : GargishDocumentBook
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
for (int i = 0; i < 42; i++)
|
||||
{
|
||||
m_Contents[i] = 1150976 + i;
|
||||
}
|
||||
}
|
||||
|
||||
private static int[] m_Contents = new int[42];
|
||||
|
||||
public override object Title { get { return 1151164; } } // Chronicle of the Gargoyle Queen Vol. II
|
||||
public override object Author { get { return "Queen Zhah"; } }
|
||||
public override int[] Contents { get { return m_Contents; } }
|
||||
|
||||
[Constructable]
|
||||
public ChronicleOfTheGargoyleQueen2()
|
||||
{
|
||||
Hue = 573;
|
||||
}
|
||||
|
||||
public ChronicleOfTheGargoyleQueen2(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int v = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class TerMurSnowglobe : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1151172; } } // Ter Mur Snowglobe
|
||||
|
||||
public TerMurSnowglobe()
|
||||
: base(0xE2F)
|
||||
{
|
||||
Light = LightType.Circle150;
|
||||
Hue = 2599;
|
||||
}
|
||||
|
||||
public TerMurSnowglobe(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
301
Scripts/Quests/The Ritual/Mobiles.cs
Normal file
301
Scripts/Quests/The Ritual/Mobiles.cs
Normal file
@@ -0,0 +1,301 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.RitualQuest
|
||||
{
|
||||
public class Prugyilonus : MondainQuester
|
||||
{
|
||||
public static Prugyilonus Instance { get; set; }
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (Core.SA && Instance == null)
|
||||
{
|
||||
Instance = new Prugyilonus();
|
||||
Instance.MoveToWorld(new Point3D(750, 3344, 61), Map.TerMur);
|
||||
}
|
||||
}
|
||||
|
||||
public override Type[] Quests { get { return new Type[] { typeof(ScalesOfADreamSerpentQuest) }; } }
|
||||
|
||||
public Prugyilonus()
|
||||
: base("Prugyilonus", "the Advisor to the Queen")
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
Race = Race.Gargoyle;
|
||||
|
||||
CantWalk = true;
|
||||
|
||||
Hue = 34547;
|
||||
HairItemID = Race.RandomHair(false);
|
||||
HairHue = Race.RandomHairHue();
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
SetWearable(new GargishFancyRobe(), 1345);
|
||||
}
|
||||
|
||||
public Prugyilonus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
if (Core.SA)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Bexil : MondainQuester
|
||||
{
|
||||
public override Type[] Quests { get { return new Type[] { typeof(CatchMeIfYouCanQuest) }; } }
|
||||
|
||||
public static Bexil Instance { get; set; }
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if(Core.SA && Instance == null)
|
||||
{
|
||||
Instance = new Bexil();
|
||||
Instance.MoveToWorld(new Point3D(662, 3819, -43), Map.TerMur);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (m.Backpack.GetAmount(typeof(DreamSerpentScale)) == 0)
|
||||
{
|
||||
base.OnDoubleClick(m);
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(m, 1151355, 0x3B2); // You may not obtain more than one of this item.
|
||||
SayTo(m, 1080107, 0x3B2); // I'm sorry, I have nothing for you at this time.
|
||||
}
|
||||
}
|
||||
|
||||
public Bexil()
|
||||
: base("Bexil", "the Dream Serpent")
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
Body = 0xCE;
|
||||
Hue = 2069;
|
||||
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public Bexil(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
if (Core.SA)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BexilPunchingBag : BaseCreature
|
||||
{
|
||||
public override bool InitialInnocent { get { return true; } }
|
||||
|
||||
private Dictionary<Mobile, int> _Table = new Dictionary<Mobile, int>();
|
||||
private DateTime _NextTeleport;
|
||||
|
||||
public BexilPunchingBag()
|
||||
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.4, 0.8)
|
||||
{
|
||||
Name = "Bexil";
|
||||
Title = "the Dream Serpent";
|
||||
|
||||
Body = 0xCE;
|
||||
Hue = 1976;
|
||||
BaseSoundID = 0x5A;
|
||||
|
||||
SetHits(1000000);
|
||||
}
|
||||
|
||||
private IDamageable _Combatant;
|
||||
|
||||
public override IDamageable Combatant
|
||||
{
|
||||
get { return _Combatant; }
|
||||
set { _Combatant = value; }
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if (Combatant is Mobile && _NextTeleport < DateTime.UtcNow)
|
||||
{
|
||||
var map = Map;
|
||||
var c = (Mobile)Combatant;
|
||||
|
||||
Point3D p;
|
||||
|
||||
do
|
||||
{
|
||||
int x = X + Utility.RandomMinMax(-10, 10);
|
||||
int y = Y + Utility.RandomMinMax(-10, 10);
|
||||
|
||||
p = new Point3D(x, y, map.GetAverageZ(x, y));
|
||||
}
|
||||
while (!map.CanSpawnMobile(p.X, p.Y, map.GetAverageZ(p.X, p.Y)) || !Region.Find(p, map).IsPartOf<CatchMeIfYouCanQuest.BexilRegion>());
|
||||
|
||||
Effects.SendLocationParticles(EffectItem.Create(Location, map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
|
||||
MoveToWorld(p, map);
|
||||
Effects.SendLocationParticles(EffectItem.Create(Location, map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
|
||||
|
||||
_NextTeleport = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(1, 3));
|
||||
}
|
||||
}
|
||||
|
||||
public override int Damage(int amount, Mobile from, bool informMount, bool checkDisrupt)
|
||||
{
|
||||
if (from is PlayerMobile)
|
||||
{
|
||||
var quest = QuestHelper.GetQuest<CatchMeIfYouCanQuest>((PlayerMobile)from);
|
||||
|
||||
if (quest != null)
|
||||
{
|
||||
quest.Objectives[0].Update(this);
|
||||
|
||||
if (quest.Completed)
|
||||
{
|
||||
DreamSerpentCharm.CompleteQuest(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void Delete()
|
||||
{
|
||||
var bex = new BexilPunchingBag();
|
||||
bex.MoveToWorld(new Point3D(403, 3391, 38), Map.TerMur);
|
||||
|
||||
base.Delete();
|
||||
}
|
||||
|
||||
public BexilPunchingBag(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
if (!Core.SA)
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Grubbix : MondainQuester
|
||||
{
|
||||
public override Type[] Quests { get { return new Type[] { typeof(FilthyLifeStealersQuest) }; } }
|
||||
|
||||
public static Grubbix Instance { get; set; }
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (Core.SA && Instance == null)
|
||||
{
|
||||
Instance = new Grubbix();
|
||||
Instance.MoveToWorld(new Point3D(1106, 3138, -43), Map.TerMur);
|
||||
}
|
||||
}
|
||||
|
||||
public Grubbix()
|
||||
: base("Grubbix", "the Soulbinder")
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
CantWalk = true;
|
||||
|
||||
InitStats(100, 100, 25);
|
||||
Body = 0x100;
|
||||
Hue = 2076;
|
||||
}
|
||||
|
||||
public Grubbix(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
if (Core.SA)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
456
Scripts/Quests/The Ritual/Puzzle.cs
Normal file
456
Scripts/Quests/The Ritual/Puzzle.cs
Normal file
@@ -0,0 +1,456 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.RitualQuest
|
||||
{
|
||||
public class CrystalLotusPuzzle : Item
|
||||
{
|
||||
public static CrystalLotusPuzzle Instance { get; set; }
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (Core.SA && Instance == null)
|
||||
{
|
||||
Instance = new CrystalLotusPuzzle();
|
||||
Instance.MoveToWorld(new Point3D(978, 2876, 37), Map.TerMur);
|
||||
|
||||
var s = new Static(0x283B);
|
||||
s.Hue = 1152;
|
||||
s.Name = "Pristine Crystal Lotus";
|
||||
s.MoveToWorld(new Point3D(978, 2876, 47), Map.TerMur);
|
||||
}
|
||||
}
|
||||
|
||||
public List<PuzzleTile> Tiles { get; set; } = new List<PuzzleTile>();
|
||||
public PuzzleTile[] Order { get; set; }
|
||||
public bool Sequencing { get; set; }
|
||||
public Region Region { get; set; }
|
||||
|
||||
public Dictionary<Mobile, PuzzleTile[]> PlayerOrder { get; set; }
|
||||
|
||||
public const int White = 1150; // hue of white tile
|
||||
public const double WhiteLength = 1.2; // length tile stays white
|
||||
public const double SequenceLength = 17.0;
|
||||
|
||||
public CrystalLotusPuzzle()
|
||||
: base(0x1223)
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
LoadTiles();
|
||||
|
||||
RegisterRegion();
|
||||
DoSequence();
|
||||
}
|
||||
|
||||
private void DoSequence()
|
||||
{
|
||||
if (Region != null && Region.GetPlayerCount() == 0)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(10), DoSequence);
|
||||
return;
|
||||
}
|
||||
|
||||
Sequencing = true;
|
||||
|
||||
var seqCount = Utility.RandomMinMax(4, 7);
|
||||
Order = new PuzzleTile[seqCount];
|
||||
|
||||
PlayerOrder = new Dictionary<Mobile, PuzzleTile[]>();
|
||||
|
||||
for (int i = 0; i < seqCount; i++)
|
||||
{
|
||||
Order[i] = Tiles[Utility.Random(Tiles.Count)];
|
||||
|
||||
Timer.DelayCall<PuzzleTile, int>(TimeSpan.FromSeconds(i * WhiteLength), (tile, index) =>
|
||||
{
|
||||
tile.Hue = White;
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(WhiteLength), t =>
|
||||
{
|
||||
t.Hue = tile.OriginalHue;
|
||||
}, tile);
|
||||
|
||||
if (index == seqCount - 1)
|
||||
{
|
||||
Sequencing = false;
|
||||
|
||||
IPooledEnumerable eable = Map.TerMur.GetClientsInRange(Location, 20);
|
||||
|
||||
foreach (NetState ns in eable)
|
||||
{
|
||||
if (ns.Mobile != null && ns.Mobile is PlayerMobile && QuestHelper.HasQuest<PristineCrystalLotusQuest>((PlayerMobile)ns.Mobile))
|
||||
{
|
||||
ns.Mobile.SendLocalizedMessage(1151300, "", White); // Complete the puzzle to obtain a Pristine Crystal Lotus.
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(Math.Max(SequenceLength, seqCount * 3)), DoSequence);
|
||||
}
|
||||
}, Order[i], i);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTileClicked(Mobile from, PuzzleTile tile)
|
||||
{
|
||||
if (Sequencing)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (from is PlayerMobile)
|
||||
{
|
||||
var quest = QuestHelper.GetQuest<PristineCrystalLotusQuest>((PlayerMobile)from);
|
||||
|
||||
if (quest != null)
|
||||
{
|
||||
if (!PlayerOrder.ContainsKey(from))
|
||||
{
|
||||
PlayerOrder[from] = new PuzzleTile[Order.Length];
|
||||
}
|
||||
|
||||
var list = PlayerOrder[from];
|
||||
|
||||
for (int i = 0; i < Order.Length; i++)
|
||||
{
|
||||
var actual = Order[i];
|
||||
|
||||
if (list[i] == null)
|
||||
{
|
||||
list[i] = tile;
|
||||
|
||||
if (i == Order.Length - 1)
|
||||
{
|
||||
if (CheckMatch(list))
|
||||
{
|
||||
from.SendLocalizedMessage(1151304); // You matched that pattern correctly.
|
||||
|
||||
quest.PuzzlesComplete++;
|
||||
|
||||
if (quest.PuzzlesComplete >= 5)
|
||||
{
|
||||
from.SendLocalizedMessage(1151306); // You may now retrieve a Pristine Crystal Lotus.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1151305); // You did not complete the pattern correctly.
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckMatch(PuzzleTile[] list)
|
||||
{
|
||||
for (int i = 0; i < Order.Length; i++)
|
||||
{
|
||||
if (Order[i] != list[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech { get { return true; } }
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
var pm = e.Mobile as PlayerMobile;
|
||||
|
||||
if (pm == null)
|
||||
return;
|
||||
|
||||
if (e.Speech.ToLower() == "i seek the lotus")
|
||||
{
|
||||
var quest = QuestHelper.GetQuest<PristineCrystalLotusQuest>(pm);
|
||||
|
||||
if (quest != null)
|
||||
{
|
||||
pm.SendLocalizedMessage(1151300); // Complete the puzzle to obtain a Pristine Crystal Lotus.
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1151301); // You marvel at the flashing tiles.
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.Speech.ToLower() == "give me the lotus")
|
||||
{
|
||||
var quest = QuestHelper.GetQuest<PristineCrystalLotusQuest>(pm);
|
||||
|
||||
if (quest != null)
|
||||
{
|
||||
if (quest.PuzzlesComplete < 5)
|
||||
{
|
||||
pm.SendLocalizedMessage(1151303); // You have not completed the puzzle.
|
||||
}
|
||||
else if (!quest.ReceivedLotus)
|
||||
{
|
||||
var lotus = new PristineCrystalLotus();
|
||||
pm.AddToBackpack(lotus);
|
||||
pm.SendLocalizedMessage(1151302); // A Pristine Crystal Lotus has been placed in your backpack.
|
||||
|
||||
QuestHelper.CheckRewardItem(pm, lotus);
|
||||
|
||||
quest.ReceivedLotus = true;
|
||||
}
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LoadTiles()
|
||||
{
|
||||
var map = Map.TerMur;
|
||||
|
||||
//West
|
||||
PuzzleTile tile = new PuzzleTile(this, 33, 0);
|
||||
tile.MoveToWorld(new Point3D(971, 2876, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 14, 0);
|
||||
tile.MoveToWorld(new Point3D(971, 2878, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 1195, 0);
|
||||
tile.MoveToWorld(new Point3D(972, 2877, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 63, 0);
|
||||
tile.MoveToWorld(new Point3D(973, 2876, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
// NorthWest
|
||||
tile = new PuzzleTile(this, 63, 1);
|
||||
tile.MoveToWorld(new Point3D(978, 2868, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 1195, 1);
|
||||
tile.MoveToWorld(new Point3D(979, 2868, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 14, 1);
|
||||
tile.MoveToWorld(new Point3D(979, 2869, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 33, 1);
|
||||
tile.MoveToWorld(new Point3D(980, 2870, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
// NorthEast
|
||||
tile = new PuzzleTile(this, 33, 2);
|
||||
tile.MoveToWorld(new Point3D(985, 2870, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 1195, 2);
|
||||
tile.MoveToWorld(new Point3D(986, 2870, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 63, 2);
|
||||
tile.MoveToWorld(new Point3D(985, 2871, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 14, 2);
|
||||
tile.MoveToWorld(new Point3D(986, 2871, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
// East
|
||||
tile = new PuzzleTile(this, 14, 3);
|
||||
tile.MoveToWorld(new Point3D(985, 2876, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 33, 3);
|
||||
tile.MoveToWorld(new Point3D(986, 2877, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 63, 3);
|
||||
tile.MoveToWorld(new Point3D(987, 2878, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 1195, 3);
|
||||
tile.MoveToWorld(new Point3D(988, 2879, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
// SouthEast
|
||||
tile = new PuzzleTile(this, 1195, 4);
|
||||
tile.MoveToWorld(new Point3D(982, 2881, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 33, 4);
|
||||
tile.MoveToWorld(new Point3D(982, 2882, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 63, 4);
|
||||
tile.MoveToWorld(new Point3D(982, 2883, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 14, 4);
|
||||
tile.MoveToWorld(new Point3D(981, 2883, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
// SouthWest
|
||||
tile = new PuzzleTile(this, 33, 5);
|
||||
tile.MoveToWorld(new Point3D(975, 2882, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 14, 5);
|
||||
tile.MoveToWorld(new Point3D(976, 2883, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 63, 5);
|
||||
tile.MoveToWorld(new Point3D(975, 2884, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
tile = new PuzzleTile(this, 1195, 5);
|
||||
tile.MoveToWorld(new Point3D(976, 2885, 37), map);
|
||||
Tiles.Add(tile);
|
||||
|
||||
Teleporter tele = new Teleporter(new Point3D(1050, 2940, 38), map, false);
|
||||
tele.MoveToWorld(new Point3D(1018, 2915, 38), map);
|
||||
Static sparkles = new Static(0x373A);
|
||||
sparkles.MoveToWorld(new Point3D(1018, 2915, 38), map);
|
||||
|
||||
tele = new Teleporter(new Point3D(1018, 2915, 38), map, false);
|
||||
tele.MoveToWorld(new Point3D(1050, 2940, 38), map);
|
||||
sparkles = new Static(0x373A);
|
||||
sparkles.MoveToWorld(new Point3D(1050, 2940, 38), map);
|
||||
}
|
||||
|
||||
public override void Delete()
|
||||
{
|
||||
base.Delete();
|
||||
|
||||
var s = Map.TerMur.FindItem<Static>(new Point3D(978, 2876, 47));
|
||||
}
|
||||
|
||||
private void RegisterRegion()
|
||||
{
|
||||
Region = new Region("Crystal Lotus Puzzle Region", Map.TerMur, Region.DefaultPriority, new Rectangle2D(945, 2858, 66, 62));
|
||||
Region.Register();
|
||||
}
|
||||
|
||||
public CrystalLotusPuzzle(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.WriteItemList(Tiles, true);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
Tiles = reader.ReadStrongItemList<PuzzleTile>();
|
||||
|
||||
if (Core.SA)
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
foreach (var tile in Tiles)
|
||||
{
|
||||
tile.Puzzle = this;
|
||||
}
|
||||
|
||||
RegisterRegion();
|
||||
DoSequence();
|
||||
}
|
||||
else
|
||||
{
|
||||
ColUtility.SafeDelete(Tiles);
|
||||
ColUtility.Free(Tiles);
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PuzzleTile : Item
|
||||
{
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CrystalLotusPuzzle Puzzle { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int OriginalHue { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Group { get; private set; }
|
||||
|
||||
public override bool ForceShowProperties { get { return true; } }
|
||||
|
||||
public PuzzleTile(CrystalLotusPuzzle puzzle, int hue, int group)
|
||||
: base(0x519)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = hue;
|
||||
Group = group;
|
||||
|
||||
OriginalHue = hue;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (Puzzle == null)
|
||||
return;
|
||||
|
||||
if (m.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
Puzzle.OnTileClicked(m, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
m.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public PuzzleTile(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(OriginalHue);
|
||||
writer.Write(Group);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
OriginalHue = reader.ReadInt();
|
||||
Group = reader.ReadInt();
|
||||
|
||||
if (Hue != OriginalHue)
|
||||
{
|
||||
Hue = OriginalHue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
378
Scripts/Quests/The Ritual/Quests.cs
Normal file
378
Scripts/Quests/The Ritual/Quests.cs
Normal file
@@ -0,0 +1,378 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Engines.Quests.RitualQuest
|
||||
{
|
||||
public class ScalesOfADreamSerpentQuest : BaseQuest
|
||||
{
|
||||
public override QuestChain ChainID { get { return QuestChain.Ritual; } }
|
||||
public override Type NextQuest { get { return typeof(TearsOfASoulbinderQuest); } }
|
||||
|
||||
public override object Title { get { return 1151122; } } // Ritual: Scales of a Dream Serpent
|
||||
|
||||
public override object Description { get { return 1151123; } }
|
||||
/*Greetings, adventurer. Our queen has need of your services again, should you be willing to come to her aid.<br><br>
|
||||
As you may know, her Majesty has spent the past thousand years diligently researching ways in which she could defeat the
|
||||
Defiler. I have personally assisted her in this effort and we have discovered a ritual which will magnify the cleansing
|
||||
magic that she originally used against him, potentially breaking the barrier that protects the Defiler’s body from harm.
|
||||
<br><br> The ritual is ancient, dangerous, and requires many obscure components that are not easy to obtain. Her
|
||||
Majesty has been successful in acquiring all but five of them over the years but, now, time is running out and she has
|
||||
asked me to task you with their acquisition. I have been provided with a list of the five remaining components and would
|
||||
like you to obtain them.<br><br> The first component that I require is a handful of scales from a Dream Serpent.<br><br>
|
||||
Dream Serpents are mischievous but benevolent creatures that live off of magical energy. They are extremely rare and
|
||||
hard to catch, preferring to live in the realm of dreams rather than the physical realm. However, there is one location
|
||||
within the kingdom that you may find one.<br><br> Journey once again to the Southwestern Flight Tower. On your way to
|
||||
the Athenaeum, you may have noticed a clearing surrounded by four hillocks. This location is an intersection of ley lines
|
||||
which run throughout Ter Mur. Ley lines are energized, concentrated strands of magical energy and thus they are
|
||||
irresistible to the creatures. If my calculations are correct, you should find a serpent and be able to interact with the
|
||||
creature. Heed my warning, adventurer: you should not seek to harm the beast. Offensive tactics must be avoided at all
|
||||
costs, as these magical beings help keep the very energy of Ter Mur harnessed and in balance. Speak with the creature and
|
||||
ask for its aid, but do not harm it. When you have acquired the scales, return to me and I shall reward you and guide you
|
||||
towards the second component.*/
|
||||
|
||||
public override object Refuse { get { return 1151124; } }
|
||||
/*You do not wish to assist us? Then we shall wait for someone who does not wish to sit idly by while our people suffer.
|
||||
Be gone from my sight, coward.*/
|
||||
|
||||
public override object Uncomplete { get { return 1151125; } } // Were you able to acquire the scales? Please do not dally, adventurer!
|
||||
|
||||
public override object Complete { get { return 1151126; } }
|
||||
/*You have the scales? Excellent! <br><br> We are now one step closer to completing the list of components for the ritual,
|
||||
my friend. With your assistance, I believe we will be able to acquire all of them just in time.<br><br> Now, on to the next
|
||||
component.*/
|
||||
|
||||
public ScalesOfADreamSerpentQuest()
|
||||
{
|
||||
AddObjective(new ObtainObjective(typeof(DreamSerpentScale), "Dream Serpent Scales", 1, 0x1F13, 0, 1976)); // TODO: Get ID
|
||||
AddReward(new BaseReward(1151384)); // The gratitude of the Gargoyle Queen and the next quest in the chain.
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class TearsOfASoulbinderQuest : BaseQuest
|
||||
{
|
||||
public override QuestChain ChainID { get { return QuestChain.Ritual; } }
|
||||
public override Type NextQuest { get { return typeof(PristineCrystalLotusQuest); } }
|
||||
|
||||
public override object Title { get { return 1151131; } } // Ritual: Tears of a Soulbinder
|
||||
|
||||
public override object Description { get { return 1151132; } }
|
||||
/*I fear I must now send you to convene with a creature that may not prove as willing to help as the ones you have encountered
|
||||
previously, my friend. I require the crystallized tear of a Soulbinder, a malevolent creature that prefers to roam the desolate
|
||||
edges of Ter Mur where the Void has consumed much of the area.<br><br><br> Spawned from the depths of the Abyss, the
|
||||
Soulbinder is a vile and disgusting creature that prefers to consume its victims alive, devouring their souls during its
|
||||
digestion. It is the spirit of its prey that nourishes the beast, and this hunger is the only thing the beast knows. I
|
||||
know not how you will cause one of these monsters to shed a tear, but I believe you are resourceful enough to find a way.
|
||||
<br><br><br> Journey to the northeast, and follow the twisting strips of land surrounded by the Void; you should be able
|
||||
to locate a path to the lair of this foul thing. I wish I could provide you with guidance regarding approaching the beast,
|
||||
but I have been unable to discern anything beyond its location. Be on your guard, adventurer, and be prepared to do battle
|
||||
should the beast prove hostile.<br><br><br>*/
|
||||
|
||||
public override object Refuse { get { return 1151124; } }
|
||||
/*You do not wish to assist us? Then we shall wait for someone who does not wish to sit idly by while our people suffer.
|
||||
Be gone from my sight, coward.*/
|
||||
|
||||
public override object Uncomplete { get { return 1151133; } } // Were you able to obtain the Soulbinder's Tear?
|
||||
|
||||
public override object Complete { get { return 1151134; } }
|
||||
/*You continue to amaze me, my friend. I will admit I was concerned that the Soulbinder would prove to be too much of a
|
||||
challenge and, yet, here you are. <br><br>Are you ready to go after the next component?*/
|
||||
|
||||
public TearsOfASoulbinderQuest()
|
||||
{
|
||||
AddObjective(new ObtainObjective(typeof(SoulbinderTear), "Soulbinders Tears", 1, 0xE2A, 0, 2076));
|
||||
AddReward(new BaseReward(1151384)); // The gratitude of the Gargoyle Queen and the next quest in the chain.
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class PristineCrystalLotusQuest : BaseQuest
|
||||
{
|
||||
public override QuestChain ChainID { get { return QuestChain.Ritual; } }
|
||||
public override Type NextQuest { get { return null; } }
|
||||
|
||||
public override object Title { get { return 1151136; } } // Ritual: Pristine Crystal Lotus
|
||||
|
||||
public override object Description { get { return 1151135; } }
|
||||
/*Now, you must traverse the northern desert. On the far edge, you will find a teleporter similar to that which you took
|
||||
to the Athenaeum Isle. This will take you to a barren, small, and twisted piece of land that was long ago drained by the
|
||||
Void. <br><br> The next component will be found there: a pristine crystal lotus. Long ago, what is now desert was a
|
||||
beautiful field of these flowers. Sadly, the Defiler's magic drained the land of life and energy, causing the land to
|
||||
become the wasteland it is today. However, one bloom remains, and it is that bloom you must acquire for me.<br><br> In
|
||||
my research, I discovered that Queen Zhah’s predecessor, King Trajalem, had the only surviving bloom placed within a
|
||||
protective barrier on the island I am directing you to. No one knows exactly why he did so, but I have journeyed there
|
||||
myself and seen it with my own eyes. Unfortunately, I was not able to discern how to break the barrier protecting the
|
||||
lotus.<br><br> The lotus stands on a pedestal surrounded by a configuration of magical tiles. I feel that these tiles
|
||||
are the key to breaking the barrier and obtaining the bloom. However, their secret eluded me. What I was able to
|
||||
discover through research is that you must speak the words ‘I seek the lotus’ to activate the tiles. Additionally, if
|
||||
you do manage to satisfy the secret of the tiles, you must state ‘Give me the lotus.’<br><br> Journey to the area, my
|
||||
friend, and please obtain the lotus. If anyone can do it, I have faith that it is you.<br><br> Be well, and I look
|
||||
forward to your return.<br><br>*/
|
||||
|
||||
public override object Refuse { get { return 1151124; } }
|
||||
/*You do not wish to assist us? Then we shall wait for someone who does not wish to sit idly by while our people suffer.
|
||||
Be gone from my sight, coward.*/
|
||||
|
||||
public override object Uncomplete { get { return 1151137; } } // Have you solved the secret of the lotus, my friend?
|
||||
|
||||
public override object Complete { get { return 1151138; } }
|
||||
/*Once again, you astound me with your perserverance and triumph! I cannot thank you enough. You are truly proving
|
||||
yourself a loyal friend.<br><br>Now, only two components remain.*/
|
||||
|
||||
public int PuzzlesComplete { get; set; }
|
||||
public bool ReceivedLotus { get; set; }
|
||||
|
||||
public PristineCrystalLotusQuest()
|
||||
{
|
||||
AddObjective(new ObtainObjective(typeof(PristineCrystalLotus), "Pristine Crystal Lotus", 1, 0x283B, 0, 1152));
|
||||
|
||||
AddReward(new BaseReward(typeof(ChronicleOfTheGargoyleQueen2), 1151164)); // Chronicle of the Gargoyle Queen Vol. II
|
||||
AddReward(new BaseReward(typeof(TerMurSnowglobe), 1151172)); // Ter Mur Snowglobe
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(PuzzlesComplete);
|
||||
writer.Write(ReceivedLotus);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
PuzzlesComplete = reader.ReadInt();
|
||||
ReceivedLotus = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
|
||||
public class CatchMeIfYouCanQuest : BaseQuest
|
||||
{
|
||||
public override object Title { get { return 1151144; } } // Catch Me If You Can!
|
||||
|
||||
public override object Description { get { return 1151145; } }
|
||||
/*Oh, have you come to see me?<br><br> This is wonderful! I haven’t spoken to a mortal in so long. It can get pretty
|
||||
droll here in the realm of dreams, and I have no one to play with! There aren’t many of us left. <br><br> What’s that?
|
||||
You want something? <br><br> My scales! Ha ha! You mortals are so silly, always after something or other. <br><br>
|
||||
Well, I’ll happily give you some scales if you agree to play a game with me! I love games, don’t you? <br><br> The game
|
||||
is simple: if you can hit me 6 times, then you win! Take this stone and step into the circle here. Then, use the stone
|
||||
and it will take you to my favorite place to play! <br><br> So, shall we play? Excellent! Be sure to put away your pets
|
||||
before you teleport with me!<br>*/
|
||||
|
||||
public override object Refuse { get { return 1151146; } } // You don’t want to play? Boo! Go away!
|
||||
|
||||
public override object Uncomplete { get { return 1151147; } } // Ah ha! Looks like you are not very fast. Want to play again?
|
||||
|
||||
public override object Complete { get { return 1151148; } }
|
||||
/*Boo, I don’t like to lose! But wasn’t that fun? <br><br> Here are some of my scales; give them to the Gargoyle Queen with
|
||||
my blessing and tell her she needs to come play a game with me sometime!*/
|
||||
|
||||
public DreamSerpentCharm Charm { get; set; }
|
||||
|
||||
public CatchMeIfYouCanQuest()
|
||||
{
|
||||
AddObjective(new InternalObjective());
|
||||
AddReward(new BaseReward(typeof(DreamSerpentScale), 1151167)); // Dream Serpents Scale
|
||||
}
|
||||
|
||||
public override void OnAccept()
|
||||
{
|
||||
base.OnAccept();
|
||||
|
||||
Charm = new DreamSerpentCharm();
|
||||
Owner.AddToBackpack(Charm);
|
||||
}
|
||||
|
||||
public override void RemoveQuest(bool removeChain)
|
||||
{
|
||||
base.RemoveQuest(removeChain);
|
||||
|
||||
if (Charm != null && !Charm.Deleted)
|
||||
{
|
||||
Charm.Delete();
|
||||
Charm = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalObjective : BaseObjective
|
||||
{
|
||||
public override object ObjectiveDescription { get { return 1151213; } } // Hit the Dream Serpent 6 times before the time is up.
|
||||
|
||||
public InternalObjective()
|
||||
: base(6)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Update(object o)
|
||||
{
|
||||
CurProgress++;
|
||||
|
||||
if (Quest.Completed)
|
||||
{
|
||||
// No Gump, no message, nothing.
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class BexilRegion : BaseRegion
|
||||
{
|
||||
public override bool AllowHousing(Mobile from, Point3D p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (Core.SA)
|
||||
{
|
||||
new BexilRegion();
|
||||
}
|
||||
}
|
||||
|
||||
public BexilRegion()
|
||||
: base("Bexil Region", Map.TerMur, Region.DefaultPriority, new Rectangle2D(386, 3356, 35, 51))
|
||||
{
|
||||
Register();
|
||||
SetupRegion();
|
||||
}
|
||||
|
||||
private void SetupRegion()
|
||||
{
|
||||
var map = Map.TerMur;
|
||||
|
||||
for (int x = 390; x < 408; x++)
|
||||
{
|
||||
int z = map.GetAverageZ(x, 3360);
|
||||
|
||||
if (map.FindItem<Blocker>(new Point3D(x, 3360, z)) == null)
|
||||
{
|
||||
var blocker = new Blocker();
|
||||
blocker.MoveToWorld(new Point3D(x, 3360, z), map);
|
||||
}
|
||||
}
|
||||
|
||||
if (!GetEnumeratedMobiles().Any(m => m is BexilPunchingBag && !m.Deleted))
|
||||
{
|
||||
var bex = new BexilPunchingBag();
|
||||
bex.MoveToWorld(new Point3D(403, 3391, 38), Map.TerMur);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckTravel(Mobile traveller, Point3D p, Server.Spells.TravelCheckType type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(Charm);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
Charm = reader.ReadItem() as DreamSerpentCharm;
|
||||
}
|
||||
}
|
||||
|
||||
public class FilthyLifeStealersQuest : BaseQuest
|
||||
{
|
||||
public override object Title { get { return 1151155; } } // Filthy Lifestealers!
|
||||
|
||||
public override object Description { get { return 1151154; } }
|
||||
/*Ah, what do we have here? <br><br><br> Bah! I was so hoping you would be something other than a human, gargoyle,
|
||||
or elf. Do you know how many of them I have eaten? Your souls have filled me but, now, they are no longer appealing.
|
||||
You are in luck that I have recently eaten, however, or else I would have devoured you anyway. <br><br><br> You want
|
||||
something, yes? I can smell the desire for something on your soul. Desire used to be such a lovely dessert for me but
|
||||
now it is bland and droll. <br><br><br> My tears, eh? Ha! Such an odd request. But you have my interest piqued.
|
||||
<br><br><br> I’ll tell you what; do something for me and I will give you a bottle of tears. <br><br><br> In
|
||||
the northwest, walking the lava shores, is a creature that has vexed me for centuries. An old foe, the Lifestealer
|
||||
eats the hearts of its victims, consuming their essence in a similar fashion to how I consume their souls. Many times
|
||||
have I lost a victim to these inane creatures, and many times have I attempted to exact my vengeance. Unfortunately,
|
||||
due to my corpulent nature, I am not as fast as they are and have failed in my desire to kill them. Wouldn’t it be
|
||||
poetic? A Soulbinder consuming a Lifestealer! <br><br><br> Go to the lava shores in the northwest, mortal, and kill
|
||||
the lifestealers you find there. When you have thinned them out, return to me and I will give you what you seek.
|
||||
<br><br><br>*/
|
||||
|
||||
public override object Refuse { get { return 1151156; } }
|
||||
/*You dare refuse me? You are truly an imbecile. Ah well, I guess I shall eat you, after all! Just as soon as I finish
|
||||
digesting my last meal, that is.*/
|
||||
|
||||
public override object Uncomplete { get { return 1151157; } } // Have you killed the Lifestealers yet? Don’t try my patience, or I will eat you!
|
||||
|
||||
public override object Complete { get { return 1151158; } }
|
||||
/*I can smell their deaths upon you, mortal. Each Lifestealer you killed let loose all of the souls that they had taken,
|
||||
and I was able to draw them here with my magic. I am so full, now! I think this will hold me over for quite some time.
|
||||
<br><br><br> Here, take what you came for. While you were gone, the thought of those Lifestealers dying was enough to
|
||||
make me laugh so hard I cried. I filled this bottle for you. <br><br> Off with you, now! <br>*/
|
||||
|
||||
public FilthyLifeStealersQuest()
|
||||
{
|
||||
AddObjective(new SlayObjective(typeof(Lifestealer), "Life Stealers", 10));
|
||||
|
||||
AddReward(new BaseReward(typeof(SoulbinderTear), 1151170)); // Souldbinder's Tears
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user