Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
|
|
@ -0,0 +1,185 @@
|
|||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class AcceptConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1049092;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindEminoBeginObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindZoelConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063175;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new FindZoelObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class RadarConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063033;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class EnterCaveConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063177;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new EnterCaveObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SneakPastGuardiansConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063180;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SneakPastGuardiansObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class NeedToHideConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063181;
|
||||
}
|
||||
|
||||
public class UseTeleporterConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063182;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new UseTeleporterObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class GiveZoelNoteConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063184;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new GiveZoelNoteObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class LostNoteConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063187;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class GainInnInformationConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063189;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new GainInnInformationObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnFromInnConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063196;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new ReturnFromInnObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SearchForSwordConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063199;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SearchForSwordObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class HallwayWalkConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063201;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new HallwayWalkObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnSwordConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063203;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new ReturnSwordObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class SlayHenchmenConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063205;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new SlayHenchmenObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class ContinueSlayHenchmenConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063208;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class GiveEminoSwordConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063211;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.AddObjective(new GiveEminoSwordObjective());
|
||||
}
|
||||
}
|
||||
|
||||
public class LostSwordConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063212;
|
||||
|
||||
public override bool Logged => false;
|
||||
}
|
||||
|
||||
public class EarnGiftsConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063216;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
public class EarnLessGiftsConversation : QuestConversation
|
||||
{
|
||||
public override object Message => 1063217;
|
||||
|
||||
public override void OnRead()
|
||||
{
|
||||
System.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class EminosUndertakingQuest : QuestSystem
|
||||
{
|
||||
private static Type[] m_TypeReferenceTable =
|
||||
{
|
||||
typeof(AcceptConversation),
|
||||
typeof(FindZoelConversation),
|
||||
typeof(RadarConversation),
|
||||
typeof(EnterCaveConversation),
|
||||
typeof(SneakPastGuardiansConversation),
|
||||
typeof(NeedToHideConversation),
|
||||
typeof(UseTeleporterConversation),
|
||||
typeof(GiveZoelNoteConversation),
|
||||
typeof(LostNoteConversation),
|
||||
typeof(GainInnInformationConversation),
|
||||
typeof(ReturnFromInnConversation),
|
||||
typeof(SearchForSwordConversation),
|
||||
typeof(HallwayWalkConversation),
|
||||
typeof(ReturnSwordConversation),
|
||||
typeof(SlayHenchmenConversation),
|
||||
typeof(ContinueSlayHenchmenConversation),
|
||||
typeof(GiveEminoSwordConversation),
|
||||
typeof(LostSwordConversation),
|
||||
typeof(EarnGiftsConversation),
|
||||
typeof(EarnLessGiftsConversation),
|
||||
typeof(FindEminoBeginObjective),
|
||||
typeof(FindZoelObjective),
|
||||
typeof(EnterCaveObjective),
|
||||
typeof(SneakPastGuardiansObjective),
|
||||
typeof(UseTeleporterObjective),
|
||||
typeof(GiveZoelNoteObjective),
|
||||
typeof(GainInnInformationObjective),
|
||||
typeof(ReturnFromInnObjective),
|
||||
typeof(SearchForSwordObjective),
|
||||
typeof(HallwayWalkObjective),
|
||||
typeof(ReturnSwordObjective),
|
||||
typeof(SlayHenchmenObjective),
|
||||
typeof(GiveEminoSwordObjective)
|
||||
};
|
||||
|
||||
private bool m_SentRadarConversion;
|
||||
|
||||
public EminosUndertakingQuest(PlayerMobile from) : base(from)
|
||||
{
|
||||
}
|
||||
|
||||
// Serialization
|
||||
public EminosUndertakingQuest()
|
||||
{
|
||||
}
|
||||
|
||||
public override Type[] TypeReferenceTable => m_TypeReferenceTable;
|
||||
|
||||
public override object Name => 1063173;
|
||||
|
||||
public override object OfferMessage => 1063174;
|
||||
|
||||
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
|
||||
public override bool IsTutorial => true;
|
||||
|
||||
public override int Picture => 0x15D5;
|
||||
|
||||
public override void Accept()
|
||||
{
|
||||
base.Accept();
|
||||
|
||||
AddConversation(new AcceptConversation());
|
||||
}
|
||||
|
||||
public override void Slice()
|
||||
{
|
||||
if (!m_SentRadarConversion &&
|
||||
(From.Map != Map.Malas || From.X < 407 || From.X > 431 || From.Y < 801 || From.Y > 830))
|
||||
{
|
||||
m_SentRadarConversion = true;
|
||||
AddConversation(new RadarConversation());
|
||||
}
|
||||
|
||||
base.Slice();
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_SentRadarConversion = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_SentRadarConversion);
|
||||
}
|
||||
|
||||
public static bool HasLostNoteForZoel(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(GiveZoelNoteObjective)))
|
||||
return from.Backpack?.FindItemByType<NoteForZoel>() == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool HasLostEminosKatana(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile pm))
|
||||
return false;
|
||||
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
if (qs.IsObjectiveInProgress(typeof(GiveEminoSwordObjective)))
|
||||
return from.Backpack?.FindItemByType<EminosKatana>() == null;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class BlueNinjaQuestTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructible]
|
||||
public BlueNinjaQuestTeleporter() : base(0x51C, 0x2)
|
||||
{
|
||||
}
|
||||
|
||||
public BlueNinjaQuestTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest && qs.FindObjective<GainInnInformationObjective>() != null)
|
||||
{
|
||||
loc = new Point3D(411, 1116, 0);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class EminosKatana : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public EminosKatana() : base(0x13FF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public EminosKatana(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1063214; // Daimyo Emino's Katana
|
||||
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is EminosUndertakingQuest);
|
||||
|
||||
/*return !qs.IsObjectiveInProgress( typeof( ReturnSwordObjective ) )
|
||||
&& !qs.IsObjectiveInProgress( typeof( SlayHenchmenObjective ) )
|
||||
&& !qs.IsObjectiveInProgress( typeof( GiveEminoSwordObjective ) );*/
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class EminosKatanaChest : WoodenChest
|
||||
{
|
||||
[Constructible]
|
||||
public EminosKatanaChest()
|
||||
{
|
||||
Movable = false;
|
||||
ItemID = 0xE42;
|
||||
|
||||
GenerateTreasure();
|
||||
}
|
||||
|
||||
public EminosKatanaChest(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsDecoContainer => false;
|
||||
|
||||
private void GenerateTreasure()
|
||||
{
|
||||
for (int i = Items.Count - 1; i >= 0; i--)
|
||||
Items[i].Delete();
|
||||
|
||||
for (int i = 0; i < 75; i++)
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
DropItem(new GoldBracelet());
|
||||
break;
|
||||
case 1:
|
||||
DropItem(new GoldRing());
|
||||
break;
|
||||
case 2:
|
||||
DropItem(Loot.RandomGem());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile player && player.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
if (EminosUndertakingQuest.HasLostEminosKatana(from))
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
katana.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
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<HallwayWalkObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
GenerateTreasure();
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
katana.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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CheckItemUse(Mobile from, Item item)
|
||||
{
|
||||
return item == this;
|
||||
}
|
||||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
return true;
|
||||
|
||||
if (from is PlayerMobile player && player.Quest is EminosUndertakingQuest)
|
||||
{
|
||||
HallwayWalkObjective obj = player.Quest.FindObjective<HallwayWalkObjective>();
|
||||
if (obj?.StolenTreasure == true)
|
||||
from.SendLocalizedMessage(
|
||||
1063247); // The guard is watching you carefully! It would be unwise to remove another item from here.
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnItemLifted(Mobile from, Item item)
|
||||
{
|
||||
if (from is PlayerMobile player && player.Quest is EminosUndertakingQuest)
|
||||
{
|
||||
HallwayWalkObjective obj = player.Quest.FindObjective<HallwayWalkObjective>();
|
||||
if (obj != null)
|
||||
obj.StolenTreasure = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class GreenNinjaQuestTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructible]
|
||||
public GreenNinjaQuestTeleporter() : base(0x51C, 0x17E)
|
||||
{
|
||||
}
|
||||
|
||||
public GreenNinjaQuestTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest && qs.FindObjective<UseTeleporterObjective>() != null)
|
||||
{
|
||||
loc = new Point3D(410, 1125, 0);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class GuardianBarrier : Item
|
||||
{
|
||||
[Constructible]
|
||||
public GuardianBarrier() : base(0x3967)
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
public GuardianBarrier(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel > AccessLevel.Player)
|
||||
return true;
|
||||
|
||||
// If the mobile is to the north of the barrier, allow him to pass
|
||||
if (Y >= m.Y)
|
||||
return true;
|
||||
|
||||
if (m is BaseCreature creature)
|
||||
{
|
||||
Mobile master = creature.GetMaster();
|
||||
|
||||
// Allow creatures to cross from the south to the north only if their master is near to the north
|
||||
return master != null && Y >= master.Y && master.InRange(this, 4);
|
||||
}
|
||||
|
||||
if (m is PlayerMobile pm && pm.Quest is EminosUndertakingQuest qs)
|
||||
{
|
||||
SneakPastGuardiansObjective obj = qs.FindObjective<SneakPastGuardiansObjective>();
|
||||
if (obj != null)
|
||||
{
|
||||
if (m.Hidden)
|
||||
return true; // Hidden ninjas can pass
|
||||
|
||||
if (!obj.TaughtHowToUseSkills)
|
||||
{
|
||||
obj.TaughtHowToUseSkills = true;
|
||||
qs.AddConversation(new NeedToHideConversation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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,41 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class NoteForZoel : QuestItem
|
||||
{
|
||||
[Constructible]
|
||||
public NoteForZoel() : base(0x14EF)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x6B9;
|
||||
}
|
||||
|
||||
public NoteForZoel(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1063186; // A Note for Zoel
|
||||
|
||||
public override bool CanDrop(PlayerMobile player)
|
||||
{
|
||||
return !(player.Quest is EminosUndertakingQuest);
|
||||
|
||||
//return !qs.IsObjectiveInProgress( typeof( GiveZoelNoteObjective ) );
|
||||
}
|
||||
|
||||
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,57 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class WhiteNinjaQuestTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteNinjaQuestTeleporter() : base(0x51C, 0x47E)
|
||||
{
|
||||
}
|
||||
|
||||
public WhiteNinjaQuestTeleporter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1026157; // teleporter
|
||||
|
||||
public override int NotWorkingMessage => 1063198; // You stand on the strange floor tile but nothing happens.
|
||||
|
||||
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<SearchForSwordObjective>();
|
||||
|
||||
if (obj != null)
|
||||
{
|
||||
if (!obj.Completed)
|
||||
obj.Complete();
|
||||
|
||||
loc = new Point3D(411, 1085, 0);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class Emino : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Emino() : base("the Notorious")
|
||||
{
|
||||
}
|
||||
|
||||
public Emino(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Daimyo Emino";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203B;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new MaleKimono());
|
||||
AddItem(new SamuraiTabi());
|
||||
AddItem(new Bandana());
|
||||
|
||||
AddItem(new PlateHaidate());
|
||||
AddItem(new PlateDo());
|
||||
AddItem(new PlateHiroSode());
|
||||
|
||||
Nunchaku nunchaku = new Nunchaku();
|
||||
nunchaku.Movable = false;
|
||||
AddItem(nunchaku);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
if (EminosUndertakingQuest.HasLostNoteForZoel(player))
|
||||
{
|
||||
Item note = new NoteForZoel();
|
||||
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
qs.AddConversation(new LostNoteConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
note.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 if (EminosUndertakingQuest.HasLostEminosKatana(player))
|
||||
{
|
||||
qs.AddConversation(new LostSwordConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindEminoBeginObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<UseTeleporterObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item note = new NoteForZoel();
|
||||
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
obj.Complete();
|
||||
|
||||
player.AddToBackpack(new LeatherNinjaPants());
|
||||
player.AddToBackpack(new LeatherNinjaMitts());
|
||||
}
|
||||
else
|
||||
{
|
||||
note.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 = qs.FindObjective<ReturnFromInnObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
|
||||
cont.DropItem(new LeatherNinjaHood());
|
||||
cont.DropItem(new LeatherNinjaJacket());
|
||||
|
||||
if (player.PlaceInBackpack(cont))
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
{
|
||||
if (qs.IsObjectiveInProgress(typeof(SlayHenchmenObjective)))
|
||||
{
|
||||
qs.AddConversation(new ContinueSlayHenchmenConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<GiveEminoSwordObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = null;
|
||||
|
||||
if (player.Backpack != null)
|
||||
katana = player.Backpack.FindItemByType<EminosKatana>();
|
||||
|
||||
if (katana != null)
|
||||
{
|
||||
bool stolenTreasure = false;
|
||||
|
||||
HallwayWalkObjective walk = qs.FindObjective<HallwayWalkObjective>();
|
||||
|
||||
if (walk != null)
|
||||
stolenTreasure = walk.StolenTreasure;
|
||||
|
||||
Kama kama = new Kama();
|
||||
|
||||
if (stolenTreasure)
|
||||
BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 20);
|
||||
else
|
||||
BaseRunicTool.ApplyAttributesTo(kama, 1, 10, 30);
|
||||
|
||||
if (player.PlaceInBackpack(kama))
|
||||
{
|
||||
katana.Delete();
|
||||
obj.Complete();
|
||||
|
||||
if (stolenTreasure)
|
||||
qs.AddConversation(new EarnLessGiftsConversation());
|
||||
else
|
||||
qs.AddConversation(new EarnGiftsConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
kama.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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (!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,54 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class EnshroudedFigure : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public EnshroudedFigure()
|
||||
{
|
||||
}
|
||||
|
||||
public EnshroudedFigure(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "an enshrouded figure";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x8401;
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new DeathShroud());
|
||||
AddItem(new ThighBoots());
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class Henchman : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Henchman() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(45, 30, 5);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this);
|
||||
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaPants());
|
||||
AddItem(new NinjaTabi());
|
||||
|
||||
if (Utility.RandomBool())
|
||||
AddItem(new Kama());
|
||||
else
|
||||
AddItem(new Tessen());
|
||||
|
||||
SetSkill(SkillName.Swords, 50.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
}
|
||||
|
||||
public Henchman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "a henchman";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class HiddenFigure : BaseQuester
|
||||
{
|
||||
public static int[] Messages =
|
||||
{
|
||||
1063191, // They won<6F>t find me here.
|
||||
1063192 // Ah, a quiet hideout.
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public HiddenFigure()
|
||||
{
|
||||
Message = Utility.RandomList(Messages);
|
||||
}
|
||||
|
||||
public HiddenFigure(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Message{ get; set; }
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = Utility.RandomBool();
|
||||
|
||||
if (Female)
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new TattsukeHakama(GetRandomHue()));
|
||||
AddItem(new Kasa());
|
||||
AddItem(new HakamaShita(GetRandomHue()));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
AddItem(new Shoes(GetShoeHue()));
|
||||
else
|
||||
AddItem(new Sandals(GetShoeHue()));
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, Message, player.NetState);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(Message);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
Message = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class JedahEntille : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public JedahEntille() : base("the Silent")
|
||||
{
|
||||
}
|
||||
|
||||
public JedahEntille(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Jedah Entille";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x6BE;
|
||||
|
||||
AddItem(new PlainDress(0x528));
|
||||
AddItem(new ThighBoots());
|
||||
AddItem(new FloppyHat());
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class Zoel : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Zoel() : base("the Masterful Tactician")
|
||||
{
|
||||
}
|
||||
|
||||
public Zoel(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Elite Ninja Zoel";
|
||||
|
||||
public override int TalkNumber => -1;
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83FE;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
HairItemID = 0x203B;
|
||||
HairHue = 0x901;
|
||||
|
||||
AddItem(new HakamaShita(0x1));
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new TattsukeHakama());
|
||||
AddItem(new Bandana());
|
||||
|
||||
AddItem(new LeatherNinjaBelt());
|
||||
|
||||
Tekagi tekagi = new Tekagi();
|
||||
tekagi.Movable = false;
|
||||
AddItem(tekagi);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is EminosUndertakingQuest;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindZoelObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is EminosUndertakingQuest)
|
||||
if (dropped is NoteForZoel)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<GiveZoelNoteObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (!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,218 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Ninja
|
||||
{
|
||||
public class FindEminoBeginObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063174;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new FindZoelConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class FindZoelObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063176;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new EnterCaveConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class EnterCaveObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063179;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(406, 1141, 0), 2))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SneakPastGuardiansConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class SneakPastGuardiansObjective : QuestObjective
|
||||
{
|
||||
public bool TaughtHowToUseSkills{ get; set; }
|
||||
|
||||
public override object Message => 1063261;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
if (System.From.Map == Map.Malas && System.From.InRange(new Point3D(412, 1123, 0), 3))
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new UseTeleporterConversation());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
TaughtHowToUseSkills = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(TaughtHowToUseSkills);
|
||||
}
|
||||
}
|
||||
|
||||
public class UseTeleporterObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063183;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new GiveZoelNoteConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class GiveZoelNoteObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063185;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new GainInnInformationConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class GainInnInformationObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063190;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
Mobile from = System.From;
|
||||
|
||||
if (from.Map == Map.Malas && from.X > 399 && from.X < 408 && from.Y > 1091 && from.Y < 1099)
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new ReturnFromInnConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnFromInnObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063197;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SearchForSwordConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class SearchForSwordObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063200;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new HallwayWalkConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class HallwayWalkObjective : QuestObjective
|
||||
{
|
||||
public bool StolenTreasure{ get; set; }
|
||||
|
||||
public override object Message => 1063202;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new ReturnSwordConversation());
|
||||
}
|
||||
|
||||
public override void ChildDeserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
StolenTreasure = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void ChildSerialize(GenericWriter writer)
|
||||
{
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(StolenTreasure);
|
||||
}
|
||||
}
|
||||
|
||||
public class ReturnSwordObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063204;
|
||||
|
||||
public override void CheckProgress()
|
||||
{
|
||||
Mobile from = System.From;
|
||||
|
||||
if (from.Map != Map.Malas || from.Y > 992)
|
||||
Complete();
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new SlayHenchmenConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class SlayHenchmenObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063206;
|
||||
|
||||
public override int MaxProgress => 3;
|
||||
|
||||
public override void RenderProgress(BaseQuestGump gump)
|
||||
{
|
||||
if (!Completed)
|
||||
{
|
||||
// Henchmen killed:
|
||||
gump.AddHtmlLocalized(70, 260, 270, 100, 1063207, BaseQuestGump.Blue);
|
||||
gump.AddLabel(70, 280, 0x64, CurProgress.ToString());
|
||||
gump.AddLabel(100, 280, 0x64, "/");
|
||||
gump.AddLabel(130, 280, 0x64, MaxProgress.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderProgress(gump);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnKill(BaseCreature creature, Container corpse)
|
||||
{
|
||||
if (creature is Henchman)
|
||||
CurProgress++;
|
||||
}
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
System.AddConversation(new GiveEminoSwordConversation());
|
||||
}
|
||||
}
|
||||
|
||||
public class GiveEminoSwordObjective : QuestObjective
|
||||
{
|
||||
public override object Message => 1063210;
|
||||
|
||||
public override void OnComplete()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue