Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -2,268 +2,206 @@ using Server.Items;
namespace Server.Engines.Quests.Necro
{
public class AcceptConversation : QuestConversation
{
public override object Message => 1049092;
public class AcceptConversation : QuestConversation
{
public override object Message => 1049092;
public AcceptConversation()
{
}
public override void OnRead()
{
Container bag = BaseQuester.GetNewContainer();
public override void OnRead()
{
Container bag = BaseQuester.GetNewContainer();
bag.DropItem(new DarkTidesHorn());
bag.DropItem( new DarkTidesHorn() );
System.From.AddToBackpack(bag);
System.From.AddToBackpack( bag );
System.AddConversation(new ReanimateMaabusConversation());
}
}
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 class ReanimateMaabusConversation : QuestConversation
{
public override object Message => 1060099;
public override object Message => 1060099;
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 QuestItemInfo[] Info => m_Info;
public override QuestItemInfo[] Info => m_Info;
public override void OnRead()
{
System.AddObjective(new FindMaabusTombObjective());
}
}
public ReanimateMaabusConversation()
{
}
public class MaabasConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 6178) // teleporter
};
public override void OnRead()
{
System.AddObjective( new FindMaabusTombObjective() );
}
}
public override object Message => 1060103;
public class MaabasConversation : QuestConversation
{
public override object Message => 1060103;
public override QuestItemInfo[] Info => m_Info;
private static QuestItemInfo[] m_Info = {
new QuestItemInfo( 1026153, 6178 ) // teleporter
};
public override void OnRead()
{
System.AddObjective(new FindCrystalCaveObjective());
}
}
public override QuestItemInfo[] Info => m_Info;
public class HorusConversation : QuestConversation
{
public override object Message => 1060105;
public MaabasConversation()
{
}
public override void OnRead()
{
System.AddObjective(new FindMardothAboutVaultObjective());
}
}
public override void OnRead()
{
System.AddObjective( new FindCrystalCaveObjective() );
}
}
public class MardothVaultConversation : QuestConversation
{
public override object Message => 1060107;
public class HorusConversation : QuestConversation
{
public override object Message => 1060105;
public override void OnRead()
{
System.AddObjective(new FindCityOfLightObjective());
}
}
public HorusConversation()
{
}
public class VaultOfSecretsConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023643, 8787) // spellbook
};
public override void OnRead()
{
System.AddObjective( new FindMardothAboutVaultObjective() );
}
}
public override object Message => 1060110;
public class MardothVaultConversation : QuestConversation
{
public override object Message => 1060107;
public override QuestItemInfo[] Info => m_Info;
public MardothVaultConversation()
{
}
public override void OnRead()
{
System.AddObjective(new FetchAbraxusScrollObjective());
}
}
public override void OnRead()
{
System.AddObjective( new FindCityOfLightObjective() );
}
}
public class ReadAbraxusScrollConversation : QuestConversation
{
public override object Message => 1060114;
public class VaultOfSecretsConversation : QuestConversation
{
public override object Message => 1060110;
public override void OnRead()
{
System.AddObjective(new ReadAbraxusScrollObjective());
}
}
private static QuestItemInfo[] m_Info = {
new QuestItemInfo( 1023643, 8787 ) // spellbook
};
public class SecondHorusConversation : QuestConversation
{
public override object Message => 1060118;
public override QuestItemInfo[] Info => m_Info;
public override void OnRead()
{
System.AddObjective(new FindCallingScrollObjective());
}
}
public VaultOfSecretsConversation()
{
}
public class HealConversation : QuestConversation
{
public override object Message => 1061610;
}
public override void OnRead()
{
System.AddObjective( new FetchAbraxusScrollObjective() );
}
}
public class HorusRewardConversation : QuestConversation
{
public override object Message => 1060717;
public class ReadAbraxusScrollConversation : QuestConversation
{
public override object Message => 1060114;
public override bool Logged => false;
}
public ReadAbraxusScrollConversation()
{
}
public class LostCallingScrollConversation : QuestConversation
{
private bool m_FromMardoth;
public override void OnRead()
{
System.AddObjective( new ReadAbraxusScrollObjective() );
}
}
public LostCallingScrollConversation(bool fromMardoth)
{
m_FromMardoth = fromMardoth;
}
public class SecondHorusConversation : QuestConversation
{
public override object Message => 1060118;
// Serialization
public LostCallingScrollConversation()
{
}
public SecondHorusConversation()
{
}
public override object Message
{
get
{
if (m_FromMardoth) return 1062058;
public override void OnRead()
{
System.AddObjective( new FindCallingScrollObjective() );
}
}
/* 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 class HealConversation : QuestConversation
{
public override object Message => 1061610;
public override bool Logged => false;
public HealConversation()
{
}
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
public class HorusRewardConversation : QuestConversation
{
public override object Message => 1060717;
m_FromMardoth = reader.ReadBool();
}
public override bool Logged => false;
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt(0); // version
public HorusRewardConversation()
{
}
}
writer.Write(m_FromMardoth);
}
}
public class LostCallingScrollConversation : QuestConversation
{
private bool m_FromMardoth;
public class MardothKronusConversation : QuestConversation
{
public override object Message => 1060121;
public override object Message
{
get
{
if ( m_FromMardoth )
{
/* You return without the scroll of Calling? I'm afraid that
* won't do. You must return to the Crystal Cave and fetch
* another scroll. Use the teleporter to the West of me to
* get there. Return here when you have the scroll. Do not
* fail me this time, young apprentice of evil.
*/
return 1062058;
}
public override void OnRead()
{
System.AddObjective(new FindWellOfTearsObjective());
}
}
/* 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 class MardothEndConversation : QuestConversation
{
public override object Message => 1060133;
public override bool Logged => false;
public override void OnRead()
{
System.AddObjective(new FindBankObjective());
}
}
public LostCallingScrollConversation( bool fromMardoth )
{
m_FromMardoth = fromMardoth;
}
public class BankerConversation : QuestConversation
{
public override object Message => 1060137;
// Serialization
public LostCallingScrollConversation()
{
}
public override void OnRead()
{
System.Complete();
}
}
public override void ChildDeserialize( GenericReader reader )
{
int version = reader.ReadEncodedInt();
public class RadarConversation : QuestConversation
{
public override object Message => 1061692;
m_FromMardoth = reader.ReadBool();
}
public override void ChildSerialize( GenericWriter writer )
{
writer.WriteEncodedInt( (int) 0 ); // version
writer.Write( (bool) m_FromMardoth );
}
}
public class MardothKronusConversation : QuestConversation
{
public override object Message => 1060121;
public MardothKronusConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FindWellOfTearsObjective() );
}
}
public class MardothEndConversation : QuestConversation
{
public override object Message => 1060133;
public MardothEndConversation()
{
}
public override void OnRead()
{
System.AddObjective( new FindBankObjective() );
}
}
public class BankerConversation : QuestConversation
{
public override object Message => 1060137;
public BankerConversation()
{
}
public override void OnRead()
{
System.Complete();
}
}
public class RadarConversation : QuestConversation
{
public override object Message => 1061692;
public override bool Logged => false;
public RadarConversation()
{
}
}
}
public override bool Logged => false;
}
}

View file

@ -3,97 +3,96 @@ 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 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 override Type[] TypeReferenceTable => m_TypeReferenceTable;
public DarkTidesQuest(PlayerMobile from) : base(from)
{
}
public override object Name => 1060095;
// Serialization
public DarkTidesQuest()
{
}
public override object OfferMessage => 1060094;
public override Type[] TypeReferenceTable => m_TypeReferenceTable;
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
public override bool IsTutorial => true;
public override object Name => 1060095;
public override int Picture => 0x15B5;
public override object OfferMessage => 1060094;
public DarkTidesQuest( PlayerMobile from ) : base( from )
{
}
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
public override bool IsTutorial => true;
// Serialization
public DarkTidesQuest()
{
}
public override int Picture => 0x15B5;
public override void Accept()
{
base.Accept();
public override void Accept()
{
base.Accept();
AddConversation( new AcceptConversation() );
}
AddConversation(new AcceptConversation());
}
public override bool IgnoreYoungProtection( Mobile from )
{
if ( from is SummonedPaladin )
return true;
public override bool IgnoreYoungProtection(Mobile from)
{
if (from is SummonedPaladin)
return true;
return base.IgnoreYoungProtection( from );
}
return base.IgnoreYoungProtection(from);
}
public static bool HasLostCallingScroll( Mobile from )
{
if ( !(from is PlayerMobile pm) )
return false;
public static bool HasLostCallingScroll(Mobile from)
{
if (!(from is PlayerMobile pm))
return false;
QuestSystem qs = pm.Quest;
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( typeof( KronusScroll ) ) == null );
}
}
if (qs is DarkTidesQuest)
if (qs.IsObjectiveInProgress(typeof(FindMardothAboutKronusObjective)) ||
qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)) ||
qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
return from.Backpack?.FindItemByType(typeof(KronusScroll)) == null;
return false;
}
}
}
return false;
}
}
}

View file

@ -2,64 +2,66 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class CrystalCaveBarrier : Item
{
[Constructible]
public CrystalCaveBarrier() : base( 0x3967 )
{
Movable = false;
}
public class CrystalCaveBarrier : Item
{
[Constructible]
public CrystalCaveBarrier() : base(0x3967)
{
Movable = false;
}
public override bool OnMoveOver( Mobile m )
{
if ( m.AccessLevel > AccessLevel.Player )
return true;
public CrystalCaveBarrier(Serial serial) : base(serial)
{
}
bool sendMessage = m.Player;
public override bool OnMoveOver(Mobile m)
{
if (m.AccessLevel > AccessLevel.Player)
return true;
if ( m is BaseCreature )
m = ((BaseCreature)m).ControlMaster;
bool sendMessage = m.Player;
if ( m is PlayerMobile pm )
{
QuestSystem qs = pm.Quest;
if (m is BaseCreature)
m = ((BaseCreature)m).ControlMaster;
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );
if (m is PlayerMobile pm)
{
QuestSystem qs = pm.Quest;
if ( obj != null && obj.Completed )
{
if ( sendMessage )
m.SendLocalizedMessage( 1060648 ); // With Horus' permission, you are able to pass through the barrier.
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(SpeakCavePasswordObjective));
return true;
}
}
}
if (obj != null && obj.Completed)
{
if (sendMessage)
m.SendLocalizedMessage(
1060648); // With Horus' permission, you are able to pass through the barrier.
if ( sendMessage )
m.SendLocalizedMessage( 1060649, "", 0x66D ); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.
return true;
}
}
}
return false;
}
if (sendMessage)
m.SendLocalizedMessage(1060649, "",
0x66D); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.
public CrystalCaveBarrier( Serial serial ) : base( serial )
{
}
return false;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,36 +2,36 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class DarkTidesHorn : HornOfRetreat
{
public override bool ValidateUse( Mobile from )
{
return ( from is PlayerMobile pm && pm.Quest is DarkTidesQuest );
}
public class DarkTidesHorn : HornOfRetreat
{
[Constructible]
public DarkTidesHorn()
{
DestLoc = new Point3D(2103, 1319, -68);
DestMap = Map.Malas;
}
[Constructible]
public DarkTidesHorn()
{
DestLoc = new Point3D( 2103, 1319, -68 );
DestMap = Map.Malas;
}
public DarkTidesHorn(Serial serial) : base(serial)
{
}
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 );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,72 +2,75 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class DarkTidesTeleporter : DynamicTeleporter
{
[Constructible]
public DarkTidesTeleporter()
{
}
public class DarkTidesTeleporter : DynamicTeleporter
{
[Constructible]
public DarkTidesTeleporter()
{
}
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
{
QuestSystem qs = player.Quest;
public DarkTidesTeleporter(Serial serial) : base(serial)
{
}
if ( qs is DarkTidesQuest )
{
if ( qs.IsObjectiveInProgress( typeof( FindMaabusTombObjective ) ) )
{
loc = new Point3D( 2038, 1263, -90 );
map = Map.Malas;
qs.AddConversation( new RadarConversation() );
return true;
}
public override bool GetDestination(PlayerMobile player, ref Point3D loc, ref Map map)
{
QuestSystem qs = player.Quest;
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;
}
}
if (qs is DarkTidesQuest)
{
if (qs.IsObjectiveInProgress(typeof(FindMaabusTombObjective)))
{
loc = new Point3D(2038, 1263, -90);
map = Map.Malas;
qs.AddConversation(new RadarConversation());
return true;
}
return false;
}
if (qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective)))
{
loc = new Point3D(1194, 521, -90);
map = Map.Malas;
return true;
}
public DarkTidesTeleporter( Serial serial ) : base( serial )
{
}
if (qs.IsObjectiveInProgress(typeof(FindCityOfLightObjective)))
{
loc = new Point3D(1091, 519, -90);
map = Map.Malas;
return true;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
if (qs.IsObjectiveInProgress(typeof(ReturnToCrystalCaveObjective)))
{
loc = new Point3D(1194, 521, -90);
map = Map.Malas;
return true;
}
writer.Write( (int) 0 ); // version
}
if (DarkTidesQuest.HasLostCallingScroll(player))
{
loc = new Point3D(1194, 521, -90);
map = Map.Malas;
return true;
}
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
return false;
}
int version = reader.ReadInt();
}
}
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();
}
}
}

View file

@ -1,159 +1,166 @@
using System;
using Server.Mobiles;
using Server.Items;
using Server.Mobiles;
using Server.Network;
namespace Server.Engines.Quests.Necro
{
public class KronusScroll : QuestItem
{
public override int LabelNumber => 1060149; // Calling of Kronus
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;
}
[Constructible]
public KronusScroll() : base(0x227A)
{
Weight = 1.0;
Hue = 0x44E;
}
public KronusScroll( Serial serial ) : base( serial )
{
}
public KronusScroll(Serial serial) : base(serial)
{
}
public override bool CanDrop( PlayerMobile player )
{
return !(player.Quest is DarkTidesQuest);
public override int LabelNumber => 1060149; // Calling of Kronus
/*return !( qs.IsObjectiveInProgress( typeof( FindCallingScrollObjective ) )
|| qs.IsObjectiveInProgress( typeof( FindMardothAboutKronusObjective ) )
|| qs.IsObjectiveInProgress( typeof( FindWellOfTearsObjective ) )
|| qs.IsObjectiveInProgress( typeof( UseCallingScrollObjective ) ) );*/
}
public override bool CanDrop(PlayerMobile player)
{
return !(player.Quest is DarkTidesQuest);
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D( 2080, 1346, 10, 10 );
private static readonly Map m_WellOfTearsMap = Map.Malas;
/*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;
public override void OnDoubleClick(Mobile from)
{
if (!IsChildOf(from))
return;
if ( from is PlayerMobile pm )
{
QuestSystem qs = pm.Quest;
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( typeof( UseCallingScrollObjective ) );
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(typeof(UseCallingScrollObjective));
if ( obj != null && !obj.Completed )
obj.Complete();
if (obj != null && !obj.Completed)
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.
}
}
}
}
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.
}
}
}
}
private class CallingTimer : Timer
{
private PlayerMobile m_Player;
private int m_Step;
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
public CallingTimer( PlayerMobile player ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ), 6 )
{
Priority = TimerPriority.TwentyFiveMS;
writer.Write(0); // version
}
m_Player = player;
m_Step = 0;
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
protected override void OnTick()
{
if ( m_Player.Deleted )
{
Stop();
return;
}
int version = reader.ReadInt();
}
if ( !m_Player.Mounted )
m_Player.Animate( Utility.RandomBool() ? 16 : 17, 7, 1, true, false, 0 );
private class CallingTimer : Timer
{
private PlayerMobile m_Player;
private int m_Step;
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;
public CallingTimer(PlayerMobile player) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0), 6)
{
Priority = TimerPriority.TwentyFiveMS;
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 );
m_Player = player;
m_Step = 0;
}
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 );
protected override void OnTick()
{
if (m_Player.Deleted)
{
Stop();
return;
}
Point3D from = new Point3D( x, y, z + Utility.RandomMinMax( 5, 20 ) );
Point3D to = new Point3D( x, y, z );
if (!m_Player.Mounted)
m_Player.Animate(Utility.RandomBool() ? 16 : 17, 7, 1, true, false, 0);
int hue = Utility.RandomList( 0x481, 0x482, 0x489, 0x497, 0x66D );
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.SendPacket( from, map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x36D4, from, to, 0, 0, false, true, hue, 0 ) );
}
}
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);
if ( m_Step < 5 )
{
m_Player.Frozen = true;
}
else // Cast completed
{
m_Player.Frozen = false;
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);
SummonedPaladin.BeginSummon( m_Player );
}
Point3D from = new Point3D(x, y, z + Utility.RandomMinMax(5, 20));
Point3D to = new Point3D(x, y, z);
m_Step++;
}
}
int hue = Utility.RandomList(0x481, 0x482, 0x489, 0x497, 0x66D);
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
Effects.SendPacket(from, map,
new HuedEffect(EffectType.Moving, Serial.Zero, Serial.Zero, 0x36D4, from, to, 0, 0, false, true,
hue, 0));
}
}
writer.Write( (int) 0 ); // version
}
if (m_Step < 5)
{
m_Player.Frozen = true;
}
else // Cast completed
{
m_Player.Frozen = false;
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
SummonedPaladin.BeginSummon(m_Player);
}
int version = reader.ReadInt();
}
}
}
m_Step++;
}
}
}
}

View file

@ -3,71 +3,72 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class KronusScrollBox : MetalBox
{
[Constructible]
public KronusScrollBox()
{
ItemID = 0xE80;
Movable = false;
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 );
}
}
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 KronusScrollBox(Serial serial) : base(serial)
{
}
public override void OnDoubleClick( Mobile from )
{
if ( from is PlayerMobile pm && pm.InRange( GetWorldLocation(), 2 ) )
{
QuestSystem qs = pm.Quest;
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( typeof( FindCallingScrollObjective ) );
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(FindCallingScrollObjective));
if ( (obj != null && !obj.Completed) || DarkTidesQuest.HasLostCallingScroll( from ) )
{
Item scroll = new KronusScroll();
if (obj != null && !obj.Completed || 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 (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 != null && !obj.Completed )
obj.Complete();
}
else
{
pm.SendLocalizedMessage( 1060148, "", 0x41 ); // You were unable to take the scroll.
scroll.Delete();
}
}
}
}
if (obj != null && !obj.Completed)
obj.Complete();
}
else
{
pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
scroll.Delete();
}
}
}
}
base.OnDoubleClick( from );
}
base.OnDoubleClick(from);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -3,152 +3,156 @@ using Server.Items;
namespace Server.Engines.Quests.Necro
{
public class MaabusCoffin : BaseAddon
{
[CommandProperty( AccessLevel.GameMaster )]
public Maabus Maabus { get; private set; }
public class MaabusCoffin : BaseAddon
{
[Constructible]
public MaabusCoffin()
{
AddComponent(new MaabusCoffinComponent(0x1C2B, 0x1C2B), -1, -1, 0);
[CommandProperty( AccessLevel.GameMaster )]
public Point3D SpawnLocation { get; set; }
AddComponent(new MaabusCoffinComponent(0x1D16, 0x1C2C), 0, -1, 0);
AddComponent(new MaabusCoffinComponent(0x1D17, 0x1C2D), 1, -1, 0);
AddComponent(new MaabusCoffinComponent(0x1D51, 0x1C2E), 2, -1, 0);
[Constructible]
public MaabusCoffin()
{
AddComponent( new MaabusCoffinComponent( 0x1C2B, 0x1C2B ), -1, -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);
}
AddComponent( new MaabusCoffinComponent( 0x1D16, 0x1C2C ), 0, -1, 0 );
AddComponent( new MaabusCoffinComponent( 0x1D17, 0x1C2D ), 1, -1, 0 );
AddComponent( new MaabusCoffinComponent( 0x1D51, 0x1C2E ), 2, -1, 0 );
public MaabusCoffin(Serial serial) : base(serial)
{
}
AddComponent( new MaabusCoffinComponent( 0x1D4E, 0x1C2A ), 0, 0, 0 );
AddComponent( new MaabusCoffinComponent( 0x1D4D, 0x1C29 ), 1, 0, 0 );
AddComponent( new MaabusCoffinComponent( 0x1D4C, 0x1C28 ), 2, 0, 0 );
}
[CommandProperty(AccessLevel.GameMaster)]
public Maabus Maabus{ get; private set; }
public void Awake( Mobile caller )
{
if ( Maabus != null || SpawnLocation == Point3D.Zero )
return;
[CommandProperty(AccessLevel.GameMaster)]
public Point3D SpawnLocation{ get; set; }
foreach ( MaabusCoffinComponent c in Components )
c.TurnToEmpty();
public void Awake(Mobile caller)
{
if (Maabus != null || SpawnLocation == Point3D.Zero)
return;
Maabus = new Maabus();
foreach (MaabusCoffinComponent c in Components)
c.TurnToEmpty();
Maabus.Location = SpawnLocation;
Maabus.Map = Map;
Maabus = new Maabus();
Maabus.Direction = Maabus.GetDirectionTo( caller );
Maabus.Location = SpawnLocation;
Maabus.Map = Map;
Timer.DelayCall( TimeSpan.FromSeconds( 7.5 ), BeginSleep );
}
Maabus.Direction = Maabus.GetDirectionTo(caller);
public void BeginSleep()
{
if ( Maabus == null )
return;
Timer.DelayCall(TimeSpan.FromSeconds(7.5), BeginSleep);
}
Effects.PlaySound( Maabus.Location, Maabus.Map, 0x48E );
public void BeginSleep()
{
if (Maabus == null)
return;
Timer.DelayCall( TimeSpan.FromSeconds( 2.5 ), Sleep );
}
Effects.PlaySound(Maabus.Location, Maabus.Map, 0x48E);
public void Sleep()
{
if ( Maabus == null )
return;
Timer.DelayCall(TimeSpan.FromSeconds(2.5), Sleep);
}
Effects.SendLocationParticles( EffectItem.Create( Maabus.Location, Maabus.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0x7E7 );
Effects.PlaySound( Maabus.Location, Maabus.Map, 0x1FE );
public void Sleep()
{
if (Maabus == null)
return;
Maabus.Delete();
Maabus = null;
Effects.SendLocationParticles(EffectItem.Create(Maabus.Location, Maabus.Map, EffectItem.DefaultDuration), 0x3728,
10, 10, 0x7E7);
Effects.PlaySound(Maabus.Location, Maabus.Map, 0x1FE);
foreach ( MaabusCoffinComponent c in Components )
c.TurnToFull();
}
Maabus.Delete();
Maabus = null;
public MaabusCoffin( Serial serial ) : base( serial )
{
}
foreach (MaabusCoffinComponent c in Components)
c.TurnToFull();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
writer.Write(0); // version
writer.Write( (Mobile) Maabus );
writer.Write( (Point3D) SpawnLocation );
}
writer.Write(Maabus);
writer.Write(SpawnLocation);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
Maabus = reader.ReadMobile() as Maabus;
SpawnLocation = reader.ReadPoint3D();
Maabus = reader.ReadMobile() as Maabus;
SpawnLocation = reader.ReadPoint3D();
Sleep();
}
}
Sleep();
}
}
public class MaabusCoffinComponent : AddonComponent
{
private int m_FullItemID;
private int m_EmptyItemID;
public class MaabusCoffinComponent : AddonComponent
{
private int m_EmptyItemID;
private int m_FullItemID;
[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 MaabusCoffinComponent(int itemID) : this(itemID, itemID)
{
}
public MaabusCoffinComponent( int itemID ) : this( itemID, itemID )
{
}
public MaabusCoffinComponent(int fullItemID, int emptyItemID) : base(fullItemID)
{
m_FullItemID = fullItemID;
m_EmptyItemID = emptyItemID;
}
public MaabusCoffinComponent( int fullItemID, int emptyItemID ) : base( fullItemID )
{
m_FullItemID = fullItemID;
m_EmptyItemID = emptyItemID;
}
public MaabusCoffinComponent(Serial serial) : base(serial)
{
}
public void TurnToEmpty()
{
ItemID = m_EmptyItemID;
}
[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 TurnToFull()
{
ItemID = m_FullItemID;
}
public void TurnToEmpty()
{
ItemID = m_EmptyItemID;
}
public MaabusCoffinComponent( Serial serial ) : base( serial )
{
}
public void TurnToFull()
{
ItemID = m_FullItemID;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
writer.Write(0); // version
writer.Write( (int) m_FullItemID );
writer.Write( (int) m_EmptyItemID );
}
writer.Write(m_FullItemID);
writer.Write(m_EmptyItemID);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
m_FullItemID = reader.ReadInt();
m_EmptyItemID = reader.ReadInt();
}
}
}
m_FullItemID = reader.ReadInt();
m_EmptyItemID = reader.ReadInt();
}
}
}

View file

@ -3,131 +3,131 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class ScrollOfAbraxus : QuestItem
{
public override int LabelNumber => 1028827; // Scroll of Abraxus
public class ScrollOfAbraxus : QuestItem
{
[Constructible]
public ScrollOfAbraxus() : base(0x227B)
{
Weight = 1.0;
}
[Constructible]
public ScrollOfAbraxus() : base( 0x227B )
{
Weight = 1.0;
}
public ScrollOfAbraxus(Serial serial) : base(serial)
{
}
public override bool CanDrop( PlayerMobile player )
{
return !(player.Quest is DarkTidesQuest);
public override int LabelNumber => 1028827; // Scroll of Abraxus
//return !( qs.IsObjectiveInProgress( typeof( RetrieveAbraxusScrollObjective ) ) || qs.IsObjectiveInProgress( typeof( ReadAbraxusScrollObjective ) ) );
}
public override bool CanDrop(PlayerMobile player)
{
return !(player.Quest is DarkTidesQuest);
public override void OnAdded(IEntity parent)
{
base.OnAdded( parent );
//return !( qs.IsObjectiveInProgress( typeof( RetrieveAbraxusScrollObjective ) ) || qs.IsObjectiveInProgress( typeof( ReadAbraxusScrollObjective ) ) );
}
if ( RootParent is PlayerMobile pm )
{
QuestSystem qs = pm.Quest;
public override void OnAdded(IEntity parent)
{
base.OnAdded(parent);
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( RetrieveAbraxusScrollObjective ) );
if (RootParent is PlayerMobile pm)
{
QuestSystem qs = pm.Quest;
if ( obj != null && !obj.Completed )
obj.Complete();
}
}
}
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(RetrieveAbraxusScrollObjective));
public override void OnDoubleClick( Mobile from )
{
if ( IsChildOf( from.Backpack ) )
{
from.SendGump( new ScrollOfAbraxusGump() );
if (obj != null && !obj.Completed)
obj.Complete();
}
}
}
if ( from is PlayerMobile pm )
{
QuestSystem qs = pm.Quest;
public override void OnDoubleClick(Mobile from)
{
if (IsChildOf(from.Backpack))
{
from.SendGump(new ScrollOfAbraxusGump());
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( ReadAbraxusScrollObjective ) );
if (from is PlayerMobile pm)
{
QuestSystem qs = pm.Quest;
if ( obj != null && !obj.Completed )
obj.Complete();
}
}
}
else
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
}
}
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(ReadAbraxusScrollObjective));
public ScrollOfAbraxus( Serial serial ) : base( serial )
{
}
if (obj != null && !obj.Completed)
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 );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
int version = reader.ReadInt();
}
}
public class ScrollOfAbraxusGump : Gump
{
public ScrollOfAbraxusGump() : base( 150, 50 )
{
AddPage( 0 );
public class ScrollOfAbraxusGump : Gump
{
public ScrollOfAbraxusGump() : base(150, 50)
{
AddPage(0);
AddImage( 0, 0, 1228 );
AddImage( 340, 255, 9005 );
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 );
}
}
}
/* 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);
}
}
}

View file

@ -2,45 +2,45 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class VaultOfSecretsBarrier : Item
{
[Constructible]
public VaultOfSecretsBarrier() : base( 0x49E )
{
Movable = false;
Visible = false;
}
public class VaultOfSecretsBarrier : Item
{
[Constructible]
public VaultOfSecretsBarrier() : base(0x49E)
{
Movable = false;
Visible = false;
}
public override bool OnMoveOver( Mobile m )
{
if ( m.AccessLevel > AccessLevel.Player )
return true;
public VaultOfSecretsBarrier(Serial serial) : base(serial)
{
}
if ( m is PlayerMobile pm && pm.Profession == 4 )
{
m.SendLocalizedMessage( 1060188, "", 0x24 ); // The wicked may not enter!
return false;
}
public override bool OnMoveOver(Mobile m)
{
if (m.AccessLevel > AccessLevel.Player)
return true;
return base.OnMoveOver( m );
}
if (m is PlayerMobile pm && pm.Profession == 4)
{
m.SendLocalizedMessage(1060188, "", 0x24); // The wicked may not enter!
return false;
}
public VaultOfSecretsBarrier( Serial serial ) : base( serial )
{
}
return base.OnMoveOver(m);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,190 +1,191 @@
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.ContextMenus;
namespace Server.Engines.Quests.Necro
{
public class Horus : BaseQuester
{
public override string DefaultName => "Horus";
public class Horus : BaseQuester
{
[Constructible]
public Horus() : base("the Guardian")
{
}
[Constructible]
public Horus() : base( "the Guardian" )
{
}
public Horus(Serial serial) : base(serial)
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
public override string DefaultName => "Horus";
Hue = 0x83F3;
Body = 0x190;
}
public override void InitBody()
{
InitStats(100, 100, 25);
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 ) );
Hue = 0x83F3;
Body = 0x190;
}
AddItem( SetHue( new Bardiche(), 0x482 ) );
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 Boots(), 0x001 ) );
AddItem( SetHue( new Cloak(), 0x482 ) );
AddItem(SetHue(new Bardiche(), 0x482));
Utility.AssignRandomHair( this, false );
Utility.AssignRandomFacialHair( this, false );
}
AddItem(SetHue(new Boots(), 0x001));
AddItem(SetHue(new Cloak(), 0x482));
public override int GetAutoTalkRange( PlayerMobile m )
{
return 3;
}
Utility.AssignRandomHair(this, false);
Utility.AssignRandomFacialHair(this, false);
}
public override bool CanTalkTo( PlayerMobile to )
{
QuestSystem qs = to.Quest;
public override int GetAutoTalkRange(PlayerMobile m)
{
return 3;
}
return ( qs is DarkTidesQuest && qs.IsObjectiveInProgress( typeof( FindCrystalCaveObjective ) ) );
}
public override bool CanTalkTo(PlayerMobile to)
{
QuestSystem qs = to.Quest;
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
return qs is DarkTidesQuest && qs.IsObjectiveInProgress(typeof(FindCrystalCaveObjective));
}
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( FindCrystalCaveObjective ) );
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
QuestSystem qs = player.Quest;
if ( obj != null && !obj.Completed )
obj.Complete();
}
}
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(FindCrystalCaveObjective));
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
if (obj != null && !obj.Completed)
obj.Complete();
}
}
if ( InRange( m.Location, 2 ) && !InRange( oldLocation, 2 ) && m is PlayerMobile pm )
{
QuestSystem qs = pm.Quest;
public override void OnMovement(Mobile m, Point3D oldLocation)
{
base.OnMovement(m, oldLocation);
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( ReturnToCrystalCaveObjective ) );
if (InRange(m.Location, 2) && !InRange(oldLocation, 2) && m is PlayerMobile pm)
{
QuestSystem qs = pm.Quest;
if ( obj != null && !obj.Completed )
obj.Complete();
else
{
obj = qs.FindObjective( typeof( FindHorusAboutRewardObjective ) );
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(ReturnToCrystalCaveObjective));
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
if (obj != null && !obj.Completed)
{
obj.Complete();
}
else
{
obj = qs.FindObjective(typeof(FindHorusAboutRewardObjective));
cont.DropItem( new Gold( 500 ) );
if (obj != null && !obj.Completed)
{
Container cont = GetNewContainer();
BaseJewel jewel = new GoldBracelet();
if ( Core.AOS )
BaseRunicTool.ApplyAttributesTo( jewel, 3, 20, 40 );
cont.DropItem( jewel );
cont.DropItem(new Gold(500));
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();
}
}
}
}
}
}
BaseJewel jewel = new GoldBracelet();
if (Core.AOS)
BaseRunicTool.ApplyAttributesTo(jewel, 3, 20, 40);
cont.DropItem(jewel);
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
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();
}
}
}
}
}
}
if ( from.Alive )
{
if ( from is PlayerMobile pm )
{
QuestSystem qs = pm.Quest;
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );
bool enabled = ( obj != null && !obj.Completed );
if (from.Alive)
if (from is PlayerMobile pm)
{
QuestSystem qs = pm.Quest;
list.Add( new SpeakPasswordEntry( this, pm, enabled ) );
}
}
}
}
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(SpeakCavePasswordObjective));
bool enabled = obj != null && !obj.Completed;
public virtual void OnPasswordSpoken( PlayerMobile from )
{
QuestSystem qs = from.Quest;
list.Add(new SpeakPasswordEntry(this, pm, enabled));
}
}
}
if ( qs is DarkTidesQuest )
{
QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );
public virtual void OnPasswordSpoken(PlayerMobile from)
{
QuestSystem qs = from.Quest;
if ( obj != null && !obj.Completed )
{
obj.Complete();
return;
}
}
if (qs is DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(SpeakCavePasswordObjective));
from.SendLocalizedMessage( 1060185 ); // Horus ignores you.
}
if (obj != null && !obj.Completed)
{
obj.Complete();
return;
}
}
private class SpeakPasswordEntry : ContextMenuEntry
{
private Horus m_Horus;
private PlayerMobile m_From;
from.SendLocalizedMessage(1060185); // Horus ignores you.
}
public SpeakPasswordEntry( Horus horus, PlayerMobile from, bool enabled ) : base( 6193, 3 )
{
m_Horus = horus;
m_From = from;
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
if ( !enabled )
Flags |= CMEFlags.Disabled;
}
writer.Write(0); // version
}
public override void OnClick()
{
if ( m_From.Alive )
m_Horus.OnPasswordSpoken( m_From );
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
public Horus( Serial serial ) : base( serial )
{
}
int version = reader.ReadInt();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
private class SpeakPasswordEntry : ContextMenuEntry
{
private PlayerMobile m_From;
private Horus m_Horus;
writer.Write( (int) 0 ); // version
}
public SpeakPasswordEntry(Horus horus, PlayerMobile from, bool enabled) : base(6193, 3)
{
m_Horus = horus;
m_From = from;
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
if (!enabled)
Flags |= CMEFlags.Disabled;
}
int version = reader.ReadInt();
}
}
}
public override void OnClick()
{
if (m_From.Alive)
m_Horus.OnPasswordSpoken(m_From);
}
}
}
}

View file

@ -2,44 +2,44 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class Maabus : BaseQuester
{
public override string DefaultName => "Maabus";
public class Maabus : BaseQuester
{
public Maabus()
{
}
public Maabus()
{
}
public Maabus(Serial serial) : base(serial)
{
}
public override void InitBody()
{
Body = 0x94;
}
public override string DefaultName => "Maabus";
public Maabus( Serial serial ) : base( serial )
{
}
public override void InitBody()
{
Body = 0x94;
}
public override bool CanTalkTo( PlayerMobile to )
{
return false;
}
public override bool CanTalkTo(PlayerMobile to)
{
return false;
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -4,217 +4,216 @@ using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class Mardoth : BaseQuester
{
public override string DefaultName => "Mardoth";
public class Mardoth : BaseQuester
{
[Constructible]
public Mardoth() : base("the Ancient Necromancer")
{
}
[Constructible]
public Mardoth() : base( "the Ancient Necromancer" )
{
}
public Mardoth(Serial serial) : base(serial)
{
}
public override void InitBody()
{
InitStats( 100, 100, 25 );
public override string DefaultName => "Mardoth";
Hue = 0x8849;
Body = 0x190;
}
public override void InitBody()
{
InitStats(100, 100, 25);
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( from is PlayerMobile player )
{
QuestSystem qs = player.Quest;
Hue = 0x8849;
Body = 0x190;
}
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.
}
public override bool OnDragDrop(Mobile from, Item dropped)
{
if (from is PlayerMobile player)
{
QuestSystem qs = player.Quest;
return false;
}
}
}
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 base.OnDragDrop( from, dropped );
}
return false;
}
}
public override void InitOutfit()
{
AddItem( new Sandals( 0x1 ) );
AddItem( new Robe( 0x66D ) );
AddItem( new BlackStaff() );
AddItem( new WizardsHat( 0x1 ) );
return base.OnDragDrop(from, dropped);
}
FacialHairItemID = 0x2041;
FacialHairHue = 0x482;
public override void InitOutfit()
{
AddItem(new Sandals(0x1));
AddItem(new Robe(0x66D));
AddItem(new BlackStaff());
AddItem(new WizardsHat(0x1));
HairItemID = 0x203C;
HairHue = 0x482;
FacialHairItemID = 0x2041;
FacialHairHue = 0x482;
Item gloves = new BoneGloves();
gloves.Hue = 0x66D;
AddItem( gloves );
HairItemID = 0x203C;
HairHue = 0x482;
Item gorget = new PlateGorget();
gorget.Hue = 0x1;
AddItem( gorget );
}
Item gloves = new BoneGloves();
gloves.Hue = 0x66D;
AddItem(gloves);
public override int GetAutoTalkRange( PlayerMobile m )
{
return 3;
}
Item gorget = new PlateGorget();
gorget.Hue = 0x1;
AddItem(gorget);
}
public override bool CanTalkTo( PlayerMobile to )
{
if ( !(to.Quest is DarkTidesQuest qs) )
return ( to.Quest == null && QuestSystem.CanOfferQuest( to, typeof( DarkTidesQuest ) ) );
public override int GetAutoTalkRange(PlayerMobile m)
{
return 3;
}
return ( qs.FindObjective( typeof( FindMardothAboutVaultObjective ) ) != null );
}
public override bool CanTalkTo(PlayerMobile to)
{
if (!(to.Quest is DarkTidesQuest qs))
return to.Quest == null && QuestSystem.CanOfferQuest(to, typeof(DarkTidesQuest));
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
return qs.FindObjective(typeof(FindMardothAboutVaultObjective)) != null;
}
if ( qs is DarkTidesQuest )
{
if ( DarkTidesQuest.HasLostCallingScroll( player ) )
{
qs.AddConversation( new LostCallingScrollConversation( true ) );
}
else
{
QuestObjective obj = qs.FindObjective( typeof( FindMardothAboutVaultObjective ) );
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
QuestSystem qs = player.Quest;
if ( obj != null && !obj.Completed )
{
obj.Complete();
}
else
{
obj = qs.FindObjective( typeof( FindMardothAboutKronusObjective ) );
if (qs is DarkTidesQuest)
{
if (DarkTidesQuest.HasLostCallingScroll(player))
{
qs.AddConversation(new LostCallingScrollConversation(true));
}
else
{
QuestObjective obj = qs.FindObjective(typeof(FindMardothAboutVaultObjective));
if ( obj != null && !obj.Completed )
{
obj.Complete();
}
else
{
obj = qs.FindObjective( typeof( FindMardothEndObjective ) );
if (obj != null && !obj.Completed)
{
obj.Complete();
}
else
{
obj = qs.FindObjective(typeof(FindMardothAboutKronusObjective));
if ( obj != null && !obj.Completed )
{
Container cont = GetNewContainer();
if (obj != null && !obj.Completed)
{
obj.Complete();
}
else
{
obj = qs.FindObjective(typeof(FindMardothEndObjective));
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 ) );
if (obj != null && !obj.Completed)
{
Container cont = GetNewContainer();
BaseWeapon weapon = new BoneHarvester();
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));
weapon.Slayer = SlayerName.OrcSlaying;
BaseWeapon weapon = new BoneHarvester();
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 );
}
weapon.Slayer = SlayerName.OrcSlaying;
cont.DropItem( weapon );
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( new BankCheck( 2000 ) );
cont.DropItem( new EnchantedSextant() );
cont.DropItem(weapon);
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();
}
}
cont.DropItem(new BankCheck(2000));
cont.DropItem(new EnchantedSextant());
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
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();
}
}
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 );
public override void OnMovement(Mobile m, Point3D oldLocation)
{
base.OnMovement(m, oldLocation);
m.PlaySound( 0x214 );
m.FixedEffect( 0x376A, 10, 16 );
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.CloseGump( typeof( ResurrectGump ) );
m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) );
}
}
}
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
public Mardoth( Serial serial ) : base( serial )
{
}
m.CloseGump(typeof(ResurrectGump));
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
}
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,240 +1,243 @@
using System;
using Server.Mobiles;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class SummonedPaladin : BaseCreature
{
private PlayerMobile m_Necromancer;
private bool m_ToDelete;
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;
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";
InitStats(45, 30, 5);
Title = "the Paladin";
Hue = 0x83F3;
Hue = 0x83F3;
Female = false;
Body = 0x190;
Name = NameList.RandomName( "male" );
Female = false;
Body = 0x190;
Name = NameList.RandomName("male");
Utility.AssignRandomHair( this );
Utility.AssignRandomFacialHair( this, false );
Utility.AssignRandomHair(this);
Utility.AssignRandomFacialHair(this, false);
FacialHairHue = HairHue;
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 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 Cloak(0xCF));
AddItem( new ThinLongsword() );
AddItem(new ThinLongsword());
SetSkill( SkillName.Swords, 50.0 );
SetSkill( SkillName.Tactics, 50.0 );
SetSkill(SkillName.Swords, 50.0);
SetSkill(SkillName.Tactics, 50.0);
PackGold( 500 );
}
PackGold(500);
}
public override bool IsHarmfulCriminal(Mobile target)
{
if ( target == m_Necromancer )
return false;
public SummonedPaladin(Serial serial) : base(serial)
{
}
return base.IsHarmfulCriminal( target );
}
public override bool ClickTitle => false;
public override bool ClickTitle => false;
public override bool PlayerRangeSensitive => false;
public override bool PlayerRangeSensitive => false;
public override bool IsHarmfulCriminal(Mobile target)
{
if (target == m_Necromancer)
return false;
public override void OnThink()
{
if ( !m_ToDelete && !Frozen )
{
if ( m_Necromancer == null || m_Necromancer.Deleted || m_Necromancer.Map == Map.Internal )
{
Delete();
return;
}
return base.IsHarmfulCriminal(target);
}
if ( Combatant != m_Necromancer )
Combatant = m_Necromancer;
public override void OnThink()
{
if (!m_ToDelete && !Frozen)
{
if (m_Necromancer == null || m_Necromancer.Deleted || m_Necromancer.Map == Map.Internal)
{
Delete();
return;
}
if ( !m_Necromancer.Alive )
{
QuestSystem qs = m_Necromancer.Quest;
if (Combatant != m_Necromancer)
Combatant = m_Necromancer;
if ( qs is DarkTidesQuest && qs.FindObjective( typeof( FindMardothEndObjective ) ) == null )
qs.AddObjective( new FindMardothEndObjective( false ) );
if (!m_Necromancer.Alive)
{
QuestSystem qs = m_Necromancer.Quest;
Say( 1060139, m_Necromancer.Name ); // You have made my work easy for me, ~1_NAME~. My task here is done.
if (qs is DarkTidesQuest && qs.FindObjective(typeof(FindMardothEndObjective)) == null)
qs.AddObjective(new FindMardothEndObjective(false));
m_ToDelete = true;
Say(1060139, m_Necromancer.Name); // You have made my work easy for me, ~1_NAME~. My task here is done.
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 );
m_ToDelete = true;
Map = m_Necromancer.Map;
Location = m_Necromancer.Location;
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);
PlaySound( 0x1FE );
Map = m_Necromancer.Map;
Location = m_Necromancer.Location;
Say( 1060140 ); // You cannot escape me, knave of evil!
}
}
PlaySound(0x1FE);
base.OnThink();
}
Say(1060140); // You cannot escape me, knave of evil!
}
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
base.OnThink();
}
QuestSystem qs = m_Necromancer.Quest;
public override void OnDeath(Container c)
{
base.OnDeath(c);
if ( qs is DarkTidesQuest && qs.FindObjective( typeof( FindMardothEndObjective ) ) == null )
qs.AddObjective( new FindMardothEndObjective( true ) );
}
QuestSystem qs = m_Necromancer.Quest;
public SummonedPaladin( Serial serial ) : base( serial )
{
}
if (qs is DarkTidesQuest && qs.FindObjective(typeof(FindMardothEndObjective)) == null)
qs.AddObjective(new FindMardothEndObjective(true));
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
writer.Write(0); // version
writer.Write( (Mobile) m_Necromancer );
writer.Write( (bool) m_ToDelete );
}
writer.Write(m_Necromancer);
writer.Write(m_ToDelete);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
m_Necromancer = reader.ReadMobile() as PlayerMobile;
m_ToDelete = reader.ReadBool();
m_Necromancer = reader.ReadMobile() as PlayerMobile;
m_ToDelete = reader.ReadBool();
if ( m_ToDelete )
Delete();
}
if (m_ToDelete)
Delete();
}
public static void BeginSummon( PlayerMobile player )
{
new SummonTimer( player ).Start();
}
public static void BeginSummon(PlayerMobile player)
{
new SummonTimer(player).Start();
}
private class SummonTimer : Timer
{
private PlayerMobile m_Player;
private SummonedPaladin m_Paladin;
private int m_Step;
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;
public SummonTimer(PlayerMobile player) : base(TimeSpan.FromSeconds(4.0))
{
Priority = TimerPriority.FiftyMS;
m_Player = player;
}
m_Player = player;
}
protected override void OnTick()
{
if ( m_Player.Deleted )
{
if ( m_Step > 0 )
m_Paladin.Delete();
protected override void OnTick()
{
if (m_Player.Deleted)
{
if (m_Step > 0)
m_Paladin.Delete();
return;
}
return;
}
if ( m_Step > 0 && m_Paladin.Deleted )
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 );
if (m_Step == 0)
{
SummonedPaladinMoongate moongate = new SummonedPaladinMoongate();
moongate.MoveToWorld(new Point3D(2091, 1348, -90), Map.Malas);
Effects.PlaySound( moongate.Location, moongate.Map, 0x20E );
Effects.PlaySound(moongate.Location, moongate.Map, 0x20E);
m_Paladin = new SummonedPaladin( m_Player );
m_Paladin.Frozen = true;
m_Paladin = new SummonedPaladin(m_Player);
m_Paladin.Frozen = true;
m_Paladin.Location = moongate.Location;
m_Paladin.Map = moongate.Map;
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(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;
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.Say(1060123); // I will slay you before I allow you to complete your evil rites!
m_Paladin.Combatant = m_Player;
}
m_Paladin.Combatant = m_Player;
}
m_Step++;
}
}
}
m_Step++;
}
}
}
public class SummonedPaladinMoongate : Item
{
public SummonedPaladinMoongate() : base( 0xF6C )
{
Movable = false;
Hue = 0x482;
Light = LightType.Circle300;
public class SummonedPaladinMoongate : Item
{
public SummonedPaladinMoongate() : base(0xF6C)
{
Movable = false;
Hue = 0x482;
Light = LightType.Circle300;
Timer.DelayCall( TimeSpan.FromSeconds( 10.0 ), Delete );
}
Timer.DelayCall(TimeSpan.FromSeconds(10.0), Delete);
}
public SummonedPaladinMoongate( Serial serial ) : base( serial )
{
}
public SummonedPaladinMoongate(Serial serial) : base(serial)
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
Delete();
}
}
}
Delete();
}
}
}

View file

@ -1,457 +1,379 @@
using Server.Items;
using Server.Mobiles;
using Server.Spells.Necromancy;
namespace Server.Engines.Quests.Necro
{
public class AnimateMaabusCorpseObjective : QuestObjective
{
public override object Message => 1060102;
private static QuestItemInfo[] m_Info = {
new QuestItemInfo( 1023643, 8787 ) // spellbook
};
public override QuestItemInfo[] Info => m_Info;
public AnimateMaabusCorpseObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new MaabasConversation() );
}
}
public class FindCrystalCaveObjective : QuestObjective
{
public override object Message => 1060104;
public FindCrystalCaveObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new HorusConversation() );
}
}
public class FindMardothAboutVaultObjective : QuestObjective
{
public override object Message => 1060106;
public FindMardothAboutVaultObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new MardothVaultConversation() );
}
}
public class FindMaabusTombObjective : QuestObjective
{
public override object Message => 1060124;
public FindMaabusTombObjective()
{
}
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 FindMaabusCorpseObjective()
{
}
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 FindCityOfLightObjective()
{
}
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
{
public override object Message => 1060109;
private static QuestItemInfo[] m_Info = {
new QuestItemInfo( 1023676, 3679 ) // glowing rune
};
public override QuestItemInfo[] Info => m_Info;
public FindVaultOfSecretsObjective()
{
}
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 FetchAbraxusScrollObjective()
{
}
public override void CheckProgress()
{
if ( System.From.Map == Map.Malas && System.From.InRange( new Point3D( 1076, 450, -84 ), 5 ) )
{
if ( Spells.Necromancy.SummonFamiliarSpell.Table[System.From] is HordeMinionFamiliar hmf && hmf.InRange( System.From, 5 ) && hmf.TargetLocation == null )
{
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 RetrieveAbraxusScrollObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new ReadAbraxusScrollConversation() );
}
}
public class ReadAbraxusScrollObjective : QuestObjective
{
public override object Message => 1060125;
public ReadAbraxusScrollObjective()
{
}
public override void OnComplete()
{
System.AddObjective( new ReturnToCrystalCaveObjective() );
}
}
public class ReturnToCrystalCaveObjective : QuestObjective
{
public override object Message => 1060115;
private static QuestItemInfo[] m_Info = {
new QuestItemInfo( 1026153, 6178 ) // teleporter
};
public override QuestItemInfo[] Info => m_Info;
public ReturnToCrystalCaveObjective()
{
}
public override void OnComplete()
{
System.AddObjective( new SpeakCavePasswordObjective() );
}
}
public class SpeakCavePasswordObjective : QuestObjective
{
public override object Message => 1060117;
public SpeakCavePasswordObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new SecondHorusConversation() );
}
}
public class FindCallingScrollObjective : QuestObjective
{
public override object Message => 1060119;
private int m_SkitteringHoppersKilled;
private bool m_HealConversationShown;
private bool m_SkitteringHoppersDisposed;
public FindCallingScrollObjective()
{
}
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( (int) 0 ); // version
writer.WriteEncodedInt( (int) m_SkitteringHoppersKilled );
writer.Write( (bool) m_HealConversationShown );
writer.Write( (bool) m_SkitteringHoppersDisposed );
}
}
public class FindHorusAboutRewardObjective : QuestObjective
{
public override object Message => 1060126;
public FindHorusAboutRewardObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new HorusRewardConversation() );
}
}
public class FindMardothAboutKronusObjective : QuestObjective
{
public override object Message => 1060127;
public FindMardothAboutKronusObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new MardothKronusConversation() );
}
}
public class FindWellOfTearsObjective : QuestObjective
{
public override object Message => 1060128;
public FindWellOfTearsObjective()
{
}
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D( 2080, 1346, 10, 10 );
private bool m_Inside;
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 UseCallingScrollObjective()
{
}
}
public class FindMardothEndObjective : QuestObjective
{
private bool m_Victory;
public override object Message
{
get
{
if ( m_Victory )
{
/* Victory! You have done as Mardoth has asked of you.
* Take as much of your foe's loot as you can carry
* and return to Mardoth for your reward.
*/
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 FindMardothEndObjective( bool victory )
{
m_Victory = victory;
}
// Serialization
public FindMardothEndObjective()
{
}
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( (int) 0 ); // version
writer.Write( (bool) m_Victory );
}
}
public class FindBankObjective : QuestObjective
{
public override object Message => 1060134;
public FindBankObjective()
{
}
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 CashBankCheckObjective()
{
}
public override void OnComplete()
{
System.AddConversation( new BankerConversation() );
}
}
}
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))
if (SummonFamiliarSpell.Table[System.From] is HordeMinionFamiliar hmf && hmf.InRange(System.From, 5) &&
hmf.TargetLocation == null)
{
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());
}
}
}