#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
135
Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs
Normal file
135
Scripts/Engines/Quests/The Summoning/Items/BellOfTheDead.cs
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class BellOfTheDead : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1050018; } } // bell of the dead
|
||||
|
||||
[Constructable]
|
||||
public BellOfTheDead() : base( 0x91A )
|
||||
{
|
||||
Hue = 0x835;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
private Chyloth m_Chyloth;
|
||||
private SkeletalDragon m_Dragon;
|
||||
private bool m_Summoning;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public Chyloth Chyloth
|
||||
{
|
||||
get{ return m_Chyloth; }
|
||||
set{ m_Chyloth = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public SkeletalDragon Dragon
|
||||
{
|
||||
get{ return m_Dragon; }
|
||||
set{ m_Dragon = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public bool Summoning
|
||||
{
|
||||
get{ return m_Summoning; }
|
||||
set{ m_Summoning = value; }
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 2 ) )
|
||||
BeginSummon( from );
|
||||
else
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
|
||||
public virtual void BeginSummon( Mobile from )
|
||||
{
|
||||
if ( m_Chyloth != null && !m_Chyloth.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050010 ); // The ferry man has already been summoned. There is no need to ring for him again.
|
||||
}
|
||||
else if ( m_Dragon != null && !m_Dragon.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050017 ); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.
|
||||
}
|
||||
else if ( !m_Summoning )
|
||||
{
|
||||
m_Summoning = true;
|
||||
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x100 );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 8.0 ), new TimerStateCallback( EndSummon ), from );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void EndSummon( object state )
|
||||
{
|
||||
Mobile from = (Mobile)state;
|
||||
|
||||
if ( m_Chyloth != null && !m_Chyloth.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050010 ); // The ferry man has already been summoned. There is no need to ring for him again.
|
||||
}
|
||||
else if ( m_Dragon != null && !m_Dragon.Deleted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1050017 ); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.
|
||||
}
|
||||
else if ( m_Summoning )
|
||||
{
|
||||
m_Summoning = false;
|
||||
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
||||
loc.Z -= 16;
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( loc, Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
|
||||
Effects.PlaySound( loc, Map, 0x1FE );
|
||||
|
||||
m_Chyloth = new Chyloth();
|
||||
|
||||
m_Chyloth.Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo( loc )));
|
||||
m_Chyloth.MoveToWorld( loc, Map );
|
||||
|
||||
m_Chyloth.Bell = this;
|
||||
m_Chyloth.AngryAt = from;
|
||||
m_Chyloth.BeginGiveWarning();
|
||||
m_Chyloth.BeginRemove( TimeSpan.FromSeconds( 40.0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public BellOfTheDead( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Chyloth );
|
||||
writer.Write( (Mobile) m_Dragon );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Chyloth = reader.ReadMobile() as Chyloth;
|
||||
m_Dragon = reader.ReadMobile() as SkeletalDragon;
|
||||
|
||||
if ( m_Chyloth != null )
|
||||
m_Chyloth.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Scripts/Engines/Quests/The Summoning/Items/ChylothShroud.cs
Normal file
32
Scripts/Engines/Quests/The Summoning/Items/ChylothShroud.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class ChylothShroud : Item
|
||||
{
|
||||
[Constructable]
|
||||
public ChylothShroud() : base( 0x204E )
|
||||
{
|
||||
Hue = 0x846;
|
||||
Layer = Layer.OuterTorso;
|
||||
}
|
||||
|
||||
public ChylothShroud( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Engines/Quests/The Summoning/Items/ChylothStaff.cs
Normal file
35
Scripts/Engines/Quests/The Summoning/Items/ChylothStaff.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class ChylothStaff : BlackStaff
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041111; } } // a magic staff
|
||||
|
||||
[Constructable]
|
||||
public ChylothStaff()
|
||||
{
|
||||
Hue = 0x482;
|
||||
}
|
||||
|
||||
public ChylothStaff( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Engines/Quests/The Summoning/Items/GoldenSkull.cs
Normal file
35
Scripts/Engines/Quests/The Summoning/Items/GoldenSkull.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class GoldenSkull : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061619; } } // a golden skull
|
||||
|
||||
[Constructable]
|
||||
public GoldenSkull() : base( Utility.Random( 0x1AE2, 3 ) )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8A5;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GoldenSkull( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Engines/Quests/The Summoning/Items/GrandGrimoire.cs
Normal file
36
Scripts/Engines/Quests/The Summoning/Items/GrandGrimoire.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class GrandGrimoire : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1060801; } } // The Grand Grimoire
|
||||
|
||||
[Constructable]
|
||||
public GrandGrimoire() : base( 0xEFA )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x835;
|
||||
Layer = Layer.OneHanded;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GrandGrimoire( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs
Normal file
64
Scripts/Engines/Quests/The Summoning/Items/SummoningAltar.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class SummoningAltar : AbbatoirAddon
|
||||
{
|
||||
private BoneDemon m_Daemon;
|
||||
|
||||
public BoneDemon Daemon
|
||||
{
|
||||
get{ return m_Daemon; }
|
||||
set
|
||||
{
|
||||
m_Daemon = value;
|
||||
CheckDaemon();
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckDaemon()
|
||||
{
|
||||
if ( m_Daemon == null || !m_Daemon.Alive )
|
||||
{
|
||||
m_Daemon = null;
|
||||
Hue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0x66D;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummoningAltar()
|
||||
{
|
||||
}
|
||||
|
||||
public SummoningAltar( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Daemon );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Daemon = reader.ReadMobile() as BoneDemon;
|
||||
|
||||
CheckDaemon();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue