#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class CrystalCaveBarrier : Item
|
||||
{
|
||||
[Constructable]
|
||||
public CrystalCaveBarrier() : base( 0x3967 )
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
if ( m.AccessLevel > AccessLevel.Player )
|
||||
return true;
|
||||
|
||||
bool sendMessage = m.Player;
|
||||
|
||||
if ( m is BaseCreature )
|
||||
m = ((BaseCreature)m).ControlMaster;
|
||||
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if ( pm != null )
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is DarkTidesQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );
|
||||
|
||||
if ( obj != null && obj.Completed )
|
||||
{
|
||||
if ( sendMessage )
|
||||
m.SendLocalizedMessage( 1060648 ); // With Horus' permission, you are able to pass through the barrier.
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( sendMessage )
|
||||
m.SendLocalizedMessage( 1060649, "", 0x66D ); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public CrystalCaveBarrier( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Engines/Quests/Dark Tides/Items/DarkTidesHorn.cs
Normal file
44
Scripts/Engines/Quests/Dark Tides/Items/DarkTidesHorn.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class DarkTidesHorn : HornOfRetreat
|
||||
{
|
||||
public override bool ValidateUse( Mobile from )
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
return ( pm != null && pm.Quest is DarkTidesQuest );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DarkTidesHorn()
|
||||
{
|
||||
DestLoc = new Point3D( 2103, 1319, -68 );
|
||||
DestMap = Map.Malas;
|
||||
}
|
||||
|
||||
public DarkTidesHorn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class DarkTidesTeleporter : DynamicTeleporter
|
||||
{
|
||||
[Constructable]
|
||||
public DarkTidesTeleporter()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is DarkTidesQuest )
|
||||
{
|
||||
if ( qs.IsObjectiveInProgress( typeof( FindMaabusTombObjective ) ) )
|
||||
{
|
||||
loc = new Point3D( 2038, 1263, -90 );
|
||||
map = Map.Malas;
|
||||
qs.AddConversation( new RadarConversation() );
|
||||
return true;
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindCrystalCaveObjective ) ) )
|
||||
{
|
||||
loc = new Point3D( 1194, 521, -90 );
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( FindCityOfLightObjective ) ) )
|
||||
{
|
||||
loc = new Point3D( 1091, 519, -90 );
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
else if ( qs.IsObjectiveInProgress( typeof( ReturnToCrystalCaveObjective ) ) )
|
||||
{
|
||||
loc = new Point3D( 1194, 521, -90 );
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
else if ( DarkTidesQuest.HasLostCallingScroll( player ) )
|
||||
{
|
||||
loc = new Point3D( 1194, 521, -90 );
|
||||
map = Map.Malas;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public DarkTidesTeleporter( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
166
Scripts/Engines/Quests/Dark Tides/Items/KronusScroll.cs
Normal file
166
Scripts/Engines/Quests/Dark Tides/Items/KronusScroll.cs
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class KronusScroll : QuestItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1060149; } } // Calling of Kronus
|
||||
|
||||
[Constructable]
|
||||
public KronusScroll() : base( 0x227A )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x44E;
|
||||
}
|
||||
|
||||
public KronusScroll( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
DarkTidesQuest qs = player.Quest as DarkTidesQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return true;
|
||||
|
||||
/*return !( qs.IsObjectiveInProgress( typeof( FindCallingScrollObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( FindMardothAboutKronusObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( FindWellOfTearsObjective ) )
|
||||
|| qs.IsObjectiveInProgress( typeof( UseCallingScrollObjective ) ) );*/
|
||||
return false;
|
||||
}
|
||||
|
||||
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D( 2080, 1346, 10, 10 );
|
||||
private static readonly Map m_WellOfTearsMap = Map.Malas;
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from ) )
|
||||
return;
|
||||
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if ( pm != null )
|
||||
{
|
||||
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 ( 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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class CallingTimer : Timer
|
||||
{
|
||||
private PlayerMobile m_Player;
|
||||
private int m_Step;
|
||||
|
||||
public CallingTimer( PlayerMobile player ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ), 6 )
|
||||
{
|
||||
Priority = TimerPriority.TwentyFiveMS;
|
||||
|
||||
m_Player = player;
|
||||
m_Step = 0;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Player.Deleted )
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !m_Player.Mounted )
|
||||
m_Player.Animate( Utility.RandomBool() ? 16 : 17, 7, 1, true, false, 0 );
|
||||
|
||||
if ( m_Step == 4 )
|
||||
{
|
||||
int baseX = KronusScroll.m_WellOfTearsArea.X;
|
||||
int baseY = KronusScroll.m_WellOfTearsArea.Y;
|
||||
int width = KronusScroll.m_WellOfTearsArea.Width;
|
||||
int height = KronusScroll.m_WellOfTearsArea.Height;
|
||||
Map map = KronusScroll.m_WellOfTearsMap;
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( m_Player.Location, m_Player.Map, TimeSpan.FromSeconds( 1.0 ) ), 0, 0, 0, 0x13C4 );
|
||||
Effects.PlaySound( m_Player.Location, m_Player.Map, 0x243 );
|
||||
|
||||
for ( int i = 0; i < 15; i++ )
|
||||
{
|
||||
int x = baseX + Utility.Random( width );
|
||||
int y = baseY + Utility.Random( height );
|
||||
int z = map.GetAverageZ( x, y );
|
||||
|
||||
Point3D from = new Point3D( x, y, z + Utility.RandomMinMax( 5, 20 ) );
|
||||
Point3D to = new Point3D( x, y, z );
|
||||
|
||||
int hue = Utility.RandomList( 0x481, 0x482, 0x489, 0x497, 0x66D );
|
||||
|
||||
Effects.SendPacket( from, map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x36D4, from, to, 0, 0, false, true, hue, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_Step < 5 )
|
||||
{
|
||||
m_Player.Frozen = true;
|
||||
}
|
||||
else // Cast completed
|
||||
{
|
||||
m_Player.Frozen = false;
|
||||
|
||||
SummonedPaladin.BeginSummon( m_Player );
|
||||
}
|
||||
|
||||
m_Step++;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
77
Scripts/Engines/Quests/Dark Tides/Items/KronusScrollBox.cs
Normal file
77
Scripts/Engines/Quests/Dark Tides/Items/KronusScrollBox.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class KronusScrollBox : MetalBox
|
||||
{
|
||||
[Constructable]
|
||||
public KronusScrollBox()
|
||||
{
|
||||
ItemID = 0xE80;
|
||||
Movable = false;
|
||||
|
||||
for ( int i = 0; i < 40; i++ )
|
||||
{
|
||||
Item scroll = Loot.RandomScroll( 0, 15, SpellbookType.Necromancer );
|
||||
scroll.Movable = false;
|
||||
DropItem( scroll );
|
||||
}
|
||||
}
|
||||
|
||||
public KronusScrollBox( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if ( pm != null && pm.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is DarkTidesQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( FindCallingScrollObjective ) );
|
||||
|
||||
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 ( obj != null && !obj.Completed )
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage( 1060148, "", 0x41 ); // You were unable to take the scroll.
|
||||
scroll.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDoubleClick( from );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
158
Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs
Normal file
158
Scripts/Engines/Quests/Dark Tides/Items/MaabusCoffin.cs
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class MaabusCoffin : BaseAddon
|
||||
{
|
||||
private Maabus m_Maabus;
|
||||
private Point3D m_SpawnLocation;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Maabus Maabus { get { return m_Maabus; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D SpawnLocation { get { return m_SpawnLocation; } set { m_SpawnLocation = value; } }
|
||||
|
||||
[Constructable]
|
||||
public MaabusCoffin()
|
||||
{
|
||||
AddComponent( new MaabusCoffinComponent( 0x1C2B, 0x1C2B ), -1, -1, 0 );
|
||||
|
||||
AddComponent( new MaabusCoffinComponent( 0x1D16, 0x1C2C ), 0, -1, 0 );
|
||||
AddComponent( new MaabusCoffinComponent( 0x1D17, 0x1C2D ), 1, -1, 0 );
|
||||
AddComponent( new MaabusCoffinComponent( 0x1D51, 0x1C2E ), 2, -1, 0 );
|
||||
|
||||
AddComponent( new MaabusCoffinComponent( 0x1D4E, 0x1C2A ), 0, 0, 0 );
|
||||
AddComponent( new MaabusCoffinComponent( 0x1D4D, 0x1C29 ), 1, 0, 0 );
|
||||
AddComponent( new MaabusCoffinComponent( 0x1D4C, 0x1C28 ), 2, 0, 0 );
|
||||
}
|
||||
|
||||
public void Awake( Mobile caller )
|
||||
{
|
||||
if ( m_Maabus != null || m_SpawnLocation == Point3D.Zero )
|
||||
return;
|
||||
|
||||
foreach ( MaabusCoffinComponent c in Components )
|
||||
c.TurnToEmpty();
|
||||
|
||||
m_Maabus = new Maabus();
|
||||
|
||||
m_Maabus.Location = m_SpawnLocation;
|
||||
m_Maabus.Map = Map;
|
||||
|
||||
m_Maabus.Direction = m_Maabus.GetDirectionTo( caller );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 7.5 ), new TimerCallback( BeginSleep ) );
|
||||
}
|
||||
|
||||
public void BeginSleep()
|
||||
{
|
||||
if ( m_Maabus == null )
|
||||
return;
|
||||
|
||||
Effects.PlaySound( m_Maabus.Location, m_Maabus.Map, 0x48E );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 2.5 ), new TimerCallback( Sleep ) );
|
||||
}
|
||||
|
||||
public void Sleep()
|
||||
{
|
||||
if ( m_Maabus == null )
|
||||
return;
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( m_Maabus.Location, m_Maabus.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0x7E7 );
|
||||
Effects.PlaySound( m_Maabus.Location, m_Maabus.Map, 0x1FE );
|
||||
|
||||
m_Maabus.Delete();
|
||||
m_Maabus = null;
|
||||
|
||||
foreach ( MaabusCoffinComponent c in Components )
|
||||
c.TurnToFull();
|
||||
}
|
||||
|
||||
public MaabusCoffin( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Maabus );
|
||||
writer.Write( (Point3D) m_SpawnLocation );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Maabus = reader.ReadMobile() as Maabus;
|
||||
m_SpawnLocation = reader.ReadPoint3D();
|
||||
|
||||
Sleep();
|
||||
}
|
||||
}
|
||||
|
||||
public class MaabusCoffinComponent : AddonComponent
|
||||
{
|
||||
private int m_FullItemID;
|
||||
private int m_EmptyItemID;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D SpawnLocation
|
||||
{
|
||||
get { return Addon is MaabusCoffin ? ((MaabusCoffin)Addon).SpawnLocation : Point3D.Zero; }
|
||||
set { if ( Addon is MaabusCoffin ) ((MaabusCoffin)Addon).SpawnLocation = value; }
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent( int itemID ) : this( itemID, itemID )
|
||||
{
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent( int fullItemID, int emptyItemID ) : base( fullItemID )
|
||||
{
|
||||
m_FullItemID = fullItemID;
|
||||
m_EmptyItemID = emptyItemID;
|
||||
}
|
||||
|
||||
public void TurnToEmpty()
|
||||
{
|
||||
ItemID = m_EmptyItemID;
|
||||
}
|
||||
|
||||
public void TurnToFull()
|
||||
{
|
||||
ItemID = m_FullItemID;
|
||||
}
|
||||
|
||||
public MaabusCoffinComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) m_FullItemID );
|
||||
writer.Write( (int) m_EmptyItemID );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_FullItemID = reader.ReadInt();
|
||||
m_EmptyItemID = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
146
Scripts/Engines/Quests/Dark Tides/Items/ScrollOfAbraxus.cs
Normal file
146
Scripts/Engines/Quests/Dark Tides/Items/ScrollOfAbraxus.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class ScrollOfAbraxus : QuestItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1028827; } } // Scroll of Abraxus
|
||||
|
||||
[Constructable]
|
||||
public ScrollOfAbraxus() : base( 0x227B )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override bool CanDrop( PlayerMobile player )
|
||||
{
|
||||
DarkTidesQuest qs = player.Quest as DarkTidesQuest;
|
||||
|
||||
if ( qs == null )
|
||||
return true;
|
||||
|
||||
//return !( qs.IsObjectiveInProgress( typeof( RetrieveAbraxusScrollObjective ) ) || qs.IsObjectiveInProgress( typeof( ReadAbraxusScrollObjective ) ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
PlayerMobile pm = RootParent as PlayerMobile;
|
||||
|
||||
if ( pm != null )
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is DarkTidesQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( RetrieveAbraxusScrollObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendGump( new ScrollOfAbraxusGump() );
|
||||
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if ( pm != null )
|
||||
{
|
||||
QuestSystem qs = pm.Quest;
|
||||
|
||||
if ( qs is DarkTidesQuest )
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective( typeof( ReadAbraxusScrollObjective ) );
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public ScrollOfAbraxus( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ScrollOfAbraxusGump : Gump
|
||||
{
|
||||
public ScrollOfAbraxusGump() : base( 150, 50 )
|
||||
{
|
||||
AddPage( 0 );
|
||||
|
||||
AddImage( 0, 0, 1228 );
|
||||
AddImage( 340, 255, 9005 );
|
||||
|
||||
/* Security at the Crystal Cave<BR><BR>
|
||||
*
|
||||
* We have taken great measuresto ensure the safety of the
|
||||
* Scroll of Calling, which we have so valiantly taken from
|
||||
* the Necromancer Maabus during the battle of the wood
|
||||
* nearly 200 years ago.<BR><BR>
|
||||
*
|
||||
* The scroll must never fall into the hands of the
|
||||
* Necromancers again, lest they use it to summon the ancient
|
||||
* daemon Kronus. The scroll of calling is a necessity in the
|
||||
* series of dark rites the Necromancers must perform to once again
|
||||
* re-awaken Kronus.<BR><BR>
|
||||
*
|
||||
* Should Kronus ever rise again, the days of the Paladins, and
|
||||
* indeed humanity as we know it will be numbered.<BR><BR>
|
||||
*
|
||||
* For this reason, we have posted the honorable Horus, former
|
||||
* General of the Northern Legions to guard the entrance of the
|
||||
* Crystal Cave where we keep the Scroll of Calling. Horus was
|
||||
* infused with magical life from the tree Urywen during his last
|
||||
* battle. The power gave him eternal life, but it also,
|
||||
* unfortunately, took his eye sight.<BR><BR>
|
||||
*
|
||||
* Since Horus cannot see those he admits to the Crystal Cave,
|
||||
* he will only allow those that know the secret password to enter.
|
||||
* Speak the following word to Horus and he shall grant you passage
|
||||
* to the Crystal Cave:<BR><BR>
|
||||
*
|
||||
* <I>Urywen</I><BR><BR>
|
||||
*
|
||||
* Do not speak this password anywhere except when seeking passage
|
||||
* into the Crystal Cave, as our adversaries are lurking in the
|
||||
* shadows – they are everywhere.<BR><BR>Go with the light, friend.<BR><BR>
|
||||
*
|
||||
* <I>- Frater Melkeer</I>
|
||||
*/
|
||||
AddHtmlLocalized( 25, 36, 350, 210, 1060116, 1, false, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
|
||||
namespace Server.Engines.Quests.Necro
|
||||
{
|
||||
public class VaultOfSecretsBarrier : Item
|
||||
{
|
||||
[Constructable]
|
||||
public VaultOfSecretsBarrier() : base( 0x49E )
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
if ( m.AccessLevel > AccessLevel.Player )
|
||||
return true;
|
||||
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if ( pm != null && pm.Profession == 4 )
|
||||
{
|
||||
m.SendLocalizedMessage( 1060188, "", 0x24 ); // The wicked may not enter!
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnMoveOver( m );
|
||||
}
|
||||
|
||||
public VaultOfSecretsBarrier( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue